DBA Data[Home] [Help]

APPS.PO_COMMUNICATION_PVT dependencies on PO_LINE_LOCATIONS_ARCHIVE_ALL

Line 4255: FROM po_line_locations_archive_all plla

4251: WHERE vn.vendor_id = ph.vendor_id
4252: AND ph.po_header_id = p_document_id AND ph.revision_num = p_revision_num;
4253:
4254: SELECT count(distinct(plla.SHIP_TO_LOCATION_ID)) INTO PO_COMMUNICATION_PVT.g_dist_shipto_count
4255: FROM po_line_locations_archive_all plla
4256: WHERE plla.po_header_id = p_document_id
4257: and plla.revision_num = p_revision_num
4258: AND NVL(plla.payment_type, 'NONE') NOT IN ('ADVANCE', 'DELIVERY'); --
4259:

Line 4309: FROM po_line_locations_archive_all plla

4305: WHERE plla.po_release_id = p_document_id;
4306:
4307: ELSE
4308: SELECT count(distinct(plla.SHIP_TO_LOCATION_ID)) INTO PO_COMMUNICATION_PVT.g_dist_shipto_count
4309: FROM po_line_locations_archive_all plla
4310: WHERE plla.po_release_id = p_document_id
4311: and plla.revision_num = p_revision_num;
4312: END IF;
4313:

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

4860: l_complex_lloc_query :=
4861: ', CURSOR(SELECT del.* FROM po_line_locations_archive_xml del'
4862: || ' WHERE del.po_line_id = plx.po_line_id AND del.payment_type = ''DELIVERY'''
4863: || ' AND del.revision_num = (SELECT max(dela.revision_num)'
4864: || ' FROM po_line_locations_archive_all dela WHERE del.line_location_id = '
4865: || ' dela.line_location_id AND del.revision_num <= pcgt.revision_number) '
4866: || ' ) AS line_delivery ';
4867:
4868:

Line 4884: || ' SELECT max(dela.revision_num) FROM po_line_locations_archive_all dela'

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'
4885: || ' WHERE del.line_location_id = dela.line_location_id'
4886: || ' AND del.revision_num <= pcgt.revision_number)) AS line_delivery';
4887:
4888:

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

