255: Begin
256:
257: if(p_subinv_ctrl <> 1) then
258: select secondary_inventory_name into p_subinv_code
259: from mtl_secondary_inventories
260: where
261: secondary_inventory_name = p_subinv_code
262: and organization_id = p_org_id
263: and nvl(disable_date,trunc(sysdate)+1)>trunc(sysdate)
265: p_org_id,p_item_id,secondary_inventory_name,NULL,NULL,NULL,'Z') = 'Y' ;
266:
267: elsif(p_subinv_ctrl = 1) then
268: select secondary_inventory_name into p_subinv_code
269: from mtl_secondary_inventories
270: where
271: secondary_inventory_name = p_subinv_code
272: and organization_id = p_org_id
273: and nvl(disable_date,trunc(sysdate)+1)>trunc(sysdate)
844: -- retrive subinventory level control information
845: Begin
846: SELECT
847: locator_type into x_sub_ctrl
848: FROM MTL_SECONDARY_INVENTORIES
849: WHERE
850: organization_id = p_org and
851: secondary_inventory_name = p_subinv ;
852: Exception