Friday, 30 October 2015

Query to change distribution account wrongly entered by User while processing Inventory Miscellaneous Transaction Form

To change the account for already created distribution you would need to update both MMT and MTA data. 

update mtl_material_transactions 
set distribution_account_id = &new_acct_id -- Get correct account 
where transaction_id in (&trans_ids) 
and distribution_account_id = &old_acct_id; ---Incorrect account 

update mtl_transaction_accounts mta 
set reference_account = &correct_account_id 
where transaction_id in (&your_problematic_txns) 
and reference_account = &prior_wrong_account_id; 

commit; 


Note: The GL Period that the transaction date of the record that is update must be open for the record to be transferred to GL. 

-The Inventory Period is not required to be open for the record to be transferred to GL. 

No comments:

Post a Comment