REM FOR THE CUSTOMER WHO HAS TRANSACTIONS WHICH ARE NOT
REM GETTING COSTED AND THE TRANSACTIONS DO NOT ERROR OUT ALSO.
REM **** PLEASE NOTE THAT THE STEPS ARE ONLY APPLICABLE FOR PERPETUAL COSTING ****
REM
REM CHANGE HISTORY
REM Author Date Description
REM anjha 31-JUL-2006 Initial creation
REM anjha 01-JAN-2007 added patch for bug3339616 as
REM anjha required for OSFM 11.5.9 customers.
(i) If the costed_flag is null then this would mean that the
transaction is orphaned and cannot be picked up for costing.
In this case only option is to perform GL adjustments.
To carry out the GL adjustments please follow the steps
outlined in the file steps_orphaned_txn.txt.
(ii) If the completion_transaction_id is null in STEP2-A
OR if the above sql in (b) of STEP2-B returns no row
then contact Inventory development team as this would
mean that the backflush for a flow schedule is created
with incorrect completion_transaction_id.
(iii) If the costed_flag is 'N' then contact costing team.
update mtl_material_transactions
set transfer_transaction_id = null
where transaction_Action_id not in (2,28,3,55,5)
and transaction_id = &txn_id;
commit;
STEP3-A: If the customer is on 11.5.9 then make sure that the patch for
bug3339616 has been applied.
(i) If the costed_flag is null then this would mean that the
transaction is orphaned and cannot be picked up for costing.
In this case only option is to perform GL adjustments.
To carry out the GL adjustments please follow the steps
outlined in the file steps_orphaned_txn.txt.
(ii) If the completion_transaction_id is null in STEP3-A
OR if the above sql in (b) of STEP3-B returns no row
then contact Inventory development team as this would
mean that the backflush for a flow schedule is created
with incorrect completion_transaction_id.
(iii) If the costed_flag is 'N' then contact costing team.
c) if the transaction_Action_id is not in (2,28,3,55,5)
and tranfer_transaction_id is not null then
Please run the following :
update mtl_material_transactions
set transfer_transaction_id = null
where transaction_Action_id not in (2,28,3,55,5)
and transaction_id = &txn_id;
commit;
NOTE:- ALL THE ABOVE CASES EXCEPT THE ISSUES RELATED TO COST CUTOFF DATE
ARE RELATED TO DATA CORRUPTION IN MTL_MATERIAL_TRANSACTIONS.
AND IF THERE IS A REPRODUCIBLE TEST CASE THE ROOT CAUSE BUG
SHOULD BE LOGGED WITH INVENTORY OTHERWISE THESE KIND OF
ISSUES WILL KEEP ON REPEATING.
If the above returns 'The shipment costed should be y' then run the
following update stmt :
update mtl_material_transactions mmt
set shipment_costed = 'Y'
where mmt.transaction_id = (
select sc.bottle_neck_txn_id
from Stuck_Costing sc
where sc.txn_action_id in (12,21)
and sc.txn_shipment_costed is null
and exists ( select 'X'
from mtl_cst_txn_cost_details mctcd
where mctcd.transaction_id = sc.bottle_neck_txn_id
and mctcd.organization_id = sc.organization_id
)
and sc.bottle_neck_txn_id is not null
and sc.organization_id = &&organization_id
)
COMMIT
And then see if the transaction gets costed or not.
The above sql query will give the details of the organization waiting
on other organization's transactions.
Follow the steps given from STEP4-C: a) to f) for the organization
which comes in last row for the above query.
NOTE:- ALL THE ABOVE CASES EXCEPT THE ISSUES RELATED TO COST CUTOFF DATE
AND THE CASE RELATED TO MTL_MATERIAL_TRANSACTIONS_TEMP
ARE RELATED TO DATA CORRUPTION .
AND IF THERE IS A REPRODUCIBLE TEST CASE THEN ROOT CAUSE BUG
SHOULD BE LOGGED WITH COSTING OTHERWISE THESE KIND OF
ISSUES WILL KEEP ON REPEATING.