The personal view on the IT world of Johan Louwers, specially focusing on Oracle technology, Linux and UNIX technology, programming languages and all kinds of nice and cool things happening in the IT world.

Wednesday, December 12, 2007

Oracle: Uncosted Transactions

When trying to close a inventory period you might end up having some problems due to “Uncosted Transactions”. Uncosted Transactions are an indication you still have records pending in the mtl_material_transactions table. Normally the “Cost Manager” should clear this interface table and take action upon the records in the table. It could however that this concurrent process is somehow stopped or encountered an error during runtime.

To check this you can query the concurrent requests to see if a concurrent request named “Material cost transaction worker” is running. If this is not the case you most likely have a number of records in the mtl_material_transactions table. You can use the query below to check this:select count(1) from mtl_material_transactions where costed_flag in ('N', 'E') order by creation_date;

You will have to do some cleanup work before you can restart the process. First make sure the Cost Manager is NOT running. Now you have to check if there are error records. A error record is indicated by a “e” in costed_flag, you can use the query below to check the error records. You first have to solve the root cause of the error and than restart the Costing Manager.

select request_id, error_explanation, error_code, costed_flag from mtl_material_transactions where costed_flag in ('E') order by creation_date;

After you have solved all the root causes of the error records you also have to take some action on the non processed records which are identified by the letter “N” in costed_flag. You will have to run the update statement below to set all those ready to be processed again.

After you have taken those steps you can restart the Cost Manager again. Under the Inventory responsibility navigate to Setup – Transactions – Interface Managers. You have to set the frequency of the cost manager and start the cost manager from the Tools menu with the Launch Manager option. This should solve your problems. For more information you can check on Metalink note304313.1 and 105647.1 for more information and background details.