47: Begin
48:
49: For crec in c loop
50:
51: update mtl_material_transactions mmt
52: set mmt.project_id =
53: nvl(mmt.project_id , crec.common_project_id)
54: , mmt.source_project_id =
55: nvl(mmt.source_project_id,
65: --
66: -- This update is for subinventory transfers and direct org
67: -- transfers only
68: --
69: update mtl_material_transactions mmt
70: set mmt.to_project_id = crec.common_project_id
71: where mmt.pm_cost_collected = 'N'
72: and transfer_organization_id = crec.organization_id
73: and transaction_action_id not in ( 12 , 21 )
75:
76: --
77: -- This update is for intransit transfers only
78: --
79: update mtl_material_transactions mmt
80: set mmt.to_project_id = crec.common_project_id
81: where mmt.pm_cost_collected = 'N'
82: and transaction_action_id in ( 12 , 21 )
83: and to_project_id is null