829: if p_comp_sub is not null then
830: BEGIN
831: select null,null /*completion subinventory is inactive */
832: into p_comp_sub,p_comp_loc
833: from mtl_secondary_inventories
834: where organization_id = p_org_id
835: and secondary_inventory_name = p_comp_sub
836: and (
837: NVL(disable_date, TRUNC(p_start_date)+1) <= TRUNC(p_start_date)