0% found this document useful (0 votes)
1K views9 pages

F4211Businessfunction Notes

This document provides a functional description and technical specifications for a business function that performs sales order detail line editing and defaulting. It includes field level edits, defaulting values from reference files, and writing records to a work file. Setup notes require retrieving computer IDs, defining work fields, and calling additional functions to write to the sales order detail file. Special logic handles errors, different processing modes, and bypassing edits in certain conditions.

Uploaded by

monica liu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views9 pages

F4211Businessfunction Notes

This document provides a functional description and technical specifications for a business function that performs sales order detail line editing and defaulting. It includes field level edits, defaulting values from reference files, and writing records to a work file. Setup notes require retrieving computer IDs, defining work fields, and calling additional functions to write to the sales order detail file. Special logic handles errors, different processing modes, and bypassing edits in certain conditions.

Uploaded by

monica liu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 9

Functional Description

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.

Setup Notes and Prerequisites

 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.

 Parameter fields are denoted by -parm, header work file fields by


-hwf, and detail work file fields by -dwf. Variables that are
defined and used only within this program are denoted by (WF).
 If Processing Mode (EV05-hwf) is set to '1', this function is
running in copy mode. That means the detail work file has already
been populated with values from the original order header before
this function is called. Therefore, this function will NOT attempt
to default values into any column in the table (F42UI11) which
doesn't have a corresponding column in the parameter list. However,
the columns which are represented in the parameter list will still
be updated to the detail work file.
 Suppress Processes (MATH01) - Specify the processes to be suppressed
