DBA Data[Home] [Help]

APPS.PO_COMMUNICATION_PVT dependencies on PO_DISTRIBUTIONS_ARCHIVE_ALL

Line 5715: || ' FROM po_distributions_archive_all adva WHERE adv.po_distribution_id ='

5711: ', CURSOR(SELECT adv.* FROM po_distribution_archive_xml adv,'
5712: || ' po_line_locations_archive_xml pllx2 WHERE pllx2.po_line_id = plx.po_line_id'
5713: || ' AND pllx2.payment_type = ''ADVANCE'' AND adv.line_location_id = pllx2.line_location_id'
5714: || ' AND adv.revision_num = (SELECT max(adva.revision_num)'
5715: || ' FROM po_distributions_archive_all adva WHERE adv.po_distribution_id ='
5716: || ' adv.po_distribution_id AND adva.revision_num <= pcgt.revision_number))'
5717: || ' AS line_advance_distributions, CURSOR(SELECT del.*, CURSOR(SELECT deldist.*'
5718: || ' FROM po_distribution_xml deldist WHERE deldist.line_location_id = del.line_location_id'
5719: || ' AND deldist.revision_num = (SELECT max(deldista.revision_num)'

Line 5720: || ' FROM po_distributions_archive_all deldista WHERE deldist.po_distribution_id ='

5716: || ' adv.po_distribution_id AND adva.revision_num <= pcgt.revision_number))'
5717: || ' AS line_advance_distributions, CURSOR(SELECT del.*, CURSOR(SELECT deldist.*'
5718: || ' FROM po_distribution_xml deldist WHERE deldist.line_location_id = del.line_location_id'
5719: || ' AND deldist.revision_num = (SELECT max(deldista.revision_num)'
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'

Line 6010: SELECT count(*) into l_count FROM po_distributions_archive_all WHERE po_header_id = p_document_id;

6006: FROM PO_HEADERS_ARCHIVE_XML phx, PO_COMMUNICATION_GT pcgt WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
6007: END IF;
6008:
6009: IF(p_document_subtype <> 'BLANKET') THEN -- blankets will not have distributions
6010: SELECT count(*) into l_count FROM po_distributions_archive_all WHERE po_header_id = p_document_id;
6011:
6012: IF l_count >0 THEN
6013: --Bug 5506417: Added order by pllx.shipment_num and order by plx.line_num clauses
6014: /*Bug 10388305 Added l_tax_name_query to get tax names*/

Line 6027: and pdx.REVISION_NUM = (SELECT MAX(pda.REVISION_NUM) FROM PO_DISTRIBUTIONS_ARCHIVE_ALL pda

6023: WHERE entity_type=''PO LINE'' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,
6024: '|| 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 ||',
6025: CURSOR(SELECT pllx.*, ' || l_tax_name_query || ',' || l_shipment_short_attach_query || ',' || l_shipment_url_attach_query || ',' || l_shipment_file_attach_query ||',
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 )

Line 6137: and pd.REVISION_NUM = (SELECT MAX(pda.REVISION_NUM) FROM PO_DISTRIBUTIONS_ARCHIVE_ALL pda

6133: '|| l_line_short_attachment_query || ',' || l_line_url_attachment_query || ',' || l_line_file_attachment_query ||',
6134: CURSOR(SELECT pllx.*,'|| l_tax_name_query || ',' || l_shipment_short_attach_query || ',' || l_shipment_url_attach_query || ',' || l_shipment_file_attach_query ||',
6135: CURSOR(SELECT pd.*
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