CalcQtyOnHandForInvCostLevel

Calculate Qty on hand for Inventory Cost Level

Major Business Rule

Object Name: B4000940

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description

Purpose

To accumulate the total quantity on hand based on the inventory cost level for an item.  If the cost 
level is '1', all locations/lots, for all branches are accumulated.  If the cost level is '2', all 

locations/lots are accumulated for a specific branch.  If the cost level is '3', the location/lot is 

accumulated.



Technical Specification




Edits:

Initialize OUTPUT parm.

IFCLEV  =  '1'

Fetch (F41021) by key ITM

While no more records

PQOH  =  PQOH  +  LIPQOH

END

END


IFCLEV  =  '2'

Fetch (F41021) by key ITM,  MCU

While no more records

PQOH  =  PQOH  +  LIPQOH

END

END


IFCLEV  =  '3'

Fetch (F41021) by key ITM,  MCU,  LOCN,  LOTN

While no more records

PQOH  =  PQOH  +  LIPQOH

END

END




Data Structure

D4000940 -  CalcQtyOnHandForInvCostLevel

Parameter NameData ItemData TypeReq/OptI/O/Both
cInventoryCostLevelCLEVcharNONENONE

A code that indicates whether the system maintains one overall inventory cost for the item, a different cost for each branch/plant, or a 
different cost for each location and lot within a branch/plant. The system maintains inventory costs in the Inventory Cost table (F4105). Valid codes 
are:    1   Item level    2   Item/Branch level    3   Item/Branch/Location level

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

szBranchMCUcharNONENONE

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.

szLotLOTNcharNONENONE

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

mnPrimaryQuantityOnHandPQOHMATH_NUMERICNONENONE

The number of units that are physically in stock. The system displays the quantity on-hand in the primary unit of measure.

mnMatchQuantityQTYMATH_NUMERICNONENONE

The number of units associated with an asset.

cMatchQtyExceededEV01charNONENONE

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

Related Functions

None

Related Tables

F41021 Item Location File