35: SELECT global_attribute2
36: INTO l_trx_reason_code
37: FROM mtl_system_items mtl
38: WHERE mtl.organization_id = (SELECT inventory_organization_id
39: FROM financials_system_parameters
40: WHERE org_id = p_org_id)
41: AND mtl.inventory_item_id = l_item_id
42: AND ROWNUM = 1;
43: EXCEPTION
123: IF l_txn_reason_code IS NULL
124: THEN
125: SELECT inventory_organization_id
126: INTO l_def_from_org_id
127: FROM financials_system_parameters
128: WHERE org_id = p_org_id;
129:
130: SELECT global_attribute2
131: INTO l_txn_reason_code
146: 'MASTER INVENTORY ORGANIZATION'
147: THEN
148: SELECT inventory_organization_id
149: INTO l_def_from_org_id
150: FROM financials_system_parameters
151: WHERE org_id = p_org_id;
152:
153: SELECT global_attribute2
154: INTO l_txn_reason_code