CacheQuantitiesByItemNumber

Get Quantities By Item Number

Minor Business Rule

Object Name: B3100720

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

Data Structure

D310072B - Cache, Quantities By Item Number

Parameter NameData ItemData TypeReq/OptI/O/Both
szItemNoUnknownFormatUITMcharOPTNONE

A number that the system assigns to an item. It can be in short, long, or third item number format.

szBranchComponentCMCUcharOPTNONE

A secondary or lower-level business unit. The system uses the value that you enter to indicate that a branch or plant contains several 
subordinate departments or jobs. For example, assume that the component branch is named MMCU. The structure of MMCU might be as follows:    
Branch/Plant - (MMCU)       Dept A - (MCU)       Dept B - (MCU)       Job 123 - (MCU)

szLotLOTNcharOPTNONE

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

szLocationLOCNcharOPTNONE

The storage location from which goods will be moved.

cCommittedHSCOMMcharOPTNONE

A value that indicates whether you specified from which Location and Lot a particular item was to come. If you specified a storage area, the 
program assigns a Hard (H) commit, and subsequent programs will not determine which Location and Lot to use to satisfy the order line. If 
you did not specify a storage area, the program assigns a Soft (S) commit and attempts to determine which Location and Lot records can best 
satisfy the order line quantity. Valid codes are:    S Soft Committed,    H Hard Committed    C Hard Committed by Commitment Program    K Kit 
Master Line (No Commitment)    N Work Order (No Commitment)

mnComponentItemNoShortCPITMATH_NUMERICOPTNONE

The short identifier for the component item number.

szComponentItemNo2ndCPILcharOPTNONE

The system provides three separate item numbers. They are:    1. Item Number (short) - An eight digit, computer assigned, completely 
non-significant item number.    2. 2nd Item Number - The 25 digit, free form, user defined alphanumeric item number.    3. 3rd Item Number - Another 
25 digit, free form, user defined alphanumeric item number. The system has an extensive cross-reference search capability (see XRT). You 
can define numerous cross references to alternate part numbers to accomodate substitute item numbers, replacements, bar codes, customer 
numbers, or supplier numbers.

szComponentThirdNumberCPIAcharOPTNONE

The system provides three separate item numbers plus an extensive cross reference capability to alternate item numbers. These item 
numbers are as follows:    1. Item Number (short) - An eight digit, computer assigned, completely non-significant item number.    2. 2nd Item Number 
- The 25 digit, free form, user defined alphanumeric item number.    3. 3rd Item Number - Another 25 digit, free form, user defined 
alphanumeric item number. In addition to these three basic item numbers, an extensive cross-reference search capability has been provided (see XRT).  
Numerous cross references to alternate part numbers can be user defined (e.g. substitute item numbers, replacements, bar codes, 
customer numbers, or supplier numbers).

cCoproductsByproductsCOBYcharOPTNONE

A code that distinguishes standard components or ingredients from co-products,by-products, and intermediates. Co-products are 
(concurrent) end items as the result of a process. By-products are items that can be produced at any step of a process, but were not planned. 
Intermediate products are items defined as a result of a step but are automatically consumed in the following step. Generally, intermediates are 
nonstock items and are only defined steps with a pay-point for reporting purposes. Standard components (Discrete Manufacturing) or ingredients 
(Process Manufacturing) are consumed during the production process. Valid values are:    C Co-products    B By-products    I Intermediate 
products    Blank Standard components or ingredients

szDescriptionLine1DSC1charOPTNONE

Brief information about an item; a remark or an explanation.

szUnitOfMeasureUMcharOPTNONE

A user defined code (00/UM) that identifies the unit of measurement for an amount or quantity. For example, it can represent a barrel, box, 
cubic meter, liter, hour, and so on.

mnQtyOnHandPrimaryUnPQOHMATH_NUMERICOPTNONE

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

mnQtyOnPurchaseOrderPrPREQMATH_NUMERICOPTNONE

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

mnUnitsTransactionQtyUORGMATH_NUMERICOPTNONE

The quantity of units affected by this transaction.

mnQuantityTransactionTRQTMATH_NUMERICOPTNONE

A value that represents the available quantity, which might consist of the on-hand balance minus commitments, reservations, and 
backorders. You enter this value in the Branch/Plant Constants program (P41001).

mnAmountFieldAAMATH_NUMERICOPTNONE

A number that identifies the amount that the system will add to the account balance of the associated account number.  Enter credits with a 
minus sign (-) either before or after the amount. 

nNumberOfKeysINT01integerOPTNONE

Number of Days in Future to Query for Responses Due. 

