CalculateQuantityAvailable

Calculate Qty Available

Major Business Rule

Object Name: B4100010

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description

Purpose

This function calculates the Quantity Available and Quantity Committed, given the user defined 

availability.


Setup Notes and Prerequisites

The Short Item Number (ITM) and Branch/Plant (MCU) must be passed in, as well as the user defined 

availability from the F41001.  Use business function GetUserDefinedAvailability (B4100010) to retrieve 

these fields.


Special Logic



Technical Specification


This function calculates Quantity Available and Quantity Committed.  It calls GetSafetyStock 

(B4100010) to retrieve Safety Stock, Potency Control and Grade Control from the Item Branch table (F4102).  If 

either the Lot or Potency control is set to 'Y', or the Lot Number is not blank, the Lot Master table 

(F4108) will be retrieved.  The Lot Potency (LOTP), Lot Grade (LOTG) and Lot Expiration Date (MMEJ) 

will be retrieved.  


The From and Thru Lots, Grade, Potency and Date ranges will 

be compared to see how they compare to the information from the Lot Master.  If the record passed in 

is within the range, the Quantity Available and Quantity Committed fields are calculated based upon 

the user defined availability.


Quantity Available is calculated as follows:


Quantities Added  (DAxx = '+')


DA08:PO Receipt (LIPREQ)

DA09:WO Receipt (LIQWBO)

DA10:PO Other 1 (LIOT1A)

DA12:In Inspection (LIQTIN)

DA13:In Transit (LIQTTR)

DA14:In Operation 1 (LIQTO1)

DA15:In Operation 2 (LIQTO2)


Quantities Subtracted  (DAxx = '-')


DA01:Soft Commit (LIPCOM)

DA02:SO Hard Commit (LIHCOM)

DA03:Future Commit (LIFCOM)

DA04:WO Hard Commit (LIQOWO)

DA05:SO Other 1 (LIOT1P)

DA06:SO Other 2 (LIOT2P)

DA07:Held (LIPQOH - Used only if F41021 Lot Status is not equal to '  ')

DA11:Safety Stock (IBSAFE - Used only if F41021 Primary Bin = 'P')

Quantity Committed is calculated by adding the following quantities, based on the user defined 
availability.  The calculation is as follows:


Quantities Added

DA01:Soft Commit (LIPCOM)

DA02:SO Hard Commit (LIHCOM)

DA03:Future Commit (LIFCOM)

DA04:WO Hard Commit (LIQOWO)


Data Structure

D4100010C - Calculate Quantity Available

Parameters:
Data Item Data Structure DescriptionI/ORequired
MCUBranch/PlantIY

ITMShort Item NumberIY

LOCNLocationIN

LOTNLot NumberIN

PQOHQty On HandIN

PREQQty PO ReceiptIN

PBCKQty On BackorderIN

PCOMQty Soft CommitIN

HCOMQty Hard CommitIN

FCOMQty Future CommitIN

QOWOQty WO Hard CommitIN

QTTRQty In TransitIN

QTINQty In InspectionIN

QTO1Qty In Operation 1IN

QTO2Qty In Operation 2IN

OT1PSO Other 1IN

OT2PSO Other 2IN

OT1APO Other 1IN

SAFESafety StockI/ON

QCOMMQuantity CommittedO

QWBOQty WO ReceiptO

QROUTQty In RoutingO

QAVALQty AvailableO

PBINPrimary BinIN

LOTSLot StatusI/ON

ERRCReturn CodeO

OT1YPotency ControlI/ON

OT2YGrade ControlI/ON

FRMPFrom PotencyI/ON

THRPThru PotencyI/ON

FRGDFrom GradeI/ON

THGDThru GradeI/ON

EXDPDays Before ExpirationIN

LOTGLot GradeI/ON

LOTPLot PotencyI/ON

MMEJExpiration DateI/ON

UOM1Primary UOMIY

UOM2Secondary UOMIY

DA01Soft CommitIY

DA02Hard CommitIY

DA03Future CommitIY

