CommitSalesOrderToInventory

Commit Sales Order To Inventory

Major Business Rule

Object Name: B4200370

Parent DLL: CDIST

Location: Client/Server

Language: C

Functional Description

Purpose

Use this function to update the inventory commitment quantities of a sales order to the Item Location 

Table (F41021).  This function will process soft, hard, future, other quantity 1 and other quantity 2 

commitments.


Setup Notes and Prerequisites

• This function is designed and written for sales order applications only.
• The calling application or function should only call this function if the Inventory Interface (LFIVI 
in F40205) of the detail record is 'Y' and the item is not a kit parent.

• The calling application or function must first retrieve the UOM conversion factors and pass them to 
this program to avoid unnecessary I/O's.

• If the Location parameter is passed, it must be in data base format.
'b7'b7'b7

Special Logic

None.



Technical Specification


2.2Related Tables 

Table Table Description

F41021Item Location

F4102Item Branch


2.3Related Business Functions

Source NameFunction Name

B9800100Get Audit Information


2.4Processing


1.If CONV-parm == 0, CONV-parm = 1;// Initialize to 1 if conversion factor is zero.
2.Calculate the shipping and backorder quantity in primary unit of measure by mulitpying 

SOQS-parm and SOBK-parm against the Transaction To Primary Conversion Factor (CONV-parm).  Store the results 

in different work fields.

i.e.,Backorder Quantity in Primary = SOBK-parm * CONV-parm;

Shipping Quantity in Primary = SOQS-parm * CONV-parm;

// If soft commiting, all commitments should be updated to the primary bin.  If hard commiting, all

// commitments should be updated to the specific location/lot.

3. 

   a) If soft Commitment (COMM-parm=='S'), Fetch ITM, MCU, LOCN, LOTN, PBIN, PBCK, PCOM, HCOM, FCOM, 

OT1P, OT2P, TDAY, USER, PID and JOBN from F41021 using ITM, MCU and Primary Bin (PBIN = P).

 

   b) If Hard Commitment (COMM-parm =='H' or 'C'), Fetch the same fields using ITM, MCU, LOCN and 

LOTN


   c) If Reverse Commitment (EV02-parm) == '1', subtract the quantities 

       else add the quantities following the criteria given below.


   d) if SOBK-parm != 0


           Add/Subtract SOBK-parm to/from PBCK-F41021


   e) if OTQY-parm == ' '


           If future Committing (EV01-parm =='1')


                  Add/Subtract SOQS-parm+SOBK-parm to/from FCOM-F41021


            else


          if soft commitment (COMM-parm) =='S'


                        Add/Subtract SOQS-parm+SOBK-parm to/from PCOM-F41021


                  else


                        Add/Subtract SOQS-parm+SOBK-parm to/from HCOM-F41021


       else


            If OTQY-parm == '1'


                   Add/Subtract SOQS-parm+SOBK-parm to/from OT1P-F41021


            else 


                    Add/Subtract SOQS-parm+SOBK-parm to/from OT2P-F41021


   f) Update Audit Information (USER,JOBN,PID and TDAY) and Update F41021 the columns using 

ITM,MCU,LOCN and LOTN (the Primary Unique Key for F41021)



4.Store the values of ITM, MCU, PBIN, LOCN, LOTN, PBCK ,PCOM, HCOM, OT1P, OT2P in the cache using 

ITM, MCU, PBIN,LOCN and LOTN as the Index. Insert or Update the cache records' appropriate quantity 

fields with the quantities that are sent in. 

5. If EV04-parm !='1'

         update the MRP flag to 1 in F4102 using ITM and MCU as key. Also, update the AuditInfo of 

F4102


Data Structure

D4200370 - CommitSalesOrderToInventory

Special Input Expected
ITMItem Number

MCUBranch/Plant

LOCNLocationRequired if hard commitment

LOTNLot NumberRequired if hard commitment

SOQSShipping QuantityEither SOQS or SOBK must not

be zero.

SOBKBackorder QuantityEither SOQS or SOBK must not

be zero.

CONVTransToPrimConvFactorTransaction to primary UOM

Conversion.

COMMCommitment Flag'S' = Commit to PCOM in primary loc; 

'H' or  'C' = Commit to HCOM in

  specific location.

OTQYOther Quantity 1 or 2'1' = Commit to OT1P in F41021; 

'2' = Commit to OT2P in F41021.

EV01Future CommitmentIf '1', commit to FCOM in F41021

EV02Reverse CommitmentIf '1', reverse commitment.

PIDProgram ID

EV03Suppress Error Message

DTA1Error Message

EV04SuppressUpdateMRPFlag' ' - Update MRP flag of F4102 

'1' - Do NOT update MRP flag of F4102 

(Added 8/7/96)


Special Output Returned


^

Parameter NameData ItemData TypeReq/OptI/O/Both
mnItemNumberITMMATH_NUMERICNONENONE

