CostingProcessCurrentLevel

Costing Process Current Level

Major Business Rule

Object Name: B3001630

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose
In Cost Rollup, if we are processing the current level for an item, we and we have determined that 
this item is a Process, we have already called BF B3001610 to setup the CoByProduct Cache.  Therefore, 

we have determined all the CoByProducts that exist for this Process.  We have already costed B1-C4 for 

the Process, as well as the CoBy in R30818.


In this function we are updating the extra XX and factor and rate add ons to the Process.  Then we 

are essentially going to apportion these costs accross all the CoByProducts that exist for the Process.


1.2Setup Notes and Prerequisites

• This function is performed once per Process if the CoByProducts are being rolled and 
CoByProductsFound.

If PO CoByProduct = '1'
If CoByProductFound = '1'

• This function is performed only if the item is a process.
• This business function is called From BF B3001460 UpdateCurrentLevelCosts

1.3Special Logic


2.Technical Specifications


2.4Processing 

Work Fields

CoByProductAmt 29.9


Cache

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







1.0. Call BF 3001650 to  Read sequentially, each CoByProduct from cache memory, processing all steps 

for each CoBy until all CoByProducts are read. Must use DS JOBS to make sure we are getting the right 

cache. (LOOP)

• first time, 4 > process mode, keys '0'
• subsequent calls, 5 > process mode, keys '0'
1.1. Get Cost Component record for CoBy product with the following key.
F30026 Item Number =Cache CoByProductItem
F30026 Branch = Cache CoByProductBranch

F30026 Location and Lot = Blanks

F30026 Cost Method = DS Cost Method

F30026 Cost Type = DS Cost Type

1.2. If F30026 record found and DS Delete Flag = '1' then delete F30026 record. Go Back to 
step 1.0.


1.3. If  DS Manufactured Cost NE 0 (Apportion Add ons)

1.3.1 Initialize WK CoByProductAmt = 0
1.3.2. Decrease cost by ratio of B1-C4 to Process.

WK CoByProductAmt = DS Manufactured Cost x Cache CoBy%B1-C4
1.3.3. If Co Product, then decrease amount to apportion by F3404 Cost Percent.
If Cache CoByProduct = 'C'
and WK CoByProductAmt != 0

and Cache CoByProductCostPercent != 1.0

WK CoByProductAmt = WK CoByProductAmt x Cache
CoByProductCostPercent.

1.3.4. If WK CoByProductAmt != 0
1.3.4.1. WK TotalProcessQuantity = DS Process Batch Quantity
1.3.4.2. If WK TotalProcessQuantity = 0

Set TotalProcessQuantity = 1
WK TotalProcessQuantity = WK TotalProcessQuantity x DS Process Conv Factor

1.3.4.3.WK CoByProductAmt = WK CoByProductAmt x WK TotalProcessQuantity
sar# ? change following two lines from GT 1 to NE zeros.

1.3.4.4. If Cache CoByProductQuantityTransaction NE zero

WK CoByProductAmt = WK CoByProductAmt / Cache 
CoByProductQuantityTransaction.

1.3.4.5.If Cache ConversionFactor NE zero
WK CoByProductAmt = WK CoByProductAmt / Cache Conversion Factor.

1.3.5.Add on any extras from the CoBy Product itself.
If  Cache CoByProductCostPercent != 1
WK CoByProductAmt = WK CoByProductAmt + Cache CoByProduct%Rate

1.4. F30026 XSMC = WK CoByProductAmt (in 15.0 format)
1.5.  Get Audit Information
 If F30026 record fetch was successful, move Cache CoByProduct Item2nd to F30026 LITM, and move Cache 

CoByProduct Item3rd to F30026 AITM, and updateF30026 otherwise, just write F30026 record.

^

Data Structure

D3001630 - Costing Process Current Level

Parameter NameData ItemData TypeReq/OptI/O/Both
mnManufacturedCostMN29D9MATH_NUMERICNONENONE

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

szCostMethodLEDGcharNONENONE

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

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

mnProcessConversionFactorCONVMATH_NUMERICNONENONE

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

cDeleteFlagEV01charNONENONE

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

szCostTypeCOSTcharNONENONE

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  
Direct labor routing rollup   o  B2  Setup labor routing rollup   o  C1  Variable burden routing rollup   o  C2  Fixed burden routing rollup   o  Dx  Outside 
operation routing rollup   o  Xx  Extra add-ons, such as electricity and water  The optional add-on computations usually operate with the type 
Xx extra add-ons. This cost structure allows you to use an unlimited number of cost components to calculate alternative cost rollups. The 
system then associates these cost components with one of six user defined summary cost buckets.

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.

szProgramIDPIDcharNONENONE

The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry 
interactive program is P4210, and the number of the Print Invoices batch process report is R42565. The program ID is a variable length value. 
It is assigned according to a structured syntax in the form TSSXXX, where: T The first character of the number is alphabetic and identifies the 
type, such as P for Program, R for Report, and so on. For example, the value P in the number P4210 indicates that the object is a 
program. SS The second and third characters of the number are numeric and identify the system code. For example, the value 42 in the number P4210 
indicates that this program belongs to system 42, which is the Sales Order Processing system. XXX The remaining characters of the numer are 
numeric and identify a unique program or report. For example, the value 10 in the number P4210 indicates that this is the Sales Order Entry 
program.

mnJobNumberJOBSMATH_NUMERICNONENONE

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

szWorkCenterMCUcharOPTNONE

An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit 
might be a warehouse location, job, project, work center, branch, or plant. You can assign a business unit to a document, entity, or person for 
purposes of responsibility reporting. For example, the system provides reports of open accounts payable and accounts receivable by 
business unit to track equipment by responsible department. Business unit security might prevent you from viewing information about business units 
for which you have no authority.

cCostByWorkCenterCWCcharOPTNONE

A code, maintained in the Manufacturing Constants program (P3009), that indicates whether the system tracks cost variances for discrete 
and process items on a summarized level in the Item Cost Component Add-Ons table (F30026) or on a detailed level in the Item Cost 
Component Detail table (F300261). Valid values are: Y Yes. Maintain costs on a detailed level by cost component and work center. N No. Maintain costs 
on a summarized level by cost component only.

Related Functions

B3001650 Cache, Process CoBy Product
B9800100 Get Audit Information

Related Tables

F30026 Item Cost Component Add-Ons
F300261 Item Cost Component Detail