DA04WO Hard CommitIY

DA05SO Other 1IY

DA06SO Other 2IY

DA07On HoldIY

DA08Purchase OrderIY

DA09Work OrderIY

DA10Other POIY

DA11Safety StockIY

DA12In InspectionIY

DA13TransitIY

DA14In Operation 1IY

DA15Operation 2IY

CONVConversion FactorIN

TFLAStandardUomConversionIY


^

Parameter NameData ItemData TypeReq/OptI/O/Both
mnIdentifiershortitem_1ITMMATH_NUMERICNONENONE

Data Item  ab Data Structure  Descriptionab  ab  I/Oab  Requiredab  Notesab 

^

szBranch_2MCUcharNONENONE

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.

szLot_1LOTNcharNONENONE

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

szLocation_1LOCNcharNONENONE

The storage location from which goods will be moved.

cLotStatusCode_1LOTScharNONENONE

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.

cPrimaryBin_1PBINcharNONENONE

A code that indicates whether this is the primary or secondary location for this item within this stocking location. Valid values are:    P Primary 
storage location    S Secondary storage location  Note:  You can only have one storage area marked as primary within each branch or 
warehouse. In some cases, the system uses the primary storage area as the default.

mnSoftCommitSOWO_1PCOMMATH_NUMERICNONENONE

The number of units soft committed to sales orders or work orders in the primary units of measure.

mnHardCommitSalesOrder_1HCOMMATH_NUMERICNONENONE

The number of units committed to a specific location and lot.

mnFutureCommit_1FCOMMATH_NUMERICNONENONE

The quantity on sales order whose requested shipment date is beyond the standard commitment period that has been specified in the 
Inventory Constants for that branch.  As an example, if you normally ship most orders within 90  days, then an order for an item with a requested 
ship date a year from now would have its quantity reflected in this field.

mnHardCommitWorkOrder_1QOWOMATH_NUMERICNONENONE

The number of units hard committed to work orders in the primary unit of measure.

mnOnSalesOrderOther1_1OT1PMATH_NUMERICNONENONE

The first of two quantities that can be specified as additional offsets (subtractions from on-hand) in the determination of quantities available 
for sale.  (Primary unit of measure)

mnOnSalesOrderOther2_1OT2PMATH_NUMERICNONENONE

The second of two quantities that can be specified as additional offsets (subtractions from on-hand) in the determination of quantities 
available for sale.  (Primary unit of measure)

mnOnHand_1PQOHMATH_NUMERICNONENONE

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

mnOnPurchaseOrder_1PREQMATH_NUMERICNONENONE

The number of units specified on the purchase order in primary units of measure.

mnOnWorkOrderReceipt_1QWBOMATH_NUMERICNONENONE

The number of units on work orders in primary units of measure.

mnOnPurchaseOrderOther1_1OT1AMATH_NUMERICNONENONE

The quantity that appears on documents such as bid requests, which are not formal commitments to buy on the part of your organization.

mnInInspection_1QTINMATH_NUMERICNONENONE

The quantity currently being inspected.  This quantity has been received, but is not considered on hand.

mnInTransit_1QTTRMATH_NUMERICNONENONE

The quantity currently in transit from the supplier.

mnInOperation1_1QT01MATH_NUMERICNONENONE

Quantity field in the Batch Receiver Destination Quantity table (F4012Z) that is used to process multiple ship to locations. This function is 
only valid for EDI transactions.

mnInOperation2_1QT02MATH_NUMERICNONENONE

Quantity field in the Batch Receiver File - Destination Quantity (F4012Z) that is used to process multiple ship to locations.  This is only a 
function valid for EDI transactions.

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

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

szFromGrade_2FRGDcharNONENONE

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.

szThruGrade_2THGDcharNONENONE

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.

mnDaysBeforeExpiration_1EXDPMATH_NUMERICNONENONE

