2014年3月24日 星期一

Error with Standard Costing cst_match_date_period

Error with Standard Costing cst_match_date_period

In this Document
Symptoms
Cause
Solution
References
Applies to:

Oracle Inventory Management - Version 11.5.10.CU2 to 12.1.3 [Release 11.5.10 to 12.1]
Oracle Cost Management - Version 11.5.10.1 to 12.0.4 [Release 11.5 to 12]
Information in this document applies to any platform.
Checked for relevance 19-JUN-2010


Symptoms

When attempting to cost Sales Order Pick and Internal Order Pick the following error occurs:

ERROR

Error Code =CST_MATCH_DATE_PERIOD


Error Explanation = The transaction date is not within the accounting period specified.


The issue can be reproduced at will with the following steps:

1. Oracle cost Management 
2. Inventory 
3. Transactions 
4. View Transactions 
5. select costed_flag option error

Cause

The cause of the issue is invalid / incorrect data in MTL_MATERIAL_TRANSACTIONS, the acct_period_id is getting stamped with the accounting is of the previous period. 

Solution

To identify the issue, please obtain the following scripts output:

1) 
SELECT mmt.transaction_id txn_id,
mmt.transaction_date txn_date,
mmt.acct_period_id txn_period_id,
o.acct_period_id org_period_id,
o.period_start_date st_date,
o.schedule_close_date cl_date
FROM mtl_material_transactions mmt,
org_acct_periods o
WHERE mmt.organization_id = o.organization_id
AND TRUNC(o.schedule_close_date) >= TRUNC(mmt.transaction_date)
AND TRUNC(o.period_start_date) <= TRUNC(mmt.transaction_date)
and mmt.transaction_date is not NULL
and mmt.acct_period_id <> o.acct_period_id ;

2) select * 
   from org_acct_periods 
    where organization_id = '&org_id_where_issue_exists';

-- To implement the solution, please execute the following steps:

1) Make a backup of MTL_MATERIAL_TRANSACTIONS before running the update script. 
2) Shut down the cost manager before the update. 
3) Run the following update to correct the acct_period_id:

Update mtl_material_transactions 
set acct_period_id = <insert correct acct period id> 
,   costed_flag = 'N' 
,   transaction_group_id = NULL 
,   transaction_set_id = NULL 
,   error_code = NULL 
,   error_explanation = NULL 
where costed_flag = 'E' 
and acct_period_id =  <current incorrect value> 
and error_code = 'CST_MATCH_DATE_PERIOD'
and organization_id = '<organization_id for the affected records>'

Note: The transaction_id could also be used as the basis for the update, but in this case the number of records made that difficult and uniqueness could be achieved with the four where clauses parameters above.

3) Restart the Cost Manager.

沒有留言:

張貼留言