Functional Description
Purpose
Use this function to see if the quantity being processed is greater than the quantity available.
This function also checks to make sure the combo itm, cmu, locn , lotn & qty are not on any other lines
of the grid. If it's unique, add the qty to the link list.
Setup Notes and Prerequisites
This function should only be called if a check should be made to ensure that quantity is not being
processed that will make quantity available drop below zero. Each line will be checked as it is
processed against itself and any other previously written for the same item number.
All parameters for C4102a1 need to be passed in, as C4102a1 is called from this business function.
Do not call this business function if IBCKAV is an 'N' for the Item and Branch you are processing.
Special Logic
Create a link list wtih ITM, MCU, LOCN, LOTN, QTY.
Technical Specifications
Parameters
Data Item Data Structure Description I/O Required Notes
ITM Short Item Number I Y
MCU Branch/Plant I Y
LOCN Location I N
LOTN Lot Number I N
TQOH Primary Transaction Quantity I N
PQOH Quantity on Hand I N
PREQ Quantity on PO Receipt I N
PBCK Quantity on Backorder I N
PCOM Quantity - Soft Commit I N
HCOM Quantity - SO Hard Commit I N
FCOM Quantity - Future Commit I N
QOWO Quantity - WO Hard Commit I N
QTTR Quantity - In Transit I N
QTIN Quantity - In Inspection I N
QT01 Quantity - In Operation 1 I N
QT02 Quantity - In Operation 2 I N
OT1P Quantity - SO Other 1 I N
OT2P Quantity - SO Other 2 I N
OT1A Quantity - PO Other 1 I N
SAFE Safety Stock I N
QAVAL Quantity Available O N
PBIN Primary Bin I Y
LOTS Lot Status I N
ERRC Error Code I N
FRMP From Potency I N
THRP Thur Potency I N
FRGD From Grade I N
THGD Thru Grade I N
EXDP Days Before Expired I N
OT1Y Potency Control I N
OT2Y Grade Control I N
LOTG Lot Grade I N
LOTP Lot Potency I N
MMEJ Expiration date I N
UOM1 Primary UOM I Y
UOM2 Secondary UOM I N
GENLNG Internal Pointer to Link List I Y
EV01 Destroy Link List I N '1' = Destroy Link List
Related Tables
Related Business Functions
Calculate Quantity Available - C4102a1
Processing
Call CalculateQuantityAvailable(C4102a1).
Move blanks to work field $FOUND (one character).
Take QAVAL add TQOH, resulting in a workfield $QTY.
Check to make sure the item is not on any other lines of subfile.
If it is, add the quantity from this line to the total quantity for the item before checking
availability.
Need to store the transactions being processed in a link list.
D4100420 - Check Quantity Over Available
Parameters
Data Item Data Structure Description I/O Required Notes
ITM Short Item Number I Y
MCU Branch/Plant I Y
LOCN Location I N
LOTN Lot Number I N
TQOH Primary Transaction Quantity I N
PQOH Quantity on Hand I N
PREQ Quantity on PO Receipt I N
PBCK Quantity on Backorder I N
PCOM Quantity - Soft Commit I N
HCOM Quantity - SO Hard Commit I N
FCOM Quantity - Future Commit I N
QOWO Quantity - WO Hard Commit I N
QTTR Quantity - In Transit I N
QTIN Quantity - In Inspection I N
QT01 Quantity - In Operation 1 I N
QT02 Quantity - In Operation 2 I N
OT1P Quantity - SO Other 1 I N
OT2P Quantity - SO Other 2 I N
OT1A Quantity - PO Other 1 I N
SAFE Safety Stock I N
QAVAL Quantity Available O N
PBIN Primary Bin I Y
LOTS Lot Status I N
ERRC Error Code I N
FRMP From Potency I N
THRP Thur Potency I N
FRGD From Grade I N
THGD Thru Grade I N
EXDP Days Before Expired I N
OT1Y Potency Control I N
OT2Y Grade Control I N
LOTG Lot Grade I N
LOTP Lot Potency I N
MMEJ Expiration date I N
UOM1 Primary UOM I Y
UOM2 Secondary UOM I N
GENLNG Internal Pointer to Link List I Y
EV01 Destroy Link List I N '1' = Destroy Link List
^
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnShortItemNumber | ITM | MATH_NUMERIC | NONE | NONE |
An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item
| ||||
szBranchPlant | MCU | char | NONE | NONE |
An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit
| ||||
szLocation | LOCN | char | NONE | NONE |
The storage location from which goods will be moved. | ||||
szLotNumber | LOTN | char | NONE | NONE |
A number that identifies a lot or a serial number. A lot is a group of items with similar characteristics. | ||||
mnPrimaryQty | QCOMM | MATH_NUMERIC | NONE | NONE |
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
| ||||
mnQtyOnHand | PQOH | MATH_NUMERIC | NONE | NONE |
The number of units that are physically in stock. The system displays the quantity on-hand in the primary unit of measure. | ||||
mnQtyOnPOReceipt | PREQ | MATH_NUMERIC | NONE | NONE |
The number of units specified on the purchase order in primary units of measure. | ||||
mnQtyOnBackOrder | PBCK | MATH_NUMERIC | NONE | NONE |
The number of units backordered in primary units of measure. | ||||
mnQtySoftCommitted | PCOM | MATH_NUMERIC | NONE | NONE |
The number of units soft committed to sales orders or work orders in the primary units of measure. | ||||
mnQtySOHardCommitted | HCOM | MATH_NUMERIC | NONE | NONE |
The number of units committed to a specific location and lot. | ||||
mnQtyFutureCommit | FCOM | MATH_NUMERIC | NONE | NONE |
The quantity on sales order whose requested shipment date is beyond the standard commitment period that has been specified in the
| ||||
mnQtyWOHardCommit | QOWO | MATH_NUMERIC | NONE | NONE |
The number of units hard committed to work orders in the primary unit of measure. | ||||
mnQtyInTransit | QTTR | MATH_NUMERIC | NONE | NONE |
The quantity currently in transit from the supplier. | ||||
mnQtyInInspection | QTIN | MATH_NUMERIC | NONE | NONE |
The quantity currently being inspected. This quantity has been received, but is not considered on hand. | ||||
mnQtyInOperation1 | QTO1 | MATH_NUMERIC | NONE | NONE |
The quantity which is currently at a user-defined operation within the dock-to-stock process. The quantity has been received, but may or
| ||||
mnQtyInOperation2 | QTO2 | MATH_NUMERIC | NONE | NONE |
The quantity which is currently at a user-defined operation within the dock-to-stock process. The quantity has been received, but may or
| ||||
mnQtySOOther1 | OT1P | MATH_NUMERIC | NONE | NONE |
The first of two quantities that can be specified as additional offsets (subtractions from on-hand) in the determination of quantities available
| ||||
mnQtySOOther2 | OT2P | MATH_NUMERIC | NONE | NONE |
The second of two quantities that can be specified as additional offsets (subtractions from on-hand) in the determination of quantities
| ||||
mnQtyPOOther1 | OT1A | MATH_NUMERIC | NONE | NONE |
The quantity that appears on documents such as bid requests, which are not formal commitments to buy on the part of your organization. | ||||
mnSafetyStock | SAFE | MATH_NUMERIC | NONE | NONE |
The quantity of stock kept on hand to cover high-side variations in demand. | ||||
mnQuantityAvailable | QAVAL | MATH_NUMERIC | NONE | NONE |
A number that indicates the quantity that is available.
For example, the available quantity might consist of the on-hand quantity minus
| ||||
cPrimaryBin | PBIN | char | NONE | NONE |
A code that indicates whether this is the primary or secondary location for this item within this stocking location. Valid values are:
P Primary
| ||||
cLotStatus | LOTS | char | NONE | NONE |
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
| ||||
cErrorCode | ERRC | char | NONE | NONE |
This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document
| ||||
mnFromPotency | FRMP | MATH_NUMERIC | NONE | NONE |
A number that indicates the minimum potency or percentage of active ingredients acceptable for an item.
The system displays a warning
| ||||
mnThruPotency | THRP | MATH_NUMERIC | NONE | NONE |
A number that indicates the maximum potency or percentage of active ingredients that is acceptable for an item.
The system displays a
| ||||
szFromGrade | FRGD | char | NONE | NONE |
A user defined code (40/LG) that indicates the minimum grade that is acceptable for an item.
The system displays a warning message if
| ||||
szThruGrade | THGD | char | NONE | NONE |
A user defined code (40/LG) that indicates the maximum grade that is acceptable for an item.
The system displays a warning message if
| ||||
mnDaysBeforeExpired | EXDP | MATH_NUMERIC | NONE | NONE |
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
| ||||
cPotencyControl | OT1Y | char | NONE | NONE |
A code that indicates whether you control the item by potency. | ||||
cGradeControl | OT2Y | char | NONE | NONE |
A code that indicates whether you control the item by grade. | ||||
szLotGrade | LOTG | char | NONE | NONE |
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
| ||||
mnLotPotency | LOTP | MATH_NUMERIC | NONE | NONE |
A code that indicates the potency of the lot expressed as a percentage of active or useful material (for example, the percentage of alcohol
| ||||
jdExpirationDate | MMEJ | JDEDATE | NONE | NONE |
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
| ||||
szPrimaryUOM | UOM1 | char | NONE | NONE |
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
| ||||
szSecondaryUOM | UOM2 | char | NONE | NONE |
A user defined code (00/UM) that indicates an alternate unit of measure for the item. | ||||
idPtrToLinkList | GENLNG | ID | NONE | NONE |
General purpose ID variable. | ||||
cDestroyLinkListFlag | EV01 | char | NONE | NONE |
Parameters
| ||||
mnConversionFactorFromToPrim | CONV | MATH_NUMERIC | NONE | NONE |
The factor that the system uses to convert one unit of measure to another unit of measure. | ||||
cCalculateQty | EV02 | char | NONE | NONE |
An option that specifies the type of processing for an event. |
B4100010 Calculate Qty Available |
F4102 Item Branch File |