CheckForZeroQuantity

Check For Zero Quantity

Major Business Rule

Object Name: B4100110

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description

Purpose

Base on the Index and Keys combination, fetch all records exist in F41021 (Item Location) table.  
Verify if any record contain any quantity.  If the quantity is not zero the ZeroQuantityFlage is set to 

'0'.  If all records found contain zero quantities or no record found, then ZeroQuantityFlag is set to 

'1'.


Setup Notes and Prerequisites

The Short Item Number (ITM), Lot Number (LOTN), and Branch/Plant (MCU) as well as the Index and Keys 

are required parameters.


Indices and Key values:


Index = 1 :

Keys = 1 :  Fetch by ITM only.
Keys = 2 :  Fetch by ITM and MCU.

Index = 2 :

Keys = 1 :  Fetch by ITM only.

Keys = 2 :  Fetch by ITM and MCU.

Keys = 3 :  Fethc by ITM, MCU, and LOTN.


Index = 3 :

Keys = 1 :  Fetch by MCU only.


Index = 5 :

Keys = 1 :  Fetch by LOTN only.

Keys = 2 :  Fetch by LOTN and ITM.

Keys = 3 :  Fetch by LOTN, ITM and MCU.



If the Check All Qty Zero parameter = '1', all quantity fields in the F41021 are checked to see if 

they are zero.


Special Logic



Technical Specification


This function fetches the Item Location record (F41021) for the keys passed in.  If any of the 

following quantity fields is not equal to zero, move a '0' to the Zero Quantity Flag parameter to be 

returned.  


Quantities checked:


Primary Quantity On HandPQOH

Soft CommittedPCOM

Hard CommittedHCOM

Quantity On Work OrderQOWO

Quantity On Work Order ReceiptQWBO

Quantity On Back OrderPBCK

Quantity On POPREQ

Quantity Other 1OT1P

Quantity Other 2OT2P


If the Check All Qty Zero parameter = '1', if any of the following quantity fields is not equal to 

zero, move a '0' to the Zero Quantity Flag parameter to be returned.


Quantities checked:


Quantity On Future CommitFCOM
Quantity - WO Soft CommitFUN1

Quantity - Inbound WarehouseQTRI

Quantity - Outbound WarehouseQTRO

Quantity - Other Purchasing 1OT1A

Quantity - In InspectionQTIN

Quantity - In Operation 1QTO1

Quantity - In Operation 2QTO2

Quantity - On Loan to ManufactureQONL




^

Data Structure

D4100110 - Check For Zero Quantity

Parameters:
Data Item Data Structure DescriptionI/ORequired
ITMShort Item NumberIY

LOTNLot NumberIY

MCUBranch PlantIY

EV02IndexIY

CDLKeysIY

EV01Zero Quantity FlagON

EV02Check All Qty ZeroIN



^

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

szLotNumberLOTNcharNONENONE

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

cZeroQuantityFlagEV01charNONENONE

'0' = Quantities Exist
'1' = No Quantities Exist

^

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.

cIndexEV02charNONENONE

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

mnKeysCDLMATH_NUMERICNONENONE

Default to 2
^

cCheckAllQtyAreZeroEV02charNONENONE

'1' = All Qty buckets will be checked for zero
^

Related Functions

None

Related Tables

F41021 Item Location File