DBA Data[Home] [Help]

APPS.PO_COMMUNICATION_PVT dependencies on FND_DOCUMENTS

Line 1144: from fnd_documents d,

1140: -- bug4931216
1141: -- Join directly to the base table to improve performance
1142: cursor l_get_po_attachments_csr(l_po_header_id number) is
1143: select fl.file_name,dbms_lob.getlength(fl.file_data)
1144: from fnd_documents d,
1145: fnd_attached_documents ad,
1146: fnd_doc_category_usages dcu,
1147: fnd_attachment_functions af,
1148: fnd_lobs fl

Line 1193: from fnd_documents d,

1189: -- bug4931216
1190: -- Join directly to the base table to improve performance
1191: cursor l_get_release_attachments_csr(l_po_release_id number) is
1192: select fl.file_name,dbms_lob.getlength(fl.file_data)
1193: from fnd_documents d,
1194: fnd_attached_documents ad,
1195: fnd_doc_category_usages dcu,
1196: fnd_attachment_functions af,
1197: fnd_lobs fl

Line 1381: from fnd_documents d,

1377: select 'Y' into l_duplicate_filenames from dual
1378: where exists
1379: (
1380: select fl.file_name
1381: from fnd_documents d,
1382: fnd_attached_documents ad,
1383: fnd_doc_category_usages dcu,
1384: fnd_attachment_functions af,
1385: fnd_lobs fl

Line 1444: from fnd_documents d,

1440: select 'Y' into l_duplicate_filenames from dual
1441: where exists
1442: (
1443: select fl.file_name
1444: from fnd_documents d,
1445: fnd_attached_documents ad,
1446: fnd_doc_category_usages dcu,
1447: fnd_attachment_functions af,
1448: fnd_lobs fl

Line 2276: l_buyer_language_code fnd_documents_tl.language%type;

2272: l_request_id number := NULL;
2273:
2274: l_progress VARCHAR2(3);
2275: l_entity_name fnd_attached_documents.entity_name%type;
2276: l_buyer_language_code fnd_documents_tl.language%type;
2277: l_pdf_file_name fnd_lobs.file_name%type; --
2278:
2279: BEGIN
2280: l_progress := '000';

Line 2376: --Bug #4865352 - Replaced fnd_documents_tl with fnd_documents_vl

2372: --
2373: -- Brought the call out of the select
2374: l_pdf_file_name := po_communication_pvt.getPDFFileName(l_doctype,'_TERMS_',l_org_id,p_document_id,
2375: l_revision_num,l_buyer_language_code);
2376: --Bug #4865352 - Replaced fnd_documents_tl with fnd_documents_vl
2377: select count(1) into l_pdf_tc_buyer_exists from fnd_lobs fl,fnd_attached_documents fad, fnd_documents_vl fdl
2378: where
2379: fad.pk2_value = TO_CHAR(p_document_id) and
2380: fad.pk3_value = TO_CHAR(l_revision_num) and

Line 2377: select count(1) into l_pdf_tc_buyer_exists from fnd_lobs fl,fnd_attached_documents fad, fnd_documents_vl fdl

2373: -- Brought the call out of the select
2374: l_pdf_file_name := po_communication_pvt.getPDFFileName(l_doctype,'_TERMS_',l_org_id,p_document_id,
2375: l_revision_num,l_buyer_language_code);
2376: --Bug #4865352 - Replaced fnd_documents_tl with fnd_documents_vl
2377: select count(1) into l_pdf_tc_buyer_exists from fnd_lobs fl,fnd_attached_documents fad, fnd_documents_vl fdl
2378: where
2379: fad.pk2_value = TO_CHAR(p_document_id) and
2380: fad.pk3_value = TO_CHAR(l_revision_num) and
2381: fad.entity_name = 'OKC_CONTRACT_DOCS' and

Line 2403: --Bug #4865352 - Added a join with fnd_documents

2399: END IF;
2400:
2401: l_pdf_file_name := po_communication_pvt.getPDFFileName(l_doctype,'_TERMS_',l_org_id,p_document_id,
2402: l_revision_num,l_buyer_language_code); --bug#3463617
2403: --Bug #4865352 - Added a join with fnd_documents
2404: select count(1) into l_pdf_tc_sup_exists from fnd_lobs fl,fnd_attached_documents fad, fnd_documents fd, fnd_documents_tl fdl
2405: where
2406: fad.pk1_value = TO_CHAR(p_document_id) and
2407: fad.pk2_value = TO_CHAR(l_revision_num) and

Line 2404: select count(1) into l_pdf_tc_sup_exists from fnd_lobs fl,fnd_attached_documents fad, fnd_documents fd, fnd_documents_tl fdl

2400:
2401: l_pdf_file_name := po_communication_pvt.getPDFFileName(l_doctype,'_TERMS_',l_org_id,p_document_id,
2402: l_revision_num,l_buyer_language_code); --bug#3463617
2403: --Bug #4865352 - Added a join with fnd_documents
2404: select count(1) into l_pdf_tc_sup_exists from fnd_lobs fl,fnd_attached_documents fad, fnd_documents fd, fnd_documents_tl fdl
2405: where
2406: fad.pk1_value = TO_CHAR(p_document_id) and
2407: fad.pk2_value = TO_CHAR(l_revision_num) and
2408: fad.entity_name = l_entity_name and

Line 2437: select count(1) into l_pdf_nt_buyer_exists from fnd_lobs fl,fnd_attached_documents fad, fnd_documents_vl fdl

2433: -- Brought the call out of the select
2434: l_pdf_file_name := po_communication_pvt.getPDFFileName(l_doctype,'_TERMS_',l_org_id,p_document_id,
2435: l_revision_num,l_buyer_language_code);
2436: --Bug #4865352
2437: select count(1) into l_pdf_nt_buyer_exists from fnd_lobs fl,fnd_attached_documents fad, fnd_documents_vl fdl
2438: where
2439: fad.pk1_value = TO_CHAR(p_document_id) and
2440: fad.pk2_value = TO_CHAR(l_revision_num) and
2441: fad.entity_name = l_entity_name and

Line 2463: --Bug #4865352 - Added a join with fnd_documents

2459: --
2460: -- Brought the call out of the select
2461: l_pdf_file_name := po_communication_pvt.getPDFFileName(l_doctype,'_TERMS_',l_org_id,p_document_id,
2462: l_revision_num,l_language_code);
2463: --Bug #4865352 - Added a join with fnd_documents
2464: select count(1) into l_pdf_nt_sup_exists from fnd_lobs fl,fnd_attached_documents fad, fnd_documents fd, fnd_documents_tl fdl
2465: where
2466: fad.pk1_value = TO_CHAR(p_document_id) and
2467: fad.pk2_value = TO_CHAR(l_revision_num) and

Line 2464: select count(1) into l_pdf_nt_sup_exists from fnd_lobs fl,fnd_attached_documents fad, fnd_documents fd, fnd_documents_tl fdl

2460: -- Brought the call out of the select
2461: l_pdf_file_name := po_communication_pvt.getPDFFileName(l_doctype,'_TERMS_',l_org_id,p_document_id,
2462: l_revision_num,l_language_code);
2463: --Bug #4865352 - Added a join with fnd_documents
2464: select count(1) into l_pdf_nt_sup_exists from fnd_lobs fl,fnd_attached_documents fad, fnd_documents fd, fnd_documents_tl fdl
2465: where
2466: fad.pk1_value = TO_CHAR(p_document_id) and
2467: fad.pk2_value = TO_CHAR(l_revision_num) and
2468: fad.entity_name = l_entity_name and

Line 2907: --Bug #4865352 - Replaced fnd_documents_tl with fnd_documents_vl

2903: -- For PDF preventing duplicate records is taken care of by explicitly deleting
2904: -- them before generating it everytime. For ZIP, it will be done by returning
2905: -- the same file id as the existing one so that an explicit delete would not be
2906: -- necessary
2907: --Bug #4865352 - Replaced fnd_documents_tl with fnd_documents_vl
2908: IF p_blob_type = 'ZIP' THEN
2909: Begin
2910: SELECT fdl.media_id
2911: INTO x_media_id

Line 2913: fnd_documents_vl fdl

2909: Begin
2910: SELECT fdl.media_id
2911: INTO x_media_id
2912: FROM fnd_attached_documents fad,
2913: fnd_documents_vl fdl
2914: WHERE fad.pk1_value=to_char(p_document_id)
2915: and fad.pk2_value=to_char(p_revision_number)
2916: and fad.entity_name = l_entity_name
2917: and fdl.document_id = fad.document_id;

Line 2941: FND_DOCUMENTS_PKG.Insert_Row(

2937: SELECT category_id into l_category_id from fnd_document_categories
2938: where name = 'CUSTOM2446' ;
2939:
2940: l_progress := '006';
2941: FND_DOCUMENTS_PKG.Insert_Row(
2942: row_id_tmp,
2943: document_id_tmp,
2944: SYSDATE,
2945: 1, --NVL(X_created_by,0),

Line 3165: --Bug #4865352 - Added join with fnd_documents and selected media_id from it

3161: if l_document_type in ('PO','PA') then
3162: l_entity_name :='PO_HEAD';
3163: end if;
3164:
3165: --Bug #4865352 - Added join with fnd_documents and selected media_id from it
3166: --Bug #5232999 - Added file name as criterion so that we get only the PDF
3167: SELECT file_data into l_document
3168: FROM fnd_lobs fl,
3169: fnd_attached_documents fad,

Line 3170: fnd_documents fd,

3166: --Bug #5232999 - Added file name as criterion so that we get only the PDF
3167: SELECT file_data into l_document
3168: FROM fnd_lobs fl,
3169: fnd_attached_documents fad,
3170: fnd_documents fd,
3171: fnd_documents_tl fdl
3172: WHERE fad.pk1_value=to_char(l_document_id) and fad.pk2_value=to_char(l_revision_number)
3173: and fdl.document_id = fad.document_id and fdl.document_id = fd.document_id and fd.media_id = fl.file_id
3174: and fad.entity_name = l_entity_name and fdl.language=l_language

Line 3171: fnd_documents_tl fdl

3167: SELECT file_data into l_document
3168: FROM fnd_lobs fl,
3169: fnd_attached_documents fad,
3170: fnd_documents fd,
3171: fnd_documents_tl fdl
3172: WHERE fad.pk1_value=to_char(l_document_id) and fad.pk2_value=to_char(l_revision_number)
3173: and fdl.document_id = fad.document_id and fdl.document_id = fd.document_id and fd.media_id = fl.file_id
3174: and fad.entity_name = l_entity_name and fdl.language=l_language
3175: and fl.file_name = l_filename ;

Line 3262: --Bug #4865352 - Added join with fnd_documents and selected media_id from it

3258: l_filename := po_communication_pvt.getPDFFileName(l_document_type,'_TERMS_',l_org_id,l_document_id,l_revision_number,l_language);
3259: ELSE
3260: l_filename := po_communication_pvt.getPDFFileName(l_document_type,'_',l_org_id,l_document_id,l_revision_number,l_language);
3261: END IF;
3262: --Bug #4865352 - Added join with fnd_documents and selected media_id from it
3263: -- Bug 4047688
3264: -- Added join condition on file name of PDF
3265: IF l_withTerms='Y' AND l_document_type in ('PO','PA') THEN
3266: SELECT file_data into l_document

Line 3269: fnd_documents fd,

3265: IF l_withTerms='Y' AND l_document_type in ('PO','PA') THEN
3266: SELECT file_data into l_document
3267: FROM fnd_lobs fl,
3268: fnd_attached_documents fad,
3269: fnd_documents fd,
3270: fnd_documents_tl fdl
3271: WHERE fad.pk2_value=to_char(l_document_id) and fad.pk3_value=to_char(l_revision_number)
3272: and fdl.document_id = fad.document_id and fdl.document_id = fd.document_id and fd.media_id = fl.file_id
3273: and fad.entity_name = 'OKC_CONTRACT_DOCS' and fdl.language=l_language

Line 3270: fnd_documents_tl fdl

3266: SELECT file_data into l_document
3267: FROM fnd_lobs fl,
3268: fnd_attached_documents fad,
3269: fnd_documents fd,
3270: fnd_documents_tl fdl
3271: WHERE fad.pk2_value=to_char(l_document_id) and fad.pk3_value=to_char(l_revision_number)
3272: and fdl.document_id = fad.document_id and fdl.document_id = fd.document_id and fd.media_id = fl.file_id
3273: and fad.entity_name = 'OKC_CONTRACT_DOCS' and fdl.language=l_language
3274: and fl.file_name = l_filename; -- Bug 4047688

Line 3282: --Bug #4865352 - Added a join with fnd_documents

3278: l_entity_name :='PO_HEAD';
3279: ELSIF l_document_type = 'RELEASE' THEN
3280: l_entity_name :='PO_REL';
3281: END IF;
3282: --Bug #4865352 - Added a join with fnd_documents
3283: IF l_document_type in ('PO','PA','RELEASE') AND l_withTerms ='N' THEN
3284: SELECT file_data into l_document
3285: FROM fnd_lobs fl,
3286: fnd_attached_documents fad,

Line 3287: fnd_documents fd,

3283: IF l_document_type in ('PO','PA','RELEASE') AND l_withTerms ='N' THEN
3284: SELECT file_data into l_document
3285: FROM fnd_lobs fl,
3286: fnd_attached_documents fad,
3287: fnd_documents fd,
3288: fnd_documents_tl fdl
3289: WHERE fad.pk1_value=to_char(l_document_id) and fad.pk2_value=to_char(l_revision_number)
3290: and fdl.document_id = fad.document_id and fd.media_id = fl.file_id
3291: and fd.document_id = fdl.document_id

Line 3288: fnd_documents_tl fdl

3284: SELECT file_data into l_document
3285: FROM fnd_lobs fl,
3286: fnd_attached_documents fad,
3287: fnd_documents fd,
3288: fnd_documents_tl fdl
3289: WHERE fad.pk1_value=to_char(l_document_id) and fad.pk2_value=to_char(l_revision_number)
3290: and fdl.document_id = fad.document_id and fd.media_id = fl.file_id
3291: and fd.document_id = fdl.document_id
3292: and fad.entity_name = l_entity_name and fl.file_name = l_filename and fdl.language=l_language;

Line 3418: --Bug #4865352 - Replaced fnd_documents_tl with fnd_documents_vl

3414:
3415: IF l_document_type in ('PO','PA') THEN
3416:
3417: IF l_withTerms='Y' THEN
3418: --Bug #4865352 - Replaced fnd_documents_tl with fnd_documents_vl
3419: -- Bug 4047688
3420: -- Appended join condition on file name of document to prevent return of multiple rows
3421: SELECT file_data into l_document
3422: FROM fnd_lobs fl,

Line 3424: fnd_documents_vl fdl

3420: -- Appended join condition on file name of document to prevent return of multiple rows
3421: SELECT file_data into l_document
3422: FROM fnd_lobs fl,
3423: fnd_attached_documents fad,
3424: fnd_documents_vl fdl
3425: WHERE fad.pk2_value=to_char(l_document_id) and fad.pk3_value=to_char(l_revision_number)
3426: and fdl.document_id = fad.document_id and fdl.media_id = fl.file_id and fad.entity_name = 'OKC_CONTRACT_DOCS'
3427: and fl.file_name = l_filename; --Bug 4047688
3428:

Line 3445: --Bug #4865352 - Added a join with fnd_documents

3441:
3442:
3443: if l_document_type in ('PO','PA','RELEASE') and l_withTerms ='N' then
3444:
3445: --Bug #4865352 - Added a join with fnd_documents
3446: SELECT file_data into l_document
3447: FROM fnd_lobs fl,
3448: fnd_attached_documents fad,
3449: fnd_documents fd,

Line 3449: fnd_documents fd,

3445: --Bug #4865352 - Added a join with fnd_documents
3446: SELECT file_data into l_document
3447: FROM fnd_lobs fl,
3448: fnd_attached_documents fad,
3449: fnd_documents fd,
3450: fnd_documents_tl fdl
3451: WHERE fad.pk1_value=to_char(l_document_id) and fad.pk2_value=to_char(l_revision_number)
3452: and fdl.document_id = fad.document_id and fd.media_id = fl.file_id and fd.document_id = fdl.document_id
3453: and fad.entity_name = l_entity_name and fl.file_name = l_filename and fdl.language=l_language;

Line 3450: fnd_documents_tl fdl

3446: SELECT file_data into l_document
3447: FROM fnd_lobs fl,
3448: fnd_attached_documents fad,
3449: fnd_documents fd,
3450: fnd_documents_tl fdl
3451: WHERE fad.pk1_value=to_char(l_document_id) and fad.pk2_value=to_char(l_revision_number)
3452: and fdl.document_id = fad.document_id and fd.media_id = fl.file_id and fd.document_id = fdl.document_id
3453: and fad.entity_name = l_entity_name and fl.file_name = l_filename and fdl.language=l_language;
3454:

Line 3745: --Bug #4865352 - Added a join with fnd_documents and selected media_id from it

3741: raise;
3742: End;
3743:
3744: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Query the Zip blob';
3745: --Bug #4865352 - Added a join with fnd_documents and selected media_id from it
3746: Begin
3747: SELECT fl.file_data,fl.file_content_type
3748: INTO l_document,l_filecontent_type
3749: FROM fnd_lobs fl,

Line 3751: fnd_documents fd,

3747: SELECT fl.file_data,fl.file_content_type
3748: INTO l_document,l_filecontent_type
3749: FROM fnd_lobs fl,
3750: fnd_attached_documents fad,
3751: fnd_documents fd,
3752: fnd_documents_tl fdl
3753: WHERE fad.pk1_value=to_char(l_document_id)
3754: and fad.pk2_value=to_char(l_revision_number)
3755: and fad.entity_name = l_entity_name

Line 3752: fnd_documents_tl fdl

3748: INTO l_document,l_filecontent_type
3749: FROM fnd_lobs fl,
3750: fnd_attached_documents fad,
3751: fnd_documents fd,
3752: fnd_documents_tl fdl
3753: WHERE fad.pk1_value=to_char(l_document_id)
3754: and fad.pk2_value=to_char(l_revision_number)
3755: and fad.entity_name = l_entity_name
3756: and fdl.document_id = fad.document_id

Line 3974: from fnd_documents d,

3970: select 'Y' into l_attachments_exist from dual
3971: where exists
3972: (
3973: select fl.file_name
3974: from fnd_documents d,
3975: fnd_attached_documents ad,
3976: fnd_doc_category_usages dcu,
3977: fnd_attachment_functions af,
3978: fnd_lobs fl

Line 4027: from fnd_documents d,

4023: select 'Y' into l_attachments_exist from dual
4024: where exists
4025: (
4026: select fl.file_name
4027: from fnd_documents d,
4028: fnd_attached_documents ad,
4029: fnd_doc_category_usages dcu,
4030: fnd_attachment_functions af,
4031: fnd_lobs fl

Line 4489: fnd_documents_short_text fds

4485: --bug6133951 added seq_num in order_by clause.
4486: l_head_short_attachment_query := 'CURSOR( SELECT fds.short_text
4487: FROM
4488: fnd_attached_docs_form_vl fad,
4489: fnd_documents_short_text fds
4490: WHERE ((entity_name=''PO_HEADERS'' AND
4491: pk1_value=to_char(phx.po_header_id))OR
4492: (entity_name = ''PO_RELEASES'' AND
4493: pk1_value = to_char(phx.po_release_id)) OR

Line 4536: fnd_documents_short_text fds

4532: --bug6133951 added seq_num in order_by clause.
4533: l_head_short_attachment_query := 'CURSOR( SELECT fds.short_text
4534: FROM
4535: fnd_attached_docs_form_vl fad,
4536: fnd_documents_short_text fds
4537: WHERE ((entity_name = ''PO_HEADERS'' AND
4538: pk1_value = to_char(phx.po_header_id)) OR
4539: (entity_name = ''PO_VENDORS'' AND
4540: pk1_value = to_char(phx.vendor_id)) OR

Line 4588: fnd_documents_short_text fds

4584: --Bug 4673653 - Added condition to show item level short text attachments
4585: l_line_short_attachment_query := ' CURSOR( SELECT plx.po_line_id , fds.short_text
4586: FROM
4587: fnd_attached_docs_form_vl fad,
4588: fnd_documents_short_text fds
4589: WHERE ((fad.entity_name=''PO_LINES'' AND fad.pk1_value=to_char(plx.po_line_id))
4590: OR
4591: (fad.entity_name=''MTL_SYSTEM_ITEMS'' AND
4592: fad.pk1_value=to_char(PO_COMMUNICATION_PVT.getInventoryOrgId()) AND --Bug6139548

Line 4652: fnd_documents_short_text fds

4648: --short_text attachment for the current document only
4649: l_shipment_short_attach_query := 'CURSOR( SELECT pllx.line_location_id, fds.short_text
4650: FROM
4651: fnd_attached_docs_form_vl fad,
4652: fnd_documents_short_text fds
4653: WHERE entity_name = ''PO_SHIPMENTS'' AND
4654: pk1_value = to_char(pllx.line_location_id) AND
4655: function_name = ''PO_PRINTPO''
4656: AND fad.media_id = fds.media_id

Line 5303: fnd_documents_long_text fdl

5299:
5300: l_headerAttachmentsQuery := 'select PO_COMMUNICATION_PVT.get_clob(fdl.rowid) long_text
5301: FROM
5302: fnd_attached_docs_form_vl fad,
5303: fnd_documents_long_text fdl
5304: WHERE ( (entity_name=''PO_RELEASES'' AND
5305: pk1_value= to_char(PO_COMMUNICATION_PVT.getDocumentId()) ) OR
5306: (entity_name = ''PO_HEADERS'' AND
5307: pk1_value = to_char(PO_COMMUNICATION_PVT.getReleaseHeaderId())) OR --Bug6139548

Line 5327: fnd_documents_long_text fdl

5323:
5324: l_headerAttachmentsQuery := 'select PO_COMMUNICATION_PVT.get_clob(fdl.rowid) long_text
5325: FROM
5326: fnd_attached_docs_form_vl fad,
5327: fnd_documents_long_text fdl
5328: WHERE ((entity_name = ''PO_HEADERS'' AND
5329: pk1_value = to_char(PO_COMMUNICATION_PVT.getReleaseHeaderId())) OR --Bug6139548
5330: (entity_name = ''PO_VENDORS'' AND
5331: pk1_value = to_char(PO_COMMUNICATION_PVT.getVendorId()))) AND

Line 5352: fnd_documents_long_text fds,

5348:
5349: l_lineAttachQuery :='SELECT PO_COMMUNICATION_PVT.get_clob(fds.rowid) text, plx.po_line_id id
5350: FROM
5351: fnd_attached_docs_form_vl fad,
5352: fnd_documents_long_text fds,
5353: po_lines_all plx
5354: WHERE ((fad.entity_name=''PO_LINES'' AND fad.pk1_value=to_char(plx.po_line_id))
5355: OR
5356: (fad.entity_name=''MTL_SYSTEM_ITEMS'' AND

Line 5381: fnd_documents_long_text fds,

5377: as this text is already printed as shipto Location */
5378: l_shipmentAttachmentQuery:= 'SELECT PO_COMMUNICATION_PVT.get_clob(fds.rowid) long_text, pllx.LINE_LOCATION_ID
5379: FROM
5380: fnd_attached_docs_form_vl fad,
5381: fnd_documents_long_text fds,
5382: po_line_locations_all pllx
5383: WHERE entity_name = ''PO_SHIPMENTS'' AND
5384: pk1_value = to_char(pllx.LINE_LOCATION_ID) AND
5385: function_name = ''PO_PRINTPO''

Line 7213: fnd_documents_long_text fds

7209: BEGIN
7210: SELECT fds.long_text INTO
7211: l_long
7212: FROM
7213: fnd_documents_long_text fds
7214: WHERE fds.ROWID= p_row_id;
7215:
7216: l_clob := l_long;
7217:

Line 7258: fnd_documents_long_text fds

7254: INTO
7255: l_one_time_address_details
7256: FROM
7257: fnd_attached_docs_form_vl fad,
7258: fnd_documents_long_text fds
7259: WHERE entity_name = 'PO_SHIPMENTS' AND
7260: pk1_value = To_Char(p_line_location_id) AND
7261: function_name = 'PO_PRINTPO'
7262: AND fad.media_id = fds.media_id