F4211Businessfunction Notes
F4211Businessfunction Notes
Purpose
This business function will provide sales order detail level editing and
defaulting process that includes:
Field level edits for correct information
Field level defaults from Data Dictionary
· A record will be written to the Sales Detail Work File (F42UI11)
if no errors are found. If a record already exists in the work file,
the record will be retrieved and updated with the changes.
Prior to calling this function, you must first retrieve your computer
ID using GetLocalComputerID (B9800150). This will then be passed in
as a parameter.
If only warnings are detected, this business function will still
write to the detail work file. The calling application should decide
whether F4211EndDocument should be called.
You must define work fields in your application to hold all the
output parameters of this function. Some of which will be passed to
subsequent edit object modules (i.e. End Doc).
This function will not actually write or update to the Sales Order
Detail file, you must call F4211FSEndDoc manually for that to happen.
The calling application will have to store the Line Number of the
work file (XLIN-parm) and the Last Line Number used (LNIX-parm) in
the grid column and form control respectively. These line numbers
are needed by this business function to correctly process the work
file.
If you are calling the SOE edit objects from an interactive
application, you may want this function to maintain the current order
totals (both domestic and foreign) and send them back to your
application so that you can display them on the screen. To do so,
you must send in the current order totals for domestic price/cost and
foreign price/cost.
· If your application handles changes to a detail line, you must use
the CM-Record Written to Work File flag to hold the value returned from
Edit Line. When the same detail line is passed into Edit Line for edits
the second time, Edit Line needs this flag to determine whether a
record has been written to the F42UI11 work file.
Special Logic
If errors are detected, the business function will not write any
detail work file and F4211EndDocument should not be called.
Use Source of Data (EV06 in parameter) to copy data from the
following files:
·
' ' = Input Parameters. You can call this function by passing to
it all of the Sales Order Header fields that you would like to
edit. Please see the 2.1 parameter section for the list of
fields to be passed into this function.
'1' = F4201 and F4211
'2' = F4201/F42019 and F2199
'3' = F4001Z and F4011Z
'4' = F47011 and F47012
'5' = F42UI01 and F42UI11 (work file)
'6' = F42UI01 and F42UI11 (cache)
'7' = F42UI12
NOTE: Any data passed into the data structure will have a higher
precedence than the data copied from one of the files listed
above.
Technical Specification
2.2 Related Tables
Table Table Description
F0101 Address Book
F0301 Customer Master
F41001 Branch/Plant Constants
F40203 Status Flow by Order Type
F40205 Line Type Constants
F4009 Distribution Constants
F0014 Payment Terms
F4201 SO Header
F0006 Business Unit Master
F4100 Location Master
F4020 Freight Table
F4101 Item Master
F4102 Branch/Plant Inventory
F41002+3 UOM Conversion
F4105 Cost Ledger
F4106 Base Price
F4104 Item XREF
F4207 Inventory Pricing Rules
F4208 Customer Pricing Rules
2.4 Processing
1. If ACTN-parm is blank, default in 'A' for Add mode.
5. If the Line Type (LNTY-parm) is blank, default in the Line Type from
the Processing Options. If not blank, verify Line Type (LNTY-parm)
against XS40205. Use GetLineTypeConstants (B4000260.C) Save the
Inventory Interface (LFIVI) to IVI-wf. If line type is ' ', treat it
as a stock line item by assigning 'Y' to IVI-wf.
Save the following columns to work fields: LND2, RGSN, TXYN, TX01,
GLC, AFT, GWO, and LND1.
12.If ADD mode, default the following information from the header
record:
AN8-dwf = AN8-hwf;
16.If the Original Promised Delivery Date (OPDJ) is blank and in Add
mode, default in the Scheduled Delivery Date (RSDJ).
18.If Promised Ship Date (PDDJ-parm) is greater than the today's date
(TRDJ-hwf), issue error '4136'. Use VerifyDate2AfterDate1
(B4000790.C)
22.If the Price Effective Date - parm is not NULL, use it.
If ADD mode,
SFXO-dwf = '000'
TXA1-parm = TXA1-hwf;
EXR1-parm = EXR1-hwf;
RCD-parm = RCD from PO;
SLSM-parm = CMC1-hwf;
SLM2-parm = CMC2-hwf;
SLCM-parm = CMR1-hwf;
SLC2-parm = CMR2-hwf;
CARS-parm = CARS-hwf;
TRDJ-dwf = TRDJ-hwf;
AFT-parm = LFAFT;
EMCU-dwf = MCU-hwf;
VR01-dwf = VR01-hwf;
VR02-dwf = VR02-hwf;
If ROUT-parm == ' ', ROUT-parm = ROUT-hwf;
If STOP-parm == ' ', STOP-parm = STOP-hwf;
If ZON-parm == ' ', ZON-parm = ZON-hwf;
TRDC-dwf = TRDC-hwf;
If PRIO-parm == ' ', PRIO-parm = PRIO-hwf;
If BACK-dwf == ' ', BACK-dwf = BACK-hwf;
If ASN-parm == ' ', ASN-parm = SHASN-hwf;
If FRTH-dwf == ' ', FRTH-dwf = SHFRTH;
If APTS-dwf == ' ', APTS-dwf = APTS - hwf;
CRCD-dwf = CRCD-hwf;
CRR-dwf = CRR-hwf;
OPDJ-dwf = PDDJ-dwf;
Notes:
If LTTR-parm is >= '900' or LTTR-parm == ' '
Line Status Code => Last Status (WF)
else
Line Status Code <= LTTR-parm
29.If Text line (LFTXYN == 'Y'), process text line item. Then, skip all
remaining steps.
38.If the Back Ordered Qty-parm is not 0 and the Partial Order Hold
Processing Option is not blank, set the Partial Order Hold by
concatenating the Partial Order Hold code to the HCDS string in the
F42UI11.
40.Get the fiscal year and century and store in the F42UI11 record.
41.If the Order Number parameter is blank and the flag for getting the
order number in Edit Line is set (Sales Order Flags[16] == '1') call
F4201Get Order No From Next Number (B4200030.c) to get the next order
number and update the header record.