The number of days allowed before expiration for an item where it still can be used or sold to a specific customer.  When negative, this 
number indicates the number of days after expiration for an item where it still can be used or sold to a specific customer. For example, if the 
expiration date for item 1001 is 06/01/98:     o A value of 15 in Days Before Expiration means that this specific customer only accepts this item up to 
05/15/98.     o A value of -15 in Days Before Expiration means that this specific customer accepts this item up to 06/15/98.

mnAvailable_1QAVALMATH_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).  

mnCommitted_1QCOMMMATH_NUMERICNONENONE

The total quantity that is committed to a specific location. The total quantity is the sum of all quantities that have been sold or committed 
from the following:     o Soft Committed to Sales Orders     o Hard Committed to Sales Orders     o Soft Committed to Work Orders     o Hard 
Committed to Work Orders 

mnSafetyStock_2SAFEMATH_NUMERICNONENONE

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

cPotencyControl_2OT1YcharNONENONE

A code that indicates whether you control the item by potency.

cGradeControl_2OT2YcharNONENONE

A code that indicates whether you control the item by grade.

szLotGrade_1LOTGcharNONENONE

A code that indicates the grade of a lot. The grade is used to indicate the quality of the lot. Examples include the following:    A1   Premium 
grade    A2   Secondary grade  The grade for a lot is stored in the Lot Master table (F4108).

mnLotPotency_1LOTPMATH_NUMERICNONENONE

A code that indicates the potency of the lot expressed as a percentage of active or useful material (for example, the percentage of alcohol 
in a solution). The actual potency of a lot is defined in the Lot Master table (F4108).

jdExpirationDate_1MMEJJDEDATENONENONE

The date on which a lot of items expires. The system automatically enters this date if you have specified the shelf life days for the item on 
Item Master Information or Item Branch/Plant Information. The system calculates the expiration date by adding the number of shelf life days to 
the date that you receive the item. You can commit inventory based on the lot expiration date for items. You choose how the system commits 
inventory for an item on Item Master Information or Item Branch/Plant Information.

mnInRouting_1QROUTMATH_NUMERICNONENONE

The total number of items that are in route. The total is the sum of all quantities that are considered to be in transit but are not presently on 
hand.

mnOnReceipt_1QORECMATH_NUMERICNONENONE

The total number of items that are on receipt for a specific location. The total is the sum of all quantities of an item that are on order and in 
route for a location.

mnOnBackOrder_1PBCKMATH_NUMERICNONENONE

The number of units backordered in primary units of measure.

cReturnCode_1EV01charNONENONE

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

szPrimaryUnitOfMeasureUOM1charNONENONE

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

szSecondaryUnitOfMeasureUOM2charNONENONE

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

cUDQtySoftCommitDA01charNONENONE

Code telling the system whether the number of units soft committed to sales orders or work orders should be included in the item availability 
calculation. Valid codes are: Blank  No effect on the quantity available    -      Reduces the quantity available (default)

cUDQtySOHardCommitDA02charNONENONE

Code telling the system whether the number of units hard committed to a specific location and lot for sales orders is included in the item 
availability calculation. Valid codes are: Blank   No effect on the quantity available    -  Reduces the quantity available (default)

cUDQtyFutureCommitDA03charNONENONE

Code telling the system to include the quantity on any sales order whose requested shipment date is beyond the specific commitment 
days. The valid codes are: Blank  No effect on the quantity available    -      Reduces the quantity available (default)

cUDQtyWOHardCommitDA04charNONENONE

Code telling the system whether the number of units hard committed to a specific location and lot for work orders is included in the item 
availability calculation. Valid codes are:    Blank  No effect on the quantity available    -      Reduces the amount available (default))

cUDQtySOOther1DA05charNONENONE

Code indicating whether the system includes the quantity specified as an additional reduction in the item availability calculation. Valid 
codes are: Blank  No effect on the quantity available    -        Reduces the quantity available (default)

cUDQtySOOther2DA06charNONENONE

Code indicating whether the system includes this quantity as an additional reduction in the item availablity calculation. Valid codes 
are: Blank  No effect on the quantity available    -        Reduces the quantity available (default)

