Friday, October 31, 2014

Uncosted Material transactions

For the errored out Records, use the following Script to change the ‘Costed’ flag to ‘No’:

update apps.mtl_material_transactions
set costed_flag = 'N',
request_id = NULL,
transaction_group_id = NULL,
error_code = NULL,
error_explanation = NULL
where costed_flag ='E'
and organization_id = <organization_id>

If there is no transaction Source reference, then get the Source name form the concerned Site Analyst and use the following Script:
====================================
UPDATE  apps.mtl_material_transactions
    SET             costed_flag = 'N',
              --        source_line_id = 1,
              --        transaction_reference = 'CESAR BELTRE',
              --        completion_transaction_id= 51190596,
            --  operation_seq_num =  '10',
              transaction_group_id = null,
               transaction_source_id = <transaction source id>
               error_code = null,
            error_explanation = null,
        --  cost_update_id = null
 WHERE  transaction_id = <transaction id>
======================================
Also, if there exists a long pending Uncosted Material Record with costed as ‘No’, then update the Record again with the costed as ‘No’.
===========================
update apps.mtl_material_transactions
set costed_flag = 'N',
request_id = NULL,
transaction_group_id = NULL,
error_code = NULL,
error_explanation = NULL
where costed_flag ='N'
and organization_id = <organization_id>
===========================
 


No comments:

Post a Comment