cProcessModeEV01charOPTNONE

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

cCacheCodeErrorEV01charOPTNONE

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

cSuppressErrorMessagesEV01charOPTNONE

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

szErrorMessagIDCTIDcharOPTNONE

mnJobNumberJOBSMATH_NUMERICOPTNONE

The job number (work station ID) which executed the particular job.

cReturnCursorFlagEV01charOPTNONE

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

idCursorGENLNGIDOPTNONE

General purpose ID variable.

Related Functions

B4000520 Get Item UoM Conversion Factor
B4001040 Get Item Master Description UOM
B4100010 Calculate Qty Available
B4100280 Get Item Location Detail
XF41021 Update F41021 Locations

Related Tables

None
GetQuantitiesByItemNumber

GetQuantitiesByItemNumber

Get Quantities By Item Number

Minor Business Rule

Object Name: B3100720

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose
This function will accumulate amounts by Item Number.  It return all records created by Job Number.  
It will delete all records created by Job Number.


1.2Setup Notes and Prerequisites

1.3Special Logic


2.Technical Specifications


2.4Processing 

If mode = 1

•  Fetch a record from the table using Component Item Number (DS CPIT), Component Branch (DS CMCU), 
Lot (DS LOTN), Location (DS LOCN), and Hard/Soft Commit (DS COMM). 

• If the record is NOT found:
• If Hard/Soft Commit (DS COMM) is 'H'
Call VerifyAndGetItemLocation with Component Item Number (DS CPIT), Component Branch 
(DS CMCU), Lot (DS LOTN), Location (DS LOCN) to retrieve pointer to record.  Call 

GetItemLocationDetail with pointer to retrieve Qty on Purchase Order (PREQ) and Qty on Work 

Order Receipt (QWBO).  Add these quantities and move to F31UI418(PREQ).  Call 

CalculateQuantityAvailable with Component Item Number (DS CPIT), Component Branch (DS CMCU), Lot 

(DS LOTN), Location (DS LOCN).  Move Quantity Available to F31UI418(PQOH).

• If Hard/Soft Commit (DS COMM) is 'S'
Move zeros to Quantity Available (PQOH) and Quantity on Order (PREQ) in F31UI418.
If Commitment Control (DS FLD1) is '2', Call VerifyAndGetItemLocation with Component 

Item Number (DS CPIT), else Call VerifyAndGetItemLocation with Component Item Number (DS 

CPIT) and Component Branch (DS CMCU).

If fetch passes:

Call GetItemLocationDetail with pointer to retrieve Qty on Purchase Order (PREQ) 
and Qty on Work Order Receipt (QWBO).  Add these quantities and move to 

F31UI418(PREQ).  Call CalculateQuantityAvailable with Component Item Number (DS CPIT), Component 

Branch (DS CMCU), Lot (DS LOTN), Location (DS LOCN).  Move Quantity Available to 

F31UI418(PQOH). Call

• Move Component Item Number (DS CPIT) to F31UI418 CPIT.
• Move Component Branch (DS CMCU) to F31UI418 CMCU.
• Move Hard Or Soft Commit (DS COMM) to F31UI418 COMM.
• Move Description (DS DSC1) to F31UI418 DSC1.
• Move Unit of Measure (DS UM) to F31UI418 UM.
• Move Co-By Products (DS COBY) to F31UI418 COBY.
• Move Job Number (DS JOBS) to F31UI418 JOBS.
• Move 2nd Item Number (DS CPIA) to F31UI418 CPIA.
• Move Job Number (DS JOBS) to F31UI418 JOBS.
• Move Computer ID (DS CTID) to F31UI418 CTID.
• Move 3rd Item Number (DS CPIL) to F31UI418 CPIL.
• Move Short Item Number (DS UITM) to F31UI418 UITM.
• If Primary UOM (DS UOM1) is NOT EQUAL to Unit Of Measure (DS UM).
Call GetItemUoMConversionFactor with 'Y' = Inventory Interface Flag, IMUOM1 = From 
Unit of Measure, WMUM = To Unit of Measure, WorkFieldForQuantityAvailable = Quantity To 

Convert, WMCMCU = Branch.  Move mnQuantityConvertedToPrimary to DS PQOH to be passed back 

to application and get printed in Quantity Required column.


Call GetItemUoMConversionFactor with 'Y' = Inventory Interface Flag, IMUOM1 = From 

Unit of Measure, WMUM = To Unit of Measure, Quantity on Order F31UI418(PREQ) = Quantity To 

Convert, WMCMCU = Branch.  Move mnQuantityConvertedToPrimary to DS PREQ to be passed 