cUDQtyOnHoldDA07charNONENONE

Code telling the system to include the number of units on hold in the item availability calculation. Valid codes are: Blank  No effect on the 
quantity available    -        Reduces the quantity available (default)

cUDQtyPOReceiptsDA08charNONENONE

Code telling the system whether to include the number of units on purchase orders in the item availability calculation. Valid codes are:    
Blank  No effect on the quantity available (default)    +      Increases the quantity available

cUDQtyWOReceiptsDA09charNONENONE

Code telling the system to include the number of units on work orders in the item availability calculation. Valid codes are: Blank  No effect on 
the quantity available (default)    +      Increases the quantity available

cUDQtyPOOther1DA10charNONENONE

Code indicating whether the system includes the number of units on other purchase orders in the item availability calculation. Valid codes 
are: Blank  No effect on the quantity available (default)    +      Increases the quantity available

cUDQtySafetyStockDA11charNONENONE

Code indicating whether the system includes the number of units reserved as safety stock in the item availability calculation. Valid codes 
are: Blank  No effect on the quantity available (default)    -      Reduces the quantity available

cUDQtyInInspectionDA12charNONENONE

Code telling the system to include the number of units in inspection in the item availability calculation. Valid codes are: Blank  No effect on 
the quantity available (default)    +      Increases the quantity available

cUDQtyInTransitDA13charNONENONE

Code telling the system to include the number of units in transit in the item availability calculation. Valid codes are:    Blank No effect on the 
quantity available (default)    +       Increases the quantity available

cUDQtyInOperation1DA14charNONENONE

Code telling the system to include the number of units in one operation of the receipt routing process in the item availability calculation. You 
define which operation from receipt routing corresponds to this field. Valid codes are: Blank  No effect on the quantity available (default)    +     
Increases the quantity available

cUDQtyInOperation2DA15charNONENONE

Code telling the system to include the number of units in one operation of the receipt routing process in the item availability calculation. You 
define which operation from receipt routing corresponds to this field. Valid codes are: Blank  No effect on the quantity available (default)    +     
Increases the quantity available

mnConversionFactorCONVMATH_NUMERICNONENONE

The factor that the system uses to convert one unit of measure to another unit of measure.

szStandardUOMFlagTFLAcharNONENONE

From F4101 (Item  Master)ab 

^

mnProjectHardCommitPJCMMATH_NUMERICOPTNONE

The number of units committed to a specified location and lot for a project.

Related Functions

B4000420 Analyze Grade Range.
B4000430 Analyze Potency Range
B4000520 Get Item UoM Conversion Factor

Related Tables

F4102 Item Branch File
F4108 Lot Master
FreeHuserAndHrequest

FreeHuserAndHrequest

Calculate Qty Available

Major Business Rule

Object Name: B4100010

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description

Purpose

This function frees the Hrequest and Huser.


Setup Notes and Prerequisites

The Hrequest and Huser are required parameters.


Special Logic



Technical Specification


This function frees the pointers (Hrequest and Huser) passed into this function.


Data Structure

D4100010D - Free Huser And Hrequest

Parameters:
Data Item Data Structure DescriptionI/ORequired
GENLNGGeneric HrequestI/OY

GENLNGGeneric HuserI/OY



^

Parameter NameData ItemData TypeReq/OptI/O/Both
idGenericHRqstGENLNGIDNONENONE

General purpose ID variable.

idGenericHUserGENLNGIDNONENONE

General purpose ID variable.

Related Functions

B4000420 Analyze Grade Range.
B4000430 Analyze Potency Range
B4000520 Get Item UoM Conversion Factor

Related Tables

F4102 Item Branch File
F4108 Lot Master
GetSafetyStock

GetSafetyStock

Calculate Qty Available

Major Business Rule

Object Name: B4100010

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description

Purpose

This function retrieves Safety Stock, Potency and Grade information, Reorder quantities and the 

Supplier number from the Item Branch table (F4102).

 

Setup Notes and Prerequisites

