75: , pod.po_distribution_id
76: , rsl.item_description
77: , Nvl(rsh.expected_receipt_date, Sysdate) expected_receipt_date
78: FROM rcv_shipment_lines rsl
79: , rcv_shipment_headers rsh
80: , po_line_locations poll
81: , po_distributions pod
82: , (SELECT DISTINCT source_line_id
83: FROM wms_lpn_contents
121: , pod.po_distribution_id
122: , rsl.item_description
123: , Nvl(rsh.expected_receipt_date, Sysdate) expected_receipt_date
124: FROM rcv_shipment_lines rsl
125: , rcv_shipment_headers rsh
126: , po_line_locations poll
127: , po_distributions pod
128: WHERE rsl.shipment_header_id = rsh.shipment_header_id
129: AND rsl.shipment_header_id = v_shipment_header_id
175: --Bug5578552.The COUNT should be outside of UNION.
176: SELECT COUNT(*) FROM
177: ( SELECT 1
178: FROM rcv_shipment_lines rsl
179: , rcv_shipment_headers rsh
180: , po_line_locations poll
181: , po_distributions pod
182: , (SELECT DISTINCT source_line_id
183: FROM wms_lpn_contents
210: and (v_task_id is null or pod.task_id = v_task_id)
211: UNION ALL
212: SELECT 1
213: FROM rcv_shipment_lines rsl
214: , rcv_shipment_headers rsh
215: , po_line_locations poll
216: , po_distributions pod
217: WHERE rsl.shipment_header_id = rsh.shipment_header_id
218: AND rsl.shipment_header_id = v_shipment_header_id
303: , Nvl(rsh.expected_receipt_date, Sysdate) expected_receipt_date
304: , (rsl.QUANTITY_SHIPPED - nvl(rsl.quantity_received, 0)) quantity_received --Bug 13598673
305: , decode(nvl(rsl.item_revision,'@@'), nvl(v_item_revision, '@@'),0,1) revision --Bug 13598673
306: FROM rcv_shipment_lines rsl
307: , rcv_shipment_headers rsh
308: , po_line_locations poll
309: , (SELECT DISTINCT source_line_id
310: FROM wms_lpn_contents
311: WHERE parent_lpn_id = v_lpn_id) wlc
358: , Nvl(rsh.expected_receipt_date, Sysdate) expected_receipt_date
359: , (rsl.QUANTITY_SHIPPED - nvl(rsl.quantity_received, 0)) quantity_received --Bug 13598673
360: , decode(nvl(rsl.item_revision,'@@'), nvl(v_item_revision, '@@'),0,1) revision --Bug 13598673
361: FROM rcv_shipment_lines rsl
362: , rcv_shipment_headers rsh
363: , po_line_locations poll
364: WHERE rsl.shipment_header_id = rsh.shipment_header_id
365: AND rsl.shipment_header_id = v_shipment_header_id
366: AND rsl.shipment_line_id = Nvl(v_shipment_line_id, rsl.shipment_line_id)
432: --Bug5578552.The COUNT should be outside of UNION.
433: SELECT COUNT(*) FROM
434: ( SELECT 1
435: FROM rcv_shipment_lines rsl
436: , rcv_shipment_headers rsh
437: , po_line_locations poll
438: , (SELECT DISTINCT source_line_id
439: FROM wms_lpn_contents
440: WHERE parent_lpn_id = v_lpn_id) wlc
473: AND (NVL(rsl.quantity_received,0)=0 OR NVL(rsl.item_revision, '@@') = NVL(v_item_revision, '@@')) --Bug 13598673
474: UNION ALL
475: SELECT 1
476: FROM rcv_shipment_lines rsl
477: , rcv_shipment_headers rsh
478: , po_line_locations poll
479: WHERE rsl.shipment_header_id = rsh.shipment_header_id
480: AND rsl.shipment_header_id = v_shipment_header_id
481: AND rsl.shipment_line_id = Nvl(v_shipment_line_id, rsl.shipment_line_id)
555: , pod.po_distribution_id
556: , rsl.item_description
557: , Nvl(rsh.expected_receipt_date, Sysdate) expected_receipt_date
558: FROM rcv_shipment_lines rsl
559: , rcv_shipment_headers rsh
560: , po_line_locations poll
561: , po_distributions pod
562: , (SELECT DISTINCT source_line_id
563: FROM wms_lpn_contents
601: , pod.po_distribution_id
602: , rsl.item_description
603: , Nvl(rsh.expected_receipt_date, Sysdate) expected_receipt_date
604: FROM rcv_shipment_lines rsl
605: , rcv_shipment_headers rsh
606: , po_line_locations poll
607: , po_distributions pod
608: WHERE rsl.shipment_header_id = rsh.shipment_header_id
609: AND rsl.shipment_header_id = v_shipment_header_id
646: --Bug5578552.The COUNT should be outside of UNION.
647: SELECT COUNT(*) FROM
648: ( SELECT 1
649: FROM rcv_shipment_lines rsl
650: , rcv_shipment_headers rsh
651: , po_line_locations poll
652: , po_distributions pod
653: , (SELECT DISTINCT source_line_id
654: FROM wms_lpn_contents
681: and (v_task_id is null or pod.task_id = v_task_id)
682: UNION ALL
683: SELECT 1
684: FROM rcv_shipment_lines rsl
685: , rcv_shipment_headers rsh
686: , po_line_locations poll
687: , po_distributions pod
688: WHERE rsl.shipment_header_id = rsh.shipment_header_id
689: AND rsl.shipment_header_id = v_shipment_header_id
734: , To_number(NULL)
735: , rsl.item_description
736: , Nvl(rsh.expected_receipt_date, Sysdate) expected_receipt_date
737: FROM rcv_shipment_lines rsl
738: , rcv_shipment_headers rsh
739: , po_line_locations poll
740: , (SELECT DISTINCT source_line_id
741: FROM wms_lpn_contents
742: WHERE parent_lpn_id = v_lpn_id) wlc
786: , To_number(NULL)
787: , rsl.item_description
788: , Nvl(rsh.expected_receipt_date, Sysdate) expected_receipt_date
789: FROM rcv_shipment_lines rsl
790: , rcv_shipment_headers rsh
791: , po_line_locations poll
792: WHERE rsl.shipment_header_id = rsh.shipment_header_id
793: AND rsl.shipment_header_id = v_shipment_header_id
794: AND rsl.shipment_line_id = Nvl(v_shipment_line_id, rsl.shipment_line_id)
836: --Bug5578552.The COUNT should be outside of UNION.
837: SELECT COUNT(*) FROM
838: ( SELECT 1
839: FROM rcv_shipment_lines rsl
840: , rcv_shipment_headers rsh
841: , po_line_locations poll
842: , (SELECT DISTINCT source_line_id
843: FROM wms_lpn_contents
844: WHERE parent_lpn_id = v_lpn_id) wlc
876: )
877: UNION ALL
878: SELECT 1
879: FROM rcv_shipment_lines rsl
880: , rcv_shipment_headers rsh
881: , po_line_locations poll
882: WHERE rsl.shipment_header_id = rsh.shipment_header_id
883: AND rsl.shipment_header_id = v_shipment_header_id
884: AND rsl.shipment_line_id = Nvl(v_shipment_line_id, rsl.shipment_line_id)
941: , To_number(NULL)
942: , rsl.item_description
943: , Nvl(rsh.expected_receipt_date, Sysdate) expected_receipt_date
944: FROM rcv_shipment_lines rsl
945: , rcv_shipment_headers rsh
946: , mtl_supply ms
947: WHERE rsl.shipment_header_id = v_shipment_header_id
948: AND rsh.shipment_header_id = rsl.shipment_header_id
949: AND rsl.shipment_line_id = Nvl(v_shipment_line_id, rsl.shipment_line_id)
1037: ) --9651496,9764650
1038: IS
1039: SELECT COUNT(*)
1040: FROM rcv_shipment_lines rsl
1041: , rcv_shipment_headers rsh
1042: , mtl_supply ms
1043: WHERE rsl.shipment_header_id = v_shipment_header_id
1044: AND rsh.shipment_header_id = rsl.shipment_header_id
1045: AND rsl.shipment_line_id = Nvl(v_shipment_line_id, rsl.shipment_line_id)
1255: , rsl.item_description item_description
1256: , Nvl(rsh.expected_receipt_date, Sysdate) expected_receipt_date
1257: FROM rcv_supply rsup
1258: , rcv_transactions rt
1259: , rcv_shipment_headers rsh
1260: , rcv_shipment_lines rsl
1261: WHERE rsl.shipment_header_id = v_shipment_header_id
1262: AND rsl.shipment_line_id = Nvl(v_shipment_line_id,rsl.shipment_line_id)
1263: AND rsup.item_id = v_item_id
1336: IS
1337: SELECT COUNT(*)
1338: FROM rcv_supply rsup
1339: , rcv_transactions rt
1340: , rcv_shipment_headers rsh
1341: , rcv_shipment_lines rsl
1342: WHERE rsl.shipment_header_id = v_shipment_header_id
1343: AND rsl.shipment_line_id = Nvl(v_shipment_line_id,rsl.shipment_line_id)
1344: AND rsup.item_id = v_item_id
1439: , To_char(NULL)
1440: , To_char(NULL)
1441: FROM rcv_supply rsup
1442: , rcv_transactions rt
1443: , rcv_shipment_headers rsh
1444: WHERE rsh.receipt_source_code = 'CUSTOMER'
1445: AND rsup.item_id = v_item_id
1446: AND rsup.oe_order_header_id = v_oe_order_header_id
1447: AND rsup.oe_order_line_id = Nvl(v_oe_order_line_id,Nvl(rsup.oe_order_line_id,-1))
1508: IS
1509: SELECT COUNT(*)
1510: FROM rcv_supply rsup
1511: , rcv_transactions rt
1512: , rcv_shipment_headers rsh
1513: WHERE rsh.receipt_source_code = 'CUSTOMER'
1514: AND rsup.item_id = v_item_id
1515: AND rsup.oe_order_header_id = v_oe_order_header_id
1516: AND rsup.oe_order_line_id = Nvl(v_oe_order_line_id,Nvl(rsup.oe_order_line_id,-1))
1592: , rsl.item_description item_description
1593: , to_char(null)
1594: FROM rcv_supply rsup
1595: , rcv_transactions rt
1596: , rcv_shipment_headers rsh
1597: , rcv_shipment_lines rsl
1598: , po_line_locations poll
1599: , po_distributions pod
1600: WHERE rsl.shipment_header_id = v_shipment_header_id
1673: IS
1674: SELECT COUNT(*)
1675: FROM rcv_supply rsup
1676: , rcv_transactions rt
1677: , rcv_shipment_headers rsh
1678: , rcv_shipment_lines rsl
1679: , po_line_locations poll
1680: , po_distributions pod
1681: WHERE rsl.shipment_header_id = v_shipment_header_id
1767: , rsl.item_description item_description
1768: , to_char(null)
1769: FROM rcv_supply rsup
1770: , rcv_transactions rt
1771: , rcv_shipment_headers rsh
1772: , rcv_shipment_lines rsl
1773: , po_line_locations poll
1774: , po_distributions pod
1775: WHERE rsl.shipment_header_id = v_shipment_header_id
1844: IS
1845: SELECT COUNT(*)
1846: FROM rcv_supply rsup
1847: , rcv_transactions rt
1848: , rcv_shipment_headers rsh
1849: , rcv_shipment_lines rsl
1850: , po_line_locations poll
1851: , po_distributions pod
1852: WHERE rsl.shipment_header_id = v_shipment_header_id