DBA Data[Home] [Help]

APPS.PO_COMMUNICATION_PVT dependencies on FND_ATTACHED_DOCS_FORM_VL

Line 644: SELECT count(*) into l_count from fnd_lobs fl, fnd_attached_docs_form_vl fad

640: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
641: END IF;
642:
643:
644: SELECT count(*) into l_count from fnd_lobs fl, fnd_attached_docs_form_vl fad
645: WHERE
646: fl.file_id = fad.media_id and
647: fad.pk2_value = to_char(l_document_id) and
648: fad.pk3_value = to_char(l_revision_num) and

Line 665: SELECT count(*) into l_count from fnd_lobs fl, fnd_attached_docs_form_vl fad

661: -- Added TO_CHAR() wherever a numeric value is compared with pk1_value or pk2_value.
662:
663: -- bug4931216
664: -- Add enttiy name filtering to utilize the index
665: SELECT count(*) into l_count from fnd_lobs fl, fnd_attached_docs_form_vl fad
666: WHERE
667: fl.file_id = fad.media_id and
668: fad.pk1_value = to_char(l_document_id) and
669: fad.pk2_value = to_char(l_revision_num) and

Line 5246: fnd_attached_docs_form_vl fad,

5242: --short_text attachment for the current document only.
5243: --bug6133951 added seq_num in order_by clause.
5244: l_head_short_attachment_query := 'CURSOR( SELECT fds.short_text
5245: FROM
5246: fnd_attached_docs_form_vl fad,
5247: fnd_documents_short_text fds
5248: WHERE ((entity_name=''PO_HEADERS'' AND
5249: pk1_value=to_char(phx.po_header_id))OR
5250: (entity_name = ''PO_RELEASES'' AND

Line 5263: FROM fnd_attached_docs_form_vl fad

5259: order by entity_name, seq_num) AS header_short_text'; --bug6133951
5260: --
5261: l_head_url_attachment_query := 'CURSOR(
5262: SELECT fad.url web_page --Bug#4958642
5263: FROM fnd_attached_docs_form_vl fad
5264: WHERE ((fad.entity_name=''PO_HEADERS'' AND fad.pk1_value=to_char(phx.po_header_id)) OR
5265: (fad.entity_name=''PO_RELEASES'' AND fad.pk1_value=to_char(phx.po_release_id)) OR
5266: (fad.entity_name=''PO_VENDORS'' AND fad.pk1_value=to_char(phx.vendor_id)) OR
5267: (fad.entity_name=''PO_VENDOR_SITES'' AND fad.pk1_value=to_char(phx.vendor_site_id)) --bug6154354

Line 5275: FROM fnd_attached_docs_form_vl fad

5271: order by fad.entity_name,fad.seq_num) AS header_url_attachments'; --bug6133951
5272:
5273: l_head_file_attachment_query := 'CURSOR(
5274: SELECT fad.file_name
5275: FROM fnd_attached_docs_form_vl fad
5276: WHERE ((fad.entity_name=''PO_HEADERS'' AND fad.pk1_value=to_char(phx.po_header_id)) OR
5277: (fad.entity_name=''PO_RELEASES'' AND fad.pk1_value=to_char(phx.po_release_id)) OR
5278: (fad.entity_name=''PO_VENDORS'' AND fad.pk1_value=to_char(phx.vendor_id)) OR
5279: (fad.entity_name=''PO_VENDOR_SITES'' AND fad.pk1_value=to_char(phx.vendor_site_id)) --bug6154354

Line 5293: fnd_attached_docs_form_vl fad,

5289: --short_text attachment for the current document only.
5290: --bug6133951 added seq_num in order_by clause.
5291: l_head_short_attachment_query := 'CURSOR( SELECT fds.short_text
5292: FROM
5293: fnd_attached_docs_form_vl fad,
5294: fnd_documents_short_text fds
5295: WHERE ((entity_name = ''PO_HEADERS'' AND
5296: pk1_value = to_char(phx.po_header_id)) OR
5297: (entity_name = ''PO_VENDORS'' AND

Line 5308: FROM fnd_attached_docs_form_vl fad

5304:
5305: --
5306: l_head_url_attachment_query := 'CURSOR(
5307: SELECT fad.url web_page --Bug#4958642
5308: FROM fnd_attached_docs_form_vl fad
5309: WHERE ((fad.entity_name=''PO_HEADERS'' AND fad.pk1_value=to_char(phx.po_header_id)) OR
5310: (fad.entity_name=''PO_VENDORS'' AND fad.pk1_value=to_char(phx.vendor_id)) OR
5311: (fad.entity_name=''PO_VENDOR_SITES'' AND fad.pk1_value=to_char(phx.vendor_site_id)) --bug6154354
5312: )

Line 5319: FROM fnd_attached_docs_form_vl fad

5315: order by fad.entity_name,fad.seq_num) AS header_url_attachments'; --bug6133951
5316:
5317: l_head_file_attachment_query := 'CURSOR(
5318: SELECT fad.file_name
5319: FROM fnd_attached_docs_form_vl fad
5320: WHERE ((fad.entity_name=''PO_HEADERS'' AND fad.pk1_value=to_char(phx.po_header_id)) OR
5321: (fad.entity_name=''PO_VENDORS'' AND fad.pk1_value=to_char(phx.vendor_id)) OR
5322: (fad.entity_name=''PO_VENDOR_SITES'' AND fad.pk1_value=to_char(phx.vendor_site_id)) --bug6154354
5323: )

Line 5350: fnd_attached_docs_form_vl fad,

5346: Entity types :- source doc's header -> 'PO_HEADERS' source doc's line -> 'PO_IN_GA_LINES'*/
5347:
5348: l_line_short_attachment_query := ' CURSOR( SELECT plx.po_line_id , fds.short_text
5349: FROM
5350: fnd_attached_docs_form_vl fad,
5351: fnd_documents_short_text fds
5352: WHERE ((fad.entity_name=''PO_LINES'' AND fad.pk1_value=to_char(plx.po_line_id))
5353: OR
5354: (fad.entity_name=''MTL_SYSTEM_ITEMS'' AND

Line 5380: FROM fnd_attached_docs_form_vl fad

5376: Entity types :- source doc's header -> 'PO_HEADERS' source doc's line -> 'PO_IN_GA_LINES'*/
5377:
5378: l_line_url_attachment_query := 'CURSOR(
5379: SELECT fad.url web_page --Bug#4958642
5380: FROM fnd_attached_docs_form_vl fad
5381: WHERE ((fad.entity_name=''PO_LINES'' AND fad.pk1_value=to_char(plx.po_line_id))
5382: OR
5383: (fad.entity_name=''PO_HEADERS'' AND fad.pk1_value=to_char(plx.from_header_id)
5384: AND plx.from_header_id IS NOT NULL)

Line 5407: FROM fnd_attached_docs_form_vl fad

5403: Entity types :- source doc's header -> 'PO_HEADERS' source doc's line -> 'PO_IN_GA_LINES'*/
5404:
5405: l_line_file_attachment_query := 'CURSOR(
5406: SELECT fad.file_name
5407: FROM fnd_attached_docs_form_vl fad
5408: WHERE ((fad.entity_name=''PO_LINES'' AND fad.pk1_value=to_char(plx.po_line_id))
5409: OR
5410: (fad.entity_name=''PO_HEADERS'' AND fad.pk1_value=to_char(plx.from_header_id)
5411: AND plx.from_header_id IS NOT NULL)

Line 5439: fnd_attached_docs_form_vl fad,

5435: --Appended fad.datatype_id=1 condition for retrieving the
5436: --short_text attachment for the current document only
5437: l_shipment_short_attach_query := 'CURSOR( SELECT pllx.line_location_id, fds.short_text
5438: FROM
5439: fnd_attached_docs_form_vl fad,
5440: fnd_documents_short_text fds
5441: WHERE entity_name = ''PO_SHIPMENTS'' AND
5442: pk1_value = to_char(pllx.line_location_id) AND
5443: function_name = ''PO_PRINTPO''

Line 5451: FROM fnd_attached_docs_form_vl fad

5447:
5448: --
5449: l_shipment_url_attach_query := 'CURSOR(
5450: SELECT fad.url web_page --Bug#4958642
5451: FROM fnd_attached_docs_form_vl fad
5452: WHERE fad.entity_name=''PO_SHIPMENTS''
5453: AND fad.pk1_value=to_char(pllx.line_location_id)
5454: AND fad.datatype_id=5
5455: AND fad.function_name=''PO_PRINTPO''

Line 5460: FROM fnd_attached_docs_form_vl fad

5456: order by fad.seq_num ) AS line_loc_url_attachments'; --bug6133951
5457:
5458: l_shipment_file_attach_query := 'CURSOR(
5459: SELECT fad.file_name
5460: FROM fnd_attached_docs_form_vl fad
5461: WHERE fad.entity_name=''PO_SHIPMENTS''
5462: AND fad.pk1_value=to_char(pllx.line_location_id)
5463: AND fad.datatype_id=6
5464: AND fad.function_name=''PO_PRINTPO''

Line 6187: fnd_attached_docs_form_vl fad,

6183: Replacing fdl.long_text with get_clob(fdl.rowid) */
6184:
6185: l_headerAttachmentsQuery := 'select fdl.long_text long_text
6186: FROM
6187: fnd_attached_docs_form_vl fad,
6188: fnd_documents_long_text fdl
6189: WHERE ( (entity_name=''PO_RELEASES'' AND
6190: pk1_value= to_char(PO_COMMUNICATION_PVT.getDocumentId()) ) OR
6191: (entity_name = ''PO_HEADERS'' AND

Line 6211: fnd_attached_docs_form_vl fad,

6207: Replacing fdl.long_text with get_clob(fdl.rowid) */
6208:
6209: l_headerAttachmentsQuery := 'select fdl.long_text long_text
6210: FROM
6211: fnd_attached_docs_form_vl fad,
6212: fnd_documents_long_text fdl
6213: WHERE ((entity_name = ''PO_HEADERS'' AND
6214: pk1_value = to_char(PO_COMMUNICATION_PVT.getReleaseHeaderId())) OR --Bug6139548
6215: (entity_name = ''PO_VENDORS'' AND

Line 6240: fnd_attached_docs_form_vl fad,

6236: Entity types :- source doc's header -> 'PO_HEADERS' source doc's line -> 'PO_IN_GA_LINES'*/
6237:
6238: /*l_lineAttachQuery :='SELECT fds.long_text text, plx.po_line_id id
6239: FROM
6240: fnd_attached_docs_form_vl fad,
6241: fnd_documents_long_text fds,
6242: po_lines_all plx
6243: WHERE ((fad.entity_name=''PO_LINES'' AND fad.pk1_value=to_char(plx.po_line_id))
6244: OR

Line 6266: fnd_attached_docs_form_vl. For last part of query while fetching attachments for entity MTL_SYSTEM_ITEMS, added hint

6262: order by seq_num'; --bug6133951*/
6263:
6264: /* Bug 13082363 : Improving performance of l_lineAttachQuery query using UNION ALL approach. Plus adding hint so that CBO would start
6265: optimization from po_lines_all table (plx) rather than fnd_attached_document (ad).Using base tables instead of view
6266: fnd_attached_docs_form_vl. For last part of query while fetching attachments for entity MTL_SYSTEM_ITEMS, added hint
6267: use_nl(ad) so that optimizer would perform nl join and the condition ad.pk2_value=to_char ( plx.item_id )
6268: gets evaluated at index level*/
6269: -- Bug 14476193 : Changing condition DT.media_id = fds.media_id to D.media_id = fds.media_id
6270: l_lineAttachQuery :='select text, id from

Line 6401: fnd_attached_docs_form_vl fad,

6397: -- BeginBug16076162
6398: -- Rewriting the following query for performance improvements.
6399: /*l_shipmentAttachmentQuery := 'SELECT fds.long_text long_text, pllx.LINE_LOCATION_ID
6400: FROM
6401: fnd_attached_docs_form_vl fad,
6402: fnd_documents_long_text fds,
6403: po_line_locations_all pllx
6404: WHERE entity_name = ''PO_SHIPMENTS'' AND
6405: pk1_value = to_char(pllx.LINE_LOCATION_ID) AND

Line 6415: fnd_attached_docs_form_vl fad,

6411: order by seq_num'; --bug6133951
6412: */
6413: l_shipmentAttachmentQuery := 'SELECT PO_COMMUNICATION_PVT.get_clob(fds.rowid) long_text, pllx.LINE_LOCATION_ID
6414: FROM
6415: fnd_attached_docs_form_vl fad,
6416: fnd_documents_long_text fds,
6417: po_line_locations_all pllx
6418: WHERE entity_name = ''PO_SHIPMENTS'' AND
6419: pk1_value = to_char(pllx.LINE_LOCATION_ID) AND

Line 8453: fnd_attached_docs_form_vl fad,

8449: SELECT fds.long_text
8450: INTO
8451: l_one_time_address_clob
8452: FROM
8453: fnd_attached_docs_form_vl fad,
8454: fnd_documents_long_text fds
8455: WHERE entity_name = 'PO_SHIPMENTS' AND
8456: pk1_value = To_Char(p_line_location_id) AND
8457: function_name = 'PO_PRINTPO'