The Short Item Number and Branch/Plant must be passed in, as well as the User Defined Availability 

fields (DA01 - DA15) from the F41001 table.  Use the function GetUserDefinedAvailability (B4100010) to 

retrieve this information.


Special Logic



Technical Specification


This function retrieves the Safety Stock (SAFE), Potency

Control (OT1Y), Grade Control (OT2Y), From Potency (FRMP), Thru Potency (THRP), From Grade (FRGD), 

Thru Grade (THGD), Reorder Point (ROPI), Reorder Quantity (ROQI), Reorder Quantity - Max (RQMX) and 

Supplier Number (VEND) from the Item Branch table (F4102) with the Short Item Number (ITM) and 

Branch/Plant (MCU) passed in.

Data Structure

D4100010B - Get Safety Stock

Parameters:
Data Item Data Structure DescriptionI/ORequired
MCUBranch/PlantIY

ITMShort Item NumberIY

SAFESafety StockO

OT1YPotency ControlO

OT2YGrade ControlO

FRMPDefault From PotencyO

THRPDefault Thru PotencyO

FRGDDefault From GradeO

THGDDefault Thru GradeO

ROPIReorder PointO

ROQIReorder QuantityO

RQMXRorder Quantity-MaxO

VENDSupplier NumberO

DA01Soft CommitIY

DA02Hard CommitIY

DA03Future CommitIY

DA04WO Hard CommitIY

DA05SO Other 1IY

DA06SO Other 2IY

DA07On HoldIY

DA08Purchase OrderIY

DA09Work OrderIY

DA10Other POIY

DA11Safety StockIY

DA12In InspectionIY

DA13In TransitIY

DA14In Operation 1IY

DA15In Operation 2IY


^

Parameter NameData ItemData TypeReq/OptI/O/Both
mnSafetyStock_1SAFEMATH_NUMERICNONENONE

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

cPotencyControl_1OT1YcharNONENONE

A code that indicates whether you control the item by potency.

cGradeControl_1OT2YcharNONENONE

A code that indicates whether you control the item by grade.

szBranch_1MCUcharNONENONE

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.

mnShortItemNumber_1ITMMATH_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

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

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

szDefaultFromGradeFRGDcharNONENONE

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.

szDefaultThruGradeTHGDcharNONENONE

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.

mnReorderPointROPIMATH_NUMERICNONENONE

A quantity for an item that specifies when replenishment occurs. Typically,this occurs when the total quantity on hand plus the quantity on 
order fall to, or below a specified quantity. You can enter this quantity or the system can calculate it if there is sufficient sales history.

mnReorderQuantityROQIMATH_NUMERICNONENONE

The estimated reorder quantity for an item. You can enter this quantity if there is not enough sales history available for the system to 
accurately calculate a reorder quantity.

mnReorderQuantityMaxRQMXMATH_NUMERICNONENONE

The maximum order quantity for an item. You can base the quantity on factors other than usage, such as perishability, storage capacity, 
and so forth.

mnSupplierNumberVENDMATH_NUMERICNONENONE

The address book number of the preferred provider of this item.

mnSafetyStockSAFEMATH_NUMERICNONENONE

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

mnStandardPotencySTDPMATH_NUMERICNONENONE

The percentage of active ingredients normally found in an item.

szStandardGradeSTDGcharNONENONE

A code (table 40/LG) that represents the normal grade for an item.

Related Functions

B4000420 Analyze Grade Range.
B4000430 Analyze Potency Range
B4000520 Get Item UoM Conversion Factor

Related Tables

F4102 Item Branch File
F4108 Lot Master
GetUserDefinedAvailability

GetUserDefinedAvailability

Calculate Qty Available

Minor Business Rule

Object Name: B4100010

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description

Purpose

This function retrieves the user defined availability DA01 - DA15 from the F41001 table.


Setup Notes and Prerequisites

The Branch/Plant and system code to be retrieved from the F41001 must be passed into this function.


Special Logic



Technical Specification


This function retrieves the user defined availability columns from the Inventory System Constants 

