838: if p_comp_sub is not null then
839: BEGIN
840: select null,null /*completion subinventory is inactive */
841: into p_comp_sub,p_comp_loc
842: from mtl_secondary_inventories
843: where organization_id = p_org_id
844: and secondary_inventory_name = p_comp_sub
845: and (
846: NVL(disable_date, TRUNC(p_start_date)+1) <= TRUNC(p_start_date)