1.Functional Description
1.1Purpose
This function will remove records from either the Sales Order Header (F4201) table or the Sales Order
Detail (F4211) table based on the Mode passed in.
1.2Setup Notes and Prerequisites
Records to be purged must first be successfully saved to the Sales Header Ledger (F42019) and Sales
Detail Ledger (F42119) files. Use business functions B4200570 and B4200260 to do this
1.3Special Logic
None.
2.2Related Tables
Table Table Description
F4201Sales Order Header
F4211Sales Order Detail
2.3Related Business Functions
Source NameFunction Name
2.4Processing
1.If DeleteHeaderOrDetail equals 1
If the Document Number, Document Type and Key Company is not passed in exit the function without
doing anything
delete all records in the Sales Header (F4201) table with the key equal to the Document Number,
Document Type and Key Company passed in.
2.If DeleteHeaderOrDetail equals 2
If the Document Number, Document Type, Key Company and Line Number are not passed in exit the
function without doing anything
Delete all records in the Sales Detail (F4211) table with the key equal to the Document Number,
Document Type, Key Company and Line Number passed in.
3.If an error occurs with the delete function return ErrorID '9999' if suppress error message is
not a '1'
D4200580 - DeleteSalesHeaderAndDetail
Special Input Expected
DOCODocument Number
DCTODocument Type
KCOOKey Company
LNIDLine Number
MODEDeleteHeaderOrDetail1 = Delete Header 2 = Delete Detail
EV01SuppressErrorMessage
Special Output Returned
DTAIErrorID
^
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnDocumentNumber | DOCO | MATH_NUMERIC | NONE | NONE |
A number that identifies an original document. This document can be a voucher, a sales order, an invoice, unapplied cash, a journal entry,
| ||||
szDocumentType | DCTO | char | NONE | NONE |
A user defined code (00/DT) that identifies the type of document. This code also indicates the origin of the transaction. J.D. Edwards has
| ||||
szKeyCompany | KCOO | char | NONE | NONE |
A number that, along with order number and order type, uniquely identifies an order document (such as a purchase order, a contract, a
| ||||
mnLineNumber | LNID | MATH_NUMERIC | NONE | NONE |
A number that identifies multiple occurrences, such as line numbers on a purchase order or other document. Generally, the system assigns
| ||||
cDeleteHeaderOrDetail | MODE | char | NONE | NONE |
| ||||
szErrorMessage | DTAI | char | NONE | NONE |
| ||||
cSuppressErrorMessage | EV01 | char | NONE | NONE |
| ||||
cErrorCode | ERRC | char | NONE | NONE |
This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document
| ||||
cPurgeTextOrNot | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. |
None |
F4201 Sales Order Header File | ||||
F4211 Sales Order Detail File |