CalculateIntermedQtyWithShrink

Calculate Intermediate Quantity With Shrink

Minor Business Rule

Object Name: B3000290

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose
For routing operations which produce intermediate products, this function calculates the intermediate 
quantity with shrink (Operation Yield Quantity) in the intermediate item's unit of measure.  Next, it 

determines if the Operation Yield  Quantity should be extended by the parent requested quantity, and 

it extends the Operation Yield Quantity if necessary.  Then, the quantity is rounded to a whole item 

if the item master flag IMSNS for the component is set to "R".  Finally, the calculated, rounded 

Operation Yield Quantity is adjusted from the parent item's unit of measure to the batch quantity or 

requested unit of measure.



1.2Setup Notes and Prerequisites

'b7    Prior to calling this function, the calling program has determined that this is an 
intermediate item (CheckForOperationResources B3000060.C).




2.Technical Specifications


2.4Processing 


1.0Calculate Operation Yield Quantity (RQTE1):

1.1RQTE1 equals Component Quantity Per (QNTY) divided by Operation Yield 

Percent factor (CPYP/100).

(Note: Operation Yield Percent must be divided by 100 to get factor)


2.0Adjust Operation Yield Quantity only for variable or non-batch quantities:


2.1Test for Fixed or Batch Quantities:  If Fixed Variable Quantity Indicator 

(FORQ) is equal to "F" or "%", and if BOM Batch Quantity (BQTY) is not zero, then use the 

RQTE1 from 1.1, above, and skip 2.2.


2.2For Variable or Non-Batch Quantities:  If 2.1 is not true,  extend the result 

from 1.1 by the Parent Item Requested Quantity (TRQT).  The new Operation Yield 

Quantity (RQTE1) will be RQTE1 from 1.1 times TRQT units.


3.0Use Component Item Master pointer to retrieve the Round To Whole Number code (IMSNS) from the 

component's Item Master row in table F4101.  Test if this code is equal to "R", If so:


3.1Use MathRound function to round the quantity result from 1.1 or 2.2 to the 

nearest whole number.  Note:  This should end up with a 0-decimal field.


4.0Use business function ConvertBatchQuantity B3000160.C,  in mode "1", to convert the resulting 

units (RQTE1) calculated in 1.1 or 2.2 or 3.1 from Parent Item (KIT) unit of measure (UOM1) to Batch 

Quantity units of measure (UOM).  Place this result in RTQE1 to send back to the calling program.





Retrievals:Get Component Item Master using pointer (GENLNG) and return the value in column IMSNS 

(Round to Whole Number) in 3.0, above.


^

Data Structure

D3000290 - Calculate Intermediate Qty With Shrink

Parameter NameData ItemData TypeReq/OptI/O/Both
mnComponentQuantityPerQNTYMATH_NUMERICNONENONE

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

cBOMFixedVariableQtyFORQcharNONENONE

A code that indicates if the quantity per assembly for an item on the bill of material varies according to the quantity of the parent item 
produced or is fixed regardless of the parent quantity. This value also determines if the component quantity is a percent of the parent quantity. Valid 
values are:    F Fixed Quantity    V Variable Quantity (default)    %   Quantities are expressed as a percentage and must total 100%For 
fixed-quantity components, the Work Order and Material Requirements Planning systems do not extend the component's quantity per assembly 
value by the order quantity.

mnBOMBatchQuantityBQTYMATH_NUMERICNONENONE

The quantity of finished units that you expect this bill of material or routing to produce. You can specify varying quantities of components 
based on the amount of finished goods produced. For example, 1 ounce of solvent is required per unit up to 100 units of finished product. 
However, if 200 units of finished product is produced, 2 ounces of solvent are required per finished unit. In this example, you would set up batch 
quantities for 100 and 200 units of finished product, specifying the proper amount of solvent per unit.

szBOMBatchQuantityUOMUOMcharNONENONE

A user defined code (00/UM) that indicates the quantity in which to express an inventory item, for example, CS (case) or BX (box).

mnParentItemNumberKITMATH_NUMERICNONENONE

The system provides for three separate item numbers.    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.

szParentItemBranchMMCUcharNONENONE

A code that represents a high-level business unit. Use this code to refer to a branch or plant that might have departments or jobs, which 
represent lower-level business units, subordinate to it. For example:     o Branch/Plant (MMCU)     o Dept A (MCU)     o Dept B (MCU)     o Job 123 
(MCU) Business unit security is based on the higher-level business unit.

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

szParentItemPrimaryUOMUOM1charNONENONE

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

mnOperationYieldPercentCPYPMATH_NUMERICNONENONE

The cumulative planned output yield percent for a step. The system uses this value to adjust the operation step scrap percent for the 
components at that operation step. This enables the MRP system to use the operation step scrap percent along with the existing component scrap 
percent to plan component demand.

idPointerToIntermedItemMasterGENLNGIDNONENONE

General purpose ID variable.

mnOperationYieldQuantityRQTE1MATH_NUMERICNONENONE

The number of parent items that you want to process. The system calculates lower level values in quantity per the number of parent items 
requested. For instance, if it takes 3 components per a parent item, then with a requested quantity of 10, the system would plan and cost for 30 
components.

Related Functions

B3000160 Convert Batch Quantity

Related Tables

F4101 Item Master