Functional Description
Purpose
This business function is used to adjust the Order Gross Amount (OTOT) on the sales order header
(F4201). It retrieves the sales order header record by DOCO, DCTO and KCOO. It adds the current amount(s)
to the fetched OTOT and subtracts the previous amount(s) from OTOT and updates the table F4201 with
the calculated OTOT. The foreign amounts are used only if the foreign currency flag is turned on. If
USER sent is blant or null, this business function calls the 'Get Audit Info' business function to
retrieve the proper values for USER, JOBN, UPMJ and TDAY which are used to update the F4201 record. If
USER is not balnk or null, then the passed values of JOBN, UPMJ and TDAY are used for the update of
Database.
The input parameters for this function are DOCO, DCTO, KCOO, MATH06 (Current Extended Amount -
Domestic), MATH07 (Current Extended Amount - Foreign), MATH08 (Previous Extended Amount - Domestic), MATH09
(Previous Extended Amount - Foreign), CRYR (Currency conversion on = N if not on), PID, USER, JOBN,
UPMJ and TDAY.
There are no ouput parameters for this function as it does the update of the table and doesn't pass
anything back to the calling function.
Setup Notes and Prerequisites
This function is called only if the extended amount changed (AEXP) and the order is not a future
commit.
Work fields are passed with previous and current extended amounts.
Special Logic
Foreign amounts should be updated only if Foreign Currency is turned on.
Technical Specification
2.2Related Tables
Table Table Description
F4201Sales Order Header
2.3Related Business Functions
Source NameFunction Name
2.4Processing
Retrieve the sales order header record by DOCO,DCTO,KCOO.
Subtract MATH08 (Previous domestic extended amount) from OTOT (Domestic Order Total)
Add MATH06 (Current domestic extended amount) to OTOT (Domestic Order Total)
Subtract MATH09 (Previous foreign extended amount) to FAP (Foreign Order Total) if foreign currency
is on.(CRYR not equal N).
Add MATH07 (Current foreign extended amount) to FAP (Foreign Order Total) if foreign currency is
on.(CRYR not equal N).
Update sales order header
Added 7/11/95 - If USER sent is blank or null, call Get Audit Info to retrieve the proper values for
User, Job, Date Updated, and Time of Day. Use this information to update to the database record
(F4201). If the value in USER is not blank or null, then load the proper user, job, date updated, and time
of day value into the record before updating it.
^
D4200250 - Update Order Total In F4201
Special Input Expected
DOCODocumentOrderInvoiceE
DCTOOrderType
KCOOCompanyKeyOrderNo
MATH06MathNumeric06Current Extended Amount - Domestic
MATH07MathNumeric07Current Extended Amount - Foreign
MATH08MathNumeric08Previous Extended Amount - Domestic
MATH09MathNumeric09Previous Extended Amount - Foreign
CRYRCurrency On Y/N/Z Currency Conversion On = N if not on
PIDProgramRequired parameter.
USERUserOptional
JOBNJobOptional
UPMJDate UpdatedOptional
TDAYTime of DayOptional
^
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnDocOrderInvoiceE | 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,
| ||||
szOrderType | 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
| ||||
mnDomesticCrntExtndedAmnt | MATH06 | MATH_NUMERIC | NONE | NONE |
Special Input Expected
| ||||
mnForeignCrntExtndedAmnt | MATH07 | MATH_NUMERIC | NONE | NONE |
Special Input Expected
| ||||
mnDomesticPrevExtndedAmnt | MATH08 | MATH_NUMERIC | NONE | NONE |
Special Input Expected
| ||||
mnForeignPrevExtndedAmnt | MATH09 | MATH_NUMERIC | NONE | NONE |
Special Input Expected
| ||||
cCurrencyOnYNZ | CRYR | char | NONE | NONE |
A code that specifies whether to use multi-currency accounting, and the method of multi-currency accounting to use:
Codes are:
N Do not
| ||||
szProgram | PID | char | NONE | NONE |
The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry
| ||||
szUser | USER | char | NONE | NONE |
The code that identifies a user profile. | ||||
szJob | JOBN | char | NONE | NONE |
The code that identifies the work station ID that executed a particular job. | ||||
jdDateUpdated | UPMJ | JDEDATE | NONE | NONE |
The date that specifies the last update to the file record. | ||||
mnTimeOfDay | TDAY | MATH_NUMERIC | NONE | NONE |
The computer clock in hours:minutes:seconds. | ||||
mnJobnumberA | JOBS | MATH_NUMERIC | OPT | NONE |
The job number (work station ID) which executed the particular job. | ||||
szComputerID | CTID | char | OPT | NONE |
B9800100 Get Audit Information |
F4201 Sales Order Header File |