5014: END IF;
5015:
5016: l_xml_query := l_xml_query || l_shipment_short_attach_query ||','||l_shipment_url_attach_query||','||l_shipment_file_attach_query||'
5017: 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
5018: (select ''x'' from po_line_locations_archive_all pllaa where pllaa.line_location_id = pllx.line_location_id
5019: 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 || '
5020: FROM po_lines_xml plx
5021: WHERE plx.po_header_id = phx.po_header_id and not exists
5022: (select ''x'' from po_lines_archive_all plaa where

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

5042: '|| l_line_short_attachment_query ||','||l_line_url_attachment_query||','||l_line_file_attachment_query||',
5043: CURSOR(SELECT pllx.*, '|| l_shipment_short_attach_query ||','||l_shipment_url_attach_query||','||l_shipment_file_attach_query||',
5044: 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
5045: 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
5046: (select ''x'' from po_line_locations_archive_all pllaa where pllaa.line_location_id = pllx.line_location_id
5047: 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 || '
5048: FROM po_lines_xml plx WHERE plx.po_header_id = phx.po_header_id and not exists
5049: (select ''x'' from po_lines_archive_all plaa where
5050: plaa.po_line_id = plx.po_line_id and

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

5104: AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5105:
5106: END IF;
5107:
5108: SELECT count(*) into l_count FROM po_line_locations_archive_all WHERE po_header_id = p_document_id;
5109:
5110: IF l_count >0 THEN
5111: --Bug 5506417: Added order by pllx.shipment_num and order by plx.line_num clauses
5112: 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 5130: and pllx.revision_num = (SELECT MAX(plla.REVISION_NUM) FROM PO_LINE_LOCATIONS_ARCHIVE_ALL plla

5126: END IF;
5127:
5128: l_xml_query := l_xml_query || l_shipment_short_attach_query ||','||l_shipment_url_attach_query||','||l_shipment_file_attach_query||'
5129: 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'')
5130: and pllx.revision_num = (SELECT MAX(plla.REVISION_NUM) FROM PO_LINE_LOCATIONS_ARCHIVE_ALL plla
5131: where plla.LINE_LOCATION_ID = pllx.LINE_LOCATION_ID and plla.revision_num <= pcgt.revision_number )
5132: 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 || '
5133: FROM PO_LINES_ARCHIVE_XML plx WHERE plx.po_header_id = phx.po_header_id
5134: AND plx.REVISION_NUM = (select max(revision_num) from po_lines_archive_all pla where pla.po_line_id = plx.po_line_id

Line 5159: and pllx.revision_num = (SELECT MAX(plla.REVISION_NUM) FROM PO_LINE_LOCATIONS_ARCHIVE_ALL plla

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 )
5161: 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 || '
5162: FROM PO_LINES_ARCHIVE_XML plx WHERE plx.po_header_id = phx.po_header_id
5163: AND plx.REVISION_NUM = (select max(revision_num) from po_lines_archive_all pla where pla.po_line_id = plx.po_line_id

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

5213: CURSOR(SELECT pllx.*,'|| l_shipment_short_attach_query ||','||l_shipment_url_attach_query||','||l_shipment_file_attach_query||',
5214: CURSOR(SELECT pd.*
5215: 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
5216: 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
5217: and not exists (select ''x'' from po_line_locations_archive_all pllaa where
5218: pllaa.line_location_id = pllx.line_location_id and
5219: pllaa.cancel_flag= ''Y'' and pllaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) order by pllx.shipment_num ) AS line_locations
5220: FROM po_lines_xml plx WHERE exists (SELECT ''x'' from po_line_locations_all
5221: 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 5221: 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

5217: and not exists (select ''x'' from po_line_locations_archive_all pllaa where
5218: pllaa.line_location_id = pllx.line_location_id and
5219: pllaa.cancel_flag= ''Y'' and pllaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) order by pllx.shipment_num ) AS line_locations
5220: FROM po_lines_xml plx WHERE exists (SELECT ''x'' from po_line_locations_all
5221: 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
5222: pllaa.line_location_id = po_line_locations_all.line_location_id and
5223: 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
5224: FROM PO_RELEASE_XML phx WHERE phx.PO_RELEASE_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5225:

Line 5255: and pllx.revision_num = (SELECT MAX(plla.REVISION_NUM) FROM PO_LINE_LOCATIONS_ARCHIVE_ALL plla

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
5257: FROM PO_LINES_ARCHIVE_XML plx
5258: WHERE exists (SELECT ''x'' from po_line_locations_archive_all pllaa
5259: WHERE pllaa.po_line_id = plx.po_line_id and po_release_id = phx.po_release_id

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

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
5257: FROM PO_LINES_ARCHIVE_XML plx
5258: WHERE exists (SELECT ''x'' from po_line_locations_archive_all pllaa
5259: WHERE pllaa.po_line_id = plx.po_line_id and po_release_id = phx.po_release_id
5260: and pllaa.REVISION_NUM = (select max(revision_num) from po_line_locations_archive_all pllaa1 where pllaa1.line_location_id = pllaa.line_location_id
5261: and pllaa1.revision_num <= pcgt.revision_number )
5262: and ''Y'' = decode(nvl(pllaa.cancel_flag,''N''),''N'',''Y'',''Y'',decode(pllaa.revision_num,PO_COMMUNICATION_PVT.getRevisionNum(),''Y'',''N'') ) )

Line 5260: and pllaa.REVISION_NUM = (select max(revision_num) from po_line_locations_archive_all pllaa1 where pllaa1.line_location_id = pllaa.line_location_id

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
5257: FROM PO_LINES_ARCHIVE_XML plx
5258: WHERE exists (SELECT ''x'' from po_line_locations_archive_all pllaa
5259: WHERE pllaa.po_line_id = plx.po_line_id and po_release_id = phx.po_release_id
5260: and pllaa.REVISION_NUM = (select max(revision_num) from po_line_locations_archive_all pllaa1 where pllaa1.line_location_id = pllaa.line_location_id
5261: and pllaa1.revision_num <= pcgt.revision_number )
5262: and ''Y'' = decode(nvl(pllaa.cancel_flag,''N''),''N'',''Y'',''Y'',decode(pllaa.revision_num,PO_COMMUNICATION_PVT.getRevisionNum(),''Y'',''N'') ) )
5263: and plx.po_header_id = phx.po_header_id
5264: AND plx.REVISION_NUM = (select max(revision_num) from po_lines_archive_all pla where pla.po_line_id = plx.po_line_id

Line 6844: FROM po_line_locations_archive_all plla,

6840: WHEN NO_DATA_FOUND THEN
6841: begin
6842: SELECT sum(AMOUNT_CANCELLED), pl.amount
6843: INTO l_canceled_amount, l_amount
6844: FROM po_line_locations_archive_all plla,
6845: po_lines_all pl
6846: WHERE plla.po_line_id = p_po_line_id AND
6847: plla.po_header_id = p_po_header_id AND
6848: plla.revision_num = p_po_revision_num AND