by passing in the number assigned to the option. In order to
specify a combination, add the number assigned to the option
together and send in the result. For example, to suppress the
retrieval of Processing Options (2) and the Production Allocation
Warning (4), simply take 2+4 = 6 and pass 6 into this field.
· Options:
0 = Default
1 = Writing Records When Warnings
2 = Retrieve Processing Options
4 = Production Allocation Warning
8 = Advanced Pricing Server
16 = Inventory Commitments - WasB4200850Called
32 = Inventory Commitments - ChangesMadeToQty
64 =
Note:
(2) Processing Options for P4210 are retrieved depending on the version
that is passed in, using the API AllocatePOVersionData in Edit Line.
But, the retrieving of processing options could be skipped (depending on
the usability of Sales Order Entry's (P4210) Processing Options

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.3 Related Business Functions


Source Name Function Name
RETCOBU.C Retrieve Company From Business Unit
B0000021.C FormatSubledger
B0000027.C CurrencyConvForAndDom
B0000030.C Get Exchange Rate
X0903.C Edit Date
N3800040.C F38012 Agreement Transaction Server
N3800050.C F38010 Agreement Search
B3800080.C Agreement Cache For Sales Order File
B4000150.C Get Branch Constants
B4000260.C Get Line Type Constants
B4000260.C Verify Activity Rule Status Code
B4000360.C Check Location Master
B4000370.C Get Default Branch
B4000450.C Convert Short Item to Long Item
B4000520.C Get Item UoM Conversion Factor
B4000590.C Verify Line Type
B4000670.C Get Item Unit Of Measure
B4000790.C Verify Date 2 After Date 1
B4000800.C Edit Document Type Not Blank
B4000870.C Standard Pricing Adjustments
B4000880.C Verify And Get F0101 For OP
B4000950.C Return Item Stocking Type
B4000960.C Verify Override Next Status Code
B4002000.C Compute Unit Or Extended Amount
B4100205.C Get Item Master Price Info
B4100210.C Check Item Branch
X4101.C Verify And Get Item Master
X4101.C Return Primary Item Number
XF4105.C Get Item Cost
B4200030.C F4201 Get Order Number From Next Nu.
B4200070.C Get Sales Base Price
B4200080.C Convert Domestic And Foreign Amt
B4200090.C Verify Tax Explanation Code
B4200140.C Get Ship To Billing Instructions
B4200150.C Verify Sales Order Before Update
B4200160.C Get Freight Rate Code From F4020
B4200270.C Check Item Restrictions
B4200320.C Get F4211 Next Line Number
B4200690.C Copy SO Info To Work Files
B4200710.C Calculate Transfer Cost
B4200830.C Retrieve Interbranch Order Types
B4200850.C Preferenct Calculate Commitments
N4201010.C Determine If Blanket SO Exists
B4201210.C Serial Number Processing Edits
XT4311Z1.C Purchase Order Entry MBF
B4500090.C F4074 Price Adjustment Ledger Server
B4500200.C F4573 Get Next Free Good
X4801.C Work Order Entry
N4900010.C F4215 Add Shipment Detail
N4900180.C Process Order Line
N7000320.C B4200310 - Plug & Play
B9900410.C Get Environment Value

2.4 Processing
1. If ACTN-parm is blank, default in 'A' for Add mode.

2. If ACTN-parm is 'B' (Bypass) and RecdWrittenToWF-parm is '0', blank,


or NULL, set the RecdWrittenToWF-parm to '8'. Otherwise set the
BypassOrPurge flag to '1' and change the ACTN-parm to 'D'. If the
ACTN-parm is 'P' (Purge), set the BypassOrPurge flag to '2' and
change the ACTN-parm to 'D'.

3. Source of Data Processing.

4. Retrieve the Processing Options.


Default Line Type Partial Order Hold Code
Default Last Status Product Allocation Hold Code
Override Next Status Warehouse Override Next Status
Default Transaction UOM Availability Check
Default Reason Code Use Preference Profile
Processing
Non-Updatable Status Other Quantity 1 or 2
Preference Version (P40400) Inventory Commitment Profile
Processing
Purchase Order Entry Version (P4310) Auto Blanket Release
Interbranch Order Types Transfer Order
Work Order Entry Version (P4801) Turn Off Taxable
Cost Markup Use Pricing UOM
Warehouse Request 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.

6. If line type is invalid, bypass edits and exit program.

7. Bypass processing a line (i.e., bypass all edits) if the following


conditions are ALL met:

Quantity Ordered is blank (UORG-parm == ' ')


Item Number is blank (UITM-parm == ' ')
Description is blank (DSC1-parm == ' ')
Line is not a text line (LFTXYN != 'N')

8. If the Consolidation Flag-parm is not set and there is no Job No.


passed in, read header work file (F42UI01) record for default values,
else Process Consolidation Logic. If not doing Consolidation and the
header record was not found and in CHG mode, read record from Sales
Order Header File (F4201) for default values.
9. If the action is DEL, process "cancel" logic and skip to calculate
prices and costs.

10.If DCTO-parm == ' '


DCTO-parm = DCTO-hwf

11.If KCOO-parm == ' ', KCOO-parm = KCOO-hwf;

12.If ADD mode, default the following information from the header
record:

AN8-dwf = AN8-hwf;

13.If Branch/Plant is not blank, verify it against F0006 (DD trigger).


Also retrieve the company number from F0006
(RetrieveCompanyFromBusinessUnit) and put it in the company field
(CO-dwf). If Branch/Plant is blank, default from header (MCU-hwf).
If Branch/Plant is invalid as the result of the F0006 edit, exit
program.

14.(Future) Cost Center Security Edit.

15.If Inventory Interface (IVI-dwf) == 'Y' or 'D' or 'N', process stock


item;

16.If the Original Promised Delivery Date (OPDJ) is blank and in Add
mode, default in the Scheduled Delivery Date (RSDJ).

17.If Requested Date (DRQJ-parm) is greater than the transaction date


(TRDJ-hwf), issue error. Use VerifyDate2AfterDate1 (B4000790.C)

18.If Promised Ship Date (PDDJ-parm) is greater than the today's date
(TRDJ-hwf), issue error '4136'. Use VerifyDate2AfterDate1
(B4000790.C)

19.Allocation Preference Checking. If returns error and error hasn't


been issued before (see MATH01), bypass all other edits. 6/4/96

20.(Future) Update SO07-dwf based on changes to PDDJ-parm and RSDJ-parm.

21.Assign the Price Effective Date (PEFJ-dwf) based on CP01 -parm:


' ' - assign Order Date TRDJ-hwf.
'1' - assign Requested Date DRQJ-dwf
'2' - assign Promised Date PDDJ-dwf
'3' - assign Original Promised Date OPDJ-dwf
'4' - assign Actual Shipped Date ADDJ-dwf
'5' - assign System Date UPMJ-dwf
'6' - assign Invoice Date IVD-dwf.

22.If the Price Effective Date - parm is not NULL, use it.

23.Default from hwf/PO:

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;

24.If Last Status (LTTR-parm) is blank, default from processing option


(LTT2-parm).

25.Verify Last Status (LTTR-parm) against the Order Activity Rules


(VerifyActivityRuleStatusCode B4000260.C)

Notes:
If LTTR-parm is >= '900' or LTTR-parm == ' '
Line Status Code => Last Status (WF)

If LTTR-parm == ' '


LTTR-parm = LastStatus (WF);

else
Line Status Code <= LTTR-parm

Order Type <= DCTO-parm


Line Type <= LNTY-parm
Line Status Code See Notes
Suppress Error <= ' '
Next Status => NS Work field
Status Allowed 1 => Work Field 1
Status Allowed 2 => Work Field 2
Status Allowed 3 => Work Field 3
Status Allowed 4 => Work Field 4
Status Allowed 5 => Work Field 5
Next Number not used
Ledger Record Y.N => WRTH - dwf
Error Code not used

26.If Next Status (NXTR-parm) is blank, default from processing option


first. If no processing option is specified, use the first next
status code returned from VerifyActivityRuleStatusCode (i.e., NS work
field).

1. If next status (NXTR-parm) is not blank

If Last Status (LTTR-parm) is < '900', verify using


VerifyOverrideNextStatusCode (B4000960.C).

Override Next Status <= NXTR-parm


Next Status <= NS Work Field
Status Allowed 1 <= Work Field 1
Status Allowed 2 <= Work Field 2
Status Allowed 3 <= Work Field 3
Status Allowed 4 <= Work Field 4
Status Allowed 5 <= Work Field 5
else
Verify Next Status (NXTR-parm) against the Order Activity Rules
(VerifyActivityRuleStatusCode B4000260.C)
Order Type <= DCTO-parm
Line Type <= LNTY-parm
Line Status Code <= NXTR-parm
Suppress Error <= ' '
Next Status not used
Status Allowed 1 not used
Status Allowed 2 not used
Status Allowed 3 not used
Status Allowed 4 not used
Status Allowed 5 not used
Next Number not used
Ledger Record Y.N not used
Error Code not used

28.Note: Need a way to recalculate the quantity shipped, backordered,


and canceled based on availability if one the following changes:

Promised Date (from future to non-future and vice versa)


Quantity Ordered (UORG-parm)
Branch (MCU-parm) or Location (LOCN-parm) or Lot (LOTN-parm) has
changed.

29.If Text line (LFTXYN == 'Y'), process text line item. Then, skip all
remaining steps.

30.If inventory interface (IVI-dwf) == 'N', process non-stock item.

31.If UORG-parm == 0 &&


SOQD-parm == 0 &&
SOBK-parm == 0 &&
SOCN-parm == 0 &&
IVI-dwf != 'N'
UORG-parm=1;
SOQS-parm=1;

32.If SOQS-parm == 0 // Qty ship is qty ordered minus qty


backorder and qty canceled
SOQS-parm = UORG-parm - (SOBK-parm + SOCN-parm);
else // Check to make sure quantities balance
If UORG-parm != SOQS-parm + SOBK-parm + SOCN-parm
Set error '0505';

33.Reverse sign of quantities if specified in line type:

If LFRSGN == 'Y' and UORG-parm > 0


UORG-parm = -UORG-parm;
SOQS-parm = -SOQS-parm;
SOBK-parm = -SOBK-parm;
SOCN-parm = -SOCN-parm;

34.If UOM-parm == UOM4-parm == UOM1-dwf,


TransToPrimConvFactor (CONV-dwf) = 1;
PricingToPrimConvFactor (CNV3-dwf) = 1;
else
Retrieve Uom conversion factors by calling
GetItemUoMConversionFactor (B4000520.C)

BranchPlant <= MCU-parm


FromUnitOfMeasure <= UOM-parm
ToUnitOfMeasure <= UOM4-parm
QuantityToConvert <= SOQS-parm+SOBK-parm
InventoryInterfaceFlag <= IVI-dwf
ShortItemNumber <= ITM-dwf
ConversionFactorFrom_to_To => Conversion_Trn_To_Price
(WF)
ConversionFactorFrom_to_Primary => CONV-dwf
ConversionFactorTo_to_Primary CNV3-dwf
UnitOfMeasureToPrimary <= UOM1-dwf
QuantityConvertedToPrimary => QuantityInPrimary (WF),
PQOR-dwf
ConvertToSecondary <= 1
UnitOfMeasureToSecondary <= UOM2-dwf
QuantityCOnvertedToSecondary => SQOR-dwf
ConvertToPurchasing not used
UnitOfMeasureToPurchasing not used
QuantityConvertedToPurchasing not used
ConvertToPricing not used
UnitOfMeasureToPricing not used
QuantityConvertedToPricing not used
ConvertToShipping not used
UnitOfMeasureToShipping not used
QuantityConvertedToShipping not used
ConvertToWeight <= 1
UnitOfMeasureToWeight <= WTUM-parm
QuantityConvertedToWeight => ITWT-parm
ConvertToVolume <= 1
UnitOfMeasureToVolume <= VLUM-parm
QuantityConvertedToVolume => ITVL-parm
UOMByBranch <= BUMC-parm
PotencyMode <= COMM-dwf
LotNumber <= LOTN-parm
PotencyControl <= IBOT1Y (F4102)
StandardPotency <= IBSTDP (F4102)
ErrorMessageID not used
SuppressMessageFlag <= ' '
If unit of measure invalid, bypass edits and exit program.

35.Kit Processing in batch mode. - Done in ER (R40211Z)

36.Configurator processing. - Done in ER.

37.Calculate Availability Processing.

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.

39.Blanket Order Processing.

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.

Next Number Index <= ORNN-hwf


Key Company <= Order Co. - parm
Order Type <= Order Type - parm
Fiscal Year <= FY-dwf
Century <= CTRY-dwf
Order Number => Order No. - parm, DOCO-hwf, DOCO-dwf

41.Calculate Prices And Costs.

// If the Inventory Interface (IVI-dwf) in the Line Type Master is


equal to 'D' for direct ship, update
// the Transfer/Direct Ship Flag (SO11) in the work file to '2' for
direct ship. This will acknowledge
// the calling application that this is a direct ship line type and the
PO edit objects should be called
//to process this line through purchasing edits.

42.If IVI-dwf == 'Y'


call PO Entry Edit Line

43.If IVI-dwf == 'D'


SO11-parm = '2';
SO11-dwf = '2';

44.If LineAction-parm == 'D' and ByPass Flag (internal flag) == '1'


then delete the record from the workfile.

You might also like