Functional Description
Purpose
Use this function to process the inventory commitment for a sales order detail. This function will
perform hard commitments for a sales detail line. During this process, it will allocate inventory from
locations in the Item Locations Table (F41021) using the Commitment method. If inventory needs to be
allocated from different locations, the sales order detail line will be split according to the
location.
Setup Notes and Prerequisites
The calling application should call this function once per sales detail record.
In the calling application, if the order is on hold (HOLD in the F4201 is not blank), this business
function should not be called.
If future committed line (SDSONE > 0) or blanket line (SDOTQY =='1' or '2'), this business function
should not be called.
If a warehouse line (SDSWMS=='I'), this business function should not be called.
If the detail record is canceled (SDNXTR=='999'), this business function should not be called.
If Inventory Interface Flag (LFIVI) <> 'Y', this business function should not be called.
If line is a credit line (SDUORG <= 0 or SDSOQS <= 0), this business function should not be called.
If availability checking is turned on, this function should be called after determining the
backorder or cancel quantities.
Special Logic
None.
Technical Specification
Related Tables
Table Table Description
F42UI130Commitment Work File
F40306PreferenceInventory Commitment
F4102 Item Branch
F41001Branch/Plant Constants
F40309PreferenceDelievery Dates
Related Business Functions
Source Name Function Name
B3100380.CCalculateQuantityAvailableShell
B4000520.CGetItemUoMConversionFactor
B4002120.CPromiseDelDateCalcForPref
B4200780.CGet/Update Commitment Work File
B4002090.CGetPreferenceMaster
B4002140.CF40071/F40072 GetCustomerItemGroup
B4000800.CF40073GetPricingPrefHierarchy
Processing
General Flow of Processing:
1. If the Commitment Flag != H, C or K
Continue
Else
If the Commitment Flag = H and Location is not blank
Write that location specific information to the Work File
1. If the Header Branch is different from the Default Detail Branch
If the Detail Branch is blank
SOE assigns Detail Branch = Default Detail Branch
Flow thru # 2
2. Determine branch to source from:
If a Detail Branch is passed into the preference function
( i.e. the user typed in a specific branch or they could be in change mode)
Use the detail branch to commit from - write to work file & back order to that
branch
Do not perform the preference or sequencing logic ( loops )
Else
If it's blank, determine the branch to use. do sequencing logic - loops.
3. Information written to F42UI130 work file Perform Preference Hierarchy & MCU Sequence
Loops:
The AS/400 writes records to the work file in the following manner:
Read the Preference Hierarchy Structure - Builds Sorted List of
Hierarchys
Retrieves the Item Groups, Customer Groups - if any are set up
Given the above info - Sets up the keys for the F40306 Preference Profile
- Inventory Sourcing File Cycle thru the Sorted Hierarchys One by One
Fetch the Branches One by One that are set up in the F40306 File
Get the Availability at each Branch
If the Ordered Qty can be filled from 1 branch
It writes ONLY that 1 branch to the work file
Else the Ordered Qty cannot be filled from 1 branch
It writes all branches set up in the sequences ( whether there
is qty available or not ) to the work file.
(Note: Bug on AS/400: If the same branch is in two difference
preference hierarchys the AS/400 retrieves the Qty Avail for the branch, but
doesn't note the fact that the Qty Avail is already
given to the first preferences branch. Thus it ships the from
the same branch twice, when there really is only enough to ship
from 1 branch. )
If the Item/Branch combo does not exist in the F41021 file
Do Not write that branch to the work file.
4. If no preference set up for item/customer combo:
use the header branch passed in to commit inventory from.
write to wf
5. It should back order to the first branch set up in the sequence.
6. Passing the MCU back:
If the Ordered Qty can be filled from 1 branch
Passes that mcu back - the mcu that had all the quantity.
If the Ordered Qty cannot be filled from 1 branch
If it can fill partial -
passes back the first mcu it filled from
If it cannot fill any -
passes back the first mcu in the sequence
7. In Change Mode - Sales Order Entry
F4211 End Doc needs to know the original branch in case the user changes the
quantities to another branch. Inventory needs to be de-committed and
recommitted to another branch.
8. In Change Mode - Sales Order Entry
Since there is a detail branch - let the logic flow thru as normal.
Inventory will only be commited from the detail branch passed in.
^
D4200850 - Preference Calculate Commitments
Special Input Expected
Parameters:
Data Item Data Structure DescriptionI/ORequiredNotes
DOCO Sales Order Number I Y Key
DCTO Sales Order Type I Y Key
KCOO Sales Order Company I Y Key
LNID SOE Line Number I Y Key
CTID ComputerID I Y
JOBS Job Number I Y
XLIN Line Number - Work File I Y
AN8 Customer Number I Y Sold To from Sales
Detail
SHAN Ship To Address Number I Y Ship To from Sales
Detail
PA8 Parent Address Number I Y Parent from Sales
Detail
MCU Detail Branch/Plant I/O N from Sales Detail
EMCU Header Branch/Plant I Y form Sales Header
ITM Short Item Number I Y from Sales Detail
UORG Order Quantity I Y Sales Detail
SOQS Shipped Quantity I/O Y Sales Detail
SOBK Backorder Quantity I/O Y Sales Detail
SOCN Cancel Quantity I/O Y Sales Detail
LOCN Location I N If Location is typed
in on SOE. Send in
File Format
LOTN Lot Number I N If not blank, send
from Sales Detail
UOM Unit of Measure - Trans I Y from Sales Detail
UOM4 Unit of Measure - Pricing I Y from Sales Detail
SO06 Preference Commitment FlagI/O Y Flag indicating that
B4200850 has been
called once before -
so don't call again.
SO07 Overriden Ship Date FlagI/O Y Indicates whether or
not a Preference
Hierarchy was set up
for Delivery Dates.
FRGD From Grade I N If OT1Y = 1 or Y
from Sales Detail
THGD Thru Grade I N If OT1Y = 1 or Y
from Sales Detail
FRMP From Potency I N If OT2Y = 1 or Y
from Sales Detail
THRP Thru Potency I N If OT2Y = 1 or Y
from Sales Detail
EXDP Days Before Expiration I N If OT1Y or OT2Y = Y
from Sales Detail
PDDJ Promised Ship Date I/O Y from Sales Detail If
Delivery Dates
Preference On - this
value could change.
RSDJ Promised Delivery Date I/O Y from Sales Detail If
Delivery Dates
Preference On - this
value could change.
DRQJ Requested Date I Y from Sales Detail
TRDJ Order Date I Y from Sales Detail
MOT Mode of Transport I/O Y from Sales Detail If
Delivery Dates
Preference On - this
value could change.
ROUT Route I/O Y from Sales Detail If
Delivery Dates
Preference On - this
value could change.
CARS Carrier Code I/O Y from Sales Detail If
Delivery Dates
Preference On - this
value could change.
COMM Commitment Flag I/O Y Sales Detail
BACK ItemMasterBackOrderFlag I Y
BACK CustomerBackOrderFlag I Y
BACK SOE Backorder Flag I Y Sales Detail
APTS Allow Partial Shipments I Y Sales Detail
IVI Inventory Interface I Y From Line Type Master
(LFIVI)
EV01 ActionCode I N 1=Edit, 2=Update,
3=Edit & Update,
4=Delete from Work
File. NOT USED as
of 8/9/96
EV02 POCommitmentProcessing I Y Value from processing
option #48.
1 = do commitment
2 = notify only
EV03 POPreferenceProcessing I Y Value from processing
option #69 to use
preference profile
defaults. If this
P.O. = 1, then If
Preference set up for
Delivery Dates - use.
VERS Version ID I Y Version of preference
profile (R40400)
PID Program ID I N
UPMJ Today's Date I N Optional. If NULL,
call GetAuditInfo.
TDAY Time of Day I N Optional. If NULL,
call GetAuditInfo.
USER User ID I N Optional. If NULL,
call GetAuditInfo.
JOBN WorkStationID I N Optional, If NULL call
GetAuditInfo.
EV02 SuppressErrorMessage I N
Special Output Returned
Parameters:
Data Item Data Structure DescriptionI/ORequiredNotes
MCU Detail Branch/Plant I/O N from Sales Detail
SOQS Shipped Quantity I/O Y Sales Detail
SOBK Backorder Quantity I/O Y Sales Detail
SOCN Cancel Quantity I/O Y Sales Detail
SO06 Preference Commitment FlagI/O Y Flag indicating that
B4200850 has been
called once before -
so don't call again.
SO07 Overriden Ship Date FlagI/O Y Indicates whether or
not A Preference
Hierarchy was set up
for Delivery Dates.
PDDJ Promised Ship Date I/O Y from Sales Detail If
Delivery Dates
Preference On - this
value could change.
RSDJ Promised Delivery Date I/O Y from Sales Detail If
Delivery Dates
Preference On - this
value could change.
MOT Mode of Transport I/O Y from Sales Detail If
Delivery Dates
Preference On - this
value could change.
ROUT Route I/O Y from Sales Detail If
Delivery Dates
Preference On - this
value could change.
CARS Carrier Code I/O Y from Sales Detail If
Delivery Dates
Preference On - this
value could change.
COMM Commitment Flag I/O Y Sales Detail
EV04 Multiple Branch Flag O N Flag to prompt SOE to
display error message
4600. If a '1' passed
back to SOE - then
multiple branches were
written to the work
file.
ERRC Error Code O N '1' if error occurred
in this function.
DTAI Error Message ID O N
^
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
szComputerID | CTID | char | NONE | NONE |
mnJobNumber | JOBS | MATH_NUMERIC | NONE | NONE |
The job number (work station ID) which executed the particular job. | ||||
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
| ||||
szDocumentCompany | 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
| ||||
mnSOELineNumber | 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
| ||||
mnLineNumberF42UI11 | XLIN | MATH_NUMERIC | NONE | NONE |
Line number. | ||||
mnCustomerNumber | AN8 | MATH_NUMERIC | NONE | NONE |
A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or
| ||||
mnShipToAddrNumber | SHAN | MATH_NUMERIC | NONE | NONE |
The address number of the location to which you want to ship this order. The address book provides default values for customer address,
| ||||
mnParentAddrNumber | PA8 | MATH_NUMERIC | NONE | NONE |
The address book number of the parent company. The system uses this number to associate a particular address with a parent company
| ||||
mnShortItemNumber | ITM | MATH_NUMERIC | NONE | NONE |
An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item
| ||||
szBranchPlant | MCU | char | NONE | NONE |
An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit
| ||||
szHeaderBranchPlant | EMCU | char | NONE | NONE |
A business unit is an accounting entity required for management reporting. It can be a profit center, department, warehouse location, job,
| ||||
szLocation | LOCN | char | NONE | NONE |
The storage location from which goods will be moved. | ||||
szLotNumber | LOTN | char | NONE | NONE |
A number that identifies a lot or a serial number. A lot is a group of items with similar characteristics. | ||||
mnQuantityOrdered | UORG | MATH_NUMERIC | NONE | NONE |
The quantity of units affected by this transaction. | ||||
mnQuantityShipped | SOQS | MATH_NUMERIC | NONE | NONE |
The number of units committed for shipment in Sales Order Entry, using either the entered or the primary unit of measure defined for this
| ||||
mnQuantityBackOrdered | SOBK | MATH_NUMERIC | NONE | NONE |
The number of units backordered in Sales Order Management or in Work Order Processing, using either the entered or the primary unit of
| ||||
mnQuantityCancelled | SOCN | MATH_NUMERIC | NONE | NONE |
The number of units canceled in Sales Order or Work Order Processing, using either the entered or the primary unit of measure defined for
| ||||
szTransactionUOM | UOM | char | NONE | NONE |
A user defined code (00/UM) that indicates the quantity in which to express an inventory item, for example, CS (case) or BX (box). | ||||
szPricingUOM | UOM4 | char | NONE | NONE |
A user defined code (00/UM) that indicates the unit of measure in which you usually price the item. | ||||
szPrimaryUOM | UOM1 | char | NONE | NONE |
A user defined code (00/UM) that identifies the unit of measure that the system uses to express the quantity of an item, for example, EA
| ||||
szFromGrade | FRGD | char | NONE | NONE |
A user defined code (40/LG) that indicates the minimum grade that is acceptable for an item.
The system displays a warning message if
| ||||
szThruGrade | THGD | char | NONE | NONE |
A user defined code (40/LG) that indicates the maximum grade that is acceptable for an item.
The system displays a warning message if
| ||||
mnFromPotency | FRMP | MATH_NUMERIC | NONE | NONE |
A number that indicates the minimum potency or percentage of active ingredients acceptable for an item.
The system displays a warning
| ||||
mnThruPotency | THRP | MATH_NUMERIC | NONE | NONE |
A number that indicates the maximum potency or percentage of active ingredients that is acceptable for an item.
The system displays a
| ||||
mnDaysBeforeExpiration | EXDP | MATH_NUMERIC | NONE | NONE |
The number of days allowed before expiration for an item where it still can be used or sold to a specific customer. When negative, this
| ||||
jdPromisedShipDate | PDDJ | JDEDATE | NONE | NONE |
The promised shipment date for either a sales order or purchase order. The Supply and Demand Programs use this date to calculate
| ||||
jdPromisedDelDate | RDDJ | JDEDATE | NONE | NONE |
The date of the most recent past-due notice to the customer. | ||||
jdRequestedDate | DRQJ | JDEDATE | NONE | NONE |
The date that an item is scheduled to arrive or that an action is scheduled for completion. | ||||
jdTransactionDate | TRDJ | JDEDATE | NONE | NONE |
The date that an order was entered into the system. This date determines which effective level the system uses for inventory pricing. | ||||
szModeOfTransport | MOT | char | NONE | NONE |
A user defined code (00/TM) that describes the nature of the carrier being used to transport goods to the customer. For example, by rail, by
| ||||
szRouteCode | ROUT | char | NONE | NONE |
The route field is a user defined code (system 42, type RT) that represents the delivery route on which the customer resides. This field is
| ||||
mnCarrierNumber | CARS | MATH_NUMERIC | NONE | NONE |
The address number for the preferred carrier of the item. The customer or your organization might prefer a certain carrier due to route or
| ||||
cCommitmentFlag | COMM | char | NONE | NONE |
A value that indicates whether you specified from which Location and Lot a particular item was to come. If you specified a storage area, the
| ||||
cPreferenceCommitmentFlag | SO06 | char | NONE | NONE |
| ||||
cOverridenShipDate | SO07 | char | NONE | NONE |
| ||||
cSOEBackOrderFlag | BACK | char | NONE | NONE |
An option that specifies whether to allow backorders for this item. You can allow backorders by item using the Item Master (P4101) or Item
| ||||
cCustomerBackOrderFlag | BACK | char | NONE | NONE |
An option that specifies whether to allow backorders for this item. You can allow backorders by item using the Item Master (P4101) or Item
| ||||
cAllowPartialShipments | APTS | char | NONE | NONE |
An option that indicates whether the customer accepts partial line shipments. Valid values are:
On
The customer accepts partial line
| ||||
cInventoryInterfaceFlag | IVI | char | NONE | NONE |
A code that identifies the type of interface to the Inventory Management system. Valid values are:
Y The dollar or unit value of any activity
| ||||
cPOCommitmentProcessing | EV02 | char | NONE | NONE |
| ||||
cPOPrefernceProcessing | EV03 | char | NONE | NONE |
| ||||
cMultipleBranchFlag | EV04 | char | NONE | NONE |
| ||||
cActionCode | EV01 | char | NONE | NONE |
| ||||
szVersionID | VERS | char | NONE | NONE |
A user-defined set of specifications that control how applications and reports run. You use versions to group and save a set of user-defined
| ||||
szProgramID | 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
| ||||
jdTodaysDate | 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. | ||||
szUserID | USER | char | NONE | NONE |
The code that identifies a user profile. | ||||
szWorkStationID | JOBN | char | NONE | NONE |
The code that identifies the work station ID that executed a particular job. | ||||
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
| ||||
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
| ||||
cSuppressErrorMsg | EV02 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cItemMasterBackOrderFlag | BACK | char | NONE | NONE |
An option that specifies whether to allow backorders for this item. You can allow backorders by item using the Item Master (P4101) or Item
| ||||
cPriorityProcessingCode | PRIO | char | NONE | NONE |
A code that tells the system to handle this customer's orders on a priority basis. Use this value to set up print pick slips so you can choose
| ||||
cPOCommitPreference | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
cPOCheckAvailability | EV02 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
mnProcessID | PEID | MATH_NUMERIC | OPT | NONE |
A code that identifies the Inter-Process Communication ID. | ||||
mnTransactionID | TCID | MATH_NUMERIC | OPT | NONE |
jdPromisedPickDate | PDDJ | JDEDATE | OPT | NONE |
The promised shipment date for either a sales order or purchase order. The Supply and Demand Programs use this date to calculate
| ||||
cDualPickingProcessOption | DPPO | char | OPT | NONE |
An option that determines for a dual unit of measure item whether the system uses the primary or secondary unit of measure for the following
| ||||
cDualUnitOfMeasureItem | DUAL | char | OPT | NONE |
An option that indicates that the system must maintain inventory balances and record transactions for an item in a secondary unit of
| ||||
mnConverFactorTransToSecond | CONV | MATH_NUMERIC | OPT | NONE |
The factor that the system uses to convert one unit of measure to another unit of measure. | ||||
mnUnitsSecondaryQtyOr | SQOR | MATH_NUMERIC | OPT | NONE |
If the secondary unit of measure option in Inventory Constants is selected,this field will display on data entry screens. | ||||
szItemMasterUOM2 | UOM2 | char | OPT | NONE |
A user defined code (00/UM) that indicates an alternate unit of measure for the item. | ||||
szSecondaryInputUOM2 | UOM2 | char | OPT | NONE |
A user defined code (00/UM) that indicates an alternate unit of measure for the item. | ||||
cShipAscendingDateFlag | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
cCheckExpirationDate | EDCK | char | OPT | NONE |
An option that determines whether the system ensures that a lot be shipped in ascending order in relation to other lots that have already
| ||||
cCheckSellByDate | SBCK | char | OPT | NONE |
An option that indicates whether the system ensures that a lot being shipped to a customer is shipped in ascending order by the sell by
| ||||
cCheckBestBeforeDate | BBCK | char | OPT | NONE |
An option that specifies whether the system ensures that the lot that you are shipping to a customer has a value in the Best Before Date field
| ||||
cCommitmentDateMethod | CMDM | char | OPT | NONE |
A user defined code (H40/CD) that specifies which date the system uses to commit inventory when an item is committed by date. The
| ||||
cOnlyIssueWarningSAD | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
szPreferenceSchedule | ASN | char | OPT | NONE |
A user defined code (40/AS) that identifies a price and adjustment schedule. A price and adjustment schedule contains one or more
| ||||
szItemPriceGroup | PRGR | char | OPT | NONE |
A user defined code (system 40/type PI) that identifies an inventory price group for an item.
Inventory price groups have unique pricing
| ||||
cPreferenceRetrievalUOM | CP22 | char | OPT | NONE |
A code that specifies the unit of measure that the system uses for retrieving advanced preference adjustments during sales order
| ||||
cUseAdvancedPreferences | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
szFutureUseString | GENSTR | char | OPT | NONE |
Reserved by J.D. Edwards. Generic string data item. | ||||
jdOriginalPickDate | OPPJ | JDEDATE | OPT | NONE |
The date on which items are retrieved from inventory. | ||||
szPreviousCostCenter | MCU | char | OPT | NONE |
An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit
| ||||
szLotGroup | LOTGRP | char | OPT | NONE |
Lot Group is the name of a user defined list of allowed non-blank lot status codes. Entry of a Lot Group name in the Processing Option will
|
B4000520 Get Item UoM Conversion Factor | ||||
B4000780 Get Itm Loc By Commitment | ||||
B4002000 Compute Unit Or Extended Amount | ||||
B4002060 Preference Get Values For Sales Order | ||||
B4002090 GetPreferenceMaster | ||||
B4002140 F40071/F40072 Get/Update Cust/Item Group | ||||
B4200780 F42UI130 Get/Update Commitment Work File | ||||
B4200800 F40073 Get Pricing Preference Hierarchy | ||||
B4201200 Preference Commitments By Location Cache |
F42UI130 Commitment Work File |