Professional Documents
Culture Documents
To find the ORGANIZATION_ID run this script: select organization_id, organization_code from org_organization_definitions where organization_name like xxx%; ( xxx is organization name ) To find the WIP_Entity_Id run this script: select wip_entity_id from wip_entities where wip_entity_name = and organization_id= xxx; ( xxx is organization id ) select error_code, error_explanation,lock_flag,inventory_item_id, transaction_action_id,transaction_source_type_id, process_flag,organization_idfrom mtl_material_transactions_temp where organization_id =and transaction_source_id = ;( wip_entity_id is obtained from above SQL statement )
select transaction_id, wip_entity_id,process_phase, process _statusfrom wip_cost_txn_interfacewhere process_status in (1, 3); If there are transactions for the job, then run the following script: update wip_cost_txn_interfaceset group_id=null,process_status=1,transaction_id=nullwhere transaction_id=; There must be no transactions for the job in MTL_MATERIAL_TRANSACTIONS_TEMP. The mtl_material_transactions_temp table is the Key for all material transactions. First make sure the Inventory Transaction Manager is running. select transaction_source_id , inventory_item_id, process_flag,error_code, error_explanation,transaction_source_type_id, organization_idfrom mtl_material_transactions_tempwhere process_flag = ?E?and transaction_source_type_id=5; ( 5 = Job/schedule ) If there are transactions for the job in MTL_MATERIAL_TRANSACTIONS_TEMP then run the following script: update mtl_material_transactions_tempset process_flag = Y,lock_flag = N,transaction_mode = 3,error_code = NULL,error_explanation = NULLwhere organization_id =and transaction_source_id = ; There must be NO uncosted transactions for the job in MTL_MATERIAL_TRANSACTIONS (WHERE COSTED_FLAG IN (N, E)) select request_id, costed_flag, transaction_id,transaction_group_id, inventory_item_id, transaction_source_idfrom mtl_material_transactionswhere costed_flag in (N, E)and transaction_source_type_id=5and organization_id = ; Update the records for re-submission to the Cost Manager. update mtl_material_transactionsset costed_flag = N,request_id = NULL,transaction_group_id = NULL,error_code = NULL,error_explanation = NULLwhere costed_flag in (N, E); Re-start the Cost Manager to run against this schema . If the above condition were satisfied, but the problem still occurs. CHANGE STATUS in WIP_DISCRETE_JOBS & DELETE FROM WIP_DJ_CLOSE_TEMP. 1. You need to make the changes with sqlplus. 2. You need to make sure the Status_type =5 in WIP_DISCRETE_JOBS to Complete, No charges allowed 3. You need to delete all corresponding records in WIP_DJ_CLOSE_TEMP. To find any rows for the job: select count (*) from wip_dj_close_tempwhere wip_entity_id = and wip_entity_name = ; 1. In WIP_entities table check the Entity_type ( 3 = Closed Discrete Job). 2. In Wip_discrete_jobs check the status_type (12 = Closed). Note: FILE: wiprsjob.sql
This script is used to reset Discrete Jobs that cannot be Closed due to Pending Transactions against them. This script can be downloaded here; RESET Pending Close Jobs SQL Script Note 106245.1
6. Uncosted Transactions?
When Closing the Inventory Period End, you may receive a message saying that you cannot close the Period End because a specified number of Uncosted Transactions exist. This can happen when the Cost Manager job comes down or is taken down during run time, leaving some Transactions in an in between state, with a request_id but costed_flag set to N. In Standard Costing the error message is listed in the log file of the cost worker. However, In Average Costing the error is detailed in the MMT table itself (error_code, error_explanation). There must be NO Uncosted Transactions for the job in MTL_MATERIAL_TRANSACTIONS (WHERE COSTED_FLAG IN (N, E)) select request_id, costed_flag, transaction_id,transaction_group_id, inventory_item_id, transaction_source_idfrom mtl_material_transactionswhere costed_flag in (N, E)and transaction_source_type_id=5and organization_id = ; (If this picks up any records Uncosted Transactions exist). If this table has Uncosted Transactions that errored out then see the scripts provided. IMPORTANT: Ensure that your Cost Manager is NOT running against this Schema. Create a backup table for the records you are updating (always a good practice); create table mtl_material_txn_bkup as(select * from mtl_material_transactionswhere costed_flag in (N, E); Update the records for re-submission to the Cost Manager. update mtl_material_transactionsset costed_flag = N,request_id = NULL,transaction_group_id = NULL,error_code = NULL,error_explanation = NULLwhere costed_flag in (N,'E); Re-start the Cost Manager to run against this schema. To resolve any WIP Transactions: select transaction_id, request_id, group_id,process_status , wip_entity_namefrom wip_cost_txn_interfacewhere process_status in ( 1,3) ;(Process_status= 1 indicates Pending 3 indicates Error ) (ie. only uncosted transactions exist in this table) To update the table : update wip_cost_txn_interfaceset request_id = null,group_id = null,process_status = 1where process_status = 3;(Process_status= ? ( 1 indicates Pending, 3 indicates Error ) The next Cost Manager run should pick up the Transactions and Reprocess them. If the Transactions
fail due to an ERROR condition ie. costed_flag = E. then there are Pending Transactions in WIP_COST_TXN_INTERFACE where the process_status=1. The Cost Manager is active, but never selects these rows for processing. If you are using Average Costing, then verify that a Transaction has not errored out in MTL_MATERIAL_TRANSACTIONS. If a Transaction errored out there, other transactions will not be costed in WIP_COST_TXN_INTERFACE. If using Average Costing, then all transactions are processed sequentially. If one transaction errors out, then no further processing can be done. To determine if there is an errored transaction in MTL_MATERIAL_TRANSACTIONS use the following script: select request_id, costed_flag, transaction_id,transaction_group_id, inventory_item_id, transaction_source_idfrom mtl_material_transactionswhere costed_flag in (N, E)and transaction_source_type_id=5and organization_id = ; To determine the error that has occured on this Transaction, reprocess it and look in the Cost Manager Log file for the error message. To Reprocess this Transaction: update mtl_material_transactionsset costed_flag = N,request_id = NULL,transaction_group_id = NULL,error_code = NULL,error_explanation = NULLwhere costed_flag is in (N, E);COMMIT; To view the Log File for the most Recent Cost Manager Run, use Sysadmin Responsibility and query up requests that begin Cost Manager%. Correct the error that occurs. Once this error has been properly addressed, the Cost Manager should then begin processing Transactions in WIP_COST_TXN_INTERFACE. Check for a need to increase the extent the tablespace and resubmit. A script to check for max extent, invalid objects, and table space follows; select owner,object_name, object_typefrom all_objectswhere status = INVALID;select segment_name,tablespace_name,extents,max_extentsfrom dba_segmentswhere max_extents >5; 1. Check the tablespace for the mtl_transaction_accounts. 2. Check if the Material Cost Transaction worker ( CMCMCW) is running .