An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item 
numbers (see data item XRT) to accommodate substitute item numbers, replacements, bar codes, customer numbers, supplier numbers, and 
so forth. The item numbers are as follows:   o Item Number (short) - An eight-digit, computer-assigned item number     o 2nd Item Number - The 
25-digit, free-form, user defined alphanumeric item number     o 3rd Item Number - Another 25-digit, free-form, user defined alphanumeric item 
number

szBranchPlantMCUcharNONENONE

An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit 
might be a warehouse location, job, project, work center, branch, or plant. You can assign a business unit to a document, entity, or person for 
purposes of responsibility reporting. For example, the system provides reports of open accounts payable and accounts receivable by 
business unit to track equipment by responsible department. Business unit security might prevent you from viewing information about business units 
for which you have no authority.

szLocationLOCNcharNONENONE

The storage location from which goods will be moved.

szLotNumberLOTNcharNONENONE

A number that identifies a lot or a serial number. A lot is a group of items with similar characteristics.

mnShippingQuantitySOQSMATH_NUMERICNONENONE

The number of units committed for shipment in Sales Order Entry, using either the entered or the primary unit of measure defined for this 
item. In the Manufacturing system and Work Order Time Entry, this field can indicate completed or scrapped quantities. The quantity type is 
determined by the type code entered.

mnBackorderQuantitySOBKMATH_NUMERICNONENONE

The number of units backordered in Sales Order Management or in Work Order Processing, using either the entered or the primary unit of 
measure defined for this item.

mnTransToPrimConvFactorCONVMATH_NUMERICNONENONE

The factor that the system uses to convert one unit of measure to another unit of measure.

cCommitmentFlagCOMMcharNONENONE

Special Input Expected
COMMab Commitment Flag


Significant Data Values

'S' = Commit to PCOM in primary loc;

'H' or 'C' = Commit to HCOM in specific  location.ab 

^

cOtherQuantity12OTQYcharNONENONE

Special Input Expected
OTQYab Other Quantity 1 or  2ab 


Significant Data Values

'1' = Commit to OT1P in F41021; 

'2' = Commit to OT2P in F41021.


^

cFutureCommitmentEV01charNONENONE

Special Input Expected
EV01ab Future Commitment


Significant Data Values

If '1', commit to FCOM in  F41021ab 


^

cReverseCommitmentEV02charNONENONE

Special Input Expected
EV02ab Reverse Commitment


Significant Data Values

If '1', reverse  commitment.ab 


^

szProgramIdPIDcharNONENONE

The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry 
interactive program is P4210, and the number of the Print Invoices batch process report is R42565. The program ID is a variable length value. 
It is assigned according to a structured syntax in the form TSSXXX, where: T The first character of the number is alphabetic and identifies the 
type, such as P for Program, R for Report, and so on. For example, the value P in the number P4210 indicates that the object is a 
program. SS The second and third characters of the number are numeric and identify the system code. For example, the value 42 in the number P4210 
indicates that this program belongs to system 42, which is the Sales Order Processing system. XXX The remaining characters of the numer are 
numeric and identify a unique program or report. For example, the value 10 in the number P4210 indicates that this is the Sales Order Entry 
program.

cSuppressErrorMessageEV03charNONENONE

A radio button that specifies the level at which trace/track result is to be displayed.  Select the Detail to display all transactions except IB, IX, 
and IZ types.  Or, select Derivative Lots Only to display only those transactions that may have created new derivative lot. 

szErrorMessageDTAIcharNONENONE

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 
special characters such as %, &, or +. You create new data items using system codes 55-59. You cannot change the alias.

cErrorCodeERRCcharNONENONE

This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document 
Set Server program (XT4914).

cSuppressUpdateMRPFlagEV04charNONENONE

Special Input Expected
EV04ab SuppressUpdateMRPFlag


Significant Data Values

' ' - Update MRP flag of F4102

'1' - Do NOT update MRP flag of F4102



^

cUseCacheFlagEV05charNONENONE

A flag that indicates whether automatic spell check is turned on.

mnJobNoJOBSMATH_NUMERICNONENONE

The job number (work station ID) which executed the particular job.

szUserIDUSERcharNONENONE

The code that identifies a user profile.

szWorkStationIDJOBNcharNONENONE

The code that identifies the work station ID that executed a particular job.

mnTimeOfDayTDAYMATH_NUMERICNONENONE

The computer clock in hours:minutes:seconds.

jdDateUPMJJDEDATENONENONE

The date that specifies the last update to the file record.

cDualPickingProcessOptionDPPOcharOPTNONE

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 
processes:   o Picking   o Sales order availability checking   o Committing inventory for sales   o Splitting purchase order lines  To use the 
primary unit of measure, do not choose this option. To use the secondary unit of measure, choose this option.

cDualUnitOfMeasureItemDUALcharOPTNONE