table (F41001) with the Branch/Plant passed in and blank System Code.

Data Structure

D4100010A - Get User Defined Availability

Parameters:
Data Item Data Structure DescriptionI/ORequired
MCU        Branch/PlantIY

SYSSystemCodeIY

DA01Soft CommitO

DA02Hard CommitO

DA03Future CommitO

DA04WO Hard CommitO

DA05SO Other 1O

DA06SO Other 2O

DA07On HoldO

DA08Purchase OrderO

DA09Work OrderO

DA10Other POO

DA11Safety StockO

DA12In InspectionO

DA13In TransitO

DA14In Operation 1O

DA15In Operation 2O


^

Parameter NameData ItemData TypeReq/OptI/O/Both
szBranchPlant_1MCUcharNONENONE

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.

szSystemCode_1SYcharNONENONE

A user defined code (98/SY) that identifies a system. Valid values include: 01 Address Book 03B Accounts Receivable 04 Accounts 
Payable 09 General Accounting 11 Multicurrency

cUDQtySoftCommitDA01charNONENONE


^

cUDQtyHardCommitDA02charNONENONE

Code telling the system whether the number of units hard committed to a specific location and lot for sales orders is included in the item 
availability calculation. Valid codes are: Blank   No effect on the quantity available    -  Reduces the quantity available (default)

cUDQtyFutureCommitDA03charNONENONE

Code telling the system to include the quantity on any sales order whose requested shipment date is beyond the specific commitment 
days. The valid codes are: Blank  No effect on the quantity available    -      Reduces the quantity available (default)

cUDQtyWOHardCommitDA04charNONENONE

Code telling the system whether the number of units hard committed to a specific location and lot for work orders is included in the item 
availability calculation. Valid codes are:    Blank  No effect on the quantity available    -      Reduces the amount available (default))

cUDQtySOOther1DA05charNONENONE

Code indicating whether the system includes the quantity specified as an additional reduction in the item availability calculation. Valid 
codes are: Blank  No effect on the quantity available    -        Reduces the quantity available (default)

cUDQtySOOther2DA06charNONENONE

Code indicating whether the system includes this quantity as an additional reduction in the item availablity calculation. Valid codes 
are: Blank  No effect on the quantity available    -        Reduces the quantity available (default)

cUDQtyOnHoldDA07charNONENONE

Code telling the system to include the number of units on hold in the item availability calculation. Valid codes are: Blank  No effect on the 
quantity available    -        Reduces the quantity available (default)

cUDQtyPuchaseOrderDA08charNONENONE

Code telling the system whether to include the number of units on purchase orders in the item availability calculation. Valid codes are:    
Blank  No effect on the quantity available (default)    +      Increases the quantity available

cUDQtyWorkOderDA09charNONENONE

Code telling the system to include the number of units on work orders in the item availability calculation. Valid codes are: Blank  No effect on 
the quantity available (default)    +      Increases the quantity available

cUDQtyOtherPODA10charNONENONE

Code indicating whether the system includes the number of units on other purchase orders in the item availability calculation. Valid codes 
are: Blank  No effect on the quantity available (default)    +      Increases the quantity available

cUDQtySafetyStockDA11charNONENONE

Code indicating whether the system includes the number of units reserved as safety stock in the item availability calculation. Valid codes 
are: Blank  No effect on the quantity available (default)    -      Reduces the quantity available

cUDQtyInInspectionDA12charNONENONE

Code telling the system to include the number of units in inspection in the item availability calculation. Valid codes are: Blank  No effect on 
the quantity available (default)    +      Increases the quantity available

cUDQtyInTransitDA13charNONENONE

Code telling the system to include the number of units in transit in the item availability calculation. Valid codes are:    Blank No effect on the 
quantity available (default)    +       Increases the quantity available

cUDQtyOperation1DA14charNONENONE

Code telling the system to include the number of units in one operation of the receipt routing process in the item availability calculation. You 
define which operation from receipt routing corresponds to this field. Valid codes are: Blank  No effect on the quantity available (default)    +     
Increases the quantity available