back to application and get printed in Quantity On Order column.


• Whether the record IS OR IS NOT found:
• WorkFieldForQuantityAvailable = 
• Quantity Available F31UI418(PQOH) - Quantity Required F31UI418(UORG).
• Move WorkFieldForQuantityAvailable to (DS PQOH).
• Move Quantity on Order F31UI418(PREQ) to (DS PREQ).
• WorkField (UORG) = Quantity (DS UORG) - Transaction Quantity (DS TRQT).
• If WorkField(UORG) < 0, move 0 to WorkField(UORG).
• If WorkFieldForQuantityAvailable < 0, move 0 to WorkFieldForQuantityAvailable.
• WorkFieldQtyShort = WorkFieldForQuantityAvailable - WorkField(UORG).
• If WorkFieldQtyShort < 0,
Move WorkFieldQtyShort to Quantity Short (DS MATH01) to be passed back and printed in 
Quantity Short column.

F31UI418(TRQT) = F31UI418(TRQT) + WorkFieldQtyShort.

• F31UI418(UORG) = F31UI418(UORG) + WorkField(UORG).
Insert or update record.
If mode = 2

If  hUser and hRequest are null,
Retrieve the first record, and send back the following fields: CPIT into DS CPIT, CMCU into DS 
CMCU, DSC1 into DS DSC1, PQOH into DS PQOH, PREQ into DS PREQ, UORG into DS UORG, MATH01 into DS 

MATH01, and UM into DS UM.  Return hUser and hRequest pointers.

Else
Retrieve the next record, send back CPIT, CMCU, DSC1, PQOH, PREQ, UORG, TRQT, and UM.  Pass 
back the pointers.

If mode = 3

Delete all records matching the Job Number and Computer ID and free memory.

^

Data Structure

D3100720 - Get Quantities By Item Number

Parameter NameData ItemData TypeReq/OptI/O/Both
cModeMODEcharNONENONE

The processing mode used in Purchase Order Consolidator to signify when specific orders are being processed.

cEndOfFileEV01charNONENONE

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

mnComponentItemNoCPITMATH_NUMERICNONENONE

The short identifier for the component item number.

szBranchComponentCMCUcharNONENONE

A secondary or lower-level business unit. The system uses the value that you enter to indicate that a branch or plant contains several 
subordinate departments or jobs. For example, assume that the component branch is named MMCU. The structure of MMCU might be as follows:    
Branch/Plant - (MMCU)       Dept A - (MCU)       Dept B - (MCU)       Job 123 - (MCU)

szLotLOTNcharNONENONE

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

szLocationLOCNcharNONENONE

The storage location from which goods will be moved.

cCommittedHSCOMMcharNONENONE

A value that indicates whether you specified from which Location and Lot a particular item was to come. If you specified a storage area, the 
program assigns a Hard (H) commit, and subsequent programs will not determine which Location and Lot to use to satisfy the order line. If 
you did not specify a storage area, the program assigns a Soft (S) commit and attempts to determine which Location and Lot records can best 
satisfy the order line quantity. Valid codes are:    S Soft Committed,    H Hard Committed    C Hard Committed by Commitment Program    K Kit 
Master Line (No Commitment)    N Work Order (No Commitment)

szDescriptionDSC1charNONENONE

Brief information about an item; a remark or an explanation.

szUnitOfMeasureUMcharNONENONE

A user defined code (00/UM) that identifies the unit of measurement for an amount or quantity. For example, it can represent a barrel, box, 
cubic meter, liter, hour, and so on.

cCoproductsByproductsCOBYcharNONENONE

A code that distinguishes standard components or ingredients from co-products,by-products, and intermediates. Co-products are 
(concurrent) end items as the result of a process. By-products are items that can be produced at any step of a process, but were not planned. 
Intermediate products are items defined as a result of a step but are automatically consumed in the following step. Generally, intermediates are 
nonstock items and are only defined steps with a pay-point for reporting purposes. Standard components (Discrete Manufacturing) or ingredients 
(Process Manufacturing) are consumed during the production process. Valid values are:    C Co-products    B By-products    I Intermediate 
products    Blank Standard components or ingredients

mnTransactionQuantityTRQTMATH_NUMERICNONENONE

A value that represents the available quantity, which might consist of the on-hand balance minus commitments, reservations, and 
backorders. You enter this value in the Branch/Plant Constants program (P41001).

cCommitmentControlFLD1charNONENONE

