Costing error
Message : CSTPACIN.COST_INV_TXN:CSTPAVCP.average_cost_update (40): ORA-01400:
cannot insert NULL into
("BOM"."CST_LAYER_COST_DETAILS"."ITEM_COST")
Symptoms
1. Actual Cost Worker Completed warning.
2. Cost manager not initiate the Actual Cost Worker concurrent for related Inventory organization
3. mtl_material_transactions > Costed_flag displayed as 'E'
4. mtl_material_transactions > Error_Code = No error
5. mtl_material_transactions >ERROR_EXPLANATION = CSTPACIN.COST_INV_TXN:CSTPAVCP.average_cost_update (40): ORA-01400: cannot insert NULL into ("BOM"."CST_LAYER_COST_DETAILS"."ITEM_COST")
Solution
1. To Find the Problematic record in Mtl_material_transactions Table
select * from mtl_material_transactions where costed_flag = 'E'
2. To find the item code = Segment1
select * from mtl_system_items where inventory_item_id = 787838
3. To find to check the New_average_cost field is null
select * from mtl_cst_txn_cost_details where transaction_id = 37480170
4. Check the Average cost of the item code : Navigation > Cost management - SLA > Item costs > Item costs >Find the Item Code > "Unit cost" field value
To Update the Average cost
update mtl_cst_txn_cost_details
set new_average_cost ='4.31648' --Enter average cost
where transaction_id in
( Select transaction_id from mtl_material_transactions
where costed_flag = 'E'
and transaction_id = 37480170 -- Enter Transaction_id
--and TRANSACTION_ACTION_ID=24 and
--TRANSACTION_SOURCE_TYPE_ID=13)
and new_average_cost is null
and value_change is null
and percentage_change is null)
To update the Costed_flag as 'N'
update mtl_material_transactions
set costed_flag='N',
transaction_group_id=NULL,
error_code=NULL,
error_explanation=NULL
where costed_flag='E'
Symptoms
1. Actual Cost Worker Completed warning.
2. Cost manager not initiate the Actual Cost Worker concurrent for related Inventory organization
3. mtl_material_transactions > Costed_flag displayed as 'E'
4. mtl_material_transactions > Error_Code = No error
5. mtl_material_transactions >ERROR_EXPLANATION = CSTPACIN.COST_INV_TXN:CSTPAVCP.average_cost_update (40): ORA-01400: cannot insert NULL into ("BOM"."CST_LAYER_COST_DETAILS"."ITEM_COST")
Solution
1. To Find the Problematic record in Mtl_material_transactions Table
select * from mtl_material_transactions where costed_flag = 'E'
2. To find the item code = Segment1
select * from mtl_system_items where inventory_item_id = 787838
3. To find to check the New_average_cost field is null
select * from mtl_cst_txn_cost_details where transaction_id = 37480170
4. Check the Average cost of the item code : Navigation > Cost management - SLA > Item costs > Item costs >Find the Item Code > "Unit cost" field value
To Update the Average cost
update mtl_cst_txn_cost_details
set new_average_cost ='4.31648' --Enter average cost
where transaction_id in
( Select transaction_id from mtl_material_transactions
where costed_flag = 'E'
and transaction_id = 37480170 -- Enter Transaction_id
--and TRANSACTION_ACTION_ID=24 and
--TRANSACTION_SOURCE_TYPE_ID=13)
and new_average_cost is null
and value_change is null
and percentage_change is null)
To update the Costed_flag as 'N'
update mtl_material_transactions
set costed_flag='N',
transaction_group_id=NULL,
error_code=NULL,
error_explanation=NULL
where costed_flag='E'