35:
36: g_po_wf_debug VARCHAR2(1) := NVL(FND_PROFILE.VALUE('PO_SET_DEBUG_WORKFLOW_ON'),'N'); -- BUG 9858430
37:
38: TYPE shipment_record IS RECORD (
39: line_num po_lines_all.line_num%TYPE,
40: po_line_id po_lines_all.po_line_id%TYPE,
41: item_num mtl_system_items_kfv.concatenated_segments%TYPE,
42: item_revision po_lines_all.item_revision%TYPE,
43: vendor_product_num po_lines.vendor_product_num%TYPE, /* Bug 3105566 */
36: g_po_wf_debug VARCHAR2(1) := NVL(FND_PROFILE.VALUE('PO_SET_DEBUG_WORKFLOW_ON'),'N'); -- BUG 9858430
37:
38: TYPE shipment_record IS RECORD (
39: line_num po_lines_all.line_num%TYPE,
40: po_line_id po_lines_all.po_line_id%TYPE,
41: item_num mtl_system_items_kfv.concatenated_segments%TYPE,
42: item_revision po_lines_all.item_revision%TYPE,
43: vendor_product_num po_lines.vendor_product_num%TYPE, /* Bug 3105566 */
44: item_desc po_lines.item_description%TYPE,
38: TYPE shipment_record IS RECORD (
39: line_num po_lines_all.line_num%TYPE,
40: po_line_id po_lines_all.po_line_id%TYPE,
41: item_num mtl_system_items_kfv.concatenated_segments%TYPE,
42: item_revision po_lines_all.item_revision%TYPE,
43: vendor_product_num po_lines.vendor_product_num%TYPE, /* Bug 3105566 */
44: item_desc po_lines.item_description%TYPE,
45: uom mtl_units_of_measure_tl.unit_of_measure_tl%TYPE, /* Bug 2701946 */
46: quantity po_line_locations.quantity%TYPE,
47: unit_price po_lines.unit_price%TYPE,
48: need_by_date po_line_locations.need_by_date%TYPE,
49: promised_date po_line_locations.promised_date%TYPE,
50: taxable_flag po_line_locations.taxable_flag%TYPE,
51: note_to_vendor po_lines_all.note_to_vendor%TYPE,
52: un_number_id po_lines_all.un_number_id%TYPE,
53: hazard_class_id po_lines_all.hazard_class_id%TYPE,
54: cancel_flag po_line_locations_all.cancel_flag%TYPE,
55: cancel_date po_line_locations_all.cancel_date%TYPE,
48: need_by_date po_line_locations.need_by_date%TYPE,
49: promised_date po_line_locations.promised_date%TYPE,
50: taxable_flag po_line_locations.taxable_flag%TYPE,
51: note_to_vendor po_lines_all.note_to_vendor%TYPE,
52: un_number_id po_lines_all.un_number_id%TYPE,
53: hazard_class_id po_lines_all.hazard_class_id%TYPE,
54: cancel_flag po_line_locations_all.cancel_flag%TYPE,
55: cancel_date po_line_locations_all.cancel_date%TYPE,
56: quantity_cancelled po_line_locations_all.quantity_cancelled%TYPE,
49: promised_date po_line_locations.promised_date%TYPE,
50: taxable_flag po_line_locations.taxable_flag%TYPE,
51: note_to_vendor po_lines_all.note_to_vendor%TYPE,
52: un_number_id po_lines_all.un_number_id%TYPE,
53: hazard_class_id po_lines_all.hazard_class_id%TYPE,
54: cancel_flag po_line_locations_all.cancel_flag%TYPE,
55: cancel_date po_line_locations_all.cancel_date%TYPE,
56: quantity_cancelled po_line_locations_all.quantity_cancelled%TYPE,
57: item_id po_lines_all.item_id%TYPE,
53: hazard_class_id po_lines_all.hazard_class_id%TYPE,
54: cancel_flag po_line_locations_all.cancel_flag%TYPE,
55: cancel_date po_line_locations_all.cancel_date%TYPE,
56: quantity_cancelled po_line_locations_all.quantity_cancelled%TYPE,
57: item_id po_lines_all.item_id%TYPE,
58: org_id po_line_locations_all.org_id%TYPE,
59: contract_num po_lines_all.contract_num%TYPE,
60: line_location_id po_line_locations_all.line_location_id%TYPE,
61: ship_to_location_id po_line_locations_all.ship_to_location_id%TYPE,
55: cancel_date po_line_locations_all.cancel_date%TYPE,
56: quantity_cancelled po_line_locations_all.quantity_cancelled%TYPE,
57: item_id po_lines_all.item_id%TYPE,
58: org_id po_line_locations_all.org_id%TYPE,
59: contract_num po_lines_all.contract_num%TYPE,
60: line_location_id po_line_locations_all.line_location_id%TYPE,
61: ship_to_location_id po_line_locations_all.ship_to_location_id%TYPE,
62: consigned_flag po_line_locations_all.consigned_flag%TYPE, --
63: start_date po_line_locations_all.start_date%TYPE, /*
62: consigned_flag po_line_locations_all.consigned_flag%TYPE, --
63: start_date po_line_locations_all.start_date%TYPE, /*
64: end_date po_line_locations_all.end_date%TYPE, /*
65: --
66: from_header_id po_lines_all.from_header_id%type,
67: from_line_id po_lines_all.from_line_id%TYPE,
68: --
69: drop_ship_flag po_line_locations_all.drop_ship_flag%TYPE --Bug 9356725
70: );
63: start_date po_line_locations_all.start_date%TYPE, /*
64: end_date po_line_locations_all.end_date%TYPE, /*
65: --
66: from_header_id po_lines_all.from_header_id%type,
67: from_line_id po_lines_all.from_line_id%TYPE,
68: --
69: drop_ship_flag po_line_locations_all.drop_ship_flag%TYPE --Bug 9356725
70: );
71:
268: pol.from_header_id,
269: pol.from_line_id,
270: --
271: pll.drop_ship_flag --Bug 9356725
272: FROM po_lines_all pol, --
274: mtl_system_items_kfv msi,
275: mtl_units_of_measure_vl umvl,
276: financials_system_params_all fsp --
316: null,
317: NULL,
318: --
319: pll.drop_ship_flag --Bug 9356725
320: FROM po_lines_all pol, --
322: mtl_system_items_kfv msi,
323: mtl_units_of_measure_vl umvl,
324: financials_system_params_all fsp --
409: null,
410: NULL,
411: --
412: pll.drop_ship_flag --Bug 9356725
413: FROM po_lines_all pol, --
415: mtl_system_items_kfv msi,
416: mtl_units_of_measure_vl umvl,
417: financials_system_params_all fsp --
549: IF (l_document_type = 'PO') THEN
550: -- Seeing if the ship to locations are distinct or not
551: select count(distinct pll.ship_to_location_id) into l_ship_to_count
552: from
553: po_lines_all pol, --
555: where PLL.PO_HEADER_ID = l_document_id
556: and PLL.po_line_id = POL.po_line_id;
557: ELSIF (l_document_type = 'RELEASE') THEN
556: and PLL.po_line_id = POL.po_line_id;
557: ELSIF (l_document_type = 'RELEASE') THEN
558: -- Seeing if the ship to locations are distinct or not
559: select count(distinct pll.ship_to_location_id) into l_ship_to_count
560: FROM po_lines_all pol, --
562: where PLL.PO_RELEASE_ID = l_document_id
563: and PLL.po_line_id = POL.po_line_id;
564: ELSIF (l_document_type = 'PA') THEN
569: ** any PRICE BREAKS
570: */
571: select nvl(count(distinct pll.ship_to_location_id),0)
572: into l_ship_to_count
573: FROM po_lines_all pol, --
575: where PLL.PO_HEADER_ID = l_document_id
576: and PLL.po_line_id = POL.po_line_id
577: and PLL.shipment_type = 'PRICE BREAK';
2714:
2715:
2716: cursor release_location_id_cursor (v_po_release_id varchar2) IS
2717: select distinct PLL.ship_to_location_id
2718: FROM po_lines_all pol, --
2720: where PLL.PO_RELEASE_ID = to_number(v_po_release_id)
2721: and PLL.po_line_id = POL.po_line_id;
2722:
2732: */
2733:
2734: cursor pa_location_count_cursor (v_po_header_id varchar2) IS
2735: select nvl(count(distinct pll.ship_to_location_id), 0)
2736: FROM po_lines_all pol, --
2738: where PLL.PO_HEADER_ID = to_number(v_po_header_id)
2739: and PLL.po_line_id = POL.po_line_id
2740: and PLL.shipment_type = 'PRICE BREAK';
2745: where PO_HEADER_ID = to_number(v_po_header_id);
2746:
2747: cursor pa_location_id_cursor (v_po_header_id varchar2) IS
2748: select distinct pll.ship_to_location_id
2749: FROM po_lines_all pol, --
2751: where PLL.PO_HEADER_ID = to_number(v_po_header_id)
2752: and PLL.po_line_id = POL.po_line_id
2753: and PLL.shipment_type = 'PRICE BREAK';
2753: and PLL.shipment_type = 'PRICE BREAK';
2754:
2755: cursor po_location_id_cursor (v_po_header_id varchar2) IS
2756: select distinct PLL.ship_to_location_id
2757: FROM po_lines_all pol, --
2759: where PLL.PO_HEADER_ID = to_number(v_po_header_id)
2760: and PLL.po_line_id = POL.po_line_id;
2761: