160: WHERE exists (SELECT 'Valid PO Shipments'
161: FROM po_line_locations_all poll
162: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
163: , mtl_parameters mp,
164: rcv_parameters rp
165: -- End for Bug 7440217
166: WHERE poh.po_header_id = poll.po_header_id
167: AND Nvl(poll.approved_flag,'N') = 'Y'
168: AND Nvl(poll.cancel_flag,'N') = 'N'
203: WHERE exists (SELECT 'Valid PO Shipments'
204: FROM po_line_locations poll
205: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
206: , mtl_parameters mp,
207: rcv_parameters rp
208: -- End for Bug 7440217
209: WHERE poh.po_header_id = poll.po_header_id
210: AND Nvl(poll.approved_flag,'N') = 'Y'
211: AND Nvl(poll.cancel_flag,'N') = 'N'
254: PO_HEADERS_ALL POH,
255: po_line_types plt,--BUG 5166887
256: mtl_parameters mp --BUG 5166887
257: -- For Bug 7440217 Added RCV_PRAMETERS to find out if the organization is LCM enabled or not
258: , rcv_parameters rp
259: -- End for Bug 7440217
260: WHERE RSUP.SUPPLY_TYPE_CODE = 'RECEIVING'
261: AND RT.TRANSACTION_TYPE <> 'UNORDERED'
262: AND RT.TRANSACTION_TYPE = PLC.LOOKUP_CODE
329: AND exists (SELECT 'Valid PO Shipments' --Added the exists to fix bug4350175
330: FROM po_line_locations_all poll
331: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
332: , mtl_parameters mp,
333: rcv_parameters rp
334: -- End for Bug 7440217
335: WHERE pr.po_header_id = poll.po_header_id
336: AND pr.po_release_id = poll.po_release_id
337: AND Nvl(poll.approved_flag,'N') = 'Y'
419: and exists (SELECT 'Valid PO Shipments'
420: FROM po_line_locations_all poll
421: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
422: , mtl_parameters mp,
423: rcv_parameters rp
424: -- End for Bug 7440217
425: WHERE poll.po_header_id = pl.po_header_id
426: AND poll.po_line_id = pl.po_line_id
427: AND Nvl(poll.approved_flag,'N') = 'Y'
694: PO_LINE_LOCATIONS_ALL PLL,
695: HR_ALL_ORGANIZATION_UNITS_TL OOD
696: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
697: , mtl_parameters mp,
698: rcv_parameters rp
699: -- End for Bug 7440217
700: WHERE RSH.receipt_source_code <> 'VENDOR'
701: AND RSUP.SUPPLY_TYPE_CODE = 'RECEIVING'
702: AND RT.TRANSACTION_TYPE <> 'UNORDERED'
1530: FROM po_lines_all pl,
1531: po_line_locations_all poll
1532: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
1533: , mtl_parameters mp,
1534: rcv_parameters rp
1535: -- End for Bug 7440217
1536: WHERE pl.item_id = p_inventory_item_id
1537: AND pl.po_header_id = poh.po_header_id
1538: AND Nvl(pl.vendor_product_num,' ') = Nvl(p_vendor_prod_num, Nvl(pl.vendor_product_num,' '))
1595: mtl_system_items_kfv msi ,
1596: po_line_locations_all poll
1597: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
1598: , mtl_parameters mp,
1599: rcv_parameters rp
1600: -- End for Bug 7440217
1601: WHERE msi.organization_id = p_organization_id
1602: AND pl.po_header_id = poh.po_header_id
1603: AND
1668: po_lines_all pl,
1669: po_line_locations_all poll
1670: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
1671: , mtl_parameters mp,
1672: rcv_parameters rp
1673: -- End for Bug 7440217
1674: WHERE flv.lookup_code = 'PO'
1675: AND flv.lookup_type = 'DOC_TYPE'
1676: AND nvl(flv.start_date_active, SYSDATE) <= SYSDATE
1728: mtl_system_items_kfv msi ,
1729: po_line_locations_all poll
1730: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
1731: , mtl_parameters mp,
1732: rcv_parameters rp
1733: -- End for Bug 7440217
1734: WHERE flv.lookup_code = 'PO'
1735: AND flv.lookup_type = 'DOC_TYPE'
1736: AND nvl(flv.start_date_active, SYSDATE) <= SYSDATE
1790: mtl_system_items_kfv msi ,
1791: po_line_locations_all poll
1792: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
1793: , mtl_parameters mp,
1794: rcv_parameters rp
1795: -- End for Bug 7440217
1796: WHERE flv.lookup_code = 'PO'
1797: AND flv.lookup_type = 'DOC_TYPE'
1798: AND nvl(flv.start_date_active, SYSDATE) <= SYSDATE
1869: FROM po_lines_all pl ,
1870: po_line_locations_all poll
1871: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
1872: , mtl_parameters mp,
1873: rcv_parameters rp
1874: -- End for Bug 7440217
1875: WHERE pl.ITEM_ID IS NULL
1876: AND pl.item_description LIKE p_item_description||'%'
1877: AND pl.po_header_id = poh.po_header_id
1935: 'Valid PO Shipments'
1936: FROM po_line_locations_all poll
1937: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
1938: , mtl_parameters mp,
1939: rcv_parameters rp
1940: -- End for Bug 7440217
1941: WHERE poh.po_header_id = poll.po_header_id
1942: AND poll.approved_flag = 'Y'
1943: AND Nvl(poll.cancel_flag,'N') = 'N'
2414: FROM po_lines_all pl ,
2415: po_line_locations_all poll
2416: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
2417: , mtl_parameters mp,
2418: rcv_parameters rp
2419: -- End for Bug 7440217
2420: WHERE pl.po_header_id = poh.po_header_id
2421: AND Nvl(pl.vendor_product_num,' ') = Nvl(p_vendor_prod_num, Nvl(pl.vendor_product_num,' '))
2422: AND Nvl(pl.item_id,-999) LIKE Nvl(p_inventory_item_id,'%')
2480: mtl_system_items_kfv msi ,
2481: po_line_locations_all poll
2482: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
2483: , mtl_parameters mp,
2484: rcv_parameters rp
2485: -- End for Bug 7440217
2486: WHERE msi.organization_id = p_organization_id
2487: AND
2488: (
2559: FROM po_lines_all pl ,
2560: po_line_locations_all poll
2561: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
2562: , mtl_parameters mp,
2563: rcv_parameters rp
2564: -- End for Bug 7440217
2565: WHERE pl.item_id IS NULL
2566: AND pl.item_description LIKE p_item_description||'%'
2567: AND pl.po_header_id = poh.po_header_id
2910: and exists (SELECT 'Valid PO Shipments'
2911: FROM po_line_locations_all poll
2912: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
2913: , mtl_parameters mp,
2914: rcv_parameters rp
2915: -- End for Bug 7440217
2916: WHERE poll.po_header_id = pl.po_header_id
2917: AND poll.po_line_id = pl.po_line_id
2918: AND Nvl(poll.approved_flag,'N') = 'Y'
2955: and exists (SELECT 'Valid PO Shipments'
2956: FROM po_line_locations_all poll
2957: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
2958: , mtl_parameters mp,
2959: rcv_parameters rp
2960: -- End for Bug 7440217
2961: WHERE poll.po_header_id = pl.po_header_id
2962: AND poll.po_line_id = pl.po_line_id
2963: AND Nvl(poll.approved_flag,'N') = 'Y'
3131: , po_line_locations_all pll
3132: , po_lines_all pl
3133: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
3134: , mtl_parameters mp
3135: , rcv_parameters rp
3136: -- End for Bug 7440217
3137: where pr.po_header_id = p_po_header_id
3138: and nvl(pr.cancel_flag, 'N') = 'N'
3139: and nvl(pr.approved_flag, 'N') <> 'N'
3296: and exists (select 1
3297: from po_line_locations_all pll
3298: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
3299: , mtl_parameters mp,
3300: rcv_parameters rp
3301: -- End for Bug 7440217
3302: WHERE NVL(pll.closed_code,'OPEN')
3303: not in ('FINALLY CLOSED', 'CLOSED FOR RECEIVING', 'CLOSED')
3304: and pll.po_header_id = p_poHeaderID
3389: and exists (select 1
3390: from po_line_locations_all pll
3391: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
3392: , mtl_parameters mp,
3393: rcv_parameters rp
3394: -- End for Bug 7440217
3395: where NVL(pll.closed_code,'OPEN')
3396: not in ('FINALLY CLOSED', 'CLOSED FOR RECEIVING', 'CLOSED')
3397: and Nvl(pll.allow_substitute_receipts_flag, 'N') = 'Y'
3478: and exists (select 1
3479: from po_line_locations_all pll
3480: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
3481: , mtl_parameters mp,
3482: rcv_parameters rp
3483: -- End for Bug 7440217
3484: WHERE NVL(pll.closed_code,'OPEN')
3485: not in ('FINALLY CLOSED', 'CLOSED FOR RECEIVING', 'CLOSED')
3486: and pll.po_header_id = p_poHeaderID
3578: and exists (select 1
3579: from po_line_locations_all pll
3580: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
3581: , mtl_parameters mp,
3582: rcv_parameters rp
3583: -- End for Bug 7440217
3584: where pll.po_header_id = p_poHeaderID
3585: and pll.po_line_id = pol.po_line_id
3586: and pll.ship_to_organization_id = p_Organization_Id
3666: and exists (select 1
3667: from po_line_locations_all pll
3668: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
3669: , mtl_parameters mp,
3670: rcv_parameters rp
3671: -- End for Bug 7440217
3672: WHERE NVL(pll.closed_code,'OPEN')
3673: not in ('FINALLY CLOSED', 'CLOSED FOR RECEIVING', 'CLOSED')
3674: and pll.po_header_id = p_poHeaderID
3757: and exists (select 1
3758: from po_line_locations_all pll
3759: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
3760: , mtl_parameters mp,
3761: rcv_parameters rp
3762: -- End for Bug 7440217
3763: where NVL(pll.closed_code, 'OPEN')
3764: not in ('FINALLY CLOSED' , 'CLOSED FOR RECEIVING', 'CLOSED' )
3765: and pll.po_header_id = p_poHeaderID
3851: and exists (select 1
3852: from po_line_locations_all pll
3853: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
3854: , mtl_parameters mp,
3855: rcv_parameters rp
3856: -- End for Bug 7440217
3857: where NVL(pll.closed_code,'OPEN')
3858: not in ('FINALLY CLOSED', 'CLOSED FOR RECEIVING', 'CLOSED') -- 3687249
3859: and Nvl(pll.allow_substitute_receipts_flag, 'N') = 'Y'
3941: and exists (select 1
3942: from po_line_locations_all pll
3943: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
3944: , mtl_parameters mp,
3945: rcv_parameters rp
3946: -- End for Bug 7440217
3947: where NVL(pll.closed_code, 'OPEN')
3948: not in ('FINALLY CLOSED' , 'CLOSED FOR RECEIVING' , 'CLOSED') -- 3687249
3949: and pll.po_header_id = p_poHeaderID
4042: and exists (select 1
4043: from po_line_locations_all pll
4044: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
4045: , mtl_parameters mp,
4046: rcv_parameters rp
4047: -- End for Bug 7440217
4048: where pll.po_header_id = p_poHeaderID
4049: and pll.po_line_id = pol.po_line_id
4050: and pll.ship_to_organization_id = p_Organization_Id
4131: and exists (select 1
4132: from po_line_locations_all pll
4133: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
4134: , mtl_parameters mp,
4135: rcv_parameters rp
4136: -- End for Bug 7440217
4137: where NVL(pll.closed_code, 'OPEN')
4138: not in ('FINALLY CLOSED' , 'CLOSED FOR RECEIVING', 'CLOSED' ) -- 3687249
4139: and pll.po_header_id = p_poHeaderID
4229: and exists (select 1
4230: from po_line_locations_all pll
4231: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
4232: , mtl_parameters mp,
4233: rcv_parameters rp
4234: -- End for Bug 7440217
4235: where NVL(pll.closed_code,'OPEN')
4236: not in ('FINALLY CLOSED', 'CLOSED FOR RECEIVING', 'CLOSED')
4237: and pll.po_header_id = p_poHeaderID
4322: and exists (select 1
4323: from po_line_locations_all pll
4324: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
4325: , mtl_parameters mp,
4326: rcv_parameters rp
4327: -- End for Bug 7440217
4328: where NVL(pll.closed_code,'OPEN') not in ('FINALLY CLOSED', 'CLOSED FOR RECEIVING', 'CLOSED')
4329: and Nvl(pll.allow_substitute_receipts_flag, 'N') = 'Y'
4330: and pll.po_header_id = pol.po_header_id
4412: and exists (select 1
4413: from po_line_locations_all pll
4414: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
4415: , mtl_parameters mp,
4416: rcv_parameters rp
4417: -- End for Bug 7440217
4418: where NVL(pll.closed_code,'OPEN') not in ('FINALLY CLOSED', 'CLOSED FOR RECEIVING', 'CLOSED')
4419: and pll.po_header_id = p_poHeaderID
4420: and pll.po_line_id = pl.po_line_id
4512: and exists (select 1
4513: from po_line_locations_all pll
4514: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
4515: , mtl_parameters mp,
4516: rcv_parameters rp
4517: -- End for Bug 7440217
4518: where pll.po_header_id = p_poHeaderID
4519: and pll.po_line_id = pol.po_line_id
4520: and pll.ship_to_organization_id = p_Organization_Id
4601: and exists (select 1
4602: from po_line_locations_all pll
4603: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
4604: , mtl_parameters mp,
4605: rcv_parameters rp
4606: -- End for Bug 7440217
4607: where NVL(pll.closed_code,'OPEN')
4608: not in ('FINALLY CLOSED', 'CLOSED FOR RECEIVING', 'CLOSED') -- 3687249
4609: and pll.po_header_id = p_poHeaderID and pll.po_line_id = pl.po_line_id
4697: and exists (select 1
4698: from po_line_locations_all pll
4699: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
4700: , mtl_parameters mp,
4701: rcv_parameters rp
4702: -- End for Bug 7440217
4703: WHERE NVL(pll.closed_code,'OPEN')
4704: not in ('FINALLY CLOSED', 'CLOSED FOR RECEIVING', 'CLOSED')
4705: and pll.po_header_id = p_poHeaderID
4783: and exists (select 1
4784: from po_line_locations_all pll
4785: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
4786: , mtl_parameters mp,
4787: rcv_parameters rp
4788: -- End for Bug 7440217
4789: where NVL(pll.closed_code,'OPEN')
4790: not in ('FINALLY CLOSED', 'CLOSED FOR RECEIVING', 'CLOSED') -- 3687249
4791: and Nvl(pll.allow_substitute_receipts_flag, 'N') = 'Y'
4865: and exists (select 1
4866: from po_line_locations_all pll
4867: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
4868: , mtl_parameters mp,
4869: rcv_parameters rp
4870: -- End for Bug 7440217
4871: WHERE NVL(pll.closed_code,'OPEN')
4872: not in ('FINALLY CLOSED', 'CLOSED FOR RECEIVING', 'CLOSED')
4873: and pll.po_header_id = p_poHeaderID
4951: and exists (select 1
4952: from po_line_locations_all pll
4953: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
4954: , mtl_parameters mp,
4955: rcv_parameters rp
4956: -- End for Bug 7440217
4957: where pll.po_header_id = p_poHeaderID
4958: and pll.po_line_id = pol.po_line_id
4959: and pll.ship_to_organization_id = p_Organization_Id
5040: and exists (select 1
5041: from po_line_locations_all pll
5042: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
5043: , mtl_parameters mp,
5044: rcv_parameters rp
5045: -- End for Bug 7440217
5046: WHERE NVL(pll.closed_code,'OPEN')
5047: not in ('FINALLY CLOSED', 'CLOSED FOR RECEIVING', 'CLOSED')
5048: and pll.po_header_id = p_poHeaderID
5123: and exists (select 1
5124: from po_line_locations_all pll
5125: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
5126: , mtl_parameters mp,
5127: rcv_parameters rp
5128: -- End for Bug 7440217
5129: where NVL(pll.closed_code, 'OPEN')
5130: not in ('FINALLY CLOSED' , 'CLOSED FOR RECEIVING', 'CLOSED' ) -- 3687249
5131: and pll.po_header_id = p_poHeaderID
5208: and exists (select 1
5209: from po_line_locations_all pll
5210: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
5211: , mtl_parameters mp,
5212: rcv_parameters rp
5213: -- End for Bug 7440217
5214: where NVL(pll.closed_code,'OPEN')
5215: not in ('FINALLY CLOSED', 'CLOSED FOR RECEIVING', 'CLOSED') -- 3687249
5216: -- For Bug 7440217 Checking if it is LCM enabled
5289: and exists (select 1
5290: from po_line_locations_all pll
5291: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
5292: , mtl_parameters mp,
5293: rcv_parameters rp
5294: -- End for Bug 7440217
5295: where NVL(pll.closed_code, 'OPEN')
5296: not in ('FINALLY CLOSED' , 'CLOSED FOR RECEIVING', 'CLOSED' ) -- 3687249
5297: -- For Bug 7440217 Checking if it is LCM enabled
5373: and exists (select 1
5374: from po_line_locations_all pll
5375: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
5376: , mtl_parameters mp,
5377: rcv_parameters rp
5378: -- End for Bug 7440217
5379: where pll.po_header_id = p_poHeaderID
5380: -- For Bug 7440217 Checking if it is LCM enabled
5381: AND mp.organization_id = p_organization_id
5461: and exists (select 1
5462: from po_line_locations_all pll
5463: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
5464: , mtl_parameters mp,
5465: rcv_parameters rp
5466: -- End for Bug 7440217
5467: where NVL(pll.closed_code, 'OPEN')
5468: not in ('FINALLY CLOSED' , 'CLOSED FOR RECEIVING', 'CLOSED' ) -- 3687249
5469: -- For Bug 7440217 Checking if it is LCM enabled
5542: and exists (select 1
5543: from po_line_locations_all pll
5544: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
5545: , mtl_parameters mp,
5546: rcv_parameters rp
5547: -- End for Bug 7440217
5548: where NVL(pll.closed_code,'OPEN')
5549: not in ('FINALLY CLOSED', 'CLOSED FOR RECEIVING', 'CLOSED') -- 3687249
5550: -- For Bug 7440217 Checking if it is LCM enabled
5626: and exists (select 1
5627: from po_line_locations_all pll
5628: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
5629: , mtl_parameters mp,
5630: rcv_parameters rp
5631: -- End for Bug 7440217
5632: where NVL(pll.closed_code,'OPEN')
5633: not in ('FINALLY CLOSED', 'CLOSED FOR RECEIVING', 'CLOSED') -- 3687249
5634: -- For Bug 7440217 Checking if it is LCM enabled
5707: and exists (select 1
5708: from po_line_locations_all pll
5709: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
5710: , mtl_parameters mp,
5711: rcv_parameters rp
5712: -- End for Bug 7440217
5713: where NVL(pll.closed_code,'OPEN')
5714: not in ('FINALLY CLOSED', 'CLOSED FOR RECEIVING', 'CLOSED') -- 3687249
5715: -- For Bug 7440217 Checking if it is LCM enabled
5791: and exists (select 1
5792: from po_line_locations_all pll
5793: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
5794: , mtl_parameters mp,
5795: rcv_parameters rp
5796: -- End for Bug 7440217
5797: where pll.po_header_id = p_poHeaderID
5798: -- For Bug 7440217 Checking if it is LCM enabled
5799: AND mp.organization_id = p_organization_id
5878: and exists (select 1
5879: from po_line_locations_all pll
5880: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
5881: , mtl_parameters mp,
5882: rcv_parameters rp
5883: -- End for Bug 7440217
5884: where NVL(pll.closed_code,'OPEN')
5885: not in ('FINALLY CLOSED', 'CLOSED FOR RECEIVING', 'CLOSED') -- 3687249
5886: -- For Bug 7440217 Checking if it is LCM enabled
6047: and exists (select 1
6048: from po_line_locations_all pll
6049: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
6050: , mtl_parameters mp,
6051: rcv_parameters rp
6052: -- End for Bug 7440217
6053: where NVL(pll.closed_code,'OPEN')
6054: not in ('FINALLY CLOSED' , 'CLOSED FOR RECEIVING', 'CLOSED' ) -- 3687249
6055: -- For Bug 7440217 Checking if it is LCM enabled
6147: and exists (select 1
6148: from po_line_locations_all pll
6149: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
6150: , mtl_parameters mp,
6151: rcv_parameters rp
6152: -- End for Bug 7440217
6153: where pll.po_header_id = p_poHeaderID
6154: -- For Bug 7440217 Checking if it is LCM enabled
6155: AND mp.organization_id = p_organization_id
6918: mtl_related_items mri,
6919: po_line_locations_all pll
6920: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
6921: , mtl_parameters mp,
6922: rcv_parameters rp
6923: -- End for Bug 7440217
6924: WHERE NVL(pll.closed_code,'OPEN') NOT IN ('FINALLY CLOSED','CLOSED FOR RECEIVING', 'CLOSED')
6925: AND NVL(pll.allow_substitute_receipts_flag, 'N') = 'Y'
6926: AND pll.po_line_id = pol.po_line_id
7003: AND EXISTS (SELECT '1'
7004: FROM po_line_locations_all pll
7005: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
7006: , mtl_parameters mp,
7007: rcv_parameters rp
7008: -- End for Bug 7440217
7009: WHERE pll.po_line_id = pol.po_line_id
7010: AND pll.ship_to_organization_id = msi.organization_id
7011: AND NVL(pll.closed_code,'OPEN') NOT IN ('FINALLY CLOSED','CLOSED FOR RECEIVING', 'CLOSED')
7149: AND EXISTS (SELECT '1'
7150: FROM po_line_locations_all pll
7151: -- For Bug 7440217 Added MTL_PARAMETERS and RCV_PRAMETERS to find out if the organization is LCM enabled or not
7152: , mtl_parameters mp,
7153: rcv_parameters rp
7154: -- End for Bug 7440217
7155: WHERE pll.po_line_id = pol.po_line_id
7156: AND pll.ship_to_organization_id = p_organization_id
7157: -- For Bug 7440217 Checking if it is LCM enabled