Functional Description
Purpose
For a given combination of Item, Branch, Location and Lot, all Item Location records (F41021) are
retrieved and the totals for quantity on hand, quantity soft committed, quantity hard committed,
quantity on work order, quantity on purchase order and quantity on receipt are calculated. Also calculated
is the Extended Cost of the total quantity on hand based on the costing method.
Setup Notes and Prerequisites
The Item Number (ITM), Branch (MCU), Index (CDL) and Keys (CDL) are required input parameters.
Determine which Index and Keys for Item Location Table (F41021) you wish to use:
Index = 1: ( ITM, MCU, LOCN, LOTN)
Keys = 1 : Fetch on Short Item Number only.
Keys = 2 : Fetch on Short Item Number and Branch/Plant
Keys = 3 : Fetch on Short Item Number, Branch/Plant, and Location.
Keys = 4 : Fetch on Short Item Number, Branch/Plant, Location, and Lot.
Index = 2:(ITM, MCU, LOTN, LOCN)
Keys = 1 : Fetch on Short Item Number only.
Keys = 2 : Fetch on Short Item Number and Branch/Plant
Keys = 3 : Fetch on Short Item Number, Branch/Plant, and Lot.
Keys = 4 : Fetch on Short Item Number, Branch/Plant, Lot, and Location.
Index = 3:(MCU, LOCN, ITM, LOTN)
Keys = 1 : Fetch on Branch/Plant only.
Keys = 2 : Fetch on Branch/Plant and Location
Keys = 3 : Fetch on Branch/Plant, Location, and Short Item Number.
Keys = 4 : Fetch on Branch/Plant, Location, Short Item Number, and Lot.
Index = 5:(LOTN, ITM, MCU)
Keys = 1 : Fetch on Lot only.
Keys = 2 : Fetch on Lot and Short Item Number
Keys = 3 : Fetch on Lot, Short Item Number, and Branch/Plant.
Special Logic
Technical Specification
Parameters
Data Item Data Structure Description I/O Required Notes
ITM Short Item Number I Y
MCU Branch/Plant I Y
LOCN Location I N
LOTN Lot Number I N
GENLNG Item Master Record I N If not passed in,
GetItemMasterByShort (XF4101) will
be
called to get CLEV.
PQOH Quantity On Hand O N
PAID Extended Cost O N Accumulate
F41021::PQOH*F4105::UNCS
for all records based on Index and
Keys passed in.
PCOM Quantity Soft Committed O N
HCOM Quantity Hard Committed O N
QOWO Quantity On Work Order O N
PREQ Quantity On Purchase Order O N
QWBO Quantity On Receipt O N
EV01 Index I Y
EV01 Keys I Y
Related Tables
F4101 - Item Master
F41021 - Item Location
F4105 - Item Cost
Related Business Functions
XF4105 - Get Item Cost
Processing
This function retrieves the Item Location records for the keys passed in. The quantity on hand is
accumulated for each record read. The Item Cost is retrieved based on the inventory costing method.
The unit cost is used to calculate the extended cost for all the records total quantity on hand.
Determine which Index and Keys for Item Location Table (F41021).
Index = 1: ( ITM, MCU, LOCN, LOTN)
Keys = 1 : Fetch on Short Item Number only.
Keys = 2 : Fetch on Short Item Number and Branch/Plant
Keys = 3 : Fetch on Short Item Number, Branch/Plant, and Location.
Keys = 4 : Fetch on Short Item Number, Branch/Plant, Location, and Lot.
Index = 2:(ITM, MCU, LOTN, LOCN)
Keys = 1 : Fetch on Short Item Number only.
Keys = 2 : Fetch on Short Item Number and Branch/Plant
Keys = 3 : Fetch on Short Item Number, Branch/Plant, and Lot.
Keys = 4 : Fetch on Short Item Number, Branch/Plant, Lot, and Location.
Index = 3:(MCU, LOCN, ITM, LOTN)
Keys = 1 : Fetch on Branch/Plant only.
Keys = 2 : Fetch on Branch/Plant and Location
Keys = 3 : Fetch on Branch/Plant, Location, and Short Item Number.
Keys = 4 : Fetch on Branch/Plant, Location, Short Item Number, and Lot.
Index = 5:(LOTN, ITM, MCU)
Keys = 1 : Fetch on Lot only.
Keys = 2 : Fetch on Lot and Short Item Number
Keys = 3 : Fetch on Lot, Short Item Number, and Branch/Plant.
Need to retrieve the Item Balance records (F41021) based on how many pieces of the key are sent.
If any piece of the key is equal to NULL that means you will not use it or any piece after
it. (i.e. If the Location field is equal to NULL you will only use Item Number and Branch as
your key when you fetch to the file. You will then 'spit and chew' on the Lot Number
if it is not equal to NULL.
Read all records that are equal to that key adding up the primary quantity on hand(PQOH) for each
of them.
Call the business function GetItemCost (XF4105.C) to retrieve the cost for the location passing
the following as parameters:
Costing Selection Inventory = I
Item Number = ITM from the F41021 record you just read
Branch = MCU from the F41021 record you just read
Location = LOCN from the F41021 record you just read
Lot = LOTN from the F41021 record you just read
Cost Level = the Level Inventory Cost field from the Item Master(F4101) record for the Item
Address to F4105 Record = Will be returned
Using the Cost (UNCS) in F4105 record returned, calculate the extended cost for each F41021
record you have read by multipying the Cost(UNCS) times the primary quantity on hand (PQOH).
If F41021::PQOH >= 0
Extended Cost = Extended Cost + (F4105::UNCS*F4102::PQOH)
End if
The following fields are returned:
The total primary quantity on hand is returned. If this number is less than zero, zero is returned.
Total extended cost for all locations read.
Total quantity soft committed for all locations read.
Total quantity hard committed for all locations read.
Total quantity on work order for all locations read.
Total quantity on purchase order for all locations read.
Total quantity on receipt for all locations read.
D41021A - Calculate Quantity On Hand
Parameters
Data Item Data Structure Description I/O Required Notes
ITM Short Item Number I Y
MCU Branch/Plant I Y
LOCN Location I N
LOTN Lot Number I N
GENLNG Item Master Record I N If not passed in,
GetItemMasterByShort (XF4101) will
be
called to get CLEV.
PQOH Quantity On Hand O N
PAID Extended Cost O N Accumulate
F41021::PQOH*F4105::UNCS
for all records based on Index and
Keys passed in.
PCOM Quantity Soft Committed O N
HCOM Quantity Hard Committed O N
QOWO Quantity On Work Order O N
PREQ Quantity On Purchase Order O N
QWBO Quantity On Receipt O N
EV01 Index I Y
EV01 Keys I Y
Determine which Index and Keys for Item Location Table (F41021) you wish to use:
Index = 1: ( ITM, MCU, LOCN, LOTN)
Keys = 1 : Fetch on Short Item Number only.
Keys = 2 : Fetch on Short Item Number and Branch/Plant
Keys = 3 : Fetch on Short Item Number, Branch/Plant, and Location.
Keys = 4 : Fetch on Short Item Number, Branch/Plant, Location, and Lot.
Index = 2:(ITM, MCU, LOTN, LOCN)
Keys = 1 : Fetch on Short Item Number only.
Keys = 2 : Fetch on Short Item Number and Branch/Plant
Keys = 3 : Fetch on Short Item Number, Branch/Plant, and Lot.
Keys = 4 : Fetch on Short Item Number, Branch/Plant, Lot, and Location.
Index = 3:(MCU, LOCN, ITM, LOTN)
Keys = 1 : Fetch on Branch/Plant only.
Keys = 2 : Fetch on Branch/Plant and Location
Keys = 3 : Fetch on Branch/Plant, Location, and Short Item Number.
Keys = 4 : Fetch on Branch/Plant, Location, Short Item Number, and Lot.
Index = 5:(LOTN, ITM, MCU)
Keys = 1 : Fetch on Lot only.
Keys = 2 : Fetch on Lot and Short Item Number
Keys = 3 : Fetch on Lot, Short Item Number, and Branch/Plant.
^
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
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
| ||||
szLocation | LOCN | char | NONE | NONE |
The storage location from which goods will be moved. | ||||
szLot | LOTN | char | NONE | NONE |
A number that identifies a lot or a serial number. A lot is a group of items with similar characteristics. | ||||
idItemMasterRecord | GENLNG | ID | NONE | NONE |
Parameters
| ||||
mnQuantityOnHand | PQOH | MATH_NUMERIC | NONE | NONE |
The number of units that are physically in stock. The system displays the quantity on-hand in the primary unit of measure. | ||||
mnExtendedCost | PAID | MATH_NUMERIC | NONE | NONE |
Parameters
| ||||
mnQuantitySoftCommitted | PCOM | MATH_NUMERIC | NONE | NONE |
The number of units soft committed to sales orders or work orders in the primary units of measure. | ||||
mnQuantityHardCommitted | HCOM | MATH_NUMERIC | NONE | NONE |
The number of units committed to a specific location and lot. | ||||
mnQuantityOnWorkOrder | QOWO | MATH_NUMERIC | NONE | NONE |
The number of units hard committed to work orders in the primary unit of measure. | ||||
mnQuantityOnPurchaseOrder | PREQ | MATH_NUMERIC | NONE | NONE |
The number of units specified on the purchase order in primary units of measure. | ||||
mnQuantityOnReceipt | QWBO | MATH_NUMERIC | NONE | NONE |
The number of units on work orders in primary units of measure. | ||||
cIndex | EV01 | char | NONE | NONE |
Determine which Index and Keys for Item Location Table (F41021) you wish to use:
| ||||
cKeys | EV02 | char | NONE | NONE |
Determine which Index and Keys for Item Location Table (F41021) you wish to use:
| ||||
mnProjectHardCommitted | PJCM | MATH_NUMERIC | OPT | NONE |
The number of units committed to a specified location and lot for a project. | ||||
mnSecondaryQtyOnHand | SQOH | MATH_NUMERIC | OPT | NONE |
The number of units on hand in secondary units of measure. | ||||
mnSecondaryQtySoftCommitted | SCMS | MATH_NUMERIC | OPT | NONE |
The number of units (expressed in the secondary unit of measure) that are soft-committed to sales orders or work orders. | ||||
mnSecondaryQtyHardCommitted | HCMS | MATH_NUMERIC | OPT | NONE |
The number of units (expressed in the secondary unit of measure) that are hard-committed to a specific location and lot. | ||||
mnSecondaryQtyWOHardCommitted | SWHC | MATH_NUMERIC | OPT | NONE |
The number of units, expressed in the secondary unit of measure, that are hard-committed to work orders. | ||||
mnSecondaryQtyOnPurchaseOrder | SREQ | MATH_NUMERIC | OPT | NONE |
The number of units, expressed in the secondary unit of measure, that are specified on the purchase order. | ||||
mnSecondaryQtyOnWOReceipt | SQWO | MATH_NUMERIC | OPT | NONE |
The number of units, expressed in the secondary unit of measure, that are specified on the work order. | ||||
mnSecondaryProjectHardCommit | PJDM | MATH_NUMERIC | OPT | NONE |
The number of units committed to a specified location and lot for a project. |
X4101 Validate and Retrieve Item Master |
F4101 Item Master | ||||
F41021 Item Location File | ||||
F4105 Item Cost File |