An option that determines how the system commits inventory to a work order, and specifies the inventory location to which commitments are 
made. Valid values are: 1 Primary Location 2 Split-Cross Branch Boundaries 3 Split-Don't Cross Branch Boundaries Note: The system 
activates this field only when you create hard commitments. The three available options are as follows:   o  Primary Location. Make commitments to 
the primary location in the branch/plant where the work order originates.   o  Split-Cross Branch Boundaries. Split the parts list and 
commitments to fill any component shortages. The system can cross branch boundaries to fill requirements. In this case, the system uses the next 
alphabetical branch/plant listed in the table that occurs after the branch/plant on the work order header. For example, for the branch/plants CAL, 
CHI, CLE, and HOU: If the system starts committing inventory at branch/plant CHI, it accesses CLE as the next branch/plant. If inventory is low in 
all locations, the system makes the remaining commitments to the primary location of the branch/plant on the work order header.   o  
Split-Don't Cross Branch Boundaries. This option is similar to Split-Cross Branch Boundaries, but the system cannot cross branch boundaries. Note: 
When you set the Commitment Method field in the Item Branch/Plant table to 2 or 3 (lot number or expiration date control), you must use the 
Split-Don't Cross Branch Boundaries option.

mnQuantityAvailablePQOHMATH_NUMERICNONENONE

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

mnQuantityOnOrderPREQMATH_NUMERICNONENONE

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

mnQuantityRequiredUORGMATH_NUMERICNONENONE

The quantity of units affected by this transaction.

mnQuantityShortUORGMATH_NUMERICNONENONE

The quantity of units affected by this transaction.

mnJobNumberJOBSMATH_NUMERICNONENONE

The job number (work station ID) which executed the particular job.

szComputerIDCTIDcharNONENONE

idhUserGENLNGIDNONENONE

General purpose ID variable.

idhRequestGENLNGIDNONENONE

General purpose ID variable.

cSuppressErrorMessagesEV01charNONENONE

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

szErrorMessageIDDTAIcharNONENONE

A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or 
special characters such as %, &, or +. You create new data items using system codes 55-59. You cannot change the alias.

sz3rdItemNumberCPIAcharNONENONE

The system provides three separate item numbers plus an extensive cross reference capability to alternate item numbers. These item 
numbers are as follows:    1. Item Number (short) - An eight digit, computer assigned, completely non-significant item number.    2. 2nd Item Number 
- The 25 digit, free form, user defined alphanumeric item number.    3. 3rd Item Number - Another 25 digit, free form, user defined 
alphanumeric item number. In addition to these three basic item numbers, an extensive cross-reference search capability has been provided (see XRT).  
Numerous cross references to alternate part numbers can be user defined (e.g. substitute item numbers, replacements, bar codes, 
customer numbers, or supplier numbers).

sz2ndItemNumberCPILcharNONENONE

The system provides three separate item numbers. They are:    1. Item Number (short) - An eight digit, computer assigned, completely 
non-significant item number.    2. 2nd Item Number - The 25 digit, free form, user defined alphanumeric item number.    3. 3rd Item Number - Another 
25 digit, free form, user defined alphanumeric item number. The system has an extensive cross-reference search capability (see XRT). You 
can define numerous cross references to alternate part numbers to accomodate substitute item numbers, replacements, bar codes, customer 
numbers, or supplier numbers.

szShortItemNumberUITMcharNONENONE

A number that the system assigns to an item. It can be in short, long, or third item number format.

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

szStandardUOMConversionTFLAcharNONENONE

Allows you to bypass the item-specific unit of measure and use the standard unit of measure. Valid values are:    blank Use the item-specific 
unit of measure    1       Bypass the item-specific unit of measure and use the standard unit of measure

szOrderTypeDCTOcharOPTNONE

A user defined code (00/DT) that identifies the type of document. This code also indicates the origin of the transaction. J.D. Edwards has 
reserved document type codes for vouchers, invoices, receipts, and time sheets, which create automatic offset entries during the post 
program. (These entries are not self-balancing when you originally enter them.) The following document types are defined by J.D. Edwards and 
should not be changed: P Accounts Payable documents   R Accounts Receivable documents   T Payroll documents   I Inventory documents  
O Purchase Order Processing documents   J General Accounting/Joint Interest Billing documents   S Sales Order Processing documents

szLotGroupLOTGRPcharOPTNONE

Lot Group is the name of a user defined list of allowed non-blank lot status codes.  Entry of a Lot Group name in the Processing Option will 
allow this Application to process lots whose lot status code is defined within the specified Lot Group Name.  

Related Functions

B4000520 Get Item UoM Conversion Factor
B4001040 Get Item Master Description UOM
B4100010 Calculate Qty Available
B4100280 Get Item Location Detail
XF41021 Update F41021 Locations

Related Tables

None