cUDQtyOperation2DA15charNONENONE

Code telling the system to include the number of units in one operation of the receipt routing process in the item availability calculation. You 
define which operation from receipt routing corresponds to this field. Valid codes are: Blank  No effect on the quantity available (default)    +     
Increases the quantity available

Related Functions

B4000420 Analyze Grade Range.
B4000430 Analyze Potency Range
B4000520 Get Item UoM Conversion Factor

Related Tables

F4102 Item Branch File
F4108 Lot Master
chase 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.

mnDaysBeforeExpiration_1EXDPMATH_NUMERICNONENONE

The number of days allowed before expiration for an item where it still can be used or sold to a specific customer.  When negative, this 
number indicates the number of days after expiration for an item where it still can be used or sold to a specific customer. For example, if the 
expiration date for item 1001 is 06/01/98:     o A value of 15 in Days Before Expiration means that this specific customer only accepts this item up to 
05/15/98.     o A value of -15 in Days Before Expiration means that this specific customer accepts this item up to 06/15/98.

mnAvailable_1QAVALMATH_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).  

mnCommitted_1QCOMMMATH_NUMERICNONENONE

The total quantity that is committed to a specific location. The total quantity is the sum of all quantities that have been sold or committed 
from the following:     o Soft Committed to Sales Orders     o Hard Committed to Sales Orders     o Soft Committed to Work Orders     o Hard 
Committed to Work Orders 

mnSafetyStock_2SAFEMATH_NUMERICNONENONE

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

cPotencyControl_2OT1YcharNONENONE

A code that indicates whether you control the item by potency.

cGradeControl_2OT2YcharNONENONE

A code that indicates whether you control the item by grade.

szLotGrade_1LOTGcharNONENONE

A code that indicates the grade of a lot. The grade is used to indicate the quality of the lot. Examples include the following:    A1   Premium 
grade    A2   Secondary grade  The grade for a lot is stored in the Lot Master table (F4108).

mnLotPotency_1LOTPMATH_NUMERICNONENONE

A code that indicates the potency of the lot expressed as a percentage of active or useful material (for example, the percentage of alcohol 
in a solution). The actual potency of a lot is defined in the Lot Master table (F4108).

jdExpirationDate_1MMEJJDEDATENONENONE

The date on which a lot of items expires. The system automatically enters this date if you have specified the shelf life days for the item on 
Item Master Information or Item Branch/Plant Information. The system calculates the expiration date by adding the number of shelf life days to 
the date that you receive the item. You can commit inventory based on the lot expiration date for items. You choose how the system commits 
inventory for an item on Item Master Information or Item Branch/Plant Information.

mnInRouting_1QROUTMATH_NUMERICNONENONE

The total number of items that are in route. The total is the sum of all quantities that are considered to be in transit but are not presently on 
hand.

mnOnReceipt_1QORECMATH_NUMERICNONENONE

The total number of items that are on receipt for a specific location. The total is the sum of all quantities of an item that are on order and in 
route for a location.

mnOnBackOrder_1PBCKMATH_NUMERICNONENONE

The number of units backordered in primary units of measure.

cReturnCode_1EV01charNONENONE

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

szPrimaryUnitOfMeasureUOM1charNONENONE

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

szSecondaryUnitOfMeasureUOM2charNONENONE

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

cUDQtySoftCommitDA01charNONENONE

Code telling the system whether the number of units soft committed to sales orders or work orders should be included in the item availability 
calculation. Valid codes are: Blank  No effect on the quantity available    -      Reduces the quantity available (default)

cUDQtySOHardCommitDA02charNONENONE

Code telling the system whether the number of units hard committed to a specific location and lot for sales orders is included in the item 
availability calculation. Valid codes are: Blank   No effect on the quantity available    -  Reduces the quantity available (default)

cUDQtyFutureCommitDA03charNONENONE

