172: IF nvl(p_source_type, 'INTERNAL') = 'EXTERNAL' THEN
173:
174: select count(*)
175: into v_ds_po_quantity
176: from oe_drop_ship_sources ods
177: where ods.line_id = l_demand_line_id
178: --and ods.drop_ship_source_id = 2
179: and ods.po_header_id is not null;
180:
183: END IF;
184:
185: select count(*)
186: into v_ds_req_quantity
187: from oe_drop_ship_sources ods
188: where ods.line_id = l_demand_line_id
189: --and ods.drop_ship_source_id = 2
190: and ods.po_header_id is null;
191:
817:
818: UNION
819:
820: select nvl(poll.promised_date,poll.need_by_date) exp_comp_date
821: from oe_drop_ship_sources ods, po_line_locations_all poll
822: where ods.line_id = l_config_line_id
823: and ods.po_header_id = poll.po_header_id
824: and ods.line_location_id = poll.line_location_id
825:
825:
826: UNION
827:
828: select porl.need_by_date exp_comp_date
829: from oe_drop_ship_sources ods, po_requisition_lines_all porl
830: where ods.line_id = l_config_line_id
831: and ods.po_header_id is null
832: and ods.requisition_header_id = porl.requisition_header_id
833: and ods.requisition_line_id = porl.requisition_line_id