CalculateItemSearchQuantities

Calculate Item Search Quantities

Major Business Rule

Object Name: B4100270

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description

Purpose

This function determines if certain quantities in the Item Location table (F41021) are zero for a 
specified Item and Branch/Plant.  The quantities checked are: Quantity on Hand (PQOH), Quantity on PO 

(PREQ), Quantity Soft Commit (PCOM), Quantity Hard Commit (HCOM), Quantity On Other 1 (OT1P), Quantity On 

Other 2 (OT2P) and Quantity on Work Order (QOWO).

This function also calculates the Quantity on Order.


Setup Notes and Prerequisites

The Short Item Number (ITM), Branch/Plant (MCU), Location (LOCN) and Lot Number (LOTN) fields are 

required parameters.  


Technical Specification


This function retrieves the Item Location record for the keys passed in and determines if the above 

mentioned quantities are zero.  If so, the Quantities Zero Flag is set to '1'.


The Quantity on Order is calculated by adding Quantity on PO (PREQ) and Quantity on WO Receipt 

(QWBO).  


Edits:

If pqoh, preq, pcom, hcom, ot1p, ot2p and qowo are zero for an item and branch, set the Quantities 
zero flag to '1'.  Calculate the quantity on order by adding preq and qwbo and returning in TRQT.


Retrievals:

Retrieve the F41021 with the ITM, MCU, LOCN, LOTN  passed.

Returns:

See Edits Section above.



^

Data Structure

D4100270 - Calculate Item Search Quantities

Parameters:
Data Item Data Structure DescriptionI/ORequired
ITMShortItemNumberIY

MCUBranchPlantIY

EV01SuppressErrorMessageIN

EV02QuantitiesZeroFlagON

DTAIErrorMessageIDON

TRQTQuantityOnOrderON

LOTNLotNumberIY

LOCNLocationIY



^

Parameter NameData ItemData TypeReq/OptI/O/Both
mnShortItemNumberITMMATH_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.

cSuppressErrorMessageEV01charNONENONE

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

cQuantitiesZeroFlagEV02charNONENONE

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.

mnQuantityOnOrderTRQTMATH_NUMERICNONENONE

A value that represents the available quantity, which might consist of the on-hand balance minus commitments, reservations, and 
backorders. You enter this value in the Branch/Plant Constants program (P41001).

szLotNumberLOTNcharNONENONE

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

szLocationLOCNcharNONENONE

The storage location from which goods will be moved.

Related Functions

None

Related Tables

F41021 Item Location File