Code telling the system to include the quantity on any sales order whose requested shipment date is beyond the specific commitment 
days. The valid codes are: Blank  No effect on the quantity available    -      Reduces the quantity available (default)

cUDQtyWOHardCommitDA04charNONENONE

Code telling the system whether the number of units hard committed to a specific location and lot for work orders is included in the item 
availability calculation. Valid codes are:    Blank  No effect on the quantity available    -      Reduces the amount available (default))

cUDQtySOOther1DA05charNONENONE

Code indicating whether the system includes the quantity specified as an additional reduction in the item availability calculation. Valid 
codes are: Blank  No effect on the quantity available    -        Reduces the quantity available (default)

cUDQtySOOther2DA06charNONENONE

Code indicating whether the system includes this quantity as an additional reduction in the item availablity calculation. Valid codes 
are: Blank  No effect on the quantity available    -        Reduces the quantity available (default)

cUDQtyOnHoldDA07charNONENONE

Code telling the system to include the number of units on hold in the item availability calculation. Valid codes are: Blank  No effect on the 
quantity available    -        Reduces the quantity available (default)

cUDQtyPOReceiptsDA08charNONENONE

Code telling the system whether to include the number of units on purchase orders in the item availability calculation. Valid codes are:    
Blank  No effect on the quantity available (default)    +      Increases the quantity available

cUDQtyWOReceiptsDA09charNONENONE

Code telling the system to include the number of units on work orders in the item availability calculation. Valid codes are: Blank  No effect on 
the quantity available (default)    +      Increases the quantity available

cUDQtyPOOther1DA10charNONENONE

Code indicating whether the system includes the number of units on other purchase orders in the item availability calculation. Valid codes 
are: Blank  No effect on the quantity available (default)    +      Increases the quantity available

cUDQtySafetyStockDA11charNONENONE

Code indicating whether the system includes the number of units reserved as safety stock in the item availability calculation. Valid codes 
are: Blank  No effect on the quantity available (default)    -      Reduces the quantity available

cUDQtyInInspectionDA12charNONENONE

Code telling the system to include the number of units in inspection in the item availability calculation. Valid codes are: Blank  No effect on 
the quantity available (default)    +      Increases the quantity available

cUDQtyInTransitDA13charNONENONE

Code telling the system to include the number of units in transit in the item availability calculation. Valid codes are:    Blank No effect on the 
quantity available (default)    +       Increases the quantity available

cUDQtyInOperation1DA14charNONENONE

Code telling the system to include the number of units in one operation of the receipt routing process in the item availability calculation. You 
define which operation from receipt routing corresponds to this field. Valid codes are: Blank  No effect on the quantity available (default)    +     
Increases the quantity available

cUDQtyInOperation2DA15charNONENONE

Code telling the system to include the number of units in one operation of the receipt routing process in the item availability calculation. You 
define which operation from receipt routing corresponds to this field. Valid codes are: Blank  No effect on the quantity available (default)    +     
Increases the quantity available

mnConversionFactorCONVMATH_NUMERICNONENONE

The factor that the system uses to convert one unit of measure to another unit of measure.

szStandardUOMFlagTFLAcharNONENONE

From F4101 (Item  Master)ab 

^

mnProjectHardCommitPJCMMATH_NUMERICOPTNONE

The number of units committed to a specified location and lot for a project.

Related Functions

B4000420 Analyze Grade Range.
B4000430 Analyze Potency Range
B4000520 Get Item UoM Conversion Factor

Related Tables

F4102 Item Branch File
F4108 Lot Master
FreeHuserAndHrequest

FreeHuserAndHrequest

Calculate Qty Available

Major Business Rule

Object Name: B4100010

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description

Purpose

This function frees the Hrequest and Huser.


Setup Notes and Prerequisites

The Hrequest and Huser are required parameters.


Special Logic



Technical Specification


This function frees the pointers (Hrequest and Huser) passed into this function.


Data Structure

D4100010D - Free Huser And Hrequest

Parameters:
Data Item Data Structure DescriptionI/ORequired
GENLNGGeneric HrequestI/OY <