F3002CalculateAvailibility

F3002 Calculate Availbility

Minor Business Rule

Object Name: N3003120

Parent DLL: CMFGBASE

Location: Client/Server

Language: NER

1.Functional Description

1.1Purpose
Calculate the On Hand Quantity and Available Quantity for the Item.  The On Hand Quantity and 
Available Quantity are returned in the Items primary unit of measure.  On Hand Quantity can be calculated 

with or without adjustment for safety stock.


1.2Setup Notes and Prerequisites

• Set flag to indicate whether or not safety stock should be subtracted from the On Hand Quantity.
• Retrieve Safety Stock, From Potency, Thru Potency, From Grade, and Thru Grade from F4102
• Retrieve Primary and Secondary UOM from F4101


1.3Special Logic

• Returns the On Hand Quantity and Available Quantity in Primary Unit of measure.




2.Technical Specifications


2.4Processing 


1.0.Call business function to Calculate Availability


BSFN F41021 CalculateAvailability

DS Item NumberShort  >mnShortItemNumber
DS BranchPlant>szBranchPlant

DS From Potency>mnFromPotency

DS Thru Potency>mnThruPotency

DS From Grade>szFromGrade

DS Thru Grade>szThruGrade

DS Primary UOM>szPrimaryUOM

DS Secondary UOM>szSecondaryUOM

DS AvailableQty<MnQuantityAvailable

'2'>mnIndex

'2'>mnKeys

DS OnHandQtyPrimary<mnQtyOnHand


2.0.If DS Subtract Safety Stock = '1', subtract safety stock from quantity on hand.

DS OnHandQty = DS OnHandQtyPrimary - DS SafetyStock.


3.0.  Convert Available Quantity to Component UOM

^

Data Structure

D3003120 - F3002 Calculate Availability

Parameter NameData ItemData TypeReq/OptI/O/Both
cSubtractSafetyStockEV01charNONENONE

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

mnSafetyStockSAFEMATH_NUMERICNONENONE

The quantity of stock kept on hand to cover high-side variations in demand.

mnItemNumberShortITMMATH_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.

mnFromPotencyFRMPMATH_NUMERICNONENONE

A number that indicates the minimum potency or percentage of active ingredients acceptable for an item. The system displays a warning 
message if you try to purchase or issue items that do not meet the minimum acceptable potency. The system does not allow you to sell items 
that do not meet the minimum acceptable potency.

mnThruPotencyTHRPMATH_NUMERICNONENONE

A number that indicates the maximum potency or percentage of active ingredients that is acceptable for an item. The system displays a 
warning message if you try to purchase or issue items that have a potency that exceeds the maximum potency acceptable. The system does 
not allow you to sell items that have a potency that exceeds the maximum potency acceptable.

szFromGradeFRGDcharNONENONE

A user defined code (40/LG) that indicates the minimum grade that is acceptable for an item. The system displays a warning message if 
you try to purchase or issue items with grades that do not meet the minimum grade acceptable. The system does not allow you to sell items 
with grades that do not meet the minimum acceptable level.

szThruGradeTHGDcharNONENONE

A user defined code (40/LG) that indicates the maximum grade that is acceptable for an item. The system displays a warning message if 
you try to purchase or issue items with grades that exceed the maximum grade acceptable. The system does not allow you to sell items with 
grades that exceed the maximum grade acceptable.

szPrimaryUOMUOM1charNONENONE

A user defined code (00/UM) that identifies the unit of measure that the system uses to express the quantity of an item, for example, EA 
(each) or KG (kilogram).

szSecondaryUOMUOM2charNONENONE

A user defined code (00/UM) that indicates an alternate unit of measure for the item.

mnCFPrimaryToComponentMN29D9MATH_NUMERICNONENONE

This is a generic field used as a work field in Everest.

mnAvailableQtyQNTYMATH_NUMERICNONENONE

The number of units that the system applies to the transaction.

mnOnHandQtyPrimaryQNTYMATH_NUMERICNONENONE

The number of units that the system applies to the transaction.

Related Functions

None

Related Tables

None