DBA Data[Home] [Help]

APPS.PO_COMMUNICATION_PVT dependencies on PO_LINE_LOCATIONS_ARCHIVE_ALL

Line 5013: FROM po_line_locations_archive_all plla

5009: WHERE vn.vendor_id = ph.vendor_id
5010: AND ph.po_header_id = p_document_id AND ph.revision_num = p_revision_num;
5011:
5012: SELECT count(distinct(plla.SHIP_TO_LOCATION_ID)) INTO PO_COMMUNICATION_PVT.g_dist_shipto_count
5013: FROM po_line_locations_archive_all plla
5014: WHERE plla.po_header_id = p_document_id
5015: and plla.revision_num = p_revision_num
5016: AND NVL(plla.payment_type, 'NONE') NOT IN ('ADVANCE', 'DELIVERY'); --
5017:

Line 5067: FROM po_line_locations_archive_all plla

5063: WHERE plla.po_release_id = p_document_id;
5064:
5065: ELSE
5066: SELECT count(distinct(plla.SHIP_TO_LOCATION_ID)) INTO PO_COMMUNICATION_PVT.g_dist_shipto_count
5067: FROM po_line_locations_archive_all plla
5068: WHERE plla.po_release_id = p_document_id
5069: and plla.revision_num = p_revision_num;
5070: END IF;
5071:

Line 5704: || ' FROM po_line_locations_archive_all dela WHERE del.line_location_id = '

5700: l_complex_lloc_query :=
5701: ', CURSOR(SELECT del.* FROM po_line_locations_archive_xml del'
5702: || ' WHERE del.po_line_id = plx.po_line_id AND del.payment_type = ''DELIVERY'''
5703: || ' AND del.revision_num = (SELECT /*+ push_subq no_unnest */ max(dela.revision_num)'
5704: || ' FROM po_line_locations_archive_all dela WHERE del.line_location_id = '
5705: || ' dela.line_location_id AND del.revision_num <= pcgt.revision_number) '
5706: || ' ) AS line_delivery ';
5707:
5708:

Line 5724: || ' SELECT /*+ push_subq no_unnest */ max(dela.revision_num) FROM po_line_locations_archive_all dela'

5720: || ' FROM po_distributions_archive_all deldista WHERE deldist.po_distribution_id ='
5721: || ' deldista.po_distribution_id AND deldista.revision_num <= pcgt.revision_number))'
5722: || ' AS distributions FROM po_line_locations_xml del WHERE del.po_line_id = plx.po_line_id'
5723: || ' AND del.payment_type = ''DELIVERY'' AND del.revision_num = ('
5724: || ' SELECT /*+ push_subq no_unnest */ max(dela.revision_num) FROM po_line_locations_archive_all dela'
5725: || ' WHERE del.line_location_id = dela.line_location_id'
5726: || ' AND del.revision_num <= pcgt.revision_number)) AS line_delivery';
5727:
5728:

