1.Functional Description
1.1Purpose
The purpose of this function is to read through Cache memory for all CoByProducts that exist for a
process item and apportion the Ingredient costs to the appropriate CoByProducts.
1.2Setup Notes and Prerequisites
This function is called from BF 3000680.C UpdateTotalCostInformation. UpdateTotalCostInformation
processes all where used logic for discrete manufacturing. Therefore, at the point this business
function is called, the cost of the ingredient is already rolled up into the cost of the Process. This
function performs the last Process task and approtions the ingredient cost across all CoByProducts.
1.3Special Logic
This function will read through Cache memory in a loop, and within that main loop, it will read
through the same Cache memory for specific cache records that match the operation sequence of the main
loop. The function must be able to pick back up where it left off in the main Cache loop.
2.Technical Specifications
2.4 Processing
This business function comprises the logic from P30820 subroutines S010X, S010Y and S010Z. The basic
functionality for this function is to Apportion the ingredient cost for the process to the CoBy
Products. Each CoByProduct that comes out after the ingredient has been used, is given a portion of the
ingredient cost. The F30026 file is updated for the CoByProduct. Fixed CoByProduct Costs are also
taken care of in this function.
Work Fields
TotalCostDistributedMN29D9
TotalCostMN29D9
CoByCostMN29D9
WK SaveOperationSequenceOPSQ
WK ProcessTransQtyQNTY
WK UnitCostMN29D9
LinkList/Cache/WorkFile Variables
COBYCoByProductAS/400 @CB
KITCoByProduct ItemAS/400 @CK
KITLCoByProduct Item2ndAS/400 @C2
KITACoByProduct Item3rdAS/400 @C3
BQTYCoByProduct QuantityPrimary?
BQTY CoByProduct QuantityTranactionAS/400 @CQ
CONVConversionFactorAS/400 @CU
MMCUCoByProduct BranchAS/400 @CM
OPSQOperationSequenceAS/400 @CO
F$RPFeatureCostPercentAS/400 @CF
F$RPCoByProductCostPercent.AS/400 @CC
F$RPCoByProduct%RateAS/400 @CE
XSMCCoByTotB1-C4AS/400 @CL
XSMCCoBy%B1-C4AS/400 @CP
0.0 Initalize WK TotalCostDistributed = 0, WK CoByCost = 0, WK TotalCost = DS IngredientCost
1. Read each CoByProduct from cache sequentially, using BF 3001650, '0' keys, but must use DS JOBS
to get the right cache for the cost rollup run. (LOOP)
Ingredient must be used before CoByProduct comes out.
2.0 If DS OperationSequence LE Cache OperationSequence and DS OperationSequence NE 0
2.1.3 Check to see if there are any fixed CoByProducts for this operation step.
and CoByProductLineNumber
Call internal function: Check for Fixed CoBy Products
Re-load Cache key fields, call BF 3001650 in mode '5', keys '5', retrieve Cache.
what has already been apportioned)
2.1.5 WK TotalCostDistributed = 0 (re-set)
F30026 Branch = Cache CoByProductBranch
F30026 Location and Lot = Blanks
F30026 Cost Method = DS Cost Method
F30026 Cost Type = DS Cost Type
2.3.1.3 WK CoByCost = WK TotalCost x (Cache FeatureCostPercent / 100)
2.3.1.4 WK TotalCostDistributed = WK TotalCostDistributed + WK CoByCost. 2.3.1.5
Get WK CoByCost in 15.0
WK ProcessTransQty = WK ProcessTransQty x DS CONV
sar? code used to be GT 1.
2.3.2.4.If Cache ConversionFactor NE zero
you go.
2.3.2.7.If DS CostType = 'A2'
Simulated(XSMC) + WK CoByCost
else
F30026 Cost Rollup -Simulated(XSCR) = F30026 Cost Rollup -Simulated(XSCR) +
WK CoByCost
2.3.2.9.If F30026 record was found, move Cache CoByProductItem2nd to F30026 LITM,
move Cache CoByProductItem3rd to F30026 AITM and update F30026. If F30026 record was
not found, then Write F30026.
Check for Fixed CoBy Products
1.0 Read CoByProducts from cache using BF 3001650, keys '3' , mode '4'. (LOOP)
F30026 Branch = Cache CoByProductBranch
F30026 Location and Lot = Blanks
F30026 Cost Method = DS Cost Method
F30026 Cost Type = DS Cost Type
1.1.3. If F30026 Cost Rollup - Simulated(XSCR) = zeros
ReturnPointer = '1'
SuppressErrorMsg = '1'
Get Genlng-F4101Pointer
Get F4101-ItemCostLevel, and Call BF free ptr to data structure
If F4101-ItemCostLevel = '3' Call BF F41021 Get Item Location Row with:
Item Number = Cache CoByProduct
Index = '4'
Keys = '3'
Call Type '1'
Get F41021-Location and F41021-Lot
Item Number = Cache CoByProduct
Branch = Cache CoByProductBranch
Location = F41021-Location
Lot = F41021-Lot
Cost Level = F4101-ItemCostLevel
Call Type = '1'
Return Pointer = '1'
Get F4105- Error Code
Get F4105Pointer
If F4105 - Error Code != 0
Genlng = F4105Pointer
Get Unit Cost, and Call BF free ptr to data structure
Set WK Unit Cost = F4105 Unit Cost in 29.9 decimals
If WK Process TransQty = 0, Set WK ProcessTransQty = 1
sar? code used to be GT 1.
If Cache ConversionFactor NE zero
Set F30026 Cost Roll-Sim(XSCR) = F30026 Cost Roll-Sim(XSCR) + WK Unit Cost.
Get Audit information
CoByProductItem3rd to F30026 AITM and update F30026. If F30026 record was not found, then Write F30026.
^
D3001640 - Costing Process Where Used
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnOperationSequence | OPSQ | MATH_NUMERIC | NONE | NONE |
A number used to indicate an order of succession.
In routing instructions, a number that sequences the fabrication or assembly steps in the
| ||||
szCostMethod | LEDG | char | NONE | NONE |
A user defined code (40/CM) that specifies the basis for calculating item costs. Cost methods 01 through 19 are reserved for J.D. Edwards
| ||||
mnIngredientCost | MN29D9 | MATH_NUMERIC | NONE | NONE |
This is a generic field used as a work field in Everest. | ||||
szCostType | COST | char | NONE | NONE |
A code that designates each element of cost for an item. Examples of the cost object types are:
o A1 Purchased raw material
o B1
| ||||
mnProcessBatchQty | BQTY | MATH_NUMERIC | NONE | NONE |
The quantity of finished units that you expect this bill of material or routing to produce. You can specify varying quantities of components
| ||||
mnUOMConversionFactor | CONV | MATH_NUMERIC | NONE | NONE |
The factor that the system uses to convert one unit of measure to another unit of measure. | ||||
cSuppressErrorMessages | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
szErrorMessageID | DTAI | char | NONE | NONE |
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
| ||||
szProgramID | PID | char | NONE | NONE |
The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry
| ||||
mnJobNumber | JOBS | MATH_NUMERIC | NONE | NONE |
The job number (work station ID) which executed the particular job. | ||||
cCostByWC | CWC | char | OPT | NONE |
A code, maintained in the Manufacturing Constants program (P3009), that indicates whether the system tracks cost variances for discrete
| ||||
szWorkCenter | MCU | char | OPT | NONE |
An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit
|
B3001200 Get BOM Mfg Info | ||||
B3001650 Cache, Process CoBy Product | ||||
B9800100 Get Audit Information | ||||
X4101 Validate and Retrieve Item Master | ||||
XF41021 Update F41021 Locations | ||||
XF4105 Item Cost I/O |
F30026 Item Cost Component Add-Ons | ||||
F300261 Item Cost Component Detail |