This document provides scripts to retrieve production batch related data from Oracle Process Manufacturing Financials. It includes scripts to get batch header information, material details, WIP postings, formula effectivities, formula material details, formula operation details, batch operation details, recipe details, and more. It also describes the logic for computing various batch variances such as material usage, yield, and substitution variances.
1. Purpose
Questions and Answers
List of the scripts that the Subledger Update uses to get the production batch
related data.
How do I get the batch header information?
How do I get the batch material details?
How do I get the batch WIP postings?
How do I get formula effectivities?
How do I get formula material details of costing formula and production formula?
How do I get formula operation details?
How do I get the batch operation details?
How do I get the recipe details?
How do I get recipe process loss details?
How do I get recipe activity details?
How do I get recipe resource details?
How do I get the recipe steps?
How do I get organization specific resource details?
How do I get resource details?
How do I get routing class process loss details?
How do I get the item cost details?
What is the logic in computing batch variances?
What is Material Usage Variance (USG and YLD)?
What is Material Substitution Variance (SUB)?
Batch Variance Computation
How do I get the batch header information?
How do I get the batch material details?
How do I get the batch WIP postings?
How do I get formula effectivities?
How do I get formula material details of costing formula and production formula?
How do I get formula operation details?
How do I get the batch operation details?
How do I get the recipe details?
How do I get recipe process loss details?
How do I get recipe activity details?
2. How do I get recipe resource details?
How do I get recipe steps?
How do I get organization specific resource details?
How do I get resource details?
How do I get routing class process loss details?
How do I get the item cost details?
How do I get the resource cost details?
What profiles do I need to know about?
What is the Logic?
What is the Material Usage Variance (USG and YLD)?
What is the Material Substitution Variance (SUB)?
What is the Resource Usage and Manning Variance (RUV & RMV)?
What is Resource Substitution Variance (RSV)?
What is Batch Close Variance (CLS)?
APPLIES TO:
Oracle Process Manufacturing Financials - Version 11.5.10 to 11.5.10.2 [Release 11.5]
Information in this document applies to any platform.
This document contains information on material usage variances and resource/routing
variances.
PURPOSE
The OPM MAC Subledger calculates manufacturing variances relating to the closing of a
production batch. This document contains information on material usage variances and
resource/routing variances.
QUESTIONS AND ANSWERS
List of the scripts that the Subledger Update uses to get the production batch related data.
How do I get the batch header information?
SELECT
bhdr.plant_code,
3. bhdr.batch_no,
bhdr.batch_id,
nvl(bhdr.routing_id,0),
bhdr.batch_close_date,
bhdr.wip_whse_code,
decode(nvl(bhdr.poc_ind, 'N'), 'N', 0, 'Y', 1, 0) poc_indicator
FROM
gme_batch_header bhdr
WHERE
bhdr.plant_code = ‘&plant_code’
bhdr.batch_no = ‘&batch_no’
bhdr.batch_close_date is not null AND
bhdr.batch_status = 4 AND
bhdr.gl_posted_ind = 0 AND
nvl(bhdr.update_inventory_ind, 'N') = 'Y';
How do I get the batch material details?
SELECT
md.batch_id,
md.material_detail_id,
nvl(md.formulaline_id,0),
md.item_id,
md.line_type,
md.line_no,
md.plan_qty,
md.item_um,
md.actual_qty,
md.cost_alloc
FROM
gme_batch_header bh,
gme_material_details md
WHERE
bh.batch_id = md.batch_id AND
bh.batch_id = &batch_id
ORDER BY
md.batch_id,
md.line_type,
md.line_no
;
How do I get the batch WIP postings?
SELECT
led.doc_id,
4. led.ledger_code,
led.acctg_unit_id,
led.acct_id,
sum(led.debit_credit_sign * led.amount_base),
FROM
gl_subr_led led
WHERE
led.co_code = ‘&company_code’ AND
led.doc_type = 'PROD' AND
led.acct_ttl_type = 1530 AND /* GL_AT_WIP */
led.doc_id = &batch_id
GROUP BY
led.doc_id,
led.ledger_code,
led.acctg_unit_id,
led.acct_id;
How do I get formula effectivities?
SELECT
rvr.recipe_validity_rule_id,
r.recipe_id,
nvl(r.routing_id, 0),
r.formula_id,
nvl(rvr.planned_process_loss, 101)
FROM
gmd_recipe_validity_rules rvr, gmd_recipes_b r
WHERE rvr.recipe_id = r.recipe_id AND
r.delete_mark = 0 AND
rvr.recipe_validity_rule_id in (&formula effectivity id’s)
ORDER BY
rvr.recipe_validity_rule_id,
r.recipe_id
;
How do I get formula material detailsof costing formula and production formula?
SELECT
fm.formula_no,
fm.formula_vers,
md.formula_id,
md.formulaline_id,
md.line_type,
md.line_m_id,
md.qty,
5. md.item_um,
md.scale_type,
md.scrap_factor,
nvl(md.contnd, 'Y'),
nvtiple, 0),
nvl(md.scale_nce, 1),
n_direction, 0)
FROM
fm_form_mst_b fm,
fm_matl_dtl md
WHERE
fm.formula_id = md.formula_id AND
fm.formula_id in (&formula id’s)
ORDER BY
md.formula_id,
md.line_type,
md.line_no
;
How do I get formula operation details?
SELECT
rh.routing_no,
rh.routing_vers,
rh.routing_qty,
rh.item_um,
rh.routing_id,
rh.process_loss,
rh.routing_class,
rd.routingstep_no,
d,
rd.oprn_id,
rd.step_qty,
op.process_qty_um,
oa.activity_factor,
ors.oprn_line_id,
ors.rs.resource_count, _usage,
ors.process_qty,
ors.cost_cmpntcls_id,
ors.cost_analysis_code,
ors.usage_um,
ors.scale_type,
ors.min_capacity,
ors.max_capacity,
ors.capacity_uom
6. FROM
fm_rout_hdr rh,
fm_rout_dtl rd,
gmd_operations op,
gmd_operation_activities oa,
gmd_operation_resources ors,
gmd_status_b gs
WHERE
rh.routing_id = rd.routing_id AND
rh.routing_status = gs.status_code AND
rd.oprn_id = op.oprn_id AND
rd.oprn_id = oa.oprn_id AND
oa.oprn_line_id = ors.oprn_line_id and
rh.delete_mark = 0 and
oa.delete_mark = 0 and
rh.routing_id in (&Costing_routing_id, &Production_routing_id)
ORDER BY
rh.routing_id,
rd.routingstep_id,
rd.oprn_id,
oa.oprn_line_id,
ors.resources
;
How do I get the batch operation details?
SELECT
bh.batch_id,
nvl(bs.routingstep_id,0),
bs.oprn_id,
nvl(bs.actual_step_qty,0),
nvl(bsa.oprn_line_id,0),
nvl(bsa.plan_activity_factor,0),
nvl(bsa.actual_activity_factor,0),
bsr.resources,
bsr.cost_cmpntcls_id,
bsr.cost_analysis_code,
nvl(bsr.actual_rsrc_count,0),
nvl(bsr.actual_rsrc_qty,0),
nvl(bsr.actual_rsrc_usage,0) /
decode(bsr.actual_rsrc_count,0,1,null,1,bsr.actual_rsrc_count),
bsr.plan_rsrc_count,
bsr.plan_rsrc_qty,
bsr.plan_rsrc_usage,
bsr.usage_uom
7. FROM
gme_batch_header bh,
gme_batch_steps bs,
gme_batch_step_activities bsa,
gme_batch_step_resources bsr
WHERE
bh.batch_id = &batch_id AND
bh.batch_id = bs.batch_id AND
bs.batch_id = bsa.batch_id AND
bs.batchstep_id = bsa.batchstep_id AND
bsa.batchstep_activity_id = bsr.batchstep_activity_id AND
bh.batch_close_date is not null AND
bh.batch_status = 4 AND
bsa.delete_mark = 0
ORDER BY
bs.batch_id,
nvl(bs.routingstep_id,0),
bs.oprn_id,
bsa.oprn_line_id,
bsr.resources
;
How do I get the recipe details?
SELECT
rc.recipe_id,
rc.recipe_no,
rc.recipe_version,
rc.recipe_status,
NVL(rc.planned_process_loss, 101),
rc.calculate_step_quantity
FROM
gmd_status_b gs,
gmd_recipes_b rc
WHERE
rc.recipe_status = gs.status_code AND
rc.recipe_id in (&costing_recipe_id, &production_recipe_id)
ORDER BY
rc.recipe_id
;
How do I get recipe process loss details?
SELECT DISTINCT
rpl.recipe_id,
8. rpl.orgn_code,
NVL(rpl.process_loss, 101)
FROM
gmd_recipe_process_loss rpl AND
WHERE
rpl.recipe_id in (&costing_recipe_id, &production_recipe_id)
ORDER BY
rpl.recipe_id, rpl.orgn_code
;
How do I get recipe activity details?
SELECT
ra.recipe_id,
ra.orgn_code,
ra.routingstep_id,
ra.oprn_line_id,
ra.activity_factor
FROM
gmd_recipe_orgn_activities ra
WHERE
ra.recipe_id in (&costing_recipe_id, &production_recipe_id)
ORDER BY
ra.recipe_id,
ra.orgn_code,
ra.routingstep_id,
ra.oprn_line_id
;
How do I get recipe resource details?
SELECT
rr.recipe_id,
rr.orgn_code,
rr.routingstep_id,
rr.oprn_line_id,
rr.resources,
rr.min_capacity,
rr.max_capacity,
rr.resource_usage,
rr.usage_um,
rr.process_qty,
rr.process_uom
FROM
gmd_recipe_orgn_resources rr
9. WHERE
rr.recipe_id in (&costing_recipe_id, &production_recipe_id)
ORDER BY
rr.recipe_id,
rr.orgn_code,
rr.routingstep_id,
rr.oprn_line_id,
rr.resources
;
How do I get the recipe steps?
SELECT
rrs.recipe_id,
rrs.routingstep_id,
rrs.step_qty
FROM
gmd_recipe_routing_steps rrs
WHERE
rrs.recipe_id in (&costing_recipe_id, &production_recipe_id)
ORDER BY
rrs.recipe_ingstep_id
;
How do I get organization specific resource details?
SELECT
rd.orgn_code,
rd.resources,
rd.min_capacity,
rd.max_capacity,
rd.capacity_constraint,
rd.capacity_uom
FROM
cr_rsrc_dtl rd
ORDER BY
rd.orgn_code,
rd.resources
;
How do I get resource details?
SELECT
r.resources,
r.min_capacity,
10. r.max_capacity,
r.capacity_constraint,
r.capacity_uom
FROM
cr_rsrc_mst r
ORDER BY
r.resources
;
How do I get routing class process loss details?
SELECT
pl.routing_class,
NVL(pl.max_quantity, -1),
pl.process_loss
FROM
gmd_process_loss pl
ORDER BY
pl.routing_class, NVL(pl.max_quantity, -1) DESC
;
How do I get the item cost details?
SELECT
orgn_code,
whse_code,
item_id,
cost_mthd_code,
calendar_code,
period_code,
acctg_cost,
nvl(fmeff_id,0),
itemcost_id
FROM
gl_item_cst
WHERE
whse_code = ‘&whse_code’
AND item_id = ‘&item_id’
AND cost_mthd_code = ‘&cost_mthd_code’
AND calendar_code = ‘&cost_calendar_code’
AND period_code = ‘&cost_period_code’
AND delete_mark = 0
ORDER BY
orgn_code, whse_code, item_id, cost_mthd_code, calendar_code,
period_code;
11. What is the logic in computing batch variances?
Subledger Update compares the recipe/routing used on the production batch to the
costing recipe/routing (used to generate the product cost) to compute the variances
like, Usage Variance (USG), Yield Variance (YLD), Substitution Variance (SUB), Resource
Usage Variance (RUV), etc. For each batch the process performance following steps to
compute these variance.
Identify the primary product of the batch
Loop thru batch material detail records (script 2) and
search for record with line_type = 1 and line_no = 1
Get cost details for the product item
Use wip warehouse, batch close date and cost method on fiscal policy to
get the cost details (script 15)
Using fmeff_id (costing recipe validity rule id) get costing recipe validity
rules data (script 3).
Using fmeff_id (costing recipe validity rule id) get material details of
costing formula (script 4)
Compute the material scale factor
Convert batch primary product’s planned quantity to item’s uom.
Convert product quantity on the costing formula to it’s item uom.
Material Scale Factor =
Converted batch product planned quantity
----------------------------------------------------
Converted costing formula product quantity
What is Material Usage Variance (USG and YLD)?
This is the difference between the value of the actual ingredient usage and the value of
the standard ingredient usage on the production batch, as scaled from the ingredient
input specified in the formula used in the Standard Cost Roll-up process
Loop thru and compare aipt 2) and costing formula material lines (script 4). When a en
compute the usage var line to line’s item uom. If different convert the quantity to item’s
uom. Scale the converted quantity by the material scale factor.
12. Apply scrap factor to the scaled formula qty
fm_qty = (Scaled Formula Qty) ( 1 + Scrap Factor)
Compare the uom on the batch material line to the item’s uom. If different
convert the actual quantity to item’s uom.
What is Material Substitution Variance (SUB)?
This is the value of the substitute ingredients used. These a not on the formula
used in the Standard Cost Roll-up process. It also includes the value of
ingredients that were on the formula used in the Standard Cost Roll-up process
but which were not used at all in the batch.
Loop thru and compare all batch material lines (script 2) and costing formula
material lines (script 4). When a match is NOT foundthen compute the
substitution variance
o Compare the uom on the formula line to line’s item uom. If different then
convert the quantity to item’s uom. Scale the converted quantity by the
material scale factor.
o Apply scrap factor to the scaled formula qty
fm_qty = (Scaled Formula Qty) ( 1 + Scrap Factor)
o Compare the uom on the batch material line to the item’s uom. If different
convert the actual quantity to item’s uom.
o Multiply the quantity (fm_qty or converted batch material qty) with the
items cost to get the variance amount. If item is ingredient then this
contributes to Substitution Variance (SUB) and if it is product then it
contributes to Yield Variance (YLD). Off set accounts for these are
RUV/WIP.
Batch Variance Computation
How do I get the batch header information?
SELECT
bhdr.plant_code,
bhdr.batch_no,
bhdr.batch_id,
nvl(bhdr.routing_id,0),
bhdr.batch_close_date,
bhdr.wip_whse_code,
decode(nvl(bhdr.poc_ind, 'N'), 'N', 0, 'Y', 1, 0) poc_indicator
FROM
gme_batch_header bhdr
WHERE
13. bhdr.plant_code = ‘&plant_code’
bhdr.batch_no = ‘&batch_no’
bhdr.batch_close_date is not null AND
bhdr.batch_status = 4 AND
bhdr.gl_posted_ind = 0 AND
nvl(bhdr.update_inventory_ind, 'N') = 'Y';
How do I get the batch material details?
SELECT
md.batch_id,
md.material_detail_id,
nvl(md.formulaline_id,0),
md.item_id,
md.line_type,
md.line_no,
md.plan_qty,
md.item_um,
md.actual_qty,
md.cost_alloc
FROM
gme_batch_header bh,
gme_material_details md
WHERE
bh.batch_id = md.batch_id AND
bh.batch_id = &batch_id
ORDER BY
md.batch_id,
md.line_type,
md.line_no
;
How do I get the batch WIP postings?
SELECT
led.doc_id,
led.ledger_code,
led.acctg_unit_id,
led.acct_id,
sum(led.debit_credit_sign * led.amount_base),
FROM
gl_subr_led led
WHERE
led.co_code = ‘&company_code’ AND
led.doc_type = 'PROD' AND
14. led.acct_ttl_type = 1530 AND /* GL_AT_WIP */
led.doc_id = &batch_id
GROUP BY
led.doc_id,
led.ledger_code,
led.acctg_unit_id,
led.acct_id;
How do I get formula effectivities?
SELECT
rvr.recipe_validity_rule_id,
r.recipe_id,
nvl(r.routing_id, 0),
r.formula_id,
nvl(rvr.planned_process_loss, 101)
FROM
gmd_recipe_validity_rules rvr, gmd_recipes_b r
WHERE rvr.recipe_id = r.recipe_id AND
r.delete_mark = 0 AND
rvr.recipe_validity_rule_id in (&formula effectivity id’s)
ORDER BY
rvr.recipe_validity_rule_id,
r.recipe_id
;
How do I get formula material detailsof costing formula and production formula?
SELECT
fm.formula_no,
fm.formula_vers,
md.formula_id,
md.formulaline_id,
md.line_type,
md.line_no,
md.item_id,
md.qty,
md.item_um,
md.scale_type,
md.scrap_factor,
nvl(md.contribute_yield_ind, 'Y'),
nvl(md.scale_multiple, 0),
nvl(md.scale_rounding_variance, 1),
nvl(md.rounding_direction, 0)
FROM
15. fm_form_mst_b fm,
fm_matl_dtl md
WHERE
fm.formula_id = md.formula_id AND
fm.formula_id in (&formula id’s)
ORDER BY
md.formula_id,
md.line_type,
md.line_no
;
How do I get formula operation details?
SELECT
rh.routing_no,
rh.routing_vers,
rh.routing_qty,
rh.item_um,
rh.routing_id,
rh.process_loss,
rh.routing_class,
rd.routingstep_no,
rd.routingsy_um,
oa.activity_factor,
ors.oprn_line_id,
ors.resources,
ors.resource_count,
ors.resource_usage,
ors.process_qty,
ors.cost_cmpntcls_id,
ors.cost_analysis_code,
ors.usage_um,
ors.scale_type,
ors.min_capacity,
ors.max_capacity,
ors.capacity_uom
FROM
fm_rout_hdr rh,
fm_rout_dtl rd,
gmd_operations op,
gmd_operation_activities oa,
gmd_operation_resources ors,
gmd_status_b gs
WHERE
rh.routing_id = rd.routing_id AND
16. rh.routing_status = gs.status_code AND
rd.oprn_id = op.oprn_id AND
rd.oprn_id = oa.oprn_id AND
oa.oprn_line_id = ors.oprn_line_id and
rh.delete_mark = 0 and
oa.delete_mark = 0 and
rh.routing_id in (&Costing_routing_id, &Production_routing_id)
ORDER BY
rh.routing_id,
rd.routingstep_id,
rd.oprn_id,
oa.oprn_line_id,
ors.resources
;
How do I get the batch operation details?
SELECT
bh.batch_id,
nvl(bs.routingstep_id,0),
bs.oprn_id,
nvl(bs.actual_step_qty,0),
nvl(bsa.oprn_line_id,0),
nvl(bsa.plan_activity_factor,0),
nvl(bsa.actual_activity_factor,0),
bsr.resources,
bsr.cost_cmpntcls_id,
bsr.cost_analysis_code,
nvl(bsr.actual_rsrc_count,0),
nvl(bsr.actual_rsrc_qty,0),
nvl(bsr.actual_rsrc_usage,0) /
decode(bsr.actual_rsrc_count,0,1,null,1,bsr.actual_rsrc_count)
actual_rsrc_usage,
bsr.plan_rsrc_count,
bsr.plan_rsrc_qty,
bsr.plan_rsrc_usage,
bsr.usage_uom
FROM
gme_batch_header bh,
gme_batch_steps bs,
gme_batch_step_activities bsa,
gme_batch_step_resources bsr
WHERE
bh.batch_id = &batch_id AND
bh.batch_id = bs.batch_id AND
17. bs.batch_id = bsa.batch_id AND
bs.batchstep_id = bsa.batchstep_id AND
bsa.batchstep_activity_id = bsr.batchstep_activity_id AND
bh.batch_close_date is not null AND
bh.batch_status = 4 AND
bsa.delete_mark = 0
ORDER BY
bs.batch_id,
nvl(bs.routingstep_id,0),
bs.oprn_id,
bsa.oprn_line_id,
bsr.resources
;
How do I get the recipe details?
SELECT
rc.recipe_id,
rc.recipe_no,
rc.recipe_version,
rc.recipe_status,
NVL(rc.planned_process_loss, 101),
rc.calculate_step_quantity
FROM
gmd_status_b gs,
gmd_recipes_b rc
WHERE
rc.recipe_status = gs.status_code AND
rc.recipe_id in (&costing_recipe_id, &production_recipe_id)
ORDER BY
rc.recipe_id
;
How do I get recipe process loss details?
SELECT DISTINCT
rpl.recipe_id,
rpl.orgn_code,
NVL(rpl.process_loss, 101)
FROM
gmd_recipe_process_loss rpl AND
WHERE
rpl.recipe_id in (&costing_recipe_id, &production_recipe_id)
ORDER BY
18. rpl.recipe_id, rpl.orgn_code
;
How do I get recipe activity details?
SELECT
ra.recipe_id,
ra.orgn_code,
ra.routingstep_id,
ra.oprn_line_id,
ra.activity_factor WHERE
ra.recipe_amp;production_recie_r>ra._id
;
How do I get recipe resource details?
SELECT
rr.recipe_id,
rr.orgn_code,
rr.routingstep_id,
rr.oprn_line_id,
rr.resources,
rr.min_capacity,
rr.max_capacity,
rr.resource_usage,
rr.usage_um,
rr.process_qty,
rr.process_uom
FROM
gmd_recipe_orgn_resources rr
WHERE
rr.recipe_id in (&costing_recipe_id, &production_recipe_id)
ORDER BY
rr.recipe_id,
rr.orgn_code,rr.oprn_liner;
How do I get recipe steps?
SELECT
rrs.recipe_id,
rrs.routingstep_id,
rrs.step_qty
FROM
gmd_recipe_routing_steps rrs
WHERE
19. rrs.recipe_id in (&costing_recipe_id, &production_recipe_id)
ORDER BY
rrs.recipe_id,
rrs.routingstep_id
;
How do I get organization specific resource details?
SELECT
rd.orgn_code,
rd.resources,
rd.min_capacity,
rd.max_capacity,
rd.capacity_constraint,
rd.capacity_uom
FROM
cr_rsrc_dtl rd
ORDER BY
rd.orgn_code,
rd.resources
;
How do I get resource details?
SELECT
r.resources,
r.min_capacity,
r.max_capacity,
r.capacity_constraint,
r.capacity_uom
FROM
cr_rsrc_mst r
ORDER BY
r.resources
;
How do I get routing class process loss details?
SELECT
pl.routing_class,
NVL(pl.max_quantity, -1),
pl.process_loss
FROM
gmd_process_loss pl
ORDER BY
20. pl.routing_class, NVL(pl.max_quantity, -1) DESC
;
How do I get the item cost details?
SELECT
orgn_code,
whse_code,
item_id,
cost_mthd_code,
calendar_code,
period_code,
acctg_cost,
nvl(fmeff_id,0),
itemcost_id
FROM
gl_item_cst
WHERE
whse_code = ‘&whse_code’
AND item_id = ‘&item_id’
AND cost_mthd_code = ‘&cost_mthd_code’
AND calendar_code = ‘&cost_calendar_code’
AND period_code = ‘&cost_period_code’
AND delete_mark = 0
ORDER BY
orgn_code, whse_code, item_id, cost_mthd_code, calendar_code,
period_code;
How do I get the resource cost details?
SELECT
r.orgn_code,
r.resources,
r.calendar_code,
r.period_code,
r.cost_mthd_code,
r.usage_um,
r.nominal_cost
FROM
cm_rsrc_dtl r,
cm_cldr_dtl d
WHERE
r.resources = &resource_name and
r.resources = &plant_code and
r.calendar_code = d.calendar_code and
21. r.period_code = d.period_code and
d.start_date >= TO_DATE(&transaction_date, ‘dd-mon-yy hh24:mi:ss’) and
d.end_date <= TO_DATE(&transaction_date, ‘dd-mon-yy hh24:mi:ss’) and
r.delete_mark = 0 and
d.delete_mark = 0;
What profiles do I need to know about?
o GMF: Subledger Variance Type
Possible Values:
Scale to Plan
Scale to Actual
Aggregate
o GMF: Log All Subledger Variances
Possible Values:
Yes
No
What is the Logic?
Identify the primary product of the batch
Loop thru batch material details records (script 2) and
search for record with line_type = 1 and line_no = 1
Get cost details for the product item
Use wip warehouse, batch close date and cost method on fiscal policy to
get the cost details (script 15)
Using fmeff_id (costing recipe validity rule id) get costing recipe validity
rules data (script 3).
Using fmeff_id (costing recipe validity rule id) get material details of
costing formula (script 4)
Compute the material scale factor
Convert batch primary product’s planned quantity to item’s uom.
Convert product quantity on the costing formula to it’s item uom.
Material Scale Factor =
Converted batch product planned quantity
----------------------------------------------------
Converted costing formula product quantity
What is the Material Usage Variance (USG and YLD)?
22. This is the difference between the value of the actual ingredient usage and the
value of the standard ingredient usage on the production batch, as scaled from
the ingredient input specified in the formula used in the Standard Cost Roll-up
process
Loop thru and compare all batch material lines (script 2) and costing formula
material lines (script 4). When a match is found, i.e., line_type and item_id is
same , then compute the usage variance
o Compare the uom on the formula line to line’s item uom. If different
convert the quantity to item’s uom. Scale the converted quantity by the
material scale factor.
o Apply scrap factor to the scaled formula qty
fm_qty = (Scaled Formula Qty) ( 1 + Scrap Factor)
o If item is ingredient with linear scaling then apply process loss to the
scaled formula qty
fm_qty = (fm_qty * 100) / (100 - process_loss)
o Compare the uom on the batch material line to he actual quantity to
item’s uom.
o Compute the difference in the scaled formula quantity (fm_qty) with
actual quantity on the batch. Multiply the difference with the items cost to
get the variance amount. If item is ingredient then this contributes to
Usage Variance (USG) and if it is product then it contributes to Yield
Variance (YLD). Off set accounts for these are RUV/WIP.
What is the Material Substitution Variance (SUB)?
This is the value of the substitute ingredients used. These are ingredients that
were used in the production batch but which were not on the formula used in
the Standard Cost Roll-up process. It also includes the value of ingredients that
were on the formula used in the Standard Cost Roll-up process but which were
not used at all in the batch.
Loop thru and compare all batch material lines (script 2) and costing formula
material lines (script 4). When a match is NOT foundthen compute the
substitution variance
o Compare the uom on the formula line to line’s item uom. If different then
convert the quantity to item’s uom. Scale the converted quantity by the
material scale factor.
o Apply scrap factor to the scaled formula qty
fm_qty = (Scaled Formula Qty) ( 1 + Scrap Factor)
o If item is ingredient with linear scaling then apply process loss to the
scaled formula qty
fm_qty = (fm_qty * 100) / (100 - process_loss)
23. o Compare the uom on the batch material line to the item’s uom. If different
convert the actual quantity to item’s uom.
o Multiply the quantity (fm_qty or converted batch material qty) with the
items cost to get the variance amount. If item is ingredient then this
contributes to Substitution Variance (SUB) and if it is product then it
contributes to Yield Variance (YLD). Off set accounts for these are
RUV/WIP.
What is the Resource Usage and Manning Variance (RUV & RMV)?
This is difference between the value of the actual resource usage and the value
of the standard resource usage on the production batch, as scaled from the
resource usage specified in the routing used in the Cost Roll-up process.
Resource Usage, Manning and substitution variances are computed for POC
batches (poc_ind = 1)
Get Batch Operation Details (script 6)
Get Cost Formula Operation Details (script 5)
Loop thru and compare batch operation dey matching records When a match is
found, i.e., resource is same , then compute the resourceords as processed.
Process unmatched itution variance (RSV).
o If multiple the products.
o Routing qty adjustment factor = Total_output_qty / Costing formula
routing_qty
o Adjusted step qty = (step_qty from costing formula operation details) *
(Routing qty adjustment factor)
o Using plant code, resource name, batch close date and fiscal policy cost
method, get cost of the resource associated to costing formula operation
details record (script 16).
o Batch Resource usage
actual_rsrc_usage from batch operation details (script 6). Converty
the actual_rsrc_usdifferent from the resource uom (scrip>= (Batch
Resource usage) * (actual_rsrc_count) * (Resource Cost)
o Costing formula Resource Usage
resource_usage from costing formula operation details. Convert
resource_usage to resource uom if usage_um on the costing
formula operation is different from the resource uom (script 10).
o Costing formula Resource Usage amount
In case of fixed scaling
(Costing formula Resource Usage) *
actual_rsrc_count *
activity_factor *
24. Resource Cost
In case of linear scaling
(Costing formula Resource Usage) *
actual_rsrc_count *
(Adjusted step qty / process_qty) *
(activity_factor) *
(Resource Cost)
If process_qty is zero then
(Costing formula Resource Usage) *
actual_rsrc_count *
activity_factor *
Resource Cost
o Resource Usage Variance Amount
Batch Resource usage amount –
Costing formula Resource Usage amount
This Resource Usage Variance Amount contributes to Resource
Usage Variance (RUV) . Off set account for this is WIP.
o Difference in the resource count
(actual_rsrc_count from the batch - resource_count from the
costing operation detail)
o Manning Variance Amount
In case of fixed scaling
(Difference in the resource count) *
(Costing formula Resource Usage) *
activity_factor *
Resource Cost
In case of linear scaling
(Difference in the resource count) *
(Costing formula Resource Usage) *
(Adjusted step qty / process_qty) *
(activity_factor) *
(Resource Cost)
If process_qty is zero then
(Difference in the resource count) *
(Costing formula Resource Usage) *
activity_factor *
Resource Cost
This Manning Variance Amount contributes to Resource Manning Variance (RMV)
. Off set account for this is WIP.
What is Resource Substitution Variance (RSV)?
This is the value of the substitute resources used. These are resources used that
were not on the routing used in the Cost Roll-up process. It also includes the
25. value of resources that were on the routing used in the Cost Roll-up process but
which were not used at all in the batch.
Get Batch Operation Details (script 6)
Get Cost Formula Operation Details (script 5)
As part of computing resource usage variance, operation details records on the
batch and costing formula are compared, marked the records that are matching
and computed resource usage variance for those matched records. Resource
substitution variance is computed for the unmatched records.
Loop thru batch operation details that are not in cost formula operation details
(i.e., batch operation detail records that are not marked in RUV processing) and
compute resource substitution variance as below:
o Using plant code, resource name, batch close date and fiscal policy cost
method, get cost of the resource associated to costing formula operation
details record (script 16).
o Batch Resource usage
actual_rsrc_usage from batch operation details (script 6). Converty
the actual_rsrc_usage to resource uom if usage_um on the batch is
different from the resource uom (script 10).
o Batch Resource usage amount
(Batch Resource usage) * (actual_rsrc_count) * (Resource Cost)
o This Batch Resource usage amount contributes to Resource Substitution
Variance (RSV) . Off set account for this is WIP.
Loop thru cost formula operation details that are not in batch operation details
(i.e., cost formula operation detail records that are not marked in RUV
processing) and compute resource substitution variance as below:
o If multiple product items exist on the costing formula/recipe then sum all
those products quantities. Total_output_qty = sum of the product quantity
of all the products.
o Routing qty adjustment factor = Total_output_qty / Costing formula
routing_qty
o Adjusted step qty = (step_qty from costing formula operation details) *
(Routing qty adjustment factor)
o Using plant code, resource name, batch close date and fiscal policy cost
method, get cost of the resource associated to costing formula operation
details record (script 16).
o Costing formula Resource Usage
26. resource_usage from costing formula operation details. Convert
resource_usage to resource uom if usage_um on the costing
formula operation is different from the resource uom (script 10).
o Costing formula Resource Usage amount
In case of fixed scaling
(Costing formula Resource Usage) *
actual_rsrc_count *
activity_factor *
Resource Cost
In cr scaling
(Costing formula Resource Usage) *
actual_rsrc_count *
(Adjusted step qty / process_qty) *
(activity_factor) *
(Resource Cost)
If process_qty is zero then
(Costing formula Resource Usage) *
actual_rsrc_count *
activity_factor *
Resource Cost
o This Costing formula Resource usage amount contributes to Resource
Substitution Variance (RSV). Off set account for this is WIP.
What is Batch Close Variance (CLS)?
This is the amount required to balance the journal created by the CLOS Batch
Close process.
Net amount posted to WIP account in a batch should total to 0.
o Sum WIP amount postings in Batch Release, Batch Certification and Batch
Step Certification sub-events and WIP amount postings in Batch Close
sub-event related to off-sets of YLD, USG, RUV, RMV, RSV, …etc. If net
amount is non-zero then it contributes to batch close variance (CLS). Off
set account for this is WIP.