CalculateComponentQuantity

Calculate Component Quantity

Minor Business Rule

Object Name: B3000580

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose


This business function will calculate the quantity of a component item needed to produce a specific 

quantity of a parent item.


1.2Setup Notes and Prerequisites



1.3Special Logic



2.Technical Specifications


2.4Processing 


1.0 Determine if a unit of measure conversion needs to be performed.
1.1 Call Verify and Get Item Master with the DS Item Number.

1.2work field quantity $WQTY = DS QNTY.

If DS UnitOfMeasure NE DS UOM1

call business function GetItemUOMConversionFactor converting 

'FROM' UM 'TO' UOM1, component branch DS CMCU, and the quantity 

to convert is DS QNTY.

put the converted quantity returned into a work field.  

In this document it will be referred to as $WQTY. 

Pass in TFLA that was retrieved with X4101.



2.0  Check for variable component item

If DS FORQ EQ 'V'

or DS FORQ EQ ' '

or DS FORQ EQ '%'

and DS BQTY EQ zeros

then divide $WQTY by DS CONV



2.a  IF DS VC01A = '1'

IF DS FORQ EQ '%'

and DS BQTY NE zeros

then divide $WQTY by DS BQTY

end


IF DS FORQ EQ 'F'

and DS BQTY NE zeros

then divide $WQTY by DS BQTY

end


IF DS FORQ EQ 'F'

and DS BQTY EQ zeros

and DS CBUP NE 1

then divide $WQTY by DS CBUP

end

       end


3.0  If needed, inflate quantity for step scrap percent.

IF DS STPP NE zeros

and $WQTY NE zeros

work field = (divide DS STPP by 100) * $WQTY

add work field to $WQTY


4.0  Consider feature cost percent.

(divide DS F_RP by 100) * $WQTY


5.0  If a variable component consider parent requested quantity.

IF DS FORQ EQ 'V'

or DS FORQ EQ ' '

or DS FORQ EQ '%'

and DS BQTY EQ zeros

multiply DS TRQT * $WQTY




6.0  Return the component quantity calculated $WQTY in 4.0 or 5.0 if it was performed.

Data Structure

D3000580 - Calculate Component Quantity

Parameter NameData ItemData TypeReq/OptI/O/Both
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)

mnComponentQtyQNTYMATH_NUMERICNONENONE

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

szComponentUMUMcharNONENONE

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.

szComponentPrimaryUOMUOM1charNONENONE

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

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.

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

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

mnUOMConversionCONVMATH_NUMERICNONENONE

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

mnComponentFeatureCostPercentFRPMATH_NUMERICNONENONE

This period number allows you to specify a 52 period financial reporting date. This is the reporting period used by several J.D. Edwards 
financial reports. This is different than the Current Period specified as the accounting period for the company.

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

mnComponentItemNumberITMMATH_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

cModeVC01AcharNONENONE

This is a generic field used for video constants display.

szItemNumberUITMcharNONENONE

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

mnAcctingCostQtyACQMATH_NUMERICNONENONE

An amount that the system uses in the Cost Rollup program to determine the allocation of setup costs. The system totals the setup costs 
and divides the sum by this quantity to determine a unit setup cost. The default is 1.

mnCalculatedComponentQuantityMN29D9MATH_NUMERICOPTNONE

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

Related Functions

B4000460 Free Ptr To Data Structure
B4000520 Get Item UoM Conversion Factor
X4101 Validate and Retrieve Item Master

Related Tables

None