You are on page 1of 20

Lot Costing

An Oracle White Paper


December 2012

Table of Contents

1. OVERVIEW...............................................................................................................................................................................................................................................................................

2. WHAT IS LOT COSTING......................................................................................................................................................................................................................................................

3. PARAMETERS SPECIFIC TO THE LOT COSTING COST TYPE .......................................................................................................................................................................

4. WHEN TO USE LOT COSTING........................................................................................................................................................................................................................................

5. TRANSACTIONS AFFECTING LOT COSTING ...........................................................................................................................................................................................................

6. SETUP REQUIRED FOR LOT COSTING .......................................................................................................................................................................................................................

7. TEST CYCLE ...........................................................................................................................................................................................................................................................................

8. TECHINICAL CONSIDERATION ....................................................................................................................................................................................................................................

9. COMMON LOT COSTING ISSUES AND HOW TO CORRECT THEM.................................................................................................................................................................


1. Overview

The objectives of this white paper are to consolidate and clarify information about Lot costing and related issues.
There is no existing document which collates all the relevant topics together.

This white paper will aim to fulfill this need and discuss the following in detail:

To Explain when to use lot costing

To Explain setup required for lot costing

To Explain a full test case for lot costing

To Explain tables populated after running lot costing

To explain what happens when lot costing fail and discuss how to correct them

2. What is Lot Costing?

Lot Costing is a perpetual form of costing unlike standard or actual costs that are periodic in nature.
The lot costs do not have cost calendar and period. Once the cost of a lot is identified, it remains the cost of the lot
until the entire lot is consumed or another receipt or batch yield is created for the same lot.
The Cost Update is not necessary for lot costs.

3. Parameters Specific to a Lot Costing Cost Type


3.1 What is the Alternate cost type?

Within any Formula, you can have a mixture of Items that are and are not Lot-costed.
When you set up a Cost Type for use by Lot Costing, you also specify which Cost Method is to be used by the Lot
Cost calculation process when an Item within the Formula is either not Lot-controlled at all, or is Lot-controlled but
not Lot-costed.
To retrieve cost for non lot control, an alternate cost method is used.
You can either use standard or actual cost method.

3.2 How is Start Date used?

The start date is the date after which all transactions are considered for lot cost calculations.
Choose the date carefully as it cannot be changed once lot costs are calculated.
The date should be at least a few periods earlier than the current date, so that all transactions for Lots currently
being used are considered for cost calculations when this Cost Method is the active one.

Note that if you set the start date too far in the past (for example, several years), then the Lot Cost process tries to
select all transactions from that date up to the present, and the process can take a very long time.
This also results in the costs of unused lots being calculated and stored on the database, which in turn affects the
performance of the Lot Cost process.
3.3 How is a Lot cost process orders transactions?
Lot cost process orders transactions by transaction date:
If a product is yielded prior to ingredient issue, the lot becomes uncostable.
If a lot has two transactions e.g. PO Receipt and WIP Issue, The transaction date of the PO Receipt
MUST be before the WIP Issue transaction date otherwise the lot becomes uncostable.

4. When To Use Lot Costing?

Oracle Process Manufacturing lets you maintain standard and actual item costs by inventory organization.
In cases where items are maintained in lots with varying attributes, the need arises to record and maintain the
costs of the items on a per lot basis to accurately reflect the variations among different lots.
Lot costing lets you calculate and store costs at the lot level. In other words, every lot has a unique cost associated
with it and that lot retains this cost until the entire lot is consumed. The lot costs are computed on a perpetual
basis unlike the existing periodic actual costing

Please note that Lot Costing is a data-intensive process which will read and write a great deal of data and will
perform poorly if it is allowed to.

For this reason if you have a large number of low-cost Lot-controlled raw material Items whose purchase price does
not tend to vary much from Period to Period it is normal NOT to declare those Items as being Lot Costed.

Items which do benefit from being Lot Costed are high-value commodity raw materials whose prices do fluctuate
and which therefore do have a significant effect on the production cost of the end product.

Precious metals would typically fall into this category.

5. Transactions Affecting Lot costing

The lot cost is calculated as either raw material cost or product cost.
The transactions that affect the Lot Cost of an item are:
Purchase Order Receipts (at PO Price)
Production Batches yields (at the cost of the batch): To have Lot cost calculation impacted a production batch
status need to be either completed or closed. Yield alone cannot impact lot cost calculation. If you have scenario
like batches having yields and crossing periods without batches being in completed status, such batches costing
accounting may happen with alternate cost type chosen while setting Lot cost. Wherever batches crossing the
period we recommend to use approach like moving batch status to complete status so that lot costing can
cost/account those batches. Once period end processing is done user can reopen the batch and complete
remaining transaction on that batch in next period. We cannot leave yield without being costed from either of cost
type. This is as per existing design of product.