Line 5872: (select ''x'' from po_line_locations_archive_all pllaa where pllaa.line_location_id = pllx.line_location_id

5868: END IF;
5869: /*Bug 10388305 Added l_tax_name_query to get tax names*/
5870: l_xml_query := l_xml_query || l_tax_name_query || ',' || l_shipment_short_attach_query || ',' || l_shipment_url_attach_query || ',' || l_shipment_file_attach_query ||'
5871: FROM po_line_locations_xml pllx WHERE pllx.po_line_id = plx.po_line_id and SHIPMENT_TYPE in (''BLANKET'',''STANDARD'',''PREPAYMENT'') AND NVL(pllx.payment_type,''NONE'') NOT IN (''ADVANCE'',''DELIVERY'') and not exists
5872: (select ''x'' from po_line_locations_archive_all pllaa where pllaa.line_location_id = pllx.line_location_id
5873: and pllaa.cancel_flag=''Y'' and pllaa.revision_num < PO_COMMUNICATION_PVT.getRevisionNum()) order by pllx.shipment_num ) AS line_locations' || l_complex_lloc_query || '
5874: FROM po_lines_xml plx
5875: WHERE plx.po_header_id = phx.po_header_id and not exists
5876: (select ''x'' from po_lines_archive_all plaa where

Line 5901: (select ''x'' from po_line_locations_archive_all pllaa where pllaa.line_location_id = pllx.line_location_id

5897: '|| l_line_short_attachment_query || ',' || l_price_modifier_query1 || ',' || l_price_modifier_query2 || ',' || l_price_modifier_query3 || ',' || l_line_url_attachment_query || ',' || l_line_file_attachment_query ||',
5898: CURSOR(SELECT pllx.*, ' || l_tax_name_query || ',' || l_shipment_short_attach_query || ',' || l_shipment_url_attach_query || ',' || l_shipment_file_attach_query ||',
5899: CURSOR(SELECT pdx.* FROM po_distribution_xml pdx WHERE pdx.po_header_id = phx.po_header_id and pdx.LINE_LOCATION_ID = pllx.LINE_LOCATION_ID) AS distributions
5900: FROM po_line_locations_xml pllx WHERE pllx.po_line_id = plx.po_line_id AND NVL(pllx.payment_type,''NONE'') NOT IN (''ADVANCE'',''DELIVERY'') and not exists
5901: (select ''x'' from po_line_locations_archive_all pllaa where pllaa.line_location_id = pllx.line_location_id
5902: and pllaa.cancel_flag=''Y'' and pllaa.revision_num < PO_COMMUNICATION_PVT.getRevisionNum()) order by pllx.shipment_num ) AS line_locations' || l_complex_dist_query || '
5903: FROM po_lines_xml plx WHERE plx.po_header_id = phx.po_header_id and not exists
5904: (select ''x'' from po_lines_archive_all plaa where
5905: plaa.po_line_id = plx.po_line_id and

Line 5978: SELECT count(*) into l_count FROM po_line_locations_archive_all WHERE po_header_id = p_document_id;

5974: AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5975:
5976: END IF;
5977:
5978: SELECT count(*) into l_count FROM po_line_locations_archive_all WHERE po_header_id = p_document_id;
5979:
5980: IF l_count >0 THEN
5981: --Bug 5506417: Added order by pllx.shipment_num and order by plx.line_num clauses
5982: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,

Line 6000: and pllx.revision_num = (SELECT /*+ push_subq no_unnest */ MAX(plla.REVISION_NUM) FROM PO_LINE_LOCATIONS_ARCHIVE_ALL plla

5996: END IF;
5997: /*Bug 10388305 Added l_tax_name_query to get tax names*/
5998: l_xml_query := l_xml_query || l_tax_name_query || ',' || l_shipment_short_attach_query || ',' || l_shipment_url_attach_query || ',' || l_shipment_file_attach_query ||'
5999: FROM PO_LINE_LOCATIONS_ARCHIVE_XML pllx WHERE pllx.po_line_id = plx.po_line_id and SHIPMENT_TYPE in (''BLANKET'',''STANDARD'',''PREPAYMENT'') AND NVL(pllx.payment_type, ''NONE'') NOT IN (''ADVANCE'',''DELIVERY'')
6000: and pllx.revision_num = (SELECT /*+ push_subq no_unnest */ MAX(plla.REVISION_NUM) FROM PO_LINE_LOCATIONS_ARCHIVE_ALL plla
6001: where plla.LINE_LOCATION_ID = pllx.LINE_LOCATION_ID and plla.revision_num <= pcgt.revision_number )
6002: and ''Y'' = decode(nvl(pllx.cancel_flag,''N''),''N'',''Y'',''Y'',decode(pllx.revision_num,PO_COMMUNICATION_PVT.getRevisionNum(),''Y'',''N'') ) order by pllx.shipment_num ) AS line_locations' || l_complex_lloc_query || '
6003: FROM PO_LINES_ARCHIVE_XML plx WHERE plx.po_header_id = phx.po_header_id
6004: AND plx.REVISION_NUM = (SELECT /*+ push_subq no_unnest */ max(revision_num) from po_lines_archive_all pla where pla.po_line_id = plx.po_line_id

Line 6030: and pllx.revision_num = (SELECT /*+ push_subq no_unnest */ MAX(plla.REVISION_NUM) FROM PO_LINE_LOCATIONS_ARCHIVE_ALL plla

6026: CURSOR(SELECT pdx.* FROM po_distribution_archive_xml pdx WHERE pdx.po_header_id = phx.po_header_id and pdx.LINE_LOCATION_ID = pllx.LINE_LOCATION_ID
6027: and pdx.REVISION_NUM = (SELECT MAX(pda.REVISION_NUM) FROM PO_DISTRIBUTIONS_ARCHIVE_ALL pda
6028: WHERE pda.PO_DISTRIBUTION_ID = pdx.PO_DISTRIBUTION_ID AND pda.REVISION_NUM <= pcgt.revision_number ) ) AS distributions
6029: FROM PO_LINE_LOCATIONS_ARCHIVE_XML pllx WHERE pllx.po_line_id = plx.po_line_id and SHIPMENT_TYPE in (''BLANKET'',''STANDARD'',''PREPAYMENT'') AND NVL(pllx.payment_type,''NONE'') NOT IN (''ADVANCE'',''DELIVERY'')
6030: and pllx.revision_num = (SELECT /*+ push_subq no_unnest */ MAX(plla.REVISION_NUM) FROM PO_LINE_LOCATIONS_ARCHIVE_ALL plla
6031: where plla.LINE_LOCATION_ID = pllx.LINE_LOCATION_ID and plla.revision_num <= pcgt.revision_number )
6032: and ''Y'' = decode(nvl(pllx.cancel_flag,''N''),''N'',''Y'',''Y'',decode(pllx.revision_num,PO_COMMUNICATION_PVT.getRevisionNum(),''Y'',''N'') ) order by pllx.shipment_num ) AS line_locations'|| l_complex_dist_query || '
6033: FROM PO_LINES_ARCHIVE_XML plx WHERE plx.po_header_id = phx.po_header_id
6034: AND plx.REVISION_NUM = (select /*+ push_subq no_unnest */ max(revision_num) from po_lines_archive_all pla where pla.po_line_id = plx.po_line_id

Line 6095: and not exists (select ''x'' from po_line_locations_archive_all pllaa where

6091: CURSOR(SELECT pllx.*,' || l_tax_name_query || ',' || l_shipment_short_attach_query || ',' || l_shipment_url_attach_query || ',' || l_shipment_file_attach_query ||',
6092: CURSOR(SELECT pd.*
6093: FROM po_distribution_xml pd WHERE pd.po_release_id = pllx.po_release_id and pd.LINE_LOCATION_ID = pllx.LINE_LOCATION_ID) AS distributions
6094: FROM po_line_locations_xml pllx WHERE pllx.po_release_id in (select po_release_id from PO_COMMUNICATION_GT) and pllx.po_line_id = plx.po_line_id
6095: and not exists (select ''x'' from po_line_locations_archive_all pllaa where
6096: pllaa.line_location_id = pllx.line_location_id and
6097: pllaa.cancel_flag= ''Y'' and pllaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) order by pllx.shipment_num ) AS line_locations
6098: FROM po_lines_xml plx WHERE exists (SELECT ''x'' from po_line_locations_all
6099: WHERE po_line_locations_all.po_line_id = plx.po_line_id and po_release_id = phx.po_release_id and not exists (select ''x'' from po_line_locations_archive_all pllaa where

Line 6099: WHERE po_line_locations_all.po_line_id = plx.po_line_id and po_release_id = phx.po_release_id and not exists (select ''x'' from po_line_locations_archive_all pllaa where

6095: and not exists (select ''x'' from po_line_locations_archive_all pllaa where
6096: pllaa.line_location_id = pllx.line_location_id and
6097: pllaa.cancel_flag= ''Y'' and pllaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) order by pllx.shipment_num ) AS line_locations
6098: FROM po_lines_xml plx WHERE exists (SELECT ''x'' from po_line_locations_all
6099: WHERE po_line_locations_all.po_line_id = plx.po_line_id and po_release_id = phx.po_release_id and not exists (select ''x'' from po_line_locations_archive_all pllaa where
6100: pllaa.line_location_id = po_line_locations_all.line_location_id and
6101: pllaa.cancel_flag= ''Y'' and pllaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) ) and plx.po_header_id = phx.po_header_id order by plx.line_num) AS lines
6102: FROM PO_RELEASE_XML phx WHERE phx.PO_RELEASE_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
6103:

Line 6140: and pllx.revision_num = (SELECT/*+ push_subq no_unnest */ MAX(plla.REVISION_NUM) FROM PO_LINE_LOCATIONS_ARCHIVE_ALL plla

6136: FROM po_distribution_archive_xml pd WHERE pd.po_release_id = pllx.po_release_id and pd.line_location_id = pllx.line_location_id
6137: and pd.REVISION_NUM = (SELECT MAX(pda.REVISION_NUM) FROM PO_DISTRIBUTIONS_ARCHIVE_ALL pda
6138: WHERE pda.PO_DISTRIBUTION_ID = pd.PO_DISTRIBUTION_ID AND pda.REVISION_NUM <= PO_COMMUNICATION_PVT.getRevisionNum() ) ) AS distributions
6139: FROM PO_LINE_LOCATIONS_ARCHIVE_XML pllx WHERE pllx.po_release_id = pcgt.po_release_id and pllx.po_line_id = plx.po_line_id
6140: and pllx.revision_num = (SELECT/*+ push_subq no_unnest */ MAX(plla.REVISION_NUM) FROM PO_LINE_LOCATIONS_ARCHIVE_ALL plla
6141: where plla.LINE_LOCATION_ID = pllx.LINE_LOCATION_ID and plla.revision_num <= pcgt.revision_number ) order by pllx.shipment_num ) AS line_locations
6142: FROM PO_LINES_ARCHIVE_XML plx
6143: WHERE exists (SELECT ''x'' from po_line_locations_archive_all pllaa
6144: WHERE pllaa.po_line_id = plx.po_line_id and po_release_id = phx.po_release_id

Line 6143: WHERE exists (SELECT ''x'' from po_line_locations_archive_all pllaa

6139: FROM PO_LINE_LOCATIONS_ARCHIVE_XML pllx WHERE pllx.po_release_id = pcgt.po_release_id and pllx.po_line_id = plx.po_line_id
6140: and pllx.revision_num = (SELECT/*+ push_subq no_unnest */ MAX(plla.REVISION_NUM) FROM PO_LINE_LOCATIONS_ARCHIVE_ALL plla
6141: where plla.LINE_LOCATION_ID = pllx.LINE_LOCATION_ID and plla.revision_num <= pcgt.revision_number ) order by pllx.shipment_num ) AS line_locations
6142: FROM PO_LINES_ARCHIVE_XML plx
6143: WHERE exists (SELECT ''x'' from po_line_locations_archive_all pllaa
6144: WHERE pllaa.po_line_id = plx.po_line_id and po_release_id = phx.po_release_id
6145: and pllaa.REVISION_NUM = (select /*+ push_subq no_unnest */ max(revision_num) from po_line_locations_archive_all pllaa1 where pllaa1.line_location_id = pllaa.line_location_id
6146: and pllaa1.revision_num <= pcgt.revision_number )
6147: and ''Y'' = decode(nvl(pllaa.cancel_flag,''N''),''N'',''Y'',''Y'',decode(pllaa.revision_num,PO_COMMUNICATION_PVT.getRevisionNum(),''Y'',''N'') ) )

Line 6145: and pllaa.REVISION_NUM = (select /*+ push_subq no_unnest */ max(revision_num) from po_line_locations_archive_all pllaa1 where pllaa1.line_location_id = pllaa.line_location_id

6141: where plla.LINE_LOCATION_ID = pllx.LINE_LOCATION_ID and plla.revision_num <= pcgt.revision_number ) order by pllx.shipment_num ) AS line_locations
6142: FROM PO_LINES_ARCHIVE_XML plx
6143: WHERE exists (SELECT ''x'' from po_line_locations_archive_all pllaa
6144: WHERE pllaa.po_line_id = plx.po_line_id and po_release_id = phx.po_release_id
6145: and pllaa.REVISION_NUM = (select /*+ push_subq no_unnest */ max(revision_num) from po_line_locations_archive_all pllaa1 where pllaa1.line_location_id = pllaa.line_location_id
6146: and pllaa1.revision_num <= pcgt.revision_number )
6147: and ''Y'' = decode(nvl(pllaa.cancel_flag,''N''),''N'',''Y'',''Y'',decode(pllaa.revision_num,PO_COMMUNICATION_PVT.getRevisionNum(),''Y'',''N'') ) )
6148: and plx.po_header_id = phx.po_header_id
6149: AND plx.REVISION_NUM = (select /*+ push_subq no_unnest */ max(revision_num) from po_lines_archive_all pla where pla.po_line_id = plx.po_line_id

Line 8036: FROM po_line_locations_archive_all plla,

8032: WHEN NO_DATA_FOUND THEN
8033: begin
8034: SELECT sum(AMOUNT_CANCELLED), pl.amount
8035: INTO l_canceled_amount, l_amount
8036: FROM po_line_locations_archive_all plla,
8037: po_lines_all pl
8038: WHERE plla.po_line_id = p_po_line_id AND
8039: plla.po_header_id = p_po_header_id AND
8040: plla.revision_num = p_po_revision_num AND