In this Document
APPLIES TO:
Oracle Cost Management - Version 12.1.3 and later
Information in this document applies to any platform.
SYMPTOMS
On : 12.1.3 version, Costing Transaction Errors
When attempting to cost material transactions the following error occurs.
ERROR
-----------------------
CST_INVALID_WIP error The wip entity is either not defined or does not have a period balance entry
STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. Create material transactions
2. Launch the cost manager that spawns the associated cost worker
3. View material transactions for error
CAUSE
Found material transactions that failed with error CST_INVALID_WIP error - The wip entity is either not defined or does not have a period balance entry
has no associated record in wip_period_balances for a specific wip_entity_id belonging to the organization_id and acct_period_id.
Run sql query to verify:
Select * from wip_period_balances
where wip_entity_id = &wip_entity_id
and organization_id = &organization_id
and acct_period_id = &acct_period_id;
This should show no record selected.
SOLUTION
To implement the solution. please execute as below:
1. Do the appropriate backup procedure
2. Run the Datafix below to insert missing record in WIP_PERIOD_BALANCES table.
INSERT INTO WIP_PERIOD_BALANCES
(ACCT_PERIOD_ID, WIP_ENTITY_ID,
REPETITIVE_SCHEDULE_ID, LAST_UPDATE_DATE,
LAST_UPDATED_BY, CREATION_DATE,
CREATED_BY, LAST_UPDATE_LOGIN,
ORGANIZATION_ID, CLASS_TYPE,
TL_RESOURCE_IN, TL_OVERHEAD_IN,
TL_OUTSIDE_PROCESSING_IN, PL_MATERIAL_IN,
PL_MATERIAL_OVERHEAD_IN, PL_RESOURCE_IN,
PL_OVERHEAD_IN, PL_OUTSIDE_PROCESSING_IN,
TL_MATERIAL_OUT, TL_MATERIAL_OVERHEAD_OUT, TL_RESOURCE_OUT,
TL_OVERHEAD_OUT, TL_OUTSIDE_PROCESSING_OUT,
PL_MATERIAL_OUT, PL_MATERIAL_OVERHEAD_OUT,
PL_RESOURCE_OUT, PL_OVERHEAD_OUT,
PL_OUTSIDE_PROCESSING_OUT,
PL_MATERIAL_VAR, PL_MATERIAL_OVERHEAD_VAR,
PL_RESOURCE_VAR, PL_OUTSIDE_PROCESSING_VAR,
PL_OVERHEAD_VAR, TL_MATERIAL_VAR, TL_MATERIAL_OVERHEAD_VAR,
TL_RESOURCE_VAR, TL_OUTSIDE_PROCESSING_VAR,
TL_OVERHEAD_VAR)
VALUES
(xxxx, yyyy, NULL, SYSDATE, 0, SYSDATE, 0, 0,
zzzz, ct, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
NOTE:
Replace xxxx with the Acct_period_id value
Replace yyyy with the wip_entity_id value
Replace zzzz with the organization_id value
Replace ct with the class_type value
commit:
Get the the class_type using below sql:
select wip_entity_name , wip_entity_id, organization_id,
decode(entity_type,1, '1=Discrete Job',
2, '2=Repetitive Assly',
3, '3=Closed Discr Job',
4, '4=Flow Schedule',
5, '5=Lot Based Job',
6, '6=EAM Job',
entity_type) entity_type
from wip_entities
where wip_entity_id = &wip_entity_id;
Note :
The class_type should be the equivalent entity_type as above sql query
3. Reprocess the uncosted material transaction records thru update sql
update mtl_material_transactions
set costed_flag = 'N',
error_code = NULL,
error_explanation = NULL,
transaction_group_id = NULL,
transaction_set_id = NULL
where transaction_id in (<Transaction_id1>,<Transaction_id2>) ;
The cost manager will pickup these transactions for reprocessing
4. Please verify if the issue was resolved.