Following are open Enhancements in this area:


Bug 25288955 - LOT COSTING, CROSS PERIOD BATCH, CLS DUE TO ALTERNATE COST POSTING(CLS BREAKUP)
Bug 21447607 - GME SHOULD NOT RELIEAVE THE RESERVATION OF ALL THE INGREDIENTS FOR BATCH COMPLTN

Incoming Inventory Transfers (at cost of the source inventory organization)


Incoming Internal Orders (at the cost of the source inventory organization)
Lot Split, Lot Merge, and Lot Translate
6. Setup Required for Lot Costing:
Note: This test cycle will present full test cycle for using lot costing and actual cost method as an alternate cost method.

6.1. Setup in Oracle Inventory

Path: Inventory Super User >items>Master items

This item is a lot controlled item

This item is a non controlled item.


6.2. Setup in OPM Financial

1. Path :( OPM Financials > Setup > Cost type)

2. Path :( OPM Financials > Setup > Lot costs > Lot Cost Items)

Use this Lot Cost Items form to setting up items that are costed on a lot basis. If an item has to be costed by lot or if all items
that belong to an item cost category need to be costed by lot, then enter the appropriate item or item cost category.Only lot-
controlled items are available here.

3. Path :( OPM Financials > Setup >fiscal Policies


7. Test Cycle

1. Create a PO

Path: Purchasing Super User=>Purchase order=>Purchase order summary

Create a PO for both lot and non lot control items

2. Create a PO receipt

Path: Purchasing Super User> Receiving> Receipts


3. View data in table MTL_MATERIAL_TRANSACTIONS

Select transaction_id,inventory_item_id,transaction_type_id,transaction_action_id ,transaction_quantity,transaction_date ,opm_costed_flag

from mtl_material_transactions where transaction_id=64557451 or transaction_id=64557447

4. Create a batch to consume both items (lot and non lot control items)

This batch is using 2 ingredients (lot and non lot control items) to produce finished product (lot control item).

5. Complete the batch and create a (WIP completion transaction)


6. Run actual cost process

Path: OPM financial=>Actual Cost=>Actual cost process

It is required to run alternate cost method (actual cost process) before running lot costing as one of the ingredients

Of the finished product Item is a non lot control item and it will not be processed by lot costing .
7. Run Lot cost process

Path: OPM financial=>Lot Costs =>Lot Cost process

8. The log file confirms that the following tables are processed for lot control items:
gmf_material_lot_cost_txns

gmf_lot_cost_details

gmf_lot_costs
9. View Lot Cost Details:
Path: OPM financial=>Lot Costs => Lot Cost Details

Lot cost for raw material (lot control item)


Lot cost for finished product item

10. View data in table gmf_material_lot_cost_txns

a. receipt transaction:

Select transaction_id ,cost_trans_date,cost_trans_qty,cost_trans_um,lot_number,Old_onhand_qty,old_unit_cost,

new_onhand_qty,new_unit_cost,total_trans_cost From gmf_material_lot_cost_txns lct where transaction_id=64557447

b.Wip issue transaction :

Select transaction_id ,cost_trans_date,cost_trans_qty,cost_trans_um,lot_number,Old_onhand_qty,old_unit_cost,

new_onhand_qty,new_unit_cost,total_trans_cost From gmf_material_lot_cost_txns lct where transaction_id=64557494

c. wip completion transaction :

Select transaction_id ,cost_trans_date,cost_trans_qty,cost_trans_um,lot_number,Old_onhand_qty,old_unit_cost,

new_onhand_qty,new_unit_cost,total_trans_cost From gmf_material_lot_cost_txns lct where transaction_id=64557509


11. View data in table gmf_lot_costs

Select header_id,inventory_item_id, organization_id,lot_number,cost_date ,unit_cost ,onhand_qty,creation_date,frozen_ind from


gmf_lot_costs where inventory_item_id= 325033 and lot_number='GW_OCT2'

Select header_id,inventory_item_id, organization_id,lot_number,cost_date ,unit_cost ,onhand_qty,creation_date,frozen_ind

from gmf_lot_costs where inventory_item_id= 276034 and lot_number='GW_OCT2'

12. View data in table gmf_lot_cost_details

select * from gmf_lot_cost_details where header_id= &header_id


13. Run Cost Update

Path: OPM financial =>Cost Update

It is required to run cost update process for alternate cost (actual cost process) so that cost will be populated in

table gl_item_gst for non lot control item.

14. Run OPM accounting pre processor

Path: OPM financial=>OPM accounting pre processor

View Data in table GMF_XLA_EXTRACT_HEADERS

SELECT header_id,event_id,entity_code,event_class_code,event_type_code,transaction_date,transaction_quantity ,transaction_value FROM


gmf_xla_extract_headers where transaction_id in (64557447,64557451,64557495,64557494,64557509)
View Data in table GMF_XLA_EXTRACT_LINES

SELECT * FROM gmf_xla_extract_lines WHERE header_id IN( (SELECT header_id FROM gmf_xla_extract_headers where

transaction_id in (64557447,64557451,64557495,64557494,64557509)));

8. Technical consideration

8.1 Lot costing tables


gmf_material_lot_cost_txns

gmf_lot_cost_details

gmf_lot_costs

8.2 Lot Cost Process executable (GMFRLC) is

GMF_LOT_COSTING_PUB.ROLLUP_LOT_COSTS procedure

- Package Body file for GMF_LOT_COSTING_PUB is GMFPLCRB.pls

Procedure to delete previously costed rows in the trail run=> Procedure: delete_lot_costs

Procedure to handle Purchase Order Receipt =>Procedure: PROCESS_RECEIPT

Procedure load and cost burdens. If any burdens are located => Procedure: process_burdens

Procedure to process Lot cost Adjustment rows=> Procedure: process_lot_cost_adjustments

Procedure to Process the PROD transaction records, whose current status is not Completed or Closed=> Procedure:
process_wip_batch

Procedure to sums up all the component costs by grouping component class and analysis code => Procedure : get_new_cost

Procedure will process - discrete to process transfers=> Procedure : process_pd_transfers

The main procedure for the rollup=> Procedure: rollup_lot_costs

Procedure to create a cost header for a new lot in gmf_lot_costs=> Procedure: create_cost_header

Procedure to create a new lot cost detail row in gmf_lot_cost_details => Procedure: create_cost_detail

Procedure to create a new linking transaction in gmf_material_lot_cost_txns => Procedure: create_material_transaction

9. Common Lot Costing issues And How to correct them

1.R12 Inventory Valuation Report Does Not Work For Lot Costing Method
How is the issue seen?

Run request Inventory Valuation Report for lot cost items whose costs have changed.
Select any previous period found the valuation is wrong.

Cause :

Cost reported for lot costing customers wasnt weighted average cost of lots in which inventory exists so that valuation is incorrect.

Solution:

To implement the solution, please execute the following steps:

1. Download and review the readme and pre-requisites for Patch. 10370554

2. Ensure that you have taken a backup of your system before applying the recommended patch.

3. Apply the patch in a test environment.

4. Confirm the following file versions:

reports/US GMFINVAL.rdf 120.3.12010000.7

patch/115/sql gmfcmcos.pls 120.6.12010000.2

patch/115/sql gmfcmcob.pls 120.15.12010000.3

2. Lot Costing errors - ORA-01403: ORA-01403: no data found in Rollup Lot Costs

How is the issue seen?

Lot Cost Process Fails.


The log file contains
Opening explosion_cursor_nr cursor
The value for the FM_YIELD_TYPE is SET
ERROR: ORA-01403: no data found in Rollup Lot Costs

Cause :

The Organization parameters were not defined the relevant organization.

Solution:

Ensure that Organization parameters are properly defined for the relevant organization especially the Yield UOM

Navigation Path>Product Development Security Manager>Organization Parameters

N.B. this parameter also needs to be setup for the 'default' organization i.e. the one with the blank organization.

3. Running Opm Lot Costing On A Final Mode Deleting Temporary Data

How is the issue seen?

Find Final mode of lot costing deleting lot costs of transaction that are later than end date put in final lot cost process run.
Steps:

1. Do PO receipt in January
2. Do PO receipt in Feb
3. Run lot cost process as on Feb date, both the receipts lot cost is visible.
4. Run lot cost process in final mode by keeping end date as 31-Jan-2010.
Observe lot cost details that belongs to Feb. It is getting vanished(getting deleted)

Cause :

No fault found, as it is intended behavior

Solution:

To make lot cost available we can run Lot cost process again in draft mode (After final mode is done).Regarding explanation for why Lot cost
process deletes all earlier costs:

Lot cost process deletes all costs, which are not final for Item/lot combination entered when running lot cost process.

This is indeed intended. This is because all subsequent costs are not valid as soon as some earlier transactions are processed / reprocessed.

This is the case regardless of whether lot cost process is run in preliminary mode or in final mode.

Final cost date is used for selection of transactions to be processed.

However once the transaction is selected and processed all subsequent costs could potentially be impacted, as lot cost is a perpetual costing
method.

4. Lot Cost not being calculated for Wip Returns

How is the issue seen?

The Lot Cost is not being calculated for WIP Return and WIP Completion pairs when changes are made to production batch transactions.

Cause :

There is a code error.

Solution:

Apply the patch 9894310

Set GMF: Use Cost Alloc Factor in Lot Costing to 'Yes'.

Set 'GMF: Maximum Number of Iterations for Lot costing' to 5


5. Lot Cost Process errors with - ERROR: Unable to locate cost header for organization: <Org Code>, item ID:
<Inventory_Item_ID>, lot Number: <Lot No >

How is the issue seen?

The Lot Costing process log file shows the following -

ERROR: Unable to locate cost header for organization: <Org Code>, item ID: <Inventory_Item_ID>, lot Number: <Lot No >
WARNING: Setting Lot for the orgn/Item/Lot <Org ID>/<Inventory_Item_ID>/<Lot No> as uncostable
Loading in copy_uncostable_record for lot_id <Lot no> Transaction_id <Transaction ID>
Loading in copy_to_transrow for lot_id <Lot No> Transaction_id <Transaction ID>
.
Loading existing cost for lot_id <Lot No> in organization <Org Code>
Previous cost was NULL
Checking if the Current Lot <Lot No> is Costable ?
Current orgn/Item/Lot <Org ID>/<Inventory_Item_ID>/<Lot No> is Not Costable
So skipping the transaction: <transaction ID>
.

Cause :

This error indicates that the Lot Costing transaction cannot arrive at a cost for the Item as the Item transactions do not have any
costs associated.
In this case the Item Lot did not have any cost when it was shipped and thus the Lot Costing process could not arrive at any cost for
it. The 'Lot Cost Adjustment' was done after the Item / Lot was shipped.)

