Functional Description
Purpose
Use this function to split the ship quantity from the backorder/cancel quantities in a sales order
detail line F4211. After the split, the original line will contain the backorder/cancel quantities
while a new line is created for the ship quantity. The new line will essentially be a mirror image o f
the original line with some differences in the status codes. - You must pass to this function the Ptr
to the F4211 record
Setup Notes and Prerequisites
In order to call this function, you must pass to it a long pointer that points to the Sales Order
Detail record. Use a business function to fetch and create this pointer.
Special Logic
Technical Specification
2.2Related Tables
Table Table Description
F4211Sales Order Detail
2.3Related Business Functions
Source NameFunction Name
X4101.CGetItemMasterByShort
B4000260.CVerifyActivityRulesStatusCode
B4200260.CWriteSalesHistoryOrLedger
2.4Processing
Insert New Record to Table (F4211)
1.Use the GENLNG to retrieve data from the Sales Order Detail data structure (F4211).
2.Save SDSOBK, SDSOCN, and SDLNID to work fields.
3.Calculate the line number of the split line.
If SDRLIT == ' ',
default line increment to .01;
else
default line increment to .1;
4.If Increment From Line Number (LNID) in the parameter is zero,
= SDLNID + RLLN)
SDLNID = LNID + RLLN).
function. If not unique, repeat step 3b-4.
6.Use the original F4211 record as a copy, map all fields to a new F4211 record. (Use the best
technique in C)
7.Save current line number to LNID.
8.SDUORG = SDSOQS;
9.Zero out SDSOBK and SDSOCN.
10.Retieve the Inventory Interface flag (LFIVI) from Line Type Master (F4205). (Use existing
business function)
11.If stock item (LFIVI = 'Y' or LFIVI = 'D'),
Retrive pointer to F4101 (use bf GetItemMasterByShort)
12.Call GetItemUOMConversionFactor and save the update the following fields:
BranchPlant<=SDMCU
FromUnitOfMeasure<=SDUOM
ToUnitOfMeasure<=SDUOM4
QuantityToConvert<=SDUORG
InventoryInterfaceFlag<=LFIVI
ShortItemNumber<=SDITM
ConversionFactorFrom_to_Tonot used
ConversionFactorFrom_to_Primary=>ConversionFactor_From_Prim
ConversionFactorTo_to_Primary=>ConversionFactor_To_Prim
UnitOfMeasureToPrimary<=SDUOM1
QuantityConvertedToPrimary=>SDPQOR
ConvertToSecondary<=1
UnitOfMeasureToSecondary<=SDUOM2
QuantityCOnvertedToSecondary=>SDSQOR
ConvertToPurchasingnot used
UnitOfMeasureToPurchasingnot used
QuantityConvertedToPurchasingnot used
ConvertToPricingnot used
UnitOfMeasureToPricingnot used
QuantityConvertedToPricingnot used
ConvertToShippingnot used
UnitOfMeasureToShippingnot used
QuantityConvertedToShippingnot used
ConvertToWeight<=1
UnitOfMeasureToWeight<=SDWTUM
QuantityConvertedToWeight=>SDITWT
ConvertToVolume<=1
UnitOfMeasureToVolume<=SDVLUM
QuantityConvertedToVolume=>SDITVL
UOMByBranchnot used
PotencyModenot used
LotNumber<=SDLOTN
PotencyControlfuture use
StandardPotencyfuture use
ErrorMessageIDnot used
SuppressMessageFlag<=' '
13.SDLTTR = LTTR (override last status in input parameter).
14.(Future) Calculate promised ship and delivery dates if specified in parameter (EV01 = '1').
15.Call GetAuditInfo and load the following fields: SDUSER, SDJOBN, SDUPMJ, SDTDAY.
16.If line is a kit parent, and the ship quantity is hard committed, flag the parent as committed
(SO10).
17.i.e., If SDCOMM = 'K' && FLD2 = '1' && SDSOBK = 0 && SDSOQS <> 0, then SDSO10 = '1'.
18.Insert record to table (F4211).
19.If warehousing, return new line number of shippable quantity. (i.e., LNID = SDLNID)
20.(Future) Copy associated text and price history.
21.Write ledger record only if specified in status flow:
to retrieve the Write Ledger field (FSWRTH).
II.If WRTH = 'Y' or FSWRTH == 'Y',
Adjust Original Detail Line
1. SDUORG = backorder save field + cancel save field
2.If SDSOBK == 0
SDSOCN = SDUORG
SDLTTR = NXT2
SDNXTR = '999'
else
SDSOBK = backorder save field
SDSOCN = Cancel save field
SDLTTR = LTT2
3.SDSOQS = 0
4.SDAEXP = 0
5.SDFEA = 0
6.SDECST = 0
7.SDFEC = 0
8.Call GetItemUOMConversionFactor and save the update the following fields:
BranchPlant<=SDMCU
FromUnitOfMeasure<=SDUOM
ToUnitOfMeasure<=SDUOM4
QuantityToConvert<=SDUORG
InventoryInterfaceFlag<=LFIVI
ShortItemNumber<=SDITM
ConversionFactorFrom_to_Tonot used
ConversionFactorFrom_to_Primary=>ConversionFactor_From_Prim
ConversionFactorTo_to_Primary=>ConversionFactor_To_Prim
UnitOfMeasureToPrimary<=SDUOM1
QuantityConvertedToPrimary=>SDPQOR
ConvertToSecondary<=1
UnitOfMeasureToSecondary<=SDUOM2
QuantityCOnvertedToSecondary=>SDSQOR
ConvertToPurchasingnot used
UnitOfMeasureToPurchasingnot used
QuantityConvertedToPurchasingnot used
ConvertToPricingnot used
UnitOfMeasureToPricingnot used
QuantityConvertedToPricingnot used
ConvertToShippingnot used
UnitOfMeasureToShippingnot used
QuantityConvertedToShippingnot used
ConvertToWeight<=1
UnitOfMeasureToWeight<=SDWTUM
QuantityConvertedToWeight=>SDITWT
ConvertToVolume<=1
UnitOfMeasureToVolume<=SDVLUM
QuantityConvertedToVolume=>SDITVL
UOMByBranchnot used
PotencyModenot used
LotNumber<=SDLOTN
PotencyControlfuture use
StandardPotencyfuture use
ErrorMessageIDnot used
SuppressMessageFlag<=' '
9.(Future) Calculate promised ship and delivery dates for preference processing.
10.Call GetAuditInfo and load the following fields: SDUSER, SDJOBN, SDUPMJ, SDTDAY.
11.Update record to table (F4211).
12.Write ledger record only if specified in status flow:
to retrieve the Write Ledger field (FSWRTH).
II.If WRTH = 'Y' or FSWRTH == 'Y',
^
D4200060 - Split Sales Order Detail Line
Special Input Expected
GENLNGF4211LongPointer
RLLN Line IncrementerPass the value of the line increment. Default to .01 if not sent.
LNID Kit Master Line Number
LTTROverride Last Ship StatusThis is the override last status of the new line.
LTT2Override Last Backorder StatusThis is the overide last status of the backorder line
NXT2Override Last Cancel StatusThis is the override last status of a cancel line.
EV01Preference ProcessingFuture use. Set to '1' if preference option is set in SOE and not warehouse.
FLD2Hard Commit FlagPass '1' if hard commiting
Special Output Returned
LNID Kit Master Line Number
^
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
idF4211RowPtr | GENLNG | ID | NONE | NONE |
General purpose ID variable. | ||||
mnLineIncrementer | RLLN | MATH_NUMERIC | NONE | NONE |
A number of the detail line on the related order for which the current order was created. For example, on a purchase order created to fill
| ||||
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
| ||||
szOverrideLastShipStatus | LTTR | char | NONE | NONE |
A code (system 40/type AT) specifying the last step in the processing cycle that this order line has successfully completed. | ||||
szOverrideLastCancelStatus | NXT2 | char | NONE | NONE |
User defined code (40/AT) that specifies what the next standard step is in the processing cycle for this order type. You set up the steps for
| ||||
szOverrideLastBackorderStatus | LTT2 | char | NONE | NONE |
The code that specifies what step in the processing cycle was last completed successfully for this order line. | ||||
cPreferenceProcessing | EV01 | char | NONE | NONE |
Special Input Expected
| ||||
cHardCommitFlag | FLD2 | char | NONE | NONE |
An option that determines how the Shop Floor Management system commits inventory. The options are as follows:
o Hard commitment at
| ||||
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
| ||||
cSuppressErrorMsg | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
szErrorMsgID | DTAI | char | NONE | NONE |
A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or
|
B4000260 Line Type - Activity Rules | ||||
B4000520 Get Item UoM Conversion Factor | ||||
B4200210 Get F4211 Detail Information | ||||
B4200260 Write Sales History Or Ledger | ||||
B4500200 F4573 Get Next Free Good | ||||
B9800100 Get Audit Information | ||||
X4101 Validate and Retrieve Item Master |
F4211 Sales Order Detail File |