1710: IF (X_expense_to_asset_transfer = 1) THEN
1711: begin
1712: select locator_type
1713: into sub_loc_code
1714: from mtl_secondary_inventories
1715: where secondary_inventory_name = c1rec.SS
1716: and organization_id = c1rec.OI
1717: and nvl(disable_date,TRUNC(c1rec.EDD)+1) > TRUNC(c1rec.EDD)
1718: and quantity_tracked = 1;
1723: ELSE
1724: begin
1725: select locator_type
1726: into sub_loc_code
1727: from mtl_secondary_inventories
1728: where secondary_inventory_name = c1rec.SS
1729: and organization_id = c1rec.OI
1730: and nvl(disable_date,TRUNC(c1rec.EDD)+1) > TRUNC(c1rec.EDD)
1731: and quantity_tracked = 1
1742: IF (X_expense_to_asset_transfer = 1) THEN
1743: begin
1744: select locator_type
1745: into sub_loc_code
1746: from mtl_secondary_inventories sub,
1747: mtl_item_sub_inventories item
1748: where item.organization_id = sub.organization_id
1749: and item.secondary_inventory = sub.secondary_inventory_name
1750: and item.inventory_item_id = c1rec.CII
1760: ELSE
1761: begin
1762: select locator_type
1763: into sub_loc_code
1764: from mtl_secondary_inventories sub,
1765: mtl_item_sub_inventories item
1766: where item.organization_id = sub.organization_id
1767: and item.secondary_inventory = sub.secondary_inventory_name
1768: and item.inventory_item_id = c1rec.CII