Solution:

Provide a cost to the Item / Lot via 'Actual Cost Adjustment' so that the transactions that are considered by the Lot Cost process
have a lot cost associated.
6. After running the Lot Cost processor you find that NO cost has been calculated for these Item / Lots.

How is the issue seen?

You have taken some lot enabled items into stock using "miscellaneous receipt, after running lot cost process you find that no
Cost has been calculated for this item lot.

Cause:

Miscellaneous receipts are not considered as a source of Receipts for the purpose of Lot cost process.

Solution:

Miscellaneous receipt will be valued at the existing Lot Cost, so if there is no lot cost for the Item /Lot / Organization combination at the time of
miscellaneous receipt, then the lot cost will be zero.

If the Lot numbers which you have used to bring the stock through Miscellaneous Receipt do not have any other receipts like PO Receipts or
Production Receipt then you have to do a Lot Cost Adjustment for these Lot Numbers.

1. If you do the Lot Cost Adjustment prior to the date and time of Miscellaneous Receipt, then the

Following should be the accounting entries:

For Lot cost Adjustment (LADJ)

INV Debit 0.00

IRV Credit 0.00

For Miscellaneous Receipt

INV Debit (Qty X Lot cost)

IVA Credit (Qty X Lot cost)

2.If you do the Lot Cost Adjustment immediately after the date and time of Miscellaneous Receipt,

