DBA Data[Home] [Help]

APPS.PO_COMMUNICATION_PVT dependencies on PO_DISTRIBUTIONS_ARCHIVE_ALL

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

4871: ', CURSOR(SELECT adv.* FROM po_distribution_archive_xml adv,'
4872: || ' po_line_locations_archive_xml pllx2 WHERE pllx2.po_line_id = plx.po_line_id'
4873: || ' AND pllx2.payment_type = ''ADVANCE'' AND adv.line_location_id = pllx2.line_location_id'
4874: || ' AND adv.revision_num = (SELECT max(adva.revision_num)'
4875: || ' FROM po_distributions_archive_all adva WHERE adv.po_distribution_id ='
4876: || ' adv.po_distribution_id AND adva.revision_num <= pcgt.revision_number))'
4877: || ' AS line_advance_distributions, CURSOR(SELECT del.*, CURSOR(SELECT deldist.*'
4878: || ' FROM po_distribution_xml deldist WHERE deldist.line_location_id = del.line_location_id'
4879: || ' AND deldist.revision_num = (SELECT max(deldista.revision_num)'

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

4876: || ' adv.po_distribution_id AND adva.revision_num <= pcgt.revision_number))'
4877: || ' AS line_advance_distributions, CURSOR(SELECT del.*, CURSOR(SELECT deldist.*'
4878: || ' FROM po_distribution_xml deldist WHERE deldist.line_location_id = del.line_location_id'
4879: || ' AND deldist.revision_num = (SELECT max(deldista.revision_num)'
4880: || ' FROM po_distributions_archive_all deldista WHERE deldist.po_distribution_id ='
4881: || ' deldista.po_distribution_id AND deldista.revision_num <= pcgt.revision_number))'
4882: || ' AS distributions FROM po_line_locations_xml del WHERE del.po_line_id = plx.po_line_id'
4883: || ' AND del.payment_type = ''DELIVERY'' AND del.revision_num = ('
4884: || ' SELECT max(dela.revision_num) FROM po_line_locations_archive_all dela'

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

5136: 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()';
5137: END IF;
5138:
5139: IF(p_document_subtype <> 'BLANKET') THEN -- blankets will not have distributions
5140: SELECT count(*) into l_count FROM po_distributions_archive_all WHERE po_header_id = p_document_id;
5141:
5142: IF l_count >0 THEN
5143: --Bug 5506417: Added order by pllx.shipment_num and order by plx.line_num clauses
5144: 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 5156: and pdx.REVISION_NUM = (SELECT MAX(pda.REVISION_NUM) FROM PO_DISTRIBUTIONS_ARCHIVE_ALL pda

5152: WHERE entity_type=''PO LINE'' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,
5153: '|| l_line_short_attachment_query ||','||l_line_url_attachment_query||','||l_line_file_attachment_query||',
5154: CURSOR(SELECT pllx.*, '|| l_shipment_short_attach_query ||','||l_shipment_url_attach_query||','||l_shipment_file_attach_query||',
5155: 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
5156: and pdx.REVISION_NUM = (SELECT MAX(pda.REVISION_NUM) FROM PO_DISTRIBUTIONS_ARCHIVE_ALL pda
5157: WHERE pda.PO_DISTRIBUTION_ID = pdx.PO_DISTRIBUTION_ID AND pda.REVISION_NUM <= pcgt.revision_number ) ) AS distributions
5158: 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'')
5159: and pllx.revision_num = (SELECT MAX(plla.REVISION_NUM) FROM PO_LINE_LOCATIONS_ARCHIVE_ALL plla
5160: where plla.LINE_LOCATION_ID = pllx.LINE_LOCATION_ID and plla.revision_num <= pcgt.revision_number )

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

5248: '|| l_line_short_attachment_query ||','||l_line_url_attachment_query||','||l_line_file_attachment_query||',
5249: CURSOR(SELECT pllx.*,'|| l_shipment_short_attach_query ||','||l_shipment_url_attach_query||','||l_shipment_file_attach_query||',
5250: CURSOR(SELECT pd.*
5251: FROM po_distribution_archive_xml pd WHERE pd.po_release_id = pllx.po_release_id and pd.line_location_id = pllx.line_location_id
5252: and pd.REVISION_NUM = (SELECT MAX(pda.REVISION_NUM) FROM PO_DISTRIBUTIONS_ARCHIVE_ALL pda
5253: WHERE pda.PO_DISTRIBUTION_ID = pd.PO_DISTRIBUTION_ID AND pda.REVISION_NUM <= PO_COMMUNICATION_PVT.getRevisionNum() ) ) AS distributions
5254: 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
5255: and pllx.revision_num = (SELECT MAX(plla.REVISION_NUM) FROM PO_LINE_LOCATIONS_ARCHIVE_ALL plla
5256: where plla.LINE_LOCATION_ID = pllx.LINE_LOCATION_ID and plla.revision_num <= pcgt.revision_number ) order by pllx.shipment_num ) AS line_locations