An option that indicates that the system must maintain inventory balances and record transactions for an item in a secondary unit of 
measure that does not have a fixed conversion to the primary unit of measure. Typically, you choose this option when the item is ordered or sold by 
a packaged quantity and priced by weight or volume. Note: For a dual unit of measure item, the system might require a tolerance check for 
inventory transactions (excluding inventory adjustments) between the primary unit of measure and the secondary unit of measure.

mnDualQuantityDQTYMATH_NUMERICOPTNONE

The number of units (for the unit of measure) that is not contained in the unit of measure structure. For dual units of measure, the system 
tracks both the primary quantity and the secondary quantity. Depending on how the picking processing option is set, the system tracks either the 
primary unit of measure or the secondary unit of measure for a unit of measure structure.

mnInputSecondToItemMasSecondCONVMATH_NUMERICOPTNONE

The factor that the system uses to convert one unit of measure to another unit of measure.

mnTransToSecondConvFactorCONVMATH_NUMERICOPTNONE

The factor that the system uses to convert one unit of measure to another unit of measure.

szComputerIDCTIDcharOPTNONE

cTransactionRelatedProcessEV01charOPTNONE

An option that specifies the type of processing for an event.

Related Functions

B4000930 Update F4102 MRP Net Chg
B9800100 Get Audit Information
XF41021 Update F41021 Locations

Related Tables

F4102 Item Branch File
F41021 Item Location File
F41021DeleteCache

F41021DeleteCache

Commit Sales Order To Inventory

Major Business Rule

Object Name: B4200370

Parent DLL: CDIST

Location: Client/Server

Language: C

Functional Description

Purpose



Setup Notes and Prerequisites

• This function is designed and written for sales order applications only.
• The calling application or function should only call this function if the Inventory Interface (LFIVI 
in F40205) of the detail record is 'Y' and the item is not a kit parent.


Special Logic

None.



Technical Specification

2.2Related Tables 
Table Table Description
F41021Item Location



2.3Related Business Functions

Source NameFunction Name
B9800100Get Audit Information



2.4Processing


Clear the cache created by CommitSalesOrderToInventory Function using the MCU, ITM, LOCN, LOTN and 
PBIN and reverse commit the quantities from F41021 by fetching the F41021 record using MCU,ITM,LOCN and 

LOTN and adding/subtracting quantities that are in the cache to the appropriate quantities of fetched 

F41021record. Update the AuditInfo of F41021.


^

Data Structure

D4200370B - F41021DeleteCache

Special Input Expected
EV01Suppress Error Message

DTA1Error Message

PIDProgram ID



^

Parameter NameData ItemData TypeReq/OptI/O/Both
cSuppressErrorMessageEV01charNONENONE

An option that specifies the type of processing for an event.

szErrorMessageIDDTAIcharNONENONE

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 
special characters such as %, &, or +. You create new data items using system codes 55-59. You cannot change the alias.

szProgramIDPIDcharNONENONE

The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry 
interactive program is P4210, and the number of the Print Invoices batch process report is R42565. The program ID is a variable length value. 
It is assigned according to a structured syntax in the form TSSXXX, where: T The first character of the number is alphabetic and identifies the 
type, such as P for Program, R for Report, and so on. For example, the value P in the number P4210 indicates that the object is a 
program. SS The second and third characters of the number are numeric and identify the system code. For example, the value 42 in the number P4210 
indicates that this program belongs to system 42, which is the Sales Order Processing system. XXX The remaining characters of the numer are 
numeric and identify a unique program or report. For example, the value 10 in the number P4210 indicates that this is the Sales Order Entry 
program.

cModeMODEcharNONENONE

The processing mode used in Purchase Order Consolidator to signify when specific orders are being processed.

szWorkStationIDJOBNcharNONENONE

The code that identifies the work station ID that executed a particular job.

szUserIDUSERcharNONENONE

The code that identifies a user profile.

mnTimeOfDayTDAYMATH_NUMERICNONENONE

The computer clock in hours:minutes:seconds.

cErrorCodeERRCcharNONENONE

This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document 
Set Server program (XT4914).

mnJobNoJOBSMATH_NUMERICNONENONE

The job number (work station ID) which executed the particular job.

jdDateUPMJJDEDATENONENONE

The date that specifies the last update to the file record.

cTransactionProcessingActiveFDA078charOPTNONE

Causes field data to be stored in a queue until a commit command is issued, at which time all data is moved to the table. If the transaction 
boundary includes other forms, check the Include in Parent check box on Business Function - Values to Pass and Form Interconnect - Values 
to Pass.

szComputerIDCTIDcharOPTNONE

Related Functions

B4000930 Update F4102 MRP Net Chg
B9800100 Get Audit Information
XF41021 Update F41021 Locations

Related Tables

F4102 Item Branch File
F41021 Item Location File