GetQuantityAvailable

Get Quantity Available

Major Business Rule

Object Name: B4100160

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description

Purpose

This function retrieves the quantity available for the Item, Branch/Plant and Lot Number retrieved.  
This function will call the C4102A function based on wheter the Quantity On Hold flag for User Defined 

Availablity is a '-' or not for the branch.



Setup Notes and Prerequisites

The Short Item Number (ITM), Branch/Plant (MCU) and Lot Number (LOTN) are required parameters.


Special Logic


Technical Specification

This function calls Calculate Quantity Available (B4100010) and the quantity available is returned.

Edits:

1.) Call GetBranchPlant with the Branch sent in
If the field DA01 (quantity on hold) from the branch plant record is a 

'-' return zeros in Quantity Available


Else


Call CalculateQuantityAvailable (C4102A.C) passing the following:

ItemNumber(ITM)

Branch(MCU)

Lot(LOTN)

LotStatus(LOTS)

  The QuantityAvailable will be passed back.



Retrievals:



Returns:

1.) Quantity Available

Data Structure

D4100160 - Get Quantity Available

Parameters:
Data Item Data Structure DescriptionI/ORequired
MCUBranchPlant

ITMIdentifierShortItem

LOTNLot

LOCNLocation

LOTSLotStatusCode

QAVALQuantityAvailable



^

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

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.

cLotStatusLOTScharNONENONE

A user defined code (41/L) that indicates the status of the lot. If you leave this field blank, it indicates that the lot is approved. All other codes 
indicate that the lot is on hold. You can assign a different status code to each location in which a lot resides on Item/Location Information or 
Location Lot Status Change.

mnQuantityAvailableQAVALMATH_NUMERICNONENONE

A number that indicates the quantity that is available. For example, the available quantity might consist of the on-hand quantity minus 
commitments, reservations, and backorders.  Availability is user defined. You can set up availability in the Branch/Plant Constants program (P41001).  

szLocationLOCNcharNONENONE

The storage location from which goods will be moved.

Related Functions

B4100010 Calculate Qty Available

Related Tables

F41021 Item Location File