F3002CalculateQuantities

F3002 Calculate Quantities

Minor Business Rule

Object Name: N3003110

Parent DLL: CMFGBASE

Location: Client/Server

Language: NER

1.Functional Description

1.1Purpose
Calculates the following quantities for a component in the Bill of  Material:

• Required Quantity in Primary UOM
• Extended Quantity
• Extended Quantity adjusted for scrap and yield
• Extended Quantity in Primary UOM
• Conversion factor used to convert the component to Primary UOM
• Conversion factor used to convert the component from Primary UOM


1.2Setup Notes and Prerequisites

• Convert Batch Quantity from Primary to display UOM
• Retrieve Standard potency and Potency Control (OT1y) from F4102.

1.3Special Logic

Calculate Scrap = '1':
• CalcExtendedQty will be adjusted for scrap
• CalcRequiredQtyPrimary will be adjusted for scrap
• CalcExtendedQtyPrimary will be adjusted for scrap

Calculate Yield = '1':

• CalcExtendedQty will be adjusted for yield
• CalcRequriedQtyPrimary will be adjusted for yield
• CalcExtendedQtyPrimary will be adjusted for yield

Calculate Primary Quanitites = '1':

• CFPrimarytoComponent will be calculated
• CFComponenttoPrimary will be calculated
• CalcRequiredQtyPrimary will be calculated
• CalcExtendedQtyPrimary will be calculated


2.Technical Specifications


2.4Processing 



1.0. If CalculatingPrimaryQuantities, determine Conversion factor for component conversion from 

Primary to Production UOM.   (DS CFComponentToPrimary, DS CFPrimaryToComponent).


Call BSFN F41002GetItemUoMConversion
F3002 ComponentBranch>szBranchPlant

DS ComponentPrimaryUOM>szFromUnitOfMeasure

DS RequiredQtyUOM>szToUnitOfMeasure

1>mnQuantityToConvert

UNDEFINED>mnConversionFactorFromToPrim

DS CFPrimaryToComponent<mnConversionFactorFrom_to_To

DS CFComponentToPrimary<mnConversionFactorTo_to_Primary

DS Potency Control>cPotencyControl

DS StandardPotency>mnStandardPotency

DS Component Item>mnItemNumberShort


2.0.If CalculatingPrimaryQuantities, Convert Required Quantity to primary UOM.  (DS 

CalcRequiredQtyPrimary)


DS CalcRequiredQtyPrimary = DS ActualRequiredQty * DS CFComponentToPrimary


3.0.Calculate Actual Extended Qty  (DS ActualExtendedQty).

If  (DS FORQ = 'V') or  (DS FORQ = '%' and DS BatchQty = 0),
DS ActualExtendedQty = DS ActualRequiredQty * DS RequestedQty.


If (F3002 FORQ = 'F') or (F3002 FORQ = '%' and F3002 BQTY != 0), 

DS ActualExtendedQty = DS ActualRequiredQty 


4.0.Determine the Calculated Extended Qty adjusted for Scrap and Yield (DS CalcExtendedQty).
4.1.Initialize WK ScrapQty and WK YieldQty equal to zeros.

4.2.If CalculatingScrap and DS Scrap is not equal to 0, calculate the scrap quantity.

WK ScrapQty = DS ActualExtendedQty * (DS ScrapPercent / 100)

4.3.If CalculatingYield and DS YieldPercent is not equal to 0, calculate the yield quanity.

WK YieldQty = DS ActualExtendedQty * (DS YieldPercent / 100)

4.4.Calculated Extended Qty.

DS CalcExtendedQty = DS ActualExtendedQty + WK ScrapQty + WK YieldQty


5.0.If CalculatingPrimaryQuantities, determine the Calculated Required Quantity Primary and 

Calculated Extended Quantity Primary.

5.1.Calculate Extended Quantity.

If  (DS FORQ = 'V') or  (DS FORQ = '%' and DS BatchQty = 0),
DS CalcExtendedQtyPrimary = DS CalcRequiredQtyPrimary * DS RequestedQty.


If (DS FORQ = 'F') or (DS FORQ = '%' and DS BQTY != 0), 

DS CalcExtendedQtyPrimary = DS CalcRequiredQtyPrimary 


5.2.Calculate Required Quantity adjusted for scrap and yield percents. (DS 
CalcExtendedQtyPrimary)


5.2.1. Initilize WK ScrapQty  and WK YieldQty equal to zeros

5.2.2. If  CalculatingScrap and DS ScrapPercent is not equal to 0, the scrap quantity. 

WK ScrapQty = 
DS CalcExtendedQtyPrimary * (DS ScrapPercent / 100) 

5.2.3. If CalculatingYield and DS YieldPercent is not equal to 0, calculate quantity to 
adjust for yield.


WK YieldQty =
DS CalcExtendedQtyPrimary * (DS YieldPercent / 100)


5.2.4. Add scrap quantity and yield quantity to required quantity to calculate the 
production quantity required.


DS CalcExtendedQtyPrimary = 
DS CalcExtendedQtyPrimary + WK ScrapQty + WK YieldQty


6.0.Retrieve data dictionary information for data item QNTY using "Get Data Dictionary Definition" 

business function and round the following fields to the correct number of display decimals:

• DS ActualExtendedQty
• DS CalcExtendedQty
• DS CalcExtendedQtyPrimary 


^

Data Structure

D3003110 - F3002 Calculate Quantities

Parameter NameData ItemData TypeReq/OptI/O/Both
cCalculateScrapEV01charNONENONE

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

cCalculateYieldEV01charNONENONE

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

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

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

mnActualRequiredQtyQNTYMATH_NUMERICNONENONE

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

szRequiredQtyUOMUMcharNONENONE

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.

cFixedOrVariableFORQcharNONENONE

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.

mnYieldPercentSTPPMATH_NUMERICNONENONE

A value that the system uses to increase or decrease the amount of materials to account for loss within the operation. The system updates 
this value on Enter/Change Bill of Material when you run the Planned Yield Update program. The system calculates this value by 
compounding the yield percentages from the last operation to the first operation. Use a processing option in Enter/Change Routing to enable the 
system to calculate the component scrap percent.

mnScrapPercentSCRPMATH_NUMERICNONENONE

The percentage of unusable component material that is created during the manufacture of a particular parent item.  During DRP/MPS/MRP 
generation, the system increases gross requirements for the component item to compensate for the loss. Note: Shrink is the expected loss of 
parent items (and hence, components) due to the manufacturing process. Shrink and scrap are compounded to figure the total loss in the 
manufacture of a particular item. Accurate shrink and scrap factors can help to produce more accurate planning calculations. Enter percentages 
as whole numbers: 5 percent as 5.0

cPotencyControlOT1YcharNONENONE

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

mnStandardPotencySTDPMATH_NUMERICNONENONE

The percentage of active ingredients normally found in an item.

mnActualExtendedQtyQNTYMATH_NUMERICNONENONE

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

mnCFPrimaryToComponentMN29D9MATH_NUMERICNONENONE

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

mnCFComponentToPrimaryMN29D9MATH_NUMERICNONENONE

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

mnCalcRequiredQtyPrimaryQNTYMATH_NUMERICNONENONE

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

mnCalcExtendedQtyPrimaryQNTYMATH_NUMERICNONENONE

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

szComponentBranchCMCUcharNONENONE

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)

mnComponentItemITMMATH_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

szPrimaryUOMUOMcharNONENONE

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

mnCalcExtendedQtyQNTYMATH_NUMERICOPTOUTPUT

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

cCalculatePrimaryQuantitiesEV01charOPTINPUT

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

Related Functions

None

Related Tables

None