the following are the accounting entries:

For Miscellaneous Receipt

INV Debit 0.00

IVA Credit 0.00

For Lot cost Adjustment (LADJ)

INV Debit (Qty X Lot cost)

IRV Credit (Qty X Lot cost)

7. Journals for Batch Close Variances in Lot Costing

How is the issue seen?

Lot Costing is being used.


Batch Close Variances exist when batches are closed.

This should not be the case when either Actual or Lot Costing is being used (other than a very small value for rounding).

Cause :

There is a posting to the Batch Close Variance account if, when the batch is closed, there is a value remaining in the WIP account. The reasons
for this should be investigated. Some reasons that have been found to cause this include

1. Missing WIP Completion postings. Do they all exist for the batch being investigated?
2. Resource Transactions not being posted because the period is closed. The cause of this may stem from current Oracle behavior where the
Resource Transaction Date is by default created using the Actual Start Date of the Step regardless whether the GL Period is already closed for
that date.

Solution:

Ensure all the postings for the batch exist.

8.Item Lot cost is not correct

How is the issue seen?

After running lot cost process, found that item lot cost is not as expected.

Solution:

In any initial Lot cost setup is unable to cost the Lot Cost Items, one can check the following:

1) Item is Lot controlled or not?( Inventory Super User > Master Items > (Find Item) > Inventory Tab > Lot Control)

2) Pertinent Item or Cost Category is listed in Lot Cost Items (OPM Financials > Setup > Lot costs > Lot Cost Items)

3) check whether Process Cost Class, category in Default Category Sets? (Inventory Super User > Setup > Items > Categories > Default Category
Sets).

4) File versions of GMFPLCRB.pls should be at latest code level.

You might also like