DBA Data[Home] [Help]

APPS.PO_COMMUNICATION_PVT dependencies on PO_COMMUNICATION_PVT

Line 1: PACKAGE BODY PO_COMMUNICATION_PVT AS

1: PACKAGE BODY PO_COMMUNICATION_PVT AS
2: /* $Header: POXVCOMB.pls 120.107.12020000.8 2013/03/22 10:42:14 inagdeo ship $ */
3:
4: -- Read the profile option that enables/disables the debug log
5: g_po_wf_debug VARCHAR2(1) := NVL(FND_PROFILE.VALUE('PO_SET_DEBUG_WORKFLOW_ON'), 'N');

Line 6: G_PKG_NAME CONSTANT VARCHAR2(30) := 'PO_COMMUNICATION_PVT';

2: /* $Header: POXVCOMB.pls 120.107.12020000.8 2013/03/22 10:42:14 inagdeo ship $ */
3:
4: -- Read the profile option that enables/disables the debug log
5: g_po_wf_debug VARCHAR2(1) := NVL(FND_PROFILE.VALUE('PO_SET_DEBUG_WORKFLOW_ON'), 'N');
6: G_PKG_NAME CONSTANT VARCHAR2(30) := 'PO_COMMUNICATION_PVT';
7: g_log_head CONSTANT VARCHAR2(30) := 'po.plsql.PO_COMMUNICATION_PVT.';
8: g_ship_cont_phone VARCHAR2(200);
9: g_ship_cont_email VARCHAR2(2000);
10: g_deliver_cont_phone VARCHAR2(200);

Line 7: g_log_head CONSTANT VARCHAR2(30) := 'po.plsql.PO_COMMUNICATION_PVT.';

3:
4: -- Read the profile option that enables/disables the debug log
5: g_po_wf_debug VARCHAR2(1) := NVL(FND_PROFILE.VALUE('PO_SET_DEBUG_WORKFLOW_ON'), 'N');
6: G_PKG_NAME CONSTANT VARCHAR2(30) := 'PO_COMMUNICATION_PVT';
7: g_log_head CONSTANT VARCHAR2(30) := 'po.plsql.PO_COMMUNICATION_PVT.';
8: g_ship_cont_phone VARCHAR2(200);
9: g_ship_cont_email VARCHAR2(2000);
10: g_deliver_cont_phone VARCHAR2(200);
11: g_deliver_cont_email VARCHAR2(2000);

Line 165: | PL/SQL body for package: PO_COMMUNICATION_PVT

161: | FILENAME
162: | POXVCOMB.pls
163: |
164: | DESCRIPTION
165: | PL/SQL body for package: PO_COMMUNICATION_PVT
166: |
167: | NOTES VSANJAY Created 08/07/2003
168: | MODIFIED (MM/DD/YY)
169: | VSANJAY 08/07/2003

Line 206: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF';

202: /*End Changes by Akyanama Bug # 12969112*/
203:
204: BEGIN
205:
206: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF';
207:
208: IF (g_po_wf_debug = 'Y') THEN
209: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY, x_progress);
210: END IF;

Line 265: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF : in exception handler';

261: FROM fnd_languages
262: WHERE language_code = l_language_code;
263: EXCEPTION
264: WHEN NO_DATA_FOUND THEN
265: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF : in exception handler';
266: IF (g_po_wf_debug = 'Y') THEN
267: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,x_progress);
268: END IF;
269: END;

Line 272: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF :launching the java concurrent program ';

268: END IF;
269: END;
270: --
271:
272: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF :launching the java concurrent program ';
273:
274: IF (g_po_wf_debug = 'Y') THEN
275: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY, x_progress);
276: END IF;

Line 356: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF : Request id is '|| l_request_id;

352: itemkey => itemkey,
353: aname => 'REQUEST_ID',
354: avalue => l_request_id);
355:
356: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF : Request id is '|| l_request_id;
357:
358: IF (g_po_wf_debug = 'Y') THEN
359: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY, x_progress);
360: END IF;

Line 368: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF : Exception submitting concurrent request';

364:
365: EXCEPTION
366: /*Begin Changes by Akyanama Bug # 12969112*//*Throwing Submission error*/
367: WHEN submission_error THEN
368: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF : Exception submitting concurrent request';
369: IF (g_po_wf_debug = 'Y') THEN
370: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
371: x_progress := fnd_message.get;
372: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);

Line 374: wf_core.context('PO_COMMUNICATION_PVT', 'GENERATE_PDF', itemtype, itemkey, 'PO', x_progress);

370: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
371: x_progress := fnd_message.get;
372: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
373: END IF;
374: wf_core.context('PO_COMMUNICATION_PVT', 'GENERATE_PDF', itemtype, itemkey, 'PO', x_progress);
375: RAISE;
376:
377: /*End Changes by Akyanama Bug # 12969112*/
378: WHEN OTHERS THEN

Line 379: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF : In Exception handler';

375: RAISE;
376:
377: /*End Changes by Akyanama Bug # 12969112*/
378: WHEN OTHERS THEN
379: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF : In Exception handler';
380: IF (g_po_wf_debug = 'Y') THEN
381: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
382: END IF;
383: wf_core.context('PO_COMMUNICATION_PVT', 'GENERATE_PDF', x_progress);

Line 383: wf_core.context('PO_COMMUNICATION_PVT', 'GENERATE_PDF', x_progress);

379: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF : In Exception handler';
380: IF (g_po_wf_debug = 'Y') THEN
381: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
382: END IF;
383: wf_core.context('PO_COMMUNICATION_PVT', 'GENERATE_PDF', x_progress);
384: RAISE;
385:
386: END GENERATE_PDF;
387:

Line 398: x_progress := 'PO_COMMUNICATION_PVT.PO_NEW_COMMUNICATION';

394: l_document_subtype po_headers.type_lookup_code%TYPE;
395: l_document_type po_headers.type_lookup_code%TYPE;
396:
397: Begin
398: x_progress := 'PO_COMMUNICATION_PVT.PO_NEW_COMMUNICATION';
399:
400: IF (g_po_wf_debug = 'Y') THEN
401: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
402: END IF;

Line 425: x_progress := 'PO_COMMUNICATION_PVT.PO_NEW_COMMUNICATION: Verify whether XDO Product is installed or not';

421: l_document_subtype := PO_WF_UTIL_PKG.GetItemAttrText (itemtype => itemtype,
422: itemkey => itemkey,
423: aname => 'DOCUMENT_SUBTYPE');
424:
425: x_progress := 'PO_COMMUNICATION_PVT.PO_NEW_COMMUNICATION: Verify whether XDO Product is installed or not';
426:
427: IF (g_po_wf_debug = 'Y') THEN
428: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
429: END IF;

Line 447: x_progress := 'PO_COMMUNICATION_PVT.PO_NEW_COMMUNICATION: In Exception handler';

443:
444: EXCEPTION
445:
446: WHEN OTHERS THEN
447: x_progress := 'PO_COMMUNICATION_PVT.PO_NEW_COMMUNICATION: In Exception handler';
448: IF (g_po_wf_debug = 'Y') THEN
449: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
450: END IF;
451: wf_core.context('PO_COMMUNICATION_PVT', 'PO_NEW_COMMUNICATION', x_progress);

Line 451: wf_core.context('PO_COMMUNICATION_PVT', 'PO_NEW_COMMUNICATION', x_progress);

447: x_progress := 'PO_COMMUNICATION_PVT.PO_NEW_COMMUNICATION: In Exception handler';
448: IF (g_po_wf_debug = 'Y') THEN
449: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
450: END IF;
451: wf_core.context('PO_COMMUNICATION_PVT', 'PO_NEW_COMMUNICATION', x_progress);
452: raise;
453:
454: END PO_NEW_COMMUNICATION;
455:

Line 473: x_progress := 'PO_COMMUNICATION_PVT.DELETE_PDF_ATTACHMENTS';

469: x_progress varchar2(100);
470: l_document_type po_headers.type_lookup_code%TYPE;
471:
472: Begin
473: x_progress := 'PO_COMMUNICATION_PVT.DELETE_PDF_ATTACHMENTS';
474:
475: IF (g_po_wf_debug = 'Y') THEN
476: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
477: END IF;

Line 524: x_progress := 'PO_COMMUNICATION_PVT.DELETE_PDF_ATTACHMENTS :Calling the Delete attachments procedure';

520: ELSIF l_document_type = 'RELEASE' and l_document_subtype = 'BLANKET' THEN
521: l_entity_name := 'PO_REL';
522: END IF;
523:
524: x_progress := 'PO_COMMUNICATION_PVT.DELETE_PDF_ATTACHMENTS :Calling the Delete attachments procedure';
525:
526: IF (g_po_wf_debug = 'Y') THEN
527: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
528: END IF;

Line 550: x_progress := 'PO_COMMUNICATION_PVT.DELETE_PDF_ATTACHMENTS:In Exception handler';

546:
547: EXCEPTION
548:
549: WHEN OTHERS THEN
550: x_progress := 'PO_COMMUNICATION_PVT.DELETE_PDF_ATTACHMENTS:In Exception handler';
551: IF (g_po_wf_debug = 'Y') THEN
552: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
553: END IF;
554: wf_core.context('PO_COMMUNICATION_PVT', 'DELETE_PDF_ATTACHMENTS', x_progress);

Line 554: wf_core.context('PO_COMMUNICATION_PVT', 'DELETE_PDF_ATTACHMENTS', x_progress);

550: x_progress := 'PO_COMMUNICATION_PVT.DELETE_PDF_ATTACHMENTS:In Exception handler';
551: IF (g_po_wf_debug = 'Y') THEN
552: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
553: END IF;
554: wf_core.context('PO_COMMUNICATION_PVT', 'DELETE_PDF_ATTACHMENTS', x_progress);
555: raise;
556:
557:
558: END DELETE_PDF_ATTACHMENTS;

Line 580: x_progress := 'PO_COMMUNICATION_PVT.PO_PDF_EXISTS';

576: l_with_terms PO_HEADERS_ALL.CONTERMS_EXIST_FLAG%TYPE;
577: l_terms varchar2(10);
578:
579: Begin
580: x_progress := 'PO_COMMUNICATION_PVT.PO_PDF_EXISTS';
581:
582: IF (g_po_wf_debug = 'Y') THEN
583: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
584: END IF;

Line 625: l_filename := po_communication_pvt.getPDFFileName(l_document_type, l_terms, l_orgid, l_document_id, l_revision_num, l_language_code);

621:
622: --frame the file name based on po_has_terms_conditions (eg POTERMS_204_1234_1_US.pdf, PO_204_1234_1_US.pdf)
623:
624: --bug#3463617:
625: l_filename := po_communication_pvt.getPDFFileName(l_document_type, l_terms, l_orgid, l_document_id, l_revision_num, l_language_code);
626:
627: x_progress := 'PO_COMMUNICATION_PVT.PO_PDF_EXISTS: Verify whether the pdf exists for the document';
628:
629: IF (g_po_wf_debug = 'Y') THEN

Line 627: x_progress := 'PO_COMMUNICATION_PVT.PO_PDF_EXISTS: Verify whether the pdf exists for the document';

623:
624: --bug#3463617:
625: l_filename := po_communication_pvt.getPDFFileName(l_document_type, l_terms, l_orgid, l_document_id, l_revision_num, l_language_code);
626:
627: x_progress := 'PO_COMMUNICATION_PVT.PO_PDF_EXISTS: Verify whether the pdf exists for the document';
628:
629: IF (g_po_wf_debug = 'Y') THEN
630: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
631: END IF;

Line 637: x_progress := 'PO_COMMUNICATION_PVT.PO_PDF_EXISTS:Searching in the Contracts Repository';

633: BEGIN
634:
635: IF l_with_terms = 'Y' THEN
636: --search in contracts repository
637: x_progress := 'PO_COMMUNICATION_PVT.PO_PDF_EXISTS:Searching in the Contracts Repository';
638:
639: IF (g_po_wf_debug = 'Y') THEN
640: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
641: END IF;

Line 653: x_progress := 'PO_COMMUNICATION_PVT.PO_PDF_EXISTS: Searching in the PO Repository';

649: fl.file_name = l_filename and
650: fad.entity_name in ('PO_HEAD', 'PO_REL');
651: ELSE
652: --search in PO repository
653: x_progress := 'PO_COMMUNICATION_PVT.PO_PDF_EXISTS: Searching in the PO Repository';
654:
655: IF (g_po_wf_debug = 'Y') THEN
656: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
657: END IF;

Line 689: x_progress := 'PO_COMMUNICATION_PVT.PO_PDF_EXISTS: In Exception handler';

685: End if;
686:
687: EXCEPTION
688: When others then
689: x_progress := 'PO_COMMUNICATION_PVT.PO_PDF_EXISTS: In Exception handler';
690: IF (g_po_wf_debug = 'Y') THEN
691: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
692: END IF;
693: wf_core.context('PO_COMMUNICATION_PVT', 'PO_PDF_EXISTS', x_progress);

Line 693: wf_core.context('PO_COMMUNICATION_PVT', 'PO_PDF_EXISTS', x_progress);

689: x_progress := 'PO_COMMUNICATION_PVT.PO_PDF_EXISTS: In Exception handler';
690: IF (g_po_wf_debug = 'Y') THEN
691: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
692: END IF;
693: wf_core.context('PO_COMMUNICATION_PVT', 'PO_PDF_EXISTS', x_progress);
694: resultout := wf_engine.eng_completed || ':' || 'N';
695: raise;
696:
697: END PO_PDF_EXISTS;

Line 756: l_progress := 'PO_COMMUNICATION_PVT.Start_Email_WF_Process: at beginning of Start_Email_WF_Process';

752:
753: l_itemtype := 'POAPPRV';
754:
755:
756: l_progress := 'PO_COMMUNICATION_PVT.Start_Email_WF_Process: at beginning of Start_Email_WF_Process';
757:
758: IF (g_po_wf_debug = 'Y') THEN
759: PO_WF_DEBUG_PKG.insert_debug (l_itemtype, l_itemkey, l_progress);
760: END IF;

Line 893: l_progress := 'PO_COMMUNICATION_PVT.Start_Email_WF_Process: Get the Supplier site language';

889: aname => 'DOCUMENT_DISPLAY_NAME',
890: avalue => l_doc_display_name );
891: -- Bug # 3290385 End
892:
893: l_progress := 'PO_COMMUNICATION_PVT.Start_Email_WF_Process: Get the Supplier site language';
894:
895: IF (g_po_wf_debug = 'Y') THEN
896: PO_WF_DEBUG_PKG.insert_debug (l_itemtype, l_itemkey, l_progress);
897: END IF;

Line 932: l_progress := 'PO_COMMUNICATION_PVT.Start_Email_WF_Process: Verify whether the role exists in wf_users';

928: l_po_email_performer := p_email_address || '.' || l_adhocuser_lang;
929: l_po_email_performer := upper(l_po_email_performer);
930: l_display_name := p_email_address; -- Bug # 3290385
931:
932: l_progress := 'PO_COMMUNICATION_PVT.Start_Email_WF_Process: Verify whether the role exists in wf_users';
933:
934: IF (g_po_wf_debug = 'Y') THEN
935: PO_WF_DEBUG_PKG.insert_debug (l_itemtype, l_itemkey, l_progress);
936: END IF;

Line 961: avalue => 'PLSQLBLOB:PO_COMMUNICATION_PVT.PDF_ATTACH_SUPP/' || l_itemtype || ':' || l_itemkey);

957: avalue => l_po_email_performer);
958: PO_WF_UTIL_PKG.SetItemAttrText (itemtype => l_itemtype,
959: itemkey => l_itemkey,
960: aname => 'PDF_ATTACHMENT',
961: avalue => 'PLSQLBLOB:PO_COMMUNICATION_PVT.PDF_ATTACH_SUPP/' || l_itemtype || ':' || l_itemkey);
962:
963: --Bug6998166, to increase print_count
964: PO_REQAPPROVAL_INIT1.update_print_count(p_document_id, p_document_type);
965:

Line 983: avalue => 'PLSQLBLOB:PO_COMMUNICATION_PVT.OKC_DOC_ATTACH/' ||

979: PO_WF_UTIL_PKG.SetItemAttrText
980: (itemtype => l_itemtype,
981: itemkey => l_itemkey,
982: aname => 'OKC_DOC_ATTACHMENT',
983: avalue => 'PLSQLBLOB:PO_COMMUNICATION_PVT.OKC_DOC_ATTACH/' ||
984: l_itemtype || ':' || l_itemkey);
985: END IF; -- not structured and not mergeable
986:
987: END IF; --IF (p_with_terms = 'Y')

Line 1002: l_progress := 'PO_COMMUNICATION_PVT.Start_Email_WF_Process : Exception in getZIPFileName';

998: --Bug# 5240634 Pass in the org_id to getZIPFileName
999: l_filename := getZIPFileName(l_orgid);
1000:
1001: Exception When others Then
1002: l_progress := 'PO_COMMUNICATION_PVT.Start_Email_WF_Process : Exception in getZIPFileName';
1003: raise;
1004: End;
1005:
1006: l_progress := 'PO_COMMUNICATION_PVT.Start_Email_WF_Process : Query the Zip blob';

Line 1006: l_progress := 'PO_COMMUNICATION_PVT.Start_Email_WF_Process : Query the Zip blob';

1002: l_progress := 'PO_COMMUNICATION_PVT.Start_Email_WF_Process : Exception in getZIPFileName';
1003: raise;
1004: End;
1005:
1006: l_progress := 'PO_COMMUNICATION_PVT.Start_Email_WF_Process : Query the Zip blob';
1007: --Bug #4865352 - Added a join with fnd_documents and selected media_id from it
1008:
1009:
1010: IF p_document_type in ('PO', 'PA') THEN

Line 1033: l_progress := 'PO_COMMUNICATION_PVT.Start_Email_WF_Process : error';

1029: and fd.media_id = fl.file_id
1030: and fl.file_name = l_filename;
1031: Exception
1032: When others Then
1033: l_progress := 'PO_COMMUNICATION_PVT.Start_Email_WF_Process : error';
1034: raise;
1035: End;
1036:
1037: IF l_zip_exists > 0 THEN

Line 1042: avalue => 'PLSQLBLOB:PO_COMMUNICATION_PVT.ZIP_ATTACH/' || l_itemtype || ':' || l_itemkey);

1038: -- bug 16475213 end
1039: PO_WF_UTIL_PKG.SetItemAttrText (itemtype => l_itemtype,
1040: itemkey => l_itemkey,
1041: aname => 'ZIP_ATTACHMENT',
1042: avalue => 'PLSQLBLOB:PO_COMMUNICATION_PVT.ZIP_ATTACH/' || l_itemtype || ':' || l_itemkey);
1043: END IF;
1044: END IF;
1045:
1046: l_progress := 'PO_COMMUNICATION_PVT.Start_Email_WF_Process:Start the workflow process';

Line 1046: l_progress := 'PO_COMMUNICATION_PVT.Start_Email_WF_Process:Start the workflow process';

1042: avalue => 'PLSQLBLOB:PO_COMMUNICATION_PVT.ZIP_ATTACH/' || l_itemtype || ':' || l_itemkey);
1043: END IF;
1044: END IF;
1045:
1046: l_progress := 'PO_COMMUNICATION_PVT.Start_Email_WF_Process:Start the workflow process';
1047:
1048: IF (g_po_wf_debug = 'Y') THEN
1049: PO_WF_DEBUG_PKG.insert_debug (l_itemtype, l_itemkey, l_progress);
1050: END IF;

Line 1058: l_progress := 'PO_COMMUNICATION_PVT.Start_WF_Process_Email: In Exception handler';

1054:
1055: EXCEPTION
1056: WHEN OTHERS THEN
1057:
1058: l_progress := 'PO_COMMUNICATION_PVT.Start_WF_Process_Email: In Exception handler';
1059:
1060: IF (g_po_wf_debug = 'Y') THEN
1061: PO_WF_DEBUG_PKG.insert_debug(l_itemtype, l_itemkey, l_progress);
1062: END IF;

Line 1100: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP_TC';

1096: /*Begin Changes by Akyanama Bug # 12969112*//*Declaring Exception*/
1097: submission_error exception;
1098: /*End Changes by Akyanama Bug # 12969112*/
1099: begin
1100: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP_TC';
1101:
1102: IF (g_po_wf_debug = 'Y') THEN
1103: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY, x_progress);
1104: END IF;

Line 1168: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP_TC -001: in exception handler';

1164: AND ph.vendor_site_id = pv.vendor_site_id;
1165:
1166: EXCEPTION
1167: WHEN NO_DATA_FOUND THEN
1168: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP_TC -001: in exception handler';
1169: IF (g_po_wf_debug = 'Y') THEN
1170: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,x_progress);
1171: END IF;
1172: END;

Line 1175: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP_TC :launching the Dispatch Purchase Order concurrent program ';

1171: END IF;
1172: END;
1173:
1174:
1175: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP_TC :launching the Dispatch Purchase Order concurrent program ';
1176:
1177: IF (g_po_wf_debug = 'Y') THEN
1178: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY, x_progress);
1179: END IF;

Line 1194: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP_TC -002: in exception handler';

1190: WHERE language_code = l_language_code;
1191:
1192: EXCEPTION
1193: WHEN NO_DATA_FOUND THEN
1194: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP_TC -002: in exception handler';
1195: IF (g_po_wf_debug = 'Y') THEN
1196: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,x_progress);
1197: END IF;
1198: END;

Line 1212: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP_TC -003: in exception handler';

1208: WHERE nls_language = l_supp_lang;
1209:
1210: EXCEPTION
1211: WHEN NO_DATA_FOUND THEN
1212: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP_TC -003: in exception handler';
1213: IF (g_po_wf_debug = 'Y') THEN
1214: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,x_progress);
1215: END IF;
1216: END;

Line 1286: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP_TC : Request id is - '|| l_request_id;

1282: aname => 'REQUEST_ID',
1283: avalue => l_request_id);
1284: -- End Bug 7299381
1285:
1286: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP_TC : Request id is - '|| l_request_id;
1287:
1288: IF (g_po_wf_debug = 'Y') THEN
1289: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY, x_progress);
1290: END IF;

Line 1299: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF : Exception submitting concurrent request';

1295:
1296: EXCEPTION
1297: /*Begin Changes by Akyanama Bug # 12969112*//*Throwing Submission error*/
1298: WHEN submission_error THEN
1299: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF : Exception submitting concurrent request';
1300: IF (g_po_wf_debug = 'Y') THEN
1301: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
1302: x_progress := fnd_message.get;
1303: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);

Line 1305: wf_core.context('PO_COMMUNICATION_PVT', 'GENERATE_PDF', itemtype, itemkey, 'PO', x_progress);

1301: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
1302: x_progress := fnd_message.get;
1303: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
1304: END IF;
1305: wf_core.context('PO_COMMUNICATION_PVT', 'GENERATE_PDF', itemtype, itemkey, 'PO', x_progress);
1306: RAISE;
1307: /*End Changes by Akyanama Bug # 12969112*/
1308: WHEN OTHERS THEN
1309: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP_TC: In Exception handler';

Line 1309: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP_TC: In Exception handler';

1305: wf_core.context('PO_COMMUNICATION_PVT', 'GENERATE_PDF', itemtype, itemkey, 'PO', x_progress);
1306: RAISE;
1307: /*End Changes by Akyanama Bug # 12969112*/
1308: WHEN OTHERS THEN
1309: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP_TC: In Exception handler';
1310:
1311: IF (g_po_wf_debug = 'Y') THEN
1312: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
1313: END IF;

Line 1314: wf_core.context('PO_COMMUNICATION_PVT', 'GENERATE_PDF_SUPP_TC', x_progress);

1310:
1311: IF (g_po_wf_debug = 'Y') THEN
1312: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
1313: END IF;
1314: wf_core.context('PO_COMMUNICATION_PVT', 'GENERATE_PDF_SUPP_TC', x_progress);
1315: raise;
1316:
1317: END GENERATE_PDF_SUPP_TC;
1318: --

Line 1395: and to_char(PO_COMMUNICATION_PVT.getInventoryOrgId()) = ad.pk1_value --Bug 4673653 Use Inventory OrgId

1391: ) and ad.entity_name = 'PO_SHIPMENTS')
1392: OR
1393: (ad.pk2_value in (select item_id from po_lines_all
1394: where po_header_id = l_po_header_id
1395: and to_char(PO_COMMUNICATION_PVT.getInventoryOrgId()) = ad.pk1_value --Bug 4673653 Use Inventory OrgId
1396: and item_id is not null
1397: ) and ad.entity_name = 'MTL_SYSTEM_ITEMS')
1398: )
1399: and d.document_id = ad.document_id

Line 1445: and to_char(PO_COMMUNICATION_PVT.getInventoryOrgId()) = ad.pk1_value --Bug 4673653 Use Inventory OrgId

1441: from po_lines_all pl, po_line_locations_all pll
1442: where pll.po_release_id = l_po_release_id
1443: and pll.shipment_type = 'BLANKET'
1444: and pll.po_line_id = pl.po_line_id
1445: and to_char(PO_COMMUNICATION_PVT.getInventoryOrgId()) = ad.pk1_value --Bug 4673653 Use Inventory OrgId
1446: and pl.item_id is not null
1447: ) AND ad.entity_name = 'MTL_SYSTEM_ITEMS')
1448: )
1449: and d.document_id = ad.document_id

Line 1461: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer ';

1457: order by fl.file_name;
1458: --
1459:
1460: begin
1461: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer ';
1462:
1463: IF (g_po_wf_debug = 'Y') THEN
1464: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY, l_progress);
1465: END IF;

Line 1518: l_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_BUYER : in exception handler';

1514: FROM fnd_languages
1515: WHERE language_code = l_language_code;
1516: EXCEPTION
1517: WHEN NO_DATA_FOUND THEN
1518: l_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_BUYER : in exception handler';
1519: IF (g_po_wf_debug = 'Y') THEN
1520: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,l_progress);
1521: END IF;
1522: END;

Line 1552: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer :Launching the Dispatch Purchase Order program ';

1548: l_withterms :='N';
1549: END IF;
1550: */ --End Bug6841986/6528046
1551:
1552: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer :Launching the Dispatch Purchase Order program ';
1553:
1554: IF (g_po_wf_debug = 'Y') THEN
1555: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY, l_progress);
1556: END IF;

Line 1577: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer: Get max zip attachment size ';

1573: -- that Zip file is not generated.
1574: Begin
1575: -- Get the 'Maximum Attachment Size' value from Purchasing Options
1576: -- A value of 0 means Zip Attachments are not supported
1577: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer: Get max zip attachment size ';
1578: l_max_attachment_size := get_max_zip_size(itemtype, itemkey);
1579:
1580: IF l_max_attachment_size > 0 THEN
1581: -- If PO has no 'To Supplier' file attachments then 'Zip Attachment' link

Line 1584: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer: Checking for supplier file attachments';

1580: IF l_max_attachment_size > 0 THEN
1581: -- If PO has no 'To Supplier' file attachments then 'Zip Attachment' link
1582: -- should not show up in the notifications and Zip file should not be generated
1583: l_attachments_exist := 'N';
1584: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer: Checking for supplier file attachments';
1585: Begin
1586: l_attachments_exist := check_for_attachments(p_document_type => l_document_type,
1587: p_document_id => l_document_id);
1588: Exception when no_data_found then

Line 1589: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer: No supplier file attachments exist for this document';

1585: Begin
1586: l_attachments_exist := check_for_attachments(p_document_type => l_document_type,
1587: p_document_id => l_document_id);
1588: Exception when no_data_found then
1589: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer: No supplier file attachments exist for this document';
1590: IF (g_po_wf_debug = 'Y') THEN
1591: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY, l_progress);
1592: END IF;
1593: l_max_attachment_size := 0; -- No need to generate zip file if no 'To Supplier' file attachments exist

Line 1597: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer: Setting workflow attribute to display Zip Attachment';

1593: l_max_attachment_size := 0; -- No need to generate zip file if no 'To Supplier' file attachments exist
1594: End;
1595:
1596: IF l_attachments_exist = 'Y' THEN
1597: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer: Setting workflow attribute to display Zip Attachment';
1598: PO_WF_UTIL_PKG.SetItemAttrText (itemtype => itemtype,
1599: itemkey => itemkey,
1600: aname => 'ZIP_ATTACHMENT',
1601: avalue => 'PLSQLBLOB:PO_COMMUNICATION_PVT.ZIP_ATTACH/' || itemtype || ':' || itemkey);

Line 1601: avalue => 'PLSQLBLOB:PO_COMMUNICATION_PVT.ZIP_ATTACH/' || itemtype || ':' || itemkey);

1597: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer: Setting workflow attribute to display Zip Attachment';
1598: PO_WF_UTIL_PKG.SetItemAttrText (itemtype => itemtype,
1599: itemkey => itemkey,
1600: aname => 'ZIP_ATTACHMENT',
1601: avalue => 'PLSQLBLOB:PO_COMMUNICATION_PVT.ZIP_ATTACH/' || itemtype || ':' || itemkey);
1602:
1603:
1604: -- An error condition is when two or more file attachments have the same file name
1605: -- but different file sizes. In this case a zip error notification should be sent

Line 1614: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer : Check for duplicate filenames';

1610: -- Case 1 would be most common and is given highest priority in terms of performance.
1611: -- So a separate query for finding duplicate file names is written. If no duplicate
1612: -- file names then cursors for checking the error condition are not opened.
1613:
1614: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer : Check for duplicate filenames';
1615: l_duplicate_filenames := 'N';
1616:
1617:
1618: IF (l_document_subtype = 'RELEASE') THEN

Line 1659: and to_char(PO_COMMUNICATION_PVT.getInventoryOrgId()) = ad.pk1_value --Bug 4673653 Use Inventory OrgId

1655: from po_lines_all pl, po_line_locations_all pll
1656: where pll.po_release_id = l_document_id
1657: and pll.shipment_type = 'BLANKET'
1658: and pll.po_line_id = pl.po_line_id
1659: and to_char(PO_COMMUNICATION_PVT.getInventoryOrgId()) = ad.pk1_value --Bug 4673653 Use Inventory OrgId
1660: and pl.item_id is not null
1661: ) AND ad.entity_name = 'MTL_SYSTEM_ITEMS')
1662: )
1663: and d.document_id = ad.document_id

Line 1677: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer: No duplicate filenames exist in the attachments for this Release';

1673: -- If no_data_found then let l_duplicate_filename remain 'N'
1674: -- so that cursor is not opened. All other exceptions raised
1675: -- until caught by outer exception handler
1676: Exception when no_data_found then
1677: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer: No duplicate filenames exist in the attachments for this Release';
1678: IF (g_po_wf_debug = 'Y') THEN
1679: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY, l_progress);
1680: END IF;
1681: End;

Line 1721: and to_char(PO_COMMUNICATION_PVT.getInventoryOrgId()) = ad.pk1_value --Bug 4673653 Use Inventory OrgId

1717: ) and ad.entity_name = 'PO_SHIPMENTS')
1718: OR
1719: (ad.pk2_value in (select item_id from po_lines_all
1720: where po_header_id = l_document_id
1721: and to_char(PO_COMMUNICATION_PVT.getInventoryOrgId()) = ad.pk1_value --Bug 4673653 Use Inventory OrgId
1722: and item_id is not null
1723: ) and ad.entity_name = 'MTL_SYSTEM_ITEMS')
1724: )
1725: and d.document_id = ad.document_id

Line 1739: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer: No duplicate filenames exist in the attachments for this PO';

1735: -- If no_data_found then let l_duplicate_filename remain 'N'
1736: -- so that cursor is not opened. All other exceptions raised
1737: -- until caught by outer exception handler
1738: Exception when no_data_found then
1739: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer: No duplicate filenames exist in the attachments for this PO';
1740: IF (g_po_wf_debug = 'Y') THEN
1741: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY, l_progress);
1742: END IF;
1743: End;

Line 1747: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer : Duplicate filenames found.';

1743: End;
1744: END IF;
1745:
1746: IF l_duplicate_filenames = 'Y' THEN
1747: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer : Duplicate filenames found.';
1748: IF (l_document_subtype = 'RELEASE') THEN
1749: open l_get_release_attachments_csr(l_document_id);
1750: ELSE
1751: open l_get_po_attachments_csr(l_document_id);

Line 1754: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer : execute loop to get duplicate filenames with error condition';

1750: ELSE
1751: open l_get_po_attachments_csr(l_document_id);
1752: END IF;
1753:
1754: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer : execute loop to get duplicate filenames with error condition';
1755: IF (g_po_wf_debug = 'Y') THEN
1756: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, l_progress);
1757: END IF;
1758:

Line 1780: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer : error flag = '|| l_error_flag;

1776: ELSE
1777: close l_get_po_attachments_csr;
1778: END IF;
1779:
1780: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer : error flag = '|| l_error_flag;
1781: IF (g_po_wf_debug = 'Y') THEN
1782: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, l_progress);
1783: END IF;
1784:

Line 1795: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,'PO_COMMUNICATION_PVT.generate_pdf_buyer: Caught Zip generation exception '|| SQLERRM);

1791: END IF; --IF l_max_attachment_size > 0
1792: Exception when others then
1793: IF (g_po_wf_debug = 'Y') THEN
1794: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY, l_progress);
1795: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,'PO_COMMUNICATION_PVT.generate_pdf_buyer: Caught Zip generation exception '|| SQLERRM);
1796: END IF;
1797: set_zip_error_code(itemtype, itemkey, 'UNEXPECTED');
1798: l_max_attachment_size := 0; -- No need to generate zip file if it is an error
1799: End;

Line 1859: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer : Request id is - '|| l_request_id;

1855: NULL, NULL, NULL, NULL, NULL, NULL, NULL,
1856: NULL, NULL, NULL, NULL, NULL, NULL, NULL,
1857: NULL);
1858:
1859: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer : Request id is - '|| l_request_id;
1860: /*Begin Changes by Akyanama Bug # 12969112*//*Checking if the request id is valid or not before setting work flow variables*/
1861: if (l_request_id <= 0 or l_request_id is null) then
1862: raise submission_error;
1863: end if;

Line 1877: l_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF : Exception submitting concurrent request';

1873:
1874: EXCEPTION
1875: /*Begin Changes by Akyanama Bug # 12969112*//*Throwing Submission error*/
1876: WHEN submission_error THEN
1877: l_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF : Exception submitting concurrent request';
1878: IF (g_po_wf_debug = 'Y') THEN
1879: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, l_progress);
1880: END IF;
1881: wf_core.context('PO_COMMUNICATION_PVT', 'GENERATE_PDF', itemtype, itemkey, 'PO', l_progress);

Line 1881: wf_core.context('PO_COMMUNICATION_PVT', 'GENERATE_PDF', itemtype, itemkey, 'PO', l_progress);

1877: l_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF : Exception submitting concurrent request';
1878: IF (g_po_wf_debug = 'Y') THEN
1879: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, l_progress);
1880: END IF;
1881: wf_core.context('PO_COMMUNICATION_PVT', 'GENERATE_PDF', itemtype, itemkey, 'PO', l_progress);
1882: RAISE;
1883: /*End Changes by Akyanama Bug # 12969112*/
1884: WHEN OTHERS THEN
1885:

Line 1890: wf_core.context('PO_COMMUNICATION_PVT', 'GENERATE_PDF_BUYER', l_progress);

1886: IF (g_po_wf_debug = 'Y') THEN
1887: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, l_progress);
1888: END IF;
1889:
1890: wf_core.context('PO_COMMUNICATION_PVT', 'GENERATE_PDF_BUYER', l_progress);
1891: raise;
1892:
1893: END GENERATE_PDF_BUYER;
1894:

Line 1923: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP';

1919: /*Begin Changes by Akyanama Bug # 12969112*//*Declaring Exception*/
1920: submission_error exception;
1921: /*End Changes by Akyanama Bug # 12969112*/
1922: begin
1923: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP';
1924:
1925: IF (g_po_wf_debug = 'Y') THEN
1926: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY, x_progress);
1927: END IF;

Line 1984: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP -000: in exception handler';

1980: SELECT po_header_id into l_header_id FROM po_releases_all
1981: WHERE po_release_id = l_document_id;
1982: EXCEPTION
1983: WHEN NO_DATA_FOUND THEN
1984: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP -000: in exception handler';
1985: IF (g_po_wf_debug = 'Y') THEN
1986: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,x_progress);
1987: END IF;
1988: END;

Line 1998: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP -001: in exception handler';

1994: WHERE
1995: ph.po_header_id = l_header_id and ph.vendor_site_id = pv.vendor_site_id;
1996: EXCEPTION
1997: WHEN NO_DATA_FOUND THEN
1998: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP -001: in exception handler';
1999: IF (g_po_wf_debug = 'Y') THEN
2000: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,x_progress);
2001: END IF;
2002: END;

Line 2004: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP :launching the Dispatch Purchase Order concurrent program ';

2000: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,x_progress);
2001: END IF;
2002: END;
2003:
2004: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP :launching the Dispatch Purchase Order concurrent program ';
2005:
2006: IF (g_po_wf_debug = 'Y') THEN
2007: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY, x_progress);
2008: END IF;

Line 2018: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP -002: in exception handler';

2014: FROM fnd_languages
2015: WHERE language_code = l_language_code;
2016: EXCEPTION
2017: WHEN NO_DATA_FOUND THEN
2018: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP -002: in exception handler';
2019: IF (g_po_wf_debug = 'Y') THEN
2020: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,x_progress);
2021: END IF;
2022: END;

Line 2032: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP -003: in exception handler';

2028: select nls_territory into l_territory from fnd_languages where
2029: nls_language = l_supp_lang;
2030: EXCEPTION
2031: WHEN NO_DATA_FOUND THEN
2032: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP -003: in exception handler';
2033: IF (g_po_wf_debug = 'Y') THEN
2034: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,x_progress);
2035: END IF;
2036: END;

Line 2097: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP : Request id is - '|| l_request_id;

2093: NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2094: NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2095: NULL);
2096:
2097: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP : Request id is - '|| l_request_id;
2098:
2099: IF (g_po_wf_debug = 'Y') THEN
2100: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY, x_progress);
2101: END IF;

Line 2119: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF : Exception submitting concurrent request';

2115:
2116: EXCEPTION
2117: /*Begin Changes by Akyanama Bug # 12969112*//*Throwing Submission error*/
2118: WHEN submission_error THEN
2119: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF : Exception submitting concurrent request';
2120: IF (g_po_wf_debug = 'Y') THEN
2121: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
2122: x_progress := fnd_message.get;
2123: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);

Line 2125: wf_core.context('PO_COMMUNICATION_PVT', 'GENERATE_PDF', itemtype, itemkey, 'PO', x_progress);

2121: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
2122: x_progress := fnd_message.get;
2123: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
2124: END IF;
2125: wf_core.context('PO_COMMUNICATION_PVT', 'GENERATE_PDF', itemtype, itemkey, 'PO', x_progress);
2126: RAISE;
2127:
2128: /*End Changes by Akyanama Bug # 12969112*/
2129: WHEN OTHERS THEN

Line 2130: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP: In Exception handler';

2126: RAISE;
2127:
2128: /*End Changes by Akyanama Bug # 12969112*/
2129: WHEN OTHERS THEN
2130: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP: In Exception handler';
2131:
2132: IF (g_po_wf_debug = 'Y') THEN
2133: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
2134: END IF;

Line 2135: wf_core.context('PO_COMMUNICATION_PVT', 'GENERATE_PDF_SUPP', x_progress);

2131:
2132: IF (g_po_wf_debug = 'Y') THEN
2133: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
2134: END IF;
2135: wf_core.context('PO_COMMUNICATION_PVT', 'GENERATE_PDF_SUPP', x_progress);
2136: raise;
2137:
2138: END GENERATE_PDF_SUPP;
2139:

Line 2170: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_EMAIL_PROCESS';

2166: submission_error exception;
2167: /*End Changes by Akyanama Bug # 12969112*/
2168:
2169: begin
2170: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_EMAIL_PROCESS';
2171:
2172: IF (g_po_wf_debug = 'Y') THEN
2173: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY, x_progress);
2174: END IF;

Line 2188: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_EMAIL_PROCESS -001: in exception handler';

2184: select nls_territory into l_territory from fnd_languages where
2185: language_code = l_language_code;
2186: EXCEPTION
2187: WHEN NO_DATA_FOUND THEN
2188: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_EMAIL_PROCESS -001: in exception handler';
2189: IF (g_po_wf_debug = 'Y') THEN
2190: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,x_progress);
2191: END IF;
2192: END;

Line 2225: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_EMAIL_PROCESS:launching the Dispatch Purchase Order concurrent program ';

2221: l_authorization_status := PO_WF_UTIL_PKG.GetItemAttrText (itemtype => itemtype,
2222: itemkey => itemkey,
2223: aname => 'AUTHORIZATION_STATUS');
2224:
2225: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_EMAIL_PROCESS:launching the Dispatch Purchase Order concurrent program ';
2226:
2227: IF (g_po_wf_debug = 'Y') THEN
2228: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY, x_progress);
2229: END IF;

Line 2243: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_EMAIL_PROCESS -002: in exception handler';

2239: language_code = l_language_code;
2240:
2241: EXCEPTION
2242: WHEN NO_DATA_FOUND THEN
2243: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_EMAIL_PROCESS -002: in exception handler';
2244: IF (g_po_wf_debug = 'Y') THEN
2245: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,x_progress);
2246: END IF;
2247: END;

Line 2325: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF : Exception submitting concurrent request';

2321:
2322: EXCEPTION
2323: /*Begin Changes by Akyanama Bug # 12969112*//*Throwing Submission error*/
2324: WHEN submission_error THEN
2325: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF : Exception submitting concurrent request';
2326: IF (g_po_wf_debug = 'Y') THEN
2327: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
2328: x_progress := fnd_message.get;
2329: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);

Line 2331: wf_core.context('PO_COMMUNICATION_PVT', 'GENERATE_PDF', itemtype, itemkey, 'PO', x_progress);

2327: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
2328: x_progress := fnd_message.get;
2329: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
2330: END IF;
2331: wf_core.context('PO_COMMUNICATION_PVT', 'GENERATE_PDF', itemtype, itemkey, 'PO', x_progress);
2332: RAISE;
2333:
2334: /*End Changes by Akyanama Bug # 12969112*/
2335: WHEN OTHERS THEN

Line 2336: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_EMAIL_PROCESS: In Exception handler';

2332: RAISE;
2333:
2334: /*End Changes by Akyanama Bug # 12969112*/
2335: WHEN OTHERS THEN
2336: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_EMAIL_PROCESS: In Exception handler';
2337:
2338: IF (g_po_wf_debug = 'Y') THEN
2339: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
2340: END IF;

Line 2341: wf_core.context('PO_COMMUNICATION_PVT', 'GENERATE_PDF_EMAIL_PROCESS', x_progress);

2337:
2338: IF (g_po_wf_debug = 'Y') THEN
2339: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey, x_progress);
2340: END IF;
2341: wf_core.context('PO_COMMUNICATION_PVT', 'GENERATE_PDF_EMAIL_PROCESS', x_progress);
2342: RAISE ;
2343:
2344: END GENERATE_PDF_EMAIL_PROCESS;
2345:

Line 2762: l_pdf_file_name := po_communication_pvt.getPDFFileName(l_doctype, '_TERMS_', l_org_id, p_document_id,

2758: END IF;
2759:
2760: --
2761: -- Brought the call out of the select
2762: l_pdf_file_name := po_communication_pvt.getPDFFileName(l_doctype, '_TERMS_', l_org_id, p_document_id,
2763: l_revision_num, l_buyer_language_code);
2764: --Bug #4865352 - Replaced fnd_documents_tl with fnd_documents_vl
2765: select count(1) into l_pdf_tc_buyer_exists from fnd_lobs fl, fnd_attached_documents fad, fnd_documents_vl fdl
2766: where

Line 2789: l_pdf_file_name := po_communication_pvt.getPDFFileName(l_doctype, '_TERMS_', l_org_id, p_document_id,

2785: p_token => l_progress,
2786: p_message => 'Checking for latest PDF without terms in suppliers language in PO Repository');
2787: END IF;
2788:
2789: l_pdf_file_name := po_communication_pvt.getPDFFileName(l_doctype, '_TERMS_', l_org_id, p_document_id,
2790: l_revision_num, l_buyer_language_code); --bug#3463617
2791: --Bug #4865352 - Added a join with fnd_documents
2792: select count(1) into l_pdf_tc_sup_exists from fnd_lobs fl, fnd_attached_documents fad, fnd_documents fd, fnd_documents_tl fdl
2793: where

Line 2822: l_pdf_file_name := po_communication_pvt.getPDFFileName(l_doctype, '_TERMS_', l_org_id, p_document_id,

2818: END IF;
2819:
2820: --
2821: -- Brought the call out of the select
2822: l_pdf_file_name := po_communication_pvt.getPDFFileName(l_doctype, '_TERMS_', l_org_id, p_document_id,
2823: l_revision_num, l_buyer_language_code);
2824: --Bug #4865352
2825: select count(1) into l_pdf_nt_buyer_exists from fnd_lobs fl, fnd_attached_documents fad, fnd_documents_vl fdl
2826: where

Line 2849: l_pdf_file_name := po_communication_pvt.getPDFFileName(l_doctype, '_TERMS_', l_org_id, p_document_id,

2845: END IF;
2846:
2847: --
2848: -- Brought the call out of the select
2849: l_pdf_file_name := po_communication_pvt.getPDFFileName(l_doctype, '_TERMS_', l_org_id, p_document_id,
2850: l_revision_num, l_language_code);
2851: --Bug #4865352 - Added a join with fnd_documents
2852: select count(1) into l_pdf_nt_sup_exists from fnd_lobs fl, fnd_attached_documents fad, fnd_documents fd, fnd_documents_tl fdl
2853: where

Line 3538: x_progress := 'PO_COMMUNICATION_PVT.pdf_attach_app ';

3534: l_itemtype := substr(document_id, 1, instr(document_id, ':') - 1);
3535:
3536: l_itemkey := substr(document_id, instr(document_id, ':') + 1, length(document_id) - 2);
3537:
3538: x_progress := 'PO_COMMUNICATION_PVT.pdf_attach_app ';
3539:
3540: IF (g_po_wf_debug = 'Y') THEN
3541: PO_WF_DEBUG_PKG.INSERT_DEBUG(l_itemtype, l_itemkey, x_progress);
3542: END IF;

Line 3581: l_filename := po_communication_pvt.getPDFFileName(l_document_type,'_TERMS_',l_org_id,l_document_id,l_revision_number,l_draft_id,l_language,'N');

3577: --Bug 9794433 we have pdf with terms now after 9301926 fix we have file with terms so refering that
3578: if l_withTerms ='Y' then
3579:
3580: --bug#3463617
3581: l_filename := po_communication_pvt.getPDFFileName(l_document_type,'_TERMS_',l_org_id,l_document_id,l_revision_number,l_draft_id,l_language,'N');
3582: else
3583: --bug#3463617
3584: l_filename := po_communication_pvt.getPDFFileName(l_document_type, '_', l_org_id, l_document_id, l_revision_number,l_draft_id, l_language,'N');
3585: end if;

Line 3584: l_filename := po_communication_pvt.getPDFFileName(l_document_type, '_', l_org_id, l_document_id, l_revision_number,l_draft_id, l_language,'N');

3580: --bug#3463617
3581: l_filename := po_communication_pvt.getPDFFileName(l_document_type,'_TERMS_',l_org_id,l_document_id,l_revision_number,l_draft_id,l_language,'N');
3582: else
3583: --bug#3463617
3584: l_filename := po_communication_pvt.getPDFFileName(l_document_type, '_', l_org_id, l_document_id, l_revision_number,l_draft_id, l_language,'N');
3585: end if;
3586: --Bug 9794433 we have pdf with terms now after 9301926 fix we have file with terms so refering that
3587:
3588: /* End Bug 7424634 */

Line 3663: x_progress := 'PO_COMMUNICATION_PVT.pdf_attach_app-Exception ';

3659: EXCEPTION
3660: WHEN OTHERS THEN
3661: --l_document:=fnd_message.get_string('PO','PO_PDF_FAILED');
3662: --WF_NOTIFICATION.WriteToBlob(document, l_document);
3663: x_progress := 'PO_COMMUNICATION_PVT.pdf_attach_app-Exception ';
3664:
3665: IF (g_po_wf_debug = 'Y') THEN
3666: PO_WF_DEBUG_PKG.INSERT_DEBUG(l_itemtype, l_itemkey, x_progress);
3667: END IF;

Line 3701: x_progress := 'PO_COMMUNICATION_PVT.pdf_attach_supp';

3697:
3698: x_progress varchar2(300);
3699:
3700: BEGIN
3701: x_progress := 'PO_COMMUNICATION_PVT.pdf_attach_supp';
3702:
3703: l_itemtype := substr(document_id, 1, instr(document_id, ':') - 1);
3704: l_itemkey := substr(document_id, instr(document_id, ':') + 1, length(document_id) - 2);
3705:

Line 3735: l_filename := po_communication_pvt.getPDFFileName(l_document_type, '_TERMS_', l_org_id, l_document_id, l_revision_number, l_language);

3731: itemkey => l_itemkey,
3732: aname => 'WITH_TERMS');
3733:
3734: IF l_withTerms = 'Y' THEN
3735: l_filename := po_communication_pvt.getPDFFileName(l_document_type, '_TERMS_', l_org_id, l_document_id, l_revision_number, l_language);
3736: ELSE
3737: l_filename := po_communication_pvt.getPDFFileName(l_document_type, '_', l_org_id, l_document_id, l_revision_number, l_language);
3738: END IF;
3739: --Bug #4865352 - Added join with fnd_documents and selected media_id from it

Line 3737: l_filename := po_communication_pvt.getPDFFileName(l_document_type, '_', l_org_id, l_document_id, l_revision_number, l_language);

3733:
3734: IF l_withTerms = 'Y' THEN
3735: l_filename := po_communication_pvt.getPDFFileName(l_document_type, '_TERMS_', l_org_id, l_document_id, l_revision_number, l_language);
3736: ELSE
3737: l_filename := po_communication_pvt.getPDFFileName(l_document_type, '_', l_org_id, l_document_id, l_revision_number, l_language);
3738: END IF;
3739: --Bug #4865352 - Added join with fnd_documents and selected media_id from it
3740: -- Bug 4047688
3741: -- Added join condition on file name of PDF

Line 3780: x_progress := 'PO_COMMUNICATION_PVT.pdf_attach_supp - Exception ';

3776: document_type :='application/pdf; name='|| l_filename;
3777:
3778: EXCEPTION
3779: WHEN OTHERS THEN
3780: x_progress := 'PO_COMMUNICATION_PVT.pdf_attach_supp - Exception ';
3781:
3782: IF (g_po_wf_debug = 'Y') THEN
3783: PO_WF_DEBUG_PKG.INSERT_DEBUG(l_itemtype, l_itemkey, x_progress);
3784: END IF;

Line 3818: x_progress := 'PO_COMMUNICATION_PVT.pdf_attach';

3814: x_progress varchar2(300);
3815: l_draft_id number;
3816:
3817: begin
3818: x_progress := 'PO_COMMUNICATION_PVT.pdf_attach';
3819:
3820: l_itemtype := substr(document_id, 1, instr(document_id, ':') - 1);
3821: l_itemkey := substr(document_id, instr(document_id, ':') + 1, length(document_id) - 2);
3822:

Line 3892: l_filename := po_communication_pvt.getPDFFileName(l_document_type, '_TERMS_', l_org_id, l_document_id, l_revision_number, l_draft_id, l_language, 'N');

3888: End;
3889:
3890: if l_withTerms = 'Y' then
3891: --bug#3463617
3892: l_filename := po_communication_pvt.getPDFFileName(l_document_type, '_TERMS_', l_org_id, l_document_id, l_revision_number, l_draft_id, l_language, 'N');
3893: else
3894: --bug#3463617
3895: l_filename := po_communication_pvt.getPDFFileName(l_document_type, '_', l_org_id, l_document_id, l_revision_number, l_draft_id, l_language, 'N');
3896:

Line 3895: l_filename := po_communication_pvt.getPDFFileName(l_document_type, '_', l_org_id, l_document_id, l_revision_number, l_draft_id, l_language, 'N');

3891: --bug#3463617
3892: l_filename := po_communication_pvt.getPDFFileName(l_document_type, '_TERMS_', l_org_id, l_document_id, l_revision_number, l_draft_id, l_language, 'N');
3893: else
3894: --bug#3463617
3895: l_filename := po_communication_pvt.getPDFFileName(l_document_type, '_', l_org_id, l_document_id, l_revision_number, l_draft_id, l_language, 'N');
3896:
3897: end if;
3898:
3899: /*Begin Edit Akyanama Bug # 13242469 */

Line 4001: x_progress := 'PO_COMMUNICATION_PVT.pdf_attach - Exception ';

3997: EXCEPTION
3998: WHEN OTHERS THEN
3999: --l_document:=fnd_message.get_string('PO','PO_PDF_FAILED');
4000: --WF_NOTIFICATION.WriteToBlob(document, l_document);
4001: x_progress := 'PO_COMMUNICATION_PVT.pdf_attach - Exception ';
4002:
4003: IF (g_po_wf_debug = 'Y') THEN
4004: PO_WF_DEBUG_PKG.INSERT_DEBUG(l_itemtype, l_itemkey, x_progress);
4005: END IF;

Line 4067: x_progress := 'PO_COMMUNICATION_PVT.okc_doc_attach:010';

4063: l_draft_id number; --Mod Project
4064:
4065: BEGIN
4066:
4067: x_progress := 'PO_COMMUNICATION_PVT.okc_doc_attach:010';
4068:
4069: l_itemtype := substr(document_id, 1, instr(document_id, ':') - 1);
4070: l_itemkey := substr(document_id, instr(document_id, ':') + 1,
4071: length(document_id) - 2);

Line 4185: x_progress := 'PO_COMMUNICATION_PVT.pdf_attach - Exception ';

4181: EXCEPTION
4182:
4183: /* Handle Exceptions */
4184: WHEN others THEN
4185: x_progress := 'PO_COMMUNICATION_PVT.pdf_attach - Exception ';
4186:
4187: IF (g_po_wf_debug = 'Y') THEN
4188: PO_WF_DEBUG_PKG.INSERT_DEBUG(l_itemtype, l_itemkey, x_progress);
4189: END IF;

Line 4252: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Begin';

4248: l_message FND_NEW_MESSAGES.message_text%TYPE;
4249:
4250:
4251: BEGIN
4252: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Begin';
4253:
4254: l_itemtype := substr(document_id, 1, instr(document_id, ':') - 1);
4255: l_itemkey := substr(document_id, instr(document_id, ':') + 1, length(document_id) - 2);
4256:

Line 4261: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Get item attributes';

4257: IF (g_po_wf_debug = 'Y') THEN
4258: PO_WF_DEBUG_PKG.INSERT_DEBUG(l_itemtype, l_itemkey, l_progress);
4259: END IF;
4260:
4261: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Get item attributes';
4262: l_document_id := wf_engine.GetItemAttrNumber (itemtype => l_itemtype,
4263: itemkey => l_itemkey,
4264: aname => 'DOCUMENT_ID');
4265:

Line 4282: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Decide Entity to query';

4278: l_revision_number := wf_engine.GetItemAttrNumber (itemtype => l_itemtype,
4279: itemkey => l_itemkey,
4280: aname => 'REVISION_NUMBER');
4281:
4282: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Decide Entity to query';
4283: IF l_document_type in ('PO', 'PA') THEN
4284: l_entity_name := 'PO_HEAD';
4285: ELSIF l_document_type = 'RELEASE' THEN
4286: l_entity_name := 'PO_REL';

Line 4289: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Get Zip file name';

4285: ELSIF l_document_type = 'RELEASE' THEN
4286: l_entity_name := 'PO_REL';
4287: END IF;
4288:
4289: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Get Zip file name';
4290: Begin
4291: --Bug# 5240634 Pass in the org_id to getZIPFileName
4292: l_filename := getZIPFileName(l_org_id);
4293: Exception When others Then

Line 4294: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Exception in getZIPFileName';

4290: Begin
4291: --Bug# 5240634 Pass in the org_id to getZIPFileName
4292: l_filename := getZIPFileName(l_org_id);
4293: Exception When others Then
4294: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Exception in getZIPFileName';
4295: raise;
4296: End;
4297:
4298: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Query the Zip blob';

Line 4298: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Query the Zip blob';

4294: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Exception in getZIPFileName';
4295: raise;
4296: End;
4297:
4298: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Query the Zip blob';
4299: --Bug #4865352 - Added a join with fnd_documents and selected media_id from it
4300: Begin
4301: SELECT fl.file_data, fl.file_content_type
4302: INTO l_document, l_filecontent_type

Line 4318: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : no_data_found';

4314: and fd.media_id = fl.file_id
4315: and fl.file_name = l_filename;
4316: Exception
4317: When others Then
4318: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : no_data_found';
4319: raise;
4320: End;
4321:
4322: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Get blob length';

Line 4322: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Get blob length';

4318: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : no_data_found';
4319: raise;
4320: End;
4321:
4322: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Get blob length';
4323: l_document_length := dbms_lob.GetLength(l_document);
4324:
4325: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Copy zip blob';
4326: dbms_lob.copy(document, l_document, l_document_length, 1, 1);

Line 4325: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Copy zip blob';

4321:
4322: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Get blob length';
4323: l_document_length := dbms_lob.GetLength(l_document);
4324:
4325: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Copy zip blob';
4326: dbms_lob.copy(document, l_document, l_document_length, 1, 1);
4327:
4328: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Set document type';
4329: document_type := l_filecontent_type ||'; name='|| l_filename;

Line 4328: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Set document type';

4324:
4325: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Copy zip blob';
4326: dbms_lob.copy(document, l_document, l_document_length, 1, 1);
4327:
4328: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Set document type';
4329: document_type := l_filecontent_type ||'; name='|| l_filename;
4330:
4331: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : End';
4332: EXCEPTION

Line 4331: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : End';

4327:
4328: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Set document type';
4329: document_type := l_filecontent_type ||'; name='|| l_filename;
4330:
4331: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : End';
4332: EXCEPTION
4333: WHEN OTHERS THEN
4334:
4335: IF (g_po_wf_debug = 'Y') THEN

Line 4420: l_progress := 'PO_COMMUNICATION_PVT.get_zip_error_code: 01';

4416: resultout OUT NOCOPY VARCHAR2) IS
4417: l_progress varchar2(200);
4418: BEGIN
4419: -- Get the value of the workflow attribute zip_error_code
4420: l_progress := 'PO_COMMUNICATION_PVT.get_zip_error_code: 01';
4421: resultout := PO_WF_UTIL_PKG.GetItemAttrText(itemtype => itemtype,
4422: itemkey => itemkey,
4423: aname => 'ZIP_ERROR_CODE');
4424: l_progress := 'PO_COMMUNICATION_PVT.get_zip_error_code: 02';

Line 4424: l_progress := 'PO_COMMUNICATION_PVT.get_zip_error_code: 02';

4420: l_progress := 'PO_COMMUNICATION_PVT.get_zip_error_code: 01';
4421: resultout := PO_WF_UTIL_PKG.GetItemAttrText(itemtype => itemtype,
4422: itemkey => itemkey,
4423: aname => 'ZIP_ERROR_CODE');
4424: l_progress := 'PO_COMMUNICATION_PVT.get_zip_error_code: 02';
4425: resultout := wf_engine.eng_completed || ':' || resultout;
4426: EXCEPTION when others THEN
4427: WF_CORE.context('PO_COMMUNICATION_PVT', 'get_zip_error_code', l_progress);
4428: raise;

Line 4427: WF_CORE.context('PO_COMMUNICATION_PVT', 'get_zip_error_code', l_progress);

4423: aname => 'ZIP_ERROR_CODE');
4424: l_progress := 'PO_COMMUNICATION_PVT.get_zip_error_code: 02';
4425: resultout := wf_engine.eng_completed || ':' || resultout;
4426: EXCEPTION when others THEN
4427: WF_CORE.context('PO_COMMUNICATION_PVT', 'get_zip_error_code', l_progress);
4428: raise;
4429: END get_zip_error_code;
4430:
4431: -------------------------------------------------------------------------------

Line 4465: l_progress := 'PO_COMMUNICATION_PVT.get_max_zip_size : Querying max_attachment_size';

4461: p_itemkey IN VARCHAR2) RETURN NUMBER IS
4462: l_max_attachment_size po_system_parameters_all.max_attachment_size%type;
4463: l_progress varchar2(200);
4464: BEGIN
4465: l_progress := 'PO_COMMUNICATION_PVT.get_max_zip_size : Querying max_attachment_size';
4466: IF (g_po_wf_debug = 'Y') THEN
4467: PO_WF_DEBUG_PKG.insert_debug(p_itemtype, p_itemkey, l_progress);
4468: END IF;
4469: select nvl(psp.max_attachment_size, 0)

Line 4472: l_progress := 'PO_COMMUNICATION_PVT.get_max_zip_size : maximum attachment size = '|| l_max_attachment_size;

4468: END IF;
4469: select nvl(psp.max_attachment_size, 0)
4470: into l_max_attachment_size
4471: from po_system_parameters psp;
4472: l_progress := 'PO_COMMUNICATION_PVT.get_max_zip_size : maximum attachment size = '|| l_max_attachment_size;
4473: IF (g_po_wf_debug = 'Y') THEN
4474: PO_WF_DEBUG_PKG.insert_debug(p_itemtype, p_itemkey, l_progress);
4475: END IF;
4476: return l_max_attachment_size;

Line 4479: l_progress := 'PO_COMMUNICATION_PVT.get_max_zip_size : handled exception while getting Maximum Attachment Size ';

4475: END IF;
4476: return l_max_attachment_size;
4477: Exception
4478: when others then
4479: l_progress := 'PO_COMMUNICATION_PVT.get_max_zip_size : handled exception while getting Maximum Attachment Size ';
4480: IF (g_po_wf_debug = 'Y') THEN
4481: PO_WF_DEBUG_PKG.insert_debug(p_itemtype, p_itemkey, l_progress);
4482: END IF;
4483: l_max_attachment_size := 0;

Line 4645: and to_char(PO_COMMUNICATION_PVT.getInventoryOrgId())=ad.pk1_value --Bug 4673653 Use Inventory OrgId

4641: and pll.po_line_id=pl.po_line_id
4642: and pl.item_id is not null
4643: ) AND ad.entity_name='MTL_SYSTEM_ITEMS'))
4644: /*bug 13528070*/
4645: and to_char(PO_COMMUNICATION_PVT.getInventoryOrgId())=ad.pk1_value --Bug 4673653 Use Inventory OrgId
4646: and d.document_id = ad.document_id
4647: and dcu.category_id = d.category_id
4648: and dcu.attachment_function_id = af.attachment_function_id
4649: and d.datatype_id=6

Line 4798: and to_char(PO_COMMUNICATION_PVT.getInventoryOrgId())=ad.pk1_value --Bug 4673653 Use Inventory OrgId

4794: where po_header_id=p_document_id
4795: and item_id is not null
4796: ) and ad.entity_name='MTL_SYSTEM_ITEMS'))
4797: /*bug 13528070*/
4798: and to_char(PO_COMMUNICATION_PVT.getInventoryOrgId())=ad.pk1_value --Bug 4673653 Use Inventory OrgId
4799: and d.document_id = ad.document_id
4800: and dcu.category_id = d.category_id
4801: and dcu.attachment_function_id = af.attachment_function_id
4802: and d.datatype_id=6

Line 4853: g_log_head CONSTANT VARCHAR2(30) := 'po.plsql.PO_COMMUNICATION_PVT.';

4849: --
4850: l_headerAttachments clob;
4851: l_headerAttachmentsQuery varchar2(1000);
4852: l_count number;
4853: g_log_head CONSTANT VARCHAR2(30) := 'po.plsql.PO_COMMUNICATION_PVT.';
4854: l_eventType varchar2(20);
4855: l_lineAttachQuery varchar2(8000); --Bug 13082363 : Increasing length
4856: l_line_Attachments clob;
4857: l_shipmentAttachmentQuery varchar2(1200); --Bug5213932 increase length

Line 4923: PO_COMMUNICATION_PVT.g_document_id := p_document_id;

4919: THEN
4920: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
4921: END IF;
4922:
4923: PO_COMMUNICATION_PVT.g_document_id := p_document_id;
4924: PO_COMMUNICATION_PVT.g_revision_num := p_revision_num;
4925: PO_COMMUNICATION_PVT.g_test_flag := p_test_flag;
4926:
4927:

Line 4924: PO_COMMUNICATION_PVT.g_revision_num := p_revision_num;

4920: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
4921: END IF;
4922:
4923: PO_COMMUNICATION_PVT.g_document_id := p_document_id;
4924: PO_COMMUNICATION_PVT.g_revision_num := p_revision_num;
4925: PO_COMMUNICATION_PVT.g_test_flag := p_test_flag;
4926:
4927:
4928: --Start Bug#3771735

Line 4925: PO_COMMUNICATION_PVT.g_test_flag := p_test_flag;

4921: END IF;
4922:
4923: PO_COMMUNICATION_PVT.g_document_id := p_document_id;
4924: PO_COMMUNICATION_PVT.g_revision_num := p_revision_num;
4925: PO_COMMUNICATION_PVT.g_test_flag := p_test_flag;
4926:
4927:
4928: --Start Bug#3771735
4929: --Assigned the Document Type Code to global variable

Line 4930: PO_COMMUNICATION_PVT.g_documentTypeCode := p_document_type;

4926:
4927:
4928: --Start Bug#3771735
4929: --Assigned the Document Type Code to global variable
4930: PO_COMMUNICATION_PVT.g_documentTypeCode := p_document_type;
4931: --End Bug#3771735
4932:
4933: /*Bug#3583910 Assigned the parameter value to the g_with_terms variable*/
4934: PO_COMMUNICATION_PVT.g_with_terms := p_with_terms;

Line 4934: PO_COMMUNICATION_PVT.g_with_terms := p_with_terms;

4930: PO_COMMUNICATION_PVT.g_documentTypeCode := p_document_type;
4931: --End Bug#3771735
4932:
4933: /*Bug#3583910 Assigned the parameter value to the g_with_terms variable*/
4934: PO_COMMUNICATION_PVT.g_with_terms := p_with_terms;
4935:
4936:
4937: -- SQl What: Querying for document type.
4938: -- SQL why: To display the Document type at header level in PO cover and details page.

Line 4941: PO_COMMUNICATION_PVT.g_documentType := null;

4937: -- SQl What: Querying for document type.
4938: -- SQL why: To display the Document type at header level in PO cover and details page.
4939: -- SQL Join:
4940:
4941: PO_COMMUNICATION_PVT.g_documentType := null;
4942: --Bug#3279968 Added the language column to the below sql statement to fetch onlyone record.
4943: --Bug 9391634 org_id was not set because of which fetching data from PO_DOCUMENT_TYPES_TL give error
4944: l_org_id := po_moac_utils_pvt.get_current_org_id;
4945:

Line 4954: SELECT TYPE_NAME into PO_COMMUNICATION_PVT.g_documentType FROM PO_DOCUMENT_TYPES_TL

4950:
4951: END IF;
4952: --Bug 9391634 org_id was not set because of which fetching data from PO_DOCUMENT_TYPES_TL give error
4953:
4954: SELECT TYPE_NAME into PO_COMMUNICATION_PVT.g_documentType FROM PO_DOCUMENT_TYPES_TL
4955: WHERE document_type_code = p_document_type and document_subtype = p_document_subtype and language = USERENV('LANG');
4956:
4957: /* For balnket documents eventtype is 'BLANKET LINE' and
4958: for other documents 'PO LINE' is event type, to get the price differentials*/

Line 4976: PO_COMMUNICATION_PVT.g_current_currency_code := null;

4972: -- Added the sql conditions to find the distinct count of shipment level ship to from header level ship to. This count is
4973: -- used in XSL to identify what to display in ship to address at header and shipment level
4974:
4975: BEGIN
4976: PO_COMMUNICATION_PVT.g_current_currency_code := null;
4977:
4978: IF(p_document_type in ('PO', 'PA')) THEN
4979: IF p_which_tables = 'MAIN' THEN
4980:

Line 4983: INTO po_communication_pvt.g_buyer_org, l_supp_org, l_po_number, l_change_summary, l_vendor_id, g_current_currency_code

4979: IF p_which_tables = 'MAIN' THEN
4980:
4981: /*Bug5983107 Commenting out the below sql and writing the new sql below without reference to hr_all_organization_units*/
4982: /* SELECT hle.name, vn.vendor_name, ph.segment1, ph.change_summary, ph.vendor_id, ph.currency_code
4983: INTO po_communication_pvt.g_buyer_org, l_supp_org, l_po_number, l_change_summary, l_vendor_id, g_current_currency_code
4984: FROM hr_all_organization_units hle, po_vendors vn, po_headers_all ph
4985: WHERE to_char(hle.organization_id) = (select org_information2 from hr_organization_information where
4986: org_information_context = 'Operating Unit Information' and organization_id = ph.org_id) AND vn.vendor_id = ph.vendor_id
4987: AND ph.po_header_id = p_document_id AND ph.revision_num = p_revision_num; */

Line 4996: SELECT count(distinct(plla.SHIP_TO_LOCATION_ID)) INTO PO_COMMUNICATION_PVT.g_dist_shipto_count

4992: WHERE vn.vendor_id = ph.vendor_id
4993: AND ph.po_header_id = p_document_id AND ph.revision_num = p_revision_num;
4994:
4995:
4996: SELECT count(distinct(plla.SHIP_TO_LOCATION_ID)) INTO PO_COMMUNICATION_PVT.g_dist_shipto_count
4997: FROM po_line_locations_all plla
4998: WHERE plla.po_header_id = p_document_id
4999: AND NVL(plla.payment_type, 'NONE') NOT IN ('ADVANCE', 'DELIVERY'); --
5000:

Line 5012: SELECT count(distinct(plla.SHIP_TO_LOCATION_ID)) INTO PO_COMMUNICATION_PVT.g_dist_shipto_count

5008: FROM po_vendors vn, po_headers_archive_all ph
5009: WHERE vn.vendor_id = ph.vendor_id
5010: AND ph.po_header_id = p_document_id AND ph.revision_num = p_revision_num;
5011:
5012: SELECT count(distinct(plla.SHIP_TO_LOCATION_ID)) INTO PO_COMMUNICATION_PVT.g_dist_shipto_count
5013: FROM po_line_locations_archive_all plla
5014: WHERE plla.po_header_id = p_document_id
5015: and plla.revision_num = p_revision_num
5016: AND NVL(plla.payment_type, 'NONE') NOT IN ('ADVANCE', 'DELIVERY'); --

Line 5033: PO_COMMUNICATION_PVT.g_buyer_org := x_legalentity_info.name;

5029: null,
5030: l_legal_entity_id,
5031: x_legalentity_info);
5032:
5033: PO_COMMUNICATION_PVT.g_buyer_org := x_legalentity_info.name;
5034:
5035: EXCEPTION
5036: WHEN OTHERS then
5037: po_communication_pvt.g_buyer_org := null;

Line 5037: po_communication_pvt.g_buyer_org := null;

5033: PO_COMMUNICATION_PVT.g_buyer_org := x_legalentity_info.name;
5034:
5035: EXCEPTION
5036: WHEN OTHERS then
5037: po_communication_pvt.g_buyer_org := null;
5038: END;
5039:
5040: /*Bug5983107 */
5041:

Line 5047: values(p_document_id, null, p_revision_num, PO_COMMUNICATION_PVT.getFormatMask);

5043: -- bug#3823799: Moved the query from top to here to insert data in table based on the document type.
5044: -- po_release_id is inserted as null
5045: -- bug#3853109: Added the column names in the insert clause as per the review comments
5046: insert into PO_COMMUNICATION_GT(po_header_id, po_release_id, revision_number, format_mask)
5047: values(p_document_id, null, p_revision_num, PO_COMMUNICATION_PVT.getFormatMask);
5048: ELSE
5049: -- Modified as a part of bug #3274076
5050: -- Vendor id is same for revisied and non revised documents. So vendor id is retreived from the releases table.
5051:

Line 5053: SELECT po_header_id INTO PO_COMMUNICATION_PVT.g_release_header_id FROM po_releases_all WHERE po_release_id = p_document_id;

5049: -- Modified as a part of bug #3274076
5050: -- Vendor id is same for revisied and non revised documents. So vendor id is retreived from the releases table.
5051:
5052: -- select the header id into g_release_header_id global variable for a given release id.
5053: SELECT po_header_id INTO PO_COMMUNICATION_PVT.g_release_header_id FROM po_releases_all WHERE po_release_id = p_document_id;
5054:
5055: SELECT ph.vendor_id, ph.currency_code INTO l_vendor_id, g_current_currency_code
5056: FROM po_vendors vn, po_headers_all ph
5057: WHERE vn.vendor_id = ph.vendor_id

Line 5058: AND ph.po_header_id = PO_COMMUNICATION_PVT.g_release_header_id ;

5054:
5055: SELECT ph.vendor_id, ph.currency_code INTO l_vendor_id, g_current_currency_code
5056: FROM po_vendors vn, po_headers_all ph
5057: WHERE vn.vendor_id = ph.vendor_id
5058: AND ph.po_header_id = PO_COMMUNICATION_PVT.g_release_header_id ;
5059:
5060: IF p_which_tables = 'MAIN' THEN
5061: SELECT count(distinct(plla.SHIP_TO_LOCATION_ID)) INTO PO_COMMUNICATION_PVT.g_dist_shipto_count
5062: FROM po_line_locations_all plla

Line 5061: SELECT count(distinct(plla.SHIP_TO_LOCATION_ID)) INTO PO_COMMUNICATION_PVT.g_dist_shipto_count

5057: WHERE vn.vendor_id = ph.vendor_id
5058: AND ph.po_header_id = PO_COMMUNICATION_PVT.g_release_header_id ;
5059:
5060: IF p_which_tables = 'MAIN' THEN
5061: SELECT count(distinct(plla.SHIP_TO_LOCATION_ID)) INTO PO_COMMUNICATION_PVT.g_dist_shipto_count
5062: FROM po_line_locations_all plla
5063: WHERE plla.po_release_id = p_document_id;
5064:
5065: ELSE

Line 5066: SELECT count(distinct(plla.SHIP_TO_LOCATION_ID)) INTO PO_COMMUNICATION_PVT.g_dist_shipto_count

5062: FROM po_line_locations_all plla
5063: WHERE plla.po_release_id = p_document_id;
5064:
5065: ELSE
5066: SELECT count(distinct(plla.SHIP_TO_LOCATION_ID)) INTO PO_COMMUNICATION_PVT.g_dist_shipto_count
5067: FROM po_line_locations_archive_all plla
5068: WHERE plla.po_release_id = p_document_id
5069: and plla.revision_num = p_revision_num;
5070: END IF;

Line 5077: values(null, p_document_id, p_revision_num, PO_COMMUNICATION_PVT.getFormatMask);

5073: -- bug#3823799: Moved the query from top to here to insert data in table based on the document type.
5074: -- po_header_id is inserted as null
5075: -- bug#3853109: Added the column names in the insert clause as per the review comments
5076: insert into PO_COMMUNICATION_GT(po_header_id, po_release_id, revision_number, format_mask)
5077: values(null, p_document_id, p_revision_num, PO_COMMUNICATION_PVT.getFormatMask);
5078: END IF;
5079:
5080: EXCEPTION
5081: WHEN OTHERS then

Line 5082: --Bug5983107 po_communication_pvt.g_buyer_org := null;

5078: END IF;
5079:
5080: EXCEPTION
5081: WHEN OTHERS then
5082: --Bug5983107 po_communication_pvt.g_buyer_org := null;
5083: l_supp_org := null;
5084: l_po_number := null;
5085: l_change_summary := null;
5086: l_vendor_id := null;

Line 5139: FND_MESSAGE.SET_TOKEN('BUYER_ORG', po_communication_pvt.g_buyer_org);

5135: -- so, show old cover page message (with no mention to look elsewhere for terms)
5136:
5137: /*Get the messages in covering page by replacing the tokens with correponding value.*/
5138: FND_MESSAGE.SET_NAME('PO', 'PO_FO_COVERING_MESSAGE');
5139: FND_MESSAGE.SET_TOKEN('BUYER_ORG', po_communication_pvt.g_buyer_org);
5140: FND_MESSAGE.SET_TOKEN('SUPP_ORG', l_supp_org);
5141: PO_COMMUNICATION_PVT.g_cover_message := FND_MESSAGE.GET;
5142:
5143:

Line 5141: PO_COMMUNICATION_PVT.g_cover_message := FND_MESSAGE.GET;

5137: /*Get the messages in covering page by replacing the tokens with correponding value.*/
5138: FND_MESSAGE.SET_NAME('PO', 'PO_FO_COVERING_MESSAGE');
5139: FND_MESSAGE.SET_TOKEN('BUYER_ORG', po_communication_pvt.g_buyer_org);
5140: FND_MESSAGE.SET_TOKEN('SUPP_ORG', l_supp_org);
5141: PO_COMMUNICATION_PVT.g_cover_message := FND_MESSAGE.GET;
5142:
5143:
5144: FND_MESSAGE.SET_NAME('PO', 'PO_FO_AMENDMENT_MESSAGE');
5145: FND_MESSAGE.SET_TOKEN('PO_NUM', l_po_number);

Line 5147: PO_COMMUNICATION_PVT.g_amendment_message := FND_MESSAGE.GET;

5143:
5144: FND_MESSAGE.SET_NAME('PO', 'PO_FO_AMENDMENT_MESSAGE');
5145: FND_MESSAGE.SET_TOKEN('PO_NUM', l_po_number);
5146: FND_MESSAGE.SET_TOKEN('CHANGE_SUMMARY', l_change_summary);
5147: PO_COMMUNICATION_PVT.g_amendment_message := FND_MESSAGE.GET;
5148:
5149: g_is_contract_attached_doc := 'N'; -- bug4026592
5150:
5151: ELSIF (- 1 <> OKC_TERMS_UTIL_GRP.get_primary_terms_doc_file_id(p_document_id => p_document_id

Line 5159: FND_MESSAGE.SET_TOKEN('BUYER_ORG', po_communication_pvt.g_buyer_org);

5155: -- Primary document exists, but is not mergeable
5156:
5157: /*Get the messages in covering page by replacing the tokens with correponding value.*/
5158: FND_MESSAGE.SET_NAME('PO', 'PO_FO_COVER_MSG_NOT_MERGED');
5159: FND_MESSAGE.SET_TOKEN('BUYER_ORG', po_communication_pvt.g_buyer_org);
5160: FND_MESSAGE.SET_TOKEN('SUPP_ORG', l_supp_org);
5161: PO_COMMUNICATION_PVT.g_cover_message := FND_MESSAGE.GET;
5162:
5163:

Line 5161: PO_COMMUNICATION_PVT.g_cover_message := FND_MESSAGE.GET;

5157: /*Get the messages in covering page by replacing the tokens with correponding value.*/
5158: FND_MESSAGE.SET_NAME('PO', 'PO_FO_COVER_MSG_NOT_MERGED');
5159: FND_MESSAGE.SET_TOKEN('BUYER_ORG', po_communication_pvt.g_buyer_org);
5160: FND_MESSAGE.SET_TOKEN('SUPP_ORG', l_supp_org);
5161: PO_COMMUNICATION_PVT.g_cover_message := FND_MESSAGE.GET;
5162:
5163:
5164: FND_MESSAGE.SET_NAME('PO', 'PO_FO_AMEND_MSG_NOT_MERGED');
5165: FND_MESSAGE.SET_TOKEN('PO_NUM', l_po_number);

Line 5167: PO_COMMUNICATION_PVT.g_amendment_message := FND_MESSAGE.GET;

5163:
5164: FND_MESSAGE.SET_NAME('PO', 'PO_FO_AMEND_MSG_NOT_MERGED');
5165: FND_MESSAGE.SET_TOKEN('PO_NUM', l_po_number);
5166: FND_MESSAGE.SET_TOKEN('CHANGE_SUMMARY', l_change_summary);
5167: PO_COMMUNICATION_PVT.g_amendment_message := FND_MESSAGE.GET;
5168:
5169: g_is_contract_attached_doc := 'Y'; -- bug4026592
5170:
5171: ELSE

Line 5177: FND_MESSAGE.SET_TOKEN('BUYER_ORG', po_communication_pvt.g_buyer_org);

5173: -- Primary attached document does not exist!
5174: -- Bug 4014230: Get buyer and supplier org tokens
5175:
5176: FND_MESSAGE.SET_NAME('PO', 'PO_FO_MSG_TERMS_DOC_MISSING');
5177: FND_MESSAGE.SET_TOKEN('BUYER_ORG', po_communication_pvt.g_buyer_org);
5178: FND_MESSAGE.SET_TOKEN('SUPP_ORG', l_supp_org);
5179: PO_COMMUNICATION_PVT.g_cover_message := FND_MESSAGE.GET;
5180:
5181: FND_MESSAGE.SET_NAME('PO', 'PO_FO_MSG_TERMS_DOC_MISSING');

Line 5179: PO_COMMUNICATION_PVT.g_cover_message := FND_MESSAGE.GET;

5175:
5176: FND_MESSAGE.SET_NAME('PO', 'PO_FO_MSG_TERMS_DOC_MISSING');
5177: FND_MESSAGE.SET_TOKEN('BUYER_ORG', po_communication_pvt.g_buyer_org);
5178: FND_MESSAGE.SET_TOKEN('SUPP_ORG', l_supp_org);
5179: PO_COMMUNICATION_PVT.g_cover_message := FND_MESSAGE.GET;
5180:
5181: FND_MESSAGE.SET_NAME('PO', 'PO_FO_MSG_TERMS_DOC_MISSING');
5182: FND_MESSAGE.SET_TOKEN('BUYER_ORG', po_communication_pvt.g_buyer_org);
5183: FND_MESSAGE.SET_TOKEN('SUPP_ORG', l_supp_org);

Line 5182: FND_MESSAGE.SET_TOKEN('BUYER_ORG', po_communication_pvt.g_buyer_org);

5178: FND_MESSAGE.SET_TOKEN('SUPP_ORG', l_supp_org);
5179: PO_COMMUNICATION_PVT.g_cover_message := FND_MESSAGE.GET;
5180:
5181: FND_MESSAGE.SET_NAME('PO', 'PO_FO_MSG_TERMS_DOC_MISSING');
5182: FND_MESSAGE.SET_TOKEN('BUYER_ORG', po_communication_pvt.g_buyer_org);
5183: FND_MESSAGE.SET_TOKEN('SUPP_ORG', l_supp_org);
5184: PO_COMMUNICATION_PVT.g_amendment_message := FND_MESSAGE.GET;
5185:
5186: g_is_contract_attached_doc := 'Y'; -- bug4026592

Line 5184: PO_COMMUNICATION_PVT.g_amendment_message := FND_MESSAGE.GET;

5180:
5181: FND_MESSAGE.SET_NAME('PO', 'PO_FO_MSG_TERMS_DOC_MISSING');
5182: FND_MESSAGE.SET_TOKEN('BUYER_ORG', po_communication_pvt.g_buyer_org);
5183: FND_MESSAGE.SET_TOKEN('SUPP_ORG', l_supp_org);
5184: PO_COMMUNICATION_PVT.g_amendment_message := FND_MESSAGE.GET;
5185:
5186: g_is_contract_attached_doc := 'Y'; -- bug4026592
5187:
5188: END IF;

Line 5210: PO_COMMUNICATION_PVT.g_timezone := FND_MESSAGE.GET;

5206: END;
5207: FND_MESSAGE.SET_NAME('PO', 'PO_FO_TIMEZONE');
5208: FND_MESSAGE.SET_TOKEN('TIME_OFFSET', l_offset);
5209: FND_MESSAGE.SET_TOKEN('TIMEZONE_NAME', l_timezone);
5210: PO_COMMUNICATION_PVT.g_timezone := FND_MESSAGE.GET;
5211: END IF;
5212:
5213: PO_COMMUNICATION_PVT.g_vendor_id := l_vendor_id;
5214:

Line 5213: PO_COMMUNICATION_PVT.g_vendor_id := l_vendor_id;

5209: FND_MESSAGE.SET_TOKEN('TIMEZONE_NAME', l_timezone);
5210: PO_COMMUNICATION_PVT.g_timezone := FND_MESSAGE.GET;
5211: END IF;
5212:
5213: PO_COMMUNICATION_PVT.g_vendor_id := l_vendor_id;
5214:
5215: /*bug#3630737.
5216: Retrieve PO_FO_DOCUMENT_NAME from fnd_new_messages by passing
5217: DocumentType, po number and revision number as tokens*/

Line 5219: FND_MESSAGE.SET_TOKEN('DOCUMENT_TYPE', PO_COMMUNICATION_PVT.g_documentType);

5215: /*bug#3630737.
5216: Retrieve PO_FO_DOCUMENT_NAME from fnd_new_messages by passing
5217: DocumentType, po number and revision number as tokens*/
5218: FND_MESSAGE.SET_NAME('PO', 'PO_FO_DOCUMENT_NAME');
5219: FND_MESSAGE.SET_TOKEN('DOCUMENT_TYPE', PO_COMMUNICATION_PVT.g_documentType);
5220: FND_MESSAGE.SET_TOKEN('PO_NUMBER', l_po_number);
5221: FND_MESSAGE.SET_TOKEN('REVISION_NUMBER', PO_COMMUNICATION_PVT.g_revision_num);
5222: PO_COMMUNICATION_PVT.g_documentName := FND_MESSAGE.GET;
5223:

Line 5221: FND_MESSAGE.SET_TOKEN('REVISION_NUMBER', PO_COMMUNICATION_PVT.g_revision_num);

5217: DocumentType, po number and revision number as tokens*/
5218: FND_MESSAGE.SET_NAME('PO', 'PO_FO_DOCUMENT_NAME');
5219: FND_MESSAGE.SET_TOKEN('DOCUMENT_TYPE', PO_COMMUNICATION_PVT.g_documentType);
5220: FND_MESSAGE.SET_TOKEN('PO_NUMBER', l_po_number);
5221: FND_MESSAGE.SET_TOKEN('REVISION_NUMBER', PO_COMMUNICATION_PVT.g_revision_num);
5222: PO_COMMUNICATION_PVT.g_documentName := FND_MESSAGE.GET;
5223:
5224: -- SQl What: Querying for header short attachments
5225: -- SQL why: To display note to supplier data in header part of pdf document.

Line 5222: PO_COMMUNICATION_PVT.g_documentName := FND_MESSAGE.GET;

5218: FND_MESSAGE.SET_NAME('PO', 'PO_FO_DOCUMENT_NAME');
5219: FND_MESSAGE.SET_TOKEN('DOCUMENT_TYPE', PO_COMMUNICATION_PVT.g_documentType);
5220: FND_MESSAGE.SET_TOKEN('PO_NUMBER', l_po_number);
5221: FND_MESSAGE.SET_TOKEN('REVISION_NUMBER', PO_COMMUNICATION_PVT.g_revision_num);
5222: PO_COMMUNICATION_PVT.g_documentName := FND_MESSAGE.GET;
5223:
5224: -- SQl What: Querying for header short attachments
5225: -- SQL why: To display note to supplier data in header part of pdf document.
5226: -- SQL Join: vendor_id and header_id

Line 5355: fad.pk1_value=to_char(PO_COMMUNICATION_PVT.getInventoryOrgId()) AND --Bug6139548

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
5355: fad.pk1_value=to_char(PO_COMMUNICATION_PVT.getInventoryOrgId()) AND --Bug6139548
5356: fad.pk2_value=to_char(plx.item_id) AND plx.item_id is not null)
5357: OR
5358: (fad.entity_name=''PO_HEADERS'' AND fad.pk1_value=to_char(plx.from_header_id)
5359: AND plx.from_header_id IS NOT NULL)

Line 5393: fad.pk1_value=to_char(PO_COMMUNICATION_PVT.getInventoryOrgId()) AND

5389: (fad.entity_name=''PO_HEADERS'' AND fad.pk1_value=to_char(plx.contract_id)
5390: AND plx.contract_id IS NOT NULL)
5391: OR
5392: (fad.entity_name=''MTL_SYSTEM_ITEMS'' AND
5393: fad.pk1_value=to_char(PO_COMMUNICATION_PVT.getInventoryOrgId()) AND
5394: fad.pk2_value=to_char(plx.item_id) AND plx.item_id is not null)
5395: )
5396: AND fad.datatype_id=5
5397: AND fad.function_name=''PO_PRINTPO'' order by fad.seq_num) AS line_url_attachments'; --bug6133951

Line 5420: fad.pk1_value=to_char(PO_COMMUNICATION_PVT.getInventoryOrgId()) AND

5416: (fad.entity_name=''PO_HEADERS'' AND fad.pk1_value=to_char(plx.contract_id)
5417: AND plx.contract_id IS NOT NULL)
5418: OR
5419: (fad.entity_name=''MTL_SYSTEM_ITEMS'' AND
5420: fad.pk1_value=to_char(PO_COMMUNICATION_PVT.getInventoryOrgId()) AND
5421: fad.pk2_value=to_char(plx.item_id) AND plx.item_id is not null)
5422: )
5423: AND fad.datatype_id=6
5424: AND fad.function_name=''PO_PRINTPO''

Line 5743: l_agreement_assign_query := ' CURSOR( select rownum, PO_COMMUNICATION_PVT.GETOPERATIONINFO(PGA.PURCHASING_ORG_ID) OU_NAME,

5739: /*
5740: These are the queries used to get purchasing organization and purchasing supplier details for main
5741: and archive tables.
5742: */
5743: l_agreement_assign_query := ' CURSOR( select rownum, PO_COMMUNICATION_PVT.GETOPERATIONINFO(PGA.PURCHASING_ORG_ID) OU_NAME,
5744: PO_COMMUNICATION_PVT.getVendorAddressLine1(PGA.vendor_site_id) VENDOR_ADDRESS_LINE1,
5745: PO_COMMUNICATION_PVT.getVendorAddressLine2() VENDOR_ADDRESS_LINE2,
5746: PO_COMMUNICATION_PVT.getVendorAddressLine3() VENDOR_ADDRESS_LINE3,
5747: PO_COMMUNICATION_PVT.getVendorCityStateZipInfo() VENDOR_CITY_STATE_ZIP,

Line 5744: PO_COMMUNICATION_PVT.getVendorAddressLine1(PGA.vendor_site_id) VENDOR_ADDRESS_LINE1,

5740: These are the queries used to get purchasing organization and purchasing supplier details for main
5741: and archive tables.
5742: */
5743: l_agreement_assign_query := ' CURSOR( select rownum, PO_COMMUNICATION_PVT.GETOPERATIONINFO(PGA.PURCHASING_ORG_ID) OU_NAME,
5744: PO_COMMUNICATION_PVT.getVendorAddressLine1(PGA.vendor_site_id) VENDOR_ADDRESS_LINE1,
5745: PO_COMMUNICATION_PVT.getVendorAddressLine2() VENDOR_ADDRESS_LINE2,
5746: PO_COMMUNICATION_PVT.getVendorAddressLine3() VENDOR_ADDRESS_LINE3,
5747: PO_COMMUNICATION_PVT.getVendorCityStateZipInfo() VENDOR_CITY_STATE_ZIP,
5748: PO_COMMUNICATION_PVT.getVendorCountry() VENDOR_COUNTRY

Line 5745: PO_COMMUNICATION_PVT.getVendorAddressLine2() VENDOR_ADDRESS_LINE2,

5741: and archive tables.
5742: */
5743: l_agreement_assign_query := ' CURSOR( select rownum, PO_COMMUNICATION_PVT.GETOPERATIONINFO(PGA.PURCHASING_ORG_ID) OU_NAME,
5744: PO_COMMUNICATION_PVT.getVendorAddressLine1(PGA.vendor_site_id) VENDOR_ADDRESS_LINE1,
5745: PO_COMMUNICATION_PVT.getVendorAddressLine2() VENDOR_ADDRESS_LINE2,
5746: PO_COMMUNICATION_PVT.getVendorAddressLine3() VENDOR_ADDRESS_LINE3,
5747: PO_COMMUNICATION_PVT.getVendorCityStateZipInfo() VENDOR_CITY_STATE_ZIP,
5748: PO_COMMUNICATION_PVT.getVendorCountry() VENDOR_COUNTRY
5749: FROM po_ga_org_assignments PGA

Line 5746: PO_COMMUNICATION_PVT.getVendorAddressLine3() VENDOR_ADDRESS_LINE3,

5742: */
5743: l_agreement_assign_query := ' CURSOR( select rownum, PO_COMMUNICATION_PVT.GETOPERATIONINFO(PGA.PURCHASING_ORG_ID) OU_NAME,
5744: PO_COMMUNICATION_PVT.getVendorAddressLine1(PGA.vendor_site_id) VENDOR_ADDRESS_LINE1,
5745: PO_COMMUNICATION_PVT.getVendorAddressLine2() VENDOR_ADDRESS_LINE2,
5746: PO_COMMUNICATION_PVT.getVendorAddressLine3() VENDOR_ADDRESS_LINE3,
5747: PO_COMMUNICATION_PVT.getVendorCityStateZipInfo() VENDOR_CITY_STATE_ZIP,
5748: PO_COMMUNICATION_PVT.getVendorCountry() VENDOR_COUNTRY
5749: FROM po_ga_org_assignments PGA
5750: WHERE PGA.ENABLED_FLAG = ''Y'' and PGA.PO_HEADER_ID = PHX.PO_HEADER_ID) as organization_details ';

Line 5747: PO_COMMUNICATION_PVT.getVendorCityStateZipInfo() VENDOR_CITY_STATE_ZIP,

5743: l_agreement_assign_query := ' CURSOR( select rownum, PO_COMMUNICATION_PVT.GETOPERATIONINFO(PGA.PURCHASING_ORG_ID) OU_NAME,
5744: PO_COMMUNICATION_PVT.getVendorAddressLine1(PGA.vendor_site_id) VENDOR_ADDRESS_LINE1,
5745: PO_COMMUNICATION_PVT.getVendorAddressLine2() VENDOR_ADDRESS_LINE2,
5746: PO_COMMUNICATION_PVT.getVendorAddressLine3() VENDOR_ADDRESS_LINE3,
5747: PO_COMMUNICATION_PVT.getVendorCityStateZipInfo() VENDOR_CITY_STATE_ZIP,
5748: PO_COMMUNICATION_PVT.getVendorCountry() VENDOR_COUNTRY
5749: FROM po_ga_org_assignments PGA
5750: WHERE PGA.ENABLED_FLAG = ''Y'' and PGA.PO_HEADER_ID = PHX.PO_HEADER_ID) as organization_details ';
5751:

Line 5748: PO_COMMUNICATION_PVT.getVendorCountry() VENDOR_COUNTRY

5744: PO_COMMUNICATION_PVT.getVendorAddressLine1(PGA.vendor_site_id) VENDOR_ADDRESS_LINE1,
5745: PO_COMMUNICATION_PVT.getVendorAddressLine2() VENDOR_ADDRESS_LINE2,
5746: PO_COMMUNICATION_PVT.getVendorAddressLine3() VENDOR_ADDRESS_LINE3,
5747: PO_COMMUNICATION_PVT.getVendorCityStateZipInfo() VENDOR_CITY_STATE_ZIP,
5748: PO_COMMUNICATION_PVT.getVendorCountry() VENDOR_COUNTRY
5749: FROM po_ga_org_assignments PGA
5750: WHERE PGA.ENABLED_FLAG = ''Y'' and PGA.PO_HEADER_ID = PHX.PO_HEADER_ID) as organization_details ';
5751:
5752: l_arc_agreement_assign_query := ' CURSOR( select rownum, PO_COMMUNICATION_PVT.GETOPERATIONINFO(PGA.PURCHASING_ORG_ID) OU_NAME,

Line 5752: l_arc_agreement_assign_query := ' CURSOR( select rownum, PO_COMMUNICATION_PVT.GETOPERATIONINFO(PGA.PURCHASING_ORG_ID) OU_NAME,

5748: PO_COMMUNICATION_PVT.getVendorCountry() VENDOR_COUNTRY
5749: FROM po_ga_org_assignments PGA
5750: WHERE PGA.ENABLED_FLAG = ''Y'' and PGA.PO_HEADER_ID = PHX.PO_HEADER_ID) as organization_details ';
5751:
5752: l_arc_agreement_assign_query := ' CURSOR( select rownum, PO_COMMUNICATION_PVT.GETOPERATIONINFO(PGA.PURCHASING_ORG_ID) OU_NAME,
5753: PO_COMMUNICATION_PVT.getVendorAddressLine1(PGA.vendor_site_id) VENDOR_ADDRESS_LINE1,
5754: PO_COMMUNICATION_PVT.getVendorAddressLine2() VENDOR_ADDRESS_LINE2,
5755: PO_COMMUNICATION_PVT.getVendorAddressLine3() VENDOR_ADDRESS_LINE3,
5756: PO_COMMUNICATION_PVT.getVendorCityStateZipInfo() VENDOR_CITY_STATE_ZIP,

Line 5753: PO_COMMUNICATION_PVT.getVendorAddressLine1(PGA.vendor_site_id) VENDOR_ADDRESS_LINE1,

5749: FROM po_ga_org_assignments PGA
5750: WHERE PGA.ENABLED_FLAG = ''Y'' and PGA.PO_HEADER_ID = PHX.PO_HEADER_ID) as organization_details ';
5751:
5752: l_arc_agreement_assign_query := ' CURSOR( select rownum, PO_COMMUNICATION_PVT.GETOPERATIONINFO(PGA.PURCHASING_ORG_ID) OU_NAME,
5753: PO_COMMUNICATION_PVT.getVendorAddressLine1(PGA.vendor_site_id) VENDOR_ADDRESS_LINE1,
5754: PO_COMMUNICATION_PVT.getVendorAddressLine2() VENDOR_ADDRESS_LINE2,
5755: PO_COMMUNICATION_PVT.getVendorAddressLine3() VENDOR_ADDRESS_LINE3,
5756: PO_COMMUNICATION_PVT.getVendorCityStateZipInfo() VENDOR_CITY_STATE_ZIP,
5757: PO_COMMUNICATION_PVT.getVendorCountry() VENDOR_COUNTRY

Line 5754: PO_COMMUNICATION_PVT.getVendorAddressLine2() VENDOR_ADDRESS_LINE2,

5750: WHERE PGA.ENABLED_FLAG = ''Y'' and PGA.PO_HEADER_ID = PHX.PO_HEADER_ID) as organization_details ';
5751:
5752: l_arc_agreement_assign_query := ' CURSOR( select rownum, PO_COMMUNICATION_PVT.GETOPERATIONINFO(PGA.PURCHASING_ORG_ID) OU_NAME,
5753: PO_COMMUNICATION_PVT.getVendorAddressLine1(PGA.vendor_site_id) VENDOR_ADDRESS_LINE1,
5754: PO_COMMUNICATION_PVT.getVendorAddressLine2() VENDOR_ADDRESS_LINE2,
5755: PO_COMMUNICATION_PVT.getVendorAddressLine3() VENDOR_ADDRESS_LINE3,
5756: PO_COMMUNICATION_PVT.getVendorCityStateZipInfo() VENDOR_CITY_STATE_ZIP,
5757: PO_COMMUNICATION_PVT.getVendorCountry() VENDOR_COUNTRY
5758: FROM po_ga_org_assignments_archive PGA

Line 5755: PO_COMMUNICATION_PVT.getVendorAddressLine3() VENDOR_ADDRESS_LINE3,

5751:
5752: l_arc_agreement_assign_query := ' CURSOR( select rownum, PO_COMMUNICATION_PVT.GETOPERATIONINFO(PGA.PURCHASING_ORG_ID) OU_NAME,
5753: PO_COMMUNICATION_PVT.getVendorAddressLine1(PGA.vendor_site_id) VENDOR_ADDRESS_LINE1,
5754: PO_COMMUNICATION_PVT.getVendorAddressLine2() VENDOR_ADDRESS_LINE2,
5755: PO_COMMUNICATION_PVT.getVendorAddressLine3() VENDOR_ADDRESS_LINE3,
5756: PO_COMMUNICATION_PVT.getVendorCityStateZipInfo() VENDOR_CITY_STATE_ZIP,
5757: PO_COMMUNICATION_PVT.getVendorCountry() VENDOR_COUNTRY
5758: FROM po_ga_org_assignments_archive PGA
5759: WHERE PGA.ENABLED_FLAG = ''Y'' and PGA.PO_HEADER_ID = PHX.PO_HEADER_ID) as organization_details ';

Line 5756: PO_COMMUNICATION_PVT.getVendorCityStateZipInfo() VENDOR_CITY_STATE_ZIP,

5752: l_arc_agreement_assign_query := ' CURSOR( select rownum, PO_COMMUNICATION_PVT.GETOPERATIONINFO(PGA.PURCHASING_ORG_ID) OU_NAME,
5753: PO_COMMUNICATION_PVT.getVendorAddressLine1(PGA.vendor_site_id) VENDOR_ADDRESS_LINE1,
5754: PO_COMMUNICATION_PVT.getVendorAddressLine2() VENDOR_ADDRESS_LINE2,
5755: PO_COMMUNICATION_PVT.getVendorAddressLine3() VENDOR_ADDRESS_LINE3,
5756: PO_COMMUNICATION_PVT.getVendorCityStateZipInfo() VENDOR_CITY_STATE_ZIP,
5757: PO_COMMUNICATION_PVT.getVendorCountry() VENDOR_COUNTRY
5758: FROM po_ga_org_assignments_archive PGA
5759: WHERE PGA.ENABLED_FLAG = ''Y'' and PGA.PO_HEADER_ID = PHX.PO_HEADER_ID) as organization_details ';
5760:

Line 5757: PO_COMMUNICATION_PVT.getVendorCountry() VENDOR_COUNTRY

5753: PO_COMMUNICATION_PVT.getVendorAddressLine1(PGA.vendor_site_id) VENDOR_ADDRESS_LINE1,
5754: PO_COMMUNICATION_PVT.getVendorAddressLine2() VENDOR_ADDRESS_LINE2,
5755: PO_COMMUNICATION_PVT.getVendorAddressLine3() VENDOR_ADDRESS_LINE3,
5756: PO_COMMUNICATION_PVT.getVendorCityStateZipInfo() VENDOR_CITY_STATE_ZIP,
5757: PO_COMMUNICATION_PVT.getVendorCountry() VENDOR_COUNTRY
5758: FROM po_ga_org_assignments_archive PGA
5759: WHERE PGA.ENABLED_FLAG = ''Y'' and PGA.PO_HEADER_ID = PHX.PO_HEADER_ID) as organization_details ';
5760:
5761: -- SQl What: Query for header, line, locations, line locations, shipments and distribution information based on

Line 5792: PO_COMMUNICATION_PVT.g_release_header_id := p_document_id; -- For documents other than Releases join is based on header id for getting the attachments.

5788: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_STATEMENT) THEN
5789: FND_LOG.string(FND_LOG.LEVEL_STATEMENT, g_log_head || l_api_name ||'NON Release:','Entered into Non Release Query Loop');
5790: END IF;
5791:
5792: PO_COMMUNICATION_PVT.g_release_header_id := p_document_id; -- For documents other than Releases join is based on header id for getting the attachments.
5793: IF p_which_tables = 'MAIN' THEN
5794:
5795: --
5796: --

Line 5807: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type,

5803: l_price_modifier_query3 := 'CURSOR (SELECT pha.segment1 ponum FROM po_headers_all pha '
5804: || 'WHERE pha.po_header_id = plx.from_header_id) AS ADD_PRICE_PONUM';
5805: --
5806:
5807: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type,
5808: PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,
5809: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5810: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5811: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,

Line 5808: PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,

5804: || 'WHERE pha.po_header_id = plx.from_header_id) AS ADD_PRICE_PONUM';
5805: --
5806:
5807: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type,
5808: PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,
5809: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5810: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5811: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5812: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,

Line 5809: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,

5805: --
5806:
5807: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type,
5808: PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,
5809: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5810: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5811: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5812: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,
5813: PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '

Line 5810: PO_COMMUNICATION_PVT.getDocumentName() document_name,

5806:
5807: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type,
5808: PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,
5809: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5810: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5811: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5812: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,
5813: PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '
5814: || l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||'

Line 5811: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,

5807: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type,
5808: PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,
5809: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5810: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5811: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5812: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,
5813: PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '
5814: || l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||'
5815: FROM PO_HEADERS_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';

Line 5813: PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '

5809: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5810: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5811: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5812: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,
5813: PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '
5814: || l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||'
5815: FROM PO_HEADERS_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5816:
5817: IF(p_document_subtype <> 'CONTRACTS') THEN -- contracts will have only headers

Line 5815: FROM PO_HEADERS_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';

5811: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5812: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,
5813: PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '
5814: || l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||'
5815: FROM PO_HEADERS_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5816:
5817: IF(p_document_subtype <> 'CONTRACTS') THEN -- contracts will have only headers
5818:
5819: SELECT count(*) into l_count FROM po_lines_all WHERE po_header_id = p_document_id;

Line 5829: 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,

5825: the entity _name is 'PO LINE' except for blanket AND entity_name is 'BLANKET LINE'
5826: for blanket
5827: */
5828: --Bug 5506417: Added order by plx.line_num clause
5829: 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,
5830: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5831: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5832: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5833: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,

Line 5830: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,

5826: for blanket
5827: */
5828: --Bug 5506417: Added order by plx.line_num clause
5829: 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,
5830: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5831: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5832: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5833: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5834: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||

Line 5831: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,

5827: */
5828: --Bug 5506417: Added order by plx.line_num clause
5829: 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,
5830: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5831: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5832: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5833: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5834: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5835: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',

Line 5832: PO_COMMUNICATION_PVT.getDocumentName() document_name,

5828: --Bug 5506417: Added order by plx.line_num clause
5829: 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,
5830: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5831: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5832: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5833: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5834: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5835: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',
5836: CURSOR(SELECT plx.*, '|| l_adv_amount_query ||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER,MIN_MULTIPLIER, MAX_MULTIPLIER FROM po_price_differentials_v

Line 5833: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,

5829: 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,
5830: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5831: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5832: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5833: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5834: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5835: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',
5836: CURSOR(SELECT plx.*, '|| l_adv_amount_query ||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER,MIN_MULTIPLIER, MAX_MULTIPLIER FROM po_price_differentials_v
5837: WHERE entity_type='''|| l_eventType ||''' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,

Line 5834: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||

5830: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5831: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5832: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5833: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5834: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5835: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',
5836: CURSOR(SELECT plx.*, '|| l_adv_amount_query ||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER,MIN_MULTIPLIER, MAX_MULTIPLIER FROM po_price_differentials_v
5837: WHERE entity_type='''|| l_eventType ||''' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,
5838: '|| l_line_short_attachment_query || ',' || l_price_modifier_query1 || ',' || l_price_modifier_query2 || ',' || l_price_modifier_query3

Line 5843: plaa.cancel_flag= ''Y'' and plaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) order by plx.line_num) AS lines

5839: || ',' || l_line_url_attachment_query || ',' || l_line_file_attachment_query ||' FROM po_lines_xml plx
5840: WHERE plx.po_header_id = phx.po_header_id and not exists
5841: (select ''x'' from po_lines_archive_all plaa where
5842: plaa.po_line_id = plx.po_line_id and
5843: plaa.cancel_flag= ''Y'' and plaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) order by plx.line_num) AS lines
5844: FROM PO_HEADERS_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5845:
5846: END IF;
5847:

Line 5844: FROM PO_HEADERS_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';

5840: WHERE plx.po_header_id = phx.po_header_id and not exists
5841: (select ''x'' from po_lines_archive_all plaa where
5842: plaa.po_line_id = plx.po_line_id and
5843: plaa.cancel_flag= ''Y'' and plaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) order by plx.line_num) AS lines
5844: FROM PO_HEADERS_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5845:
5846: END IF;
5847:
5848: SELECT count(*) into l_count FROM po_line_locations_all WHERE po_header_id = p_document_id;

Line 5854: 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,

5850: IF l_count >0 THEN
5851:
5852: /* Bug#3574748: Added the condition SHIPMENT_TYPE in ('BLANKET','STANDARD') in shipment query. */
5853: --Bug 5506417: Added order by pllx.shipment_num and order by plx.line_num clauses
5854: 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,
5855: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5856: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5857: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5858: PO_COMMUNICATION_PVT.IsDocumentSigned( PO_COMMUNICATION_PVT.getDocumentId()) Signed,

Line 5855: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,

5851:
5852: /* Bug#3574748: Added the condition SHIPMENT_TYPE in ('BLANKET','STANDARD') in shipment query. */
5853: --Bug 5506417: Added order by pllx.shipment_num and order by plx.line_num clauses
5854: 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,
5855: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5856: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5857: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5858: PO_COMMUNICATION_PVT.IsDocumentSigned( PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5859: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , '||

Line 5856: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,

5852: /* Bug#3574748: Added the condition SHIPMENT_TYPE in ('BLANKET','STANDARD') in shipment query. */
5853: --Bug 5506417: Added order by pllx.shipment_num and order by plx.line_num clauses
5854: 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,
5855: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5856: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5857: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5858: PO_COMMUNICATION_PVT.IsDocumentSigned( PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5859: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , '||
5860: ' PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , ' || l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',

Line 5857: PO_COMMUNICATION_PVT.getDocumentName() document_name,

5853: --Bug 5506417: Added order by pllx.shipment_num and order by plx.line_num clauses
5854: 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,
5855: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5856: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5857: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5858: PO_COMMUNICATION_PVT.IsDocumentSigned( PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5859: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , '||
5860: ' PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , ' || l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',
5861: CURSOR(SELECT plx.*, '|| l_adv_amount_query ||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER, MIN_MULTIPLIER,MAX_MULTIPLIER FROM po_price_differentials_v

Line 5858: PO_COMMUNICATION_PVT.IsDocumentSigned( PO_COMMUNICATION_PVT.getDocumentId()) Signed,

5854: 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,
5855: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5856: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5857: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5858: PO_COMMUNICATION_PVT.IsDocumentSigned( PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5859: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , '||
5860: ' PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , ' || l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',
5861: CURSOR(SELECT plx.*, '|| l_adv_amount_query ||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER, MIN_MULTIPLIER,MAX_MULTIPLIER FROM po_price_differentials_v
5862: WHERE entity_type='''|| l_eventType ||''' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,

Line 5859: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , '||

5855: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5856: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5857: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5858: PO_COMMUNICATION_PVT.IsDocumentSigned( PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5859: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , '||
5860: ' PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , ' || l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',
5861: CURSOR(SELECT plx.*, '|| l_adv_amount_query ||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER, MIN_MULTIPLIER,MAX_MULTIPLIER FROM po_price_differentials_v
5862: WHERE entity_type='''|| l_eventType ||''' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,
5863: '|| 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 ||',

Line 5860: ' PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , ' || l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',

5856: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5857: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5858: PO_COMMUNICATION_PVT.IsDocumentSigned( PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5859: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , '||
5860: ' PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , ' || l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',
5861: CURSOR(SELECT plx.*, '|| l_adv_amount_query ||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER, MIN_MULTIPLIER,MAX_MULTIPLIER FROM po_price_differentials_v
5862: WHERE entity_type='''|| l_eventType ||''' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,
5863: '|| 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 ||',
5864: CURSOR(SELECT pllx.*,';

Line 5873: 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 || '

5869: /*Bug 10388305 Added l_tax_name_query to get tax names*/
5870: l_xml_query := l_xml_query || l_tax_name_query || ',' || l_shipment_short_attach_query || ',' || l_shipment_url_attach_query || ',' || l_shipment_file_attach_query ||'
5871: 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
5872: (select ''x'' from po_line_locations_archive_all pllaa where pllaa.line_location_id = pllx.line_location_id
5873: 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 || '
5874: FROM po_lines_xml plx
5875: WHERE plx.po_header_id = phx.po_header_id and not exists
5876: (select ''x'' from po_lines_archive_all plaa where
5877: plaa.po_line_id = plx.po_line_id and

Line 5878: plaa.cancel_flag= ''Y'' and plaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) order by plx.line_num) AS lines

5874: FROM po_lines_xml plx
5875: WHERE plx.po_header_id = phx.po_header_id and not exists
5876: (select ''x'' from po_lines_archive_all plaa where
5877: plaa.po_line_id = plx.po_line_id and
5878: plaa.cancel_flag= ''Y'' and plaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) order by plx.line_num) AS lines
5879: FROM PO_HEADERS_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5880: END IF;
5881:
5882: IF(p_document_subtype <> 'BLANKET') THEN -- blankets will not have distributions

Line 5879: FROM PO_HEADERS_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';

5875: WHERE plx.po_header_id = phx.po_header_id and not exists
5876: (select ''x'' from po_lines_archive_all plaa where
5877: plaa.po_line_id = plx.po_line_id and
5878: plaa.cancel_flag= ''Y'' and plaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) order by plx.line_num) AS lines
5879: FROM PO_HEADERS_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5880: END IF;
5881:
5882: IF(p_document_subtype <> 'BLANKET') THEN -- blankets will not have distributions
5883: SELECT count(*) into l_count FROM po_distributions_all WHERE po_header_id = p_document_id;

Line 5888: 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,

5884:
5885: IF l_count >0 THEN
5886: --Bug 5506417 :Added order by pllx.shipment_num and order by plx.line_num clauses
5887: /*Bug 10388305 Added l_tax_name_query to get tax names*/
5888: 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,
5889: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5890: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5891: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5892: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,

Line 5889: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,

5885: IF l_count >0 THEN
5886: --Bug 5506417 :Added order by pllx.shipment_num and order by plx.line_num clauses
5887: /*Bug 10388305 Added l_tax_name_query to get tax names*/
5888: 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,
5889: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5890: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5891: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5892: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5893: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , '||

Line 5890: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,

5886: --Bug 5506417 :Added order by pllx.shipment_num and order by plx.line_num clauses
5887: /*Bug 10388305 Added l_tax_name_query to get tax names*/
5888: 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,
5889: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5890: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5891: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5892: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5893: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , '||
5894: ' PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , ' || l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',

Line 5891: PO_COMMUNICATION_PVT.getDocumentName() document_name,

5887: /*Bug 10388305 Added l_tax_name_query to get tax names*/
5888: 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,
5889: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5890: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5891: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5892: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5893: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , '||
5894: ' PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , ' || l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',
5895: CURSOR(SELECT plx.*, '|| l_adv_amount_query ||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER FROM po_price_differentials_v

Line 5892: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,

5888: 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,
5889: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5890: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5891: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5892: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5893: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , '||
5894: ' PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , ' || l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',
5895: CURSOR(SELECT plx.*, '|| l_adv_amount_query ||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER FROM po_price_differentials_v
5896: WHERE entity_type=''PO LINE'' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,

Line 5893: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , '||

5889: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5890: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5891: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5892: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5893: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , '||
5894: ' PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , ' || l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',
5895: CURSOR(SELECT plx.*, '|| l_adv_amount_query ||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER FROM po_price_differentials_v
5896: WHERE entity_type=''PO LINE'' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,
5897: '|| 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 ||',

Line 5894: ' PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , ' || l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',

5890: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5891: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5892: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5893: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , '||
5894: ' PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , ' || l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',
5895: CURSOR(SELECT plx.*, '|| l_adv_amount_query ||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER FROM po_price_differentials_v
5896: WHERE entity_type=''PO LINE'' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,
5897: '|| 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 ||',
5898: CURSOR(SELECT pllx.*, ' || l_tax_name_query || ',' || l_shipment_short_attach_query || ',' || l_shipment_url_attach_query || ',' || l_shipment_file_attach_query ||',

Line 5902: 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 || '

5898: CURSOR(SELECT pllx.*, ' || l_tax_name_query || ',' || l_shipment_short_attach_query || ',' || l_shipment_url_attach_query || ',' || l_shipment_file_attach_query ||',
5899: 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
5900: 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
5901: (select ''x'' from po_line_locations_archive_all pllaa where pllaa.line_location_id = pllx.line_location_id
5902: 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 || '
5903: FROM po_lines_xml plx WHERE plx.po_header_id = phx.po_header_id and not exists
5904: (select ''x'' from po_lines_archive_all plaa where
5905: plaa.po_line_id = plx.po_line_id and
5906: plaa.cancel_flag= ''Y'' and plaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) order by plx.line_num) AS lines

Line 5906: plaa.cancel_flag= ''Y'' and plaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) order by plx.line_num) AS lines

5902: 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 || '
5903: FROM po_lines_xml plx WHERE plx.po_header_id = phx.po_header_id and not exists
5904: (select ''x'' from po_lines_archive_all plaa where
5905: plaa.po_line_id = plx.po_line_id and
5906: plaa.cancel_flag= ''Y'' and plaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) order by plx.line_num) AS lines
5907: FROM PO_HEADERS_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND
5908: phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5909:
5910: END IF;

Line 5907: FROM PO_HEADERS_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND

5903: FROM po_lines_xml plx WHERE plx.po_header_id = phx.po_header_id and not exists
5904: (select ''x'' from po_lines_archive_all plaa where
5905: plaa.po_line_id = plx.po_line_id and
5906: plaa.cancel_flag= ''Y'' and plaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) order by plx.line_num) AS lines
5907: FROM PO_HEADERS_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND
5908: phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5909:
5910: END IF;
5911: END IF;

Line 5908: phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';

5904: (select ''x'' from po_lines_archive_all plaa where
5905: plaa.po_line_id = plx.po_line_id and
5906: plaa.cancel_flag= ''Y'' and plaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) order by plx.line_num) AS lines
5907: FROM PO_HEADERS_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND
5908: phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5909:
5910: END IF;
5911: END IF;
5912:

Line 5924: || 'AND pax1.revision_num= PO_COMMUNICATION_PVT.getRevisionNum() '

5920: --
5921: --
5922: l_price_modifier_query1 := 'CURSOR (SELECT pax1.* FROM PO_PRICE_ADJS_ARCHIVE_XML pax1 '
5923: || 'WHERE pax1.po_header_id = plx.po_header_id AND pax1.po_line_id = plx.po_line_id '
5924: || 'AND pax1.revision_num= PO_COMMUNICATION_PVT.getRevisionNum() '
5925: || 'AND pax1.parent_adjustment_id is null order by pax1.pricing_group_sequence) AS PRICE_MODIFIERS';
5926: l_price_modifier_query2 := 'CURSOR (SELECT pax2.* FROM PO_PRICE_ADJS_ARCHIVE_XML pax2 '
5927: || 'WHERE pax2.po_header_id = plx.from_header_id AND pax2.po_line_id = plx.from_line_id '
5928: || 'AND pax2.revision_num= PO_COMMUNICATION_PVT.getRevisionNum() AND '

Line 5928: || 'AND pax2.revision_num= PO_COMMUNICATION_PVT.getRevisionNum() AND '

5924: || 'AND pax1.revision_num= PO_COMMUNICATION_PVT.getRevisionNum() '
5925: || 'AND pax1.parent_adjustment_id is null order by pax1.pricing_group_sequence) AS PRICE_MODIFIERS';
5926: l_price_modifier_query2 := 'CURSOR (SELECT pax2.* FROM PO_PRICE_ADJS_ARCHIVE_XML pax2 '
5927: || 'WHERE pax2.po_header_id = plx.from_header_id AND pax2.po_line_id = plx.from_line_id '
5928: || 'AND pax2.revision_num= PO_COMMUNICATION_PVT.getRevisionNum() AND '
5929: || 'pax2.parent_adjustment_id is null order by pax2.pricing_group_sequence) AS ADD_PRICE_MODIFIERS';
5930: l_price_modifier_query3 := 'CURSOR (SELECT pha.segment1 ponum FROM po_headers_archive_all pha '
5931: || 'WHERE pha.po_header_id = plx.from_header_id) AS ADD_PRICE_PONUM';
5932: --

Line 5939: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type,

5935: /* Bug#3698674: SQL for generation of XML is framed by checking whether the values are exists at each
5936: level i.e line level, shipment level and distribution level. If the sql query is not framed with out
5937: checking the values exists in the corresponding levels in 8i "Exhausted Result" error is raised.
5938: */
5939: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type,
5940: PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,
5941: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag()
5942: test_flag,
5943: PO_COMMUNICATION_PVT.getDocumentName() document_name,

Line 5940: PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,

5936: level i.e line level, shipment level and distribution level. If the sql query is not framed with out
5937: checking the values exists in the corresponding levels in 8i "Exhausted Result" error is raised.
5938: */
5939: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type,
5940: PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,
5941: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag()
5942: test_flag,
5943: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5944: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,

Line 5941: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag()

5937: checking the values exists in the corresponding levels in 8i "Exhausted Result" error is raised.
5938: */
5939: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type,
5940: PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,
5941: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag()
5942: test_flag,
5943: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5944: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5945: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||

Line 5943: PO_COMMUNICATION_PVT.getDocumentName() document_name,

5939: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type,
5940: PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,
5941: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag()
5942: test_flag,
5943: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5944: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5945: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5946: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||'
5947: FROM PO_HEADERS_ARCHIVE_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';

Line 5944: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,

5940: PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,
5941: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag()
5942: test_flag,
5943: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5944: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5945: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5946: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||'
5947: FROM PO_HEADERS_ARCHIVE_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5948:

Line 5945: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||

5941: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag()
5942: test_flag,
5943: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5944: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5945: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5946: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||'
5947: FROM PO_HEADERS_ARCHIVE_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5948:
5949: IF(p_document_subtype <> 'CONTRACTS') THEN -- contracts will have only headers

Line 5947: FROM PO_HEADERS_ARCHIVE_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';

5943: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5944: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5945: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5946: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||'
5947: FROM PO_HEADERS_ARCHIVE_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5948:
5949: IF(p_document_subtype <> 'CONTRACTS') THEN -- contracts will have only headers
5950:
5951: SELECT count(*) into l_count FROM po_lines_archive_all WHERE po_header_id = p_document_id;

Line 5959: 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,

5955: /* for getting the price differentials FROM po_price_differentials_v
5956: the entity _name is 'PO LINE' except for blanket AND entity_name is 'BLANKET LINE'
5957: for blanket */
5958: --Bug 5506417: Added order by plx.line_num clause
5959: 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,
5960: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5961: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5962: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5963: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,

Line 5960: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,

5956: the entity _name is 'PO LINE' except for blanket AND entity_name is 'BLANKET LINE'
5957: for blanket */
5958: --Bug 5506417: Added order by plx.line_num clause
5959: 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,
5960: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5961: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5962: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5963: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5964: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||

Line 5961: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,

5957: for blanket */
5958: --Bug 5506417: Added order by plx.line_num clause
5959: 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,
5960: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5961: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5962: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5963: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5964: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5965: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',

Line 5962: PO_COMMUNICATION_PVT.getDocumentName() document_name,

5958: --Bug 5506417: Added order by plx.line_num clause
5959: 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,
5960: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5961: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5962: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5963: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5964: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5965: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',
5966: CURSOR(SELECT plx.*, '|| l_adv_amount_query ||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER,MIN_MULTIPLIER, MAX_MULTIPLIER FROM po_price_differentials_v

Line 5963: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,

5959: 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,
5960: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5961: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5962: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5963: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5964: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5965: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',
5966: CURSOR(SELECT plx.*, '|| l_adv_amount_query ||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER,MIN_MULTIPLIER, MAX_MULTIPLIER FROM po_price_differentials_v
5967: WHERE entity_type='''|| l_eventType ||''' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,

Line 5964: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||

5960: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5961: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5962: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5963: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5964: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5965: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',
5966: CURSOR(SELECT plx.*, '|| l_adv_amount_query ||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER,MIN_MULTIPLIER, MAX_MULTIPLIER FROM po_price_differentials_v
5967: WHERE entity_type='''|| l_eventType ||''' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,
5968: '|| l_line_short_attachment_query || ',' || l_price_modifier_query1 || ',' || l_price_modifier_query2 || ',' || l_price_modifier_query3

Line 5971: and pla.revision_num <= pcgt.revision_number ) and ''Y'' = decode(nvl(plx.cancel_flag,''N''),''N'',''Y'',''Y'',decode(plx.revision_num,PO_COMMUNICATION_PVT.getRevisionNum(),''Y'',''N'') ) order by plx.line_num) AS lines

5967: WHERE entity_type='''|| l_eventType ||''' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,
5968: '|| l_line_short_attachment_query || ',' || l_price_modifier_query1 || ',' || l_price_modifier_query2 || ',' || l_price_modifier_query3
5969: || ',' || l_line_url_attachment_query || ',' || l_line_file_attachment_query ||' FROM PO_LINES_ARCHIVE_XML plx WHERE plx.po_header_id = phx.po_header_id
5970: AND plx.REVISION_NUM = (select /*+ push_subq no_unnest */ max(revision_num) from po_lines_archive_all pla where pla.po_line_id = plx.po_line_id
5971: and pla.revision_num <= pcgt.revision_number ) and ''Y'' = decode(nvl(plx.cancel_flag,''N''),''N'',''Y'',''Y'',decode(plx.revision_num,PO_COMMUNICATION_PVT.getRevisionNum(),''Y'',''N'') ) order by plx.line_num) AS lines
5972: FROM PO_HEADERS_ARCHIVE_XML phx, PO_COMMUNICATION_GT pcgt
5973: WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId()
5974: AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5975:

Line 5973: WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId()

5969: || ',' || l_line_url_attachment_query || ',' || l_line_file_attachment_query ||' FROM PO_LINES_ARCHIVE_XML plx WHERE plx.po_header_id = phx.po_header_id
5970: AND plx.REVISION_NUM = (select /*+ push_subq no_unnest */ max(revision_num) from po_lines_archive_all pla where pla.po_line_id = plx.po_line_id
5971: and pla.revision_num <= pcgt.revision_number ) and ''Y'' = decode(nvl(plx.cancel_flag,''N''),''N'',''Y'',''Y'',decode(plx.revision_num,PO_COMMUNICATION_PVT.getRevisionNum(),''Y'',''N'') ) order by plx.line_num) AS lines
5972: FROM PO_HEADERS_ARCHIVE_XML phx, PO_COMMUNICATION_GT pcgt
5973: WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId()
5974: AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5975:
5976: END IF;
5977:

Line 5974: AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';

5970: AND plx.REVISION_NUM = (select /*+ push_subq no_unnest */ max(revision_num) from po_lines_archive_all pla where pla.po_line_id = plx.po_line_id
5971: and pla.revision_num <= pcgt.revision_number ) and ''Y'' = decode(nvl(plx.cancel_flag,''N''),''N'',''Y'',''Y'',decode(plx.revision_num,PO_COMMUNICATION_PVT.getRevisionNum(),''Y'',''N'') ) order by plx.line_num) AS lines
5972: FROM PO_HEADERS_ARCHIVE_XML phx, PO_COMMUNICATION_GT pcgt
5973: WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId()
5974: AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5975:
5976: END IF;
5977:
5978: SELECT count(*) into l_count FROM po_line_locations_archive_all WHERE po_header_id = p_document_id;

Line 5982: 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,

5978: SELECT count(*) into l_count FROM po_line_locations_archive_all WHERE po_header_id = p_document_id;
5979:
5980: IF l_count >0 THEN
5981: --Bug 5506417: Added order by pllx.shipment_num and order by plx.line_num clauses
5982: 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,
5983: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5984: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5985: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5986: PO_COMMUNICATION_PVT.IsDocumentSigned( PO_COMMUNICATION_PVT.getDocumentId()) Signed,

Line 5983: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,

5979:
5980: IF l_count >0 THEN
5981: --Bug 5506417: Added order by pllx.shipment_num and order by plx.line_num clauses
5982: 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,
5983: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5984: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5985: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5986: PO_COMMUNICATION_PVT.IsDocumentSigned( PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5987: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||

Line 5984: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,

5980: IF l_count >0 THEN
5981: --Bug 5506417: Added order by pllx.shipment_num and order by plx.line_num clauses
5982: 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,
5983: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5984: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5985: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5986: PO_COMMUNICATION_PVT.IsDocumentSigned( PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5987: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5988: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',

Line 5985: PO_COMMUNICATION_PVT.getDocumentName() document_name,

5981: --Bug 5506417: Added order by pllx.shipment_num and order by plx.line_num clauses
5982: 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,
5983: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5984: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5985: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5986: PO_COMMUNICATION_PVT.IsDocumentSigned( PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5987: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5988: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',
5989: CURSOR(SELECT plx.*, '|| l_adv_amount_query ||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER, MIN_MULTIPLIER,MAX_MULTIPLIER FROM po_price_differentials_v

Line 5986: PO_COMMUNICATION_PVT.IsDocumentSigned( PO_COMMUNICATION_PVT.getDocumentId()) Signed,

5982: 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,
5983: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5984: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5985: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5986: PO_COMMUNICATION_PVT.IsDocumentSigned( PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5987: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5988: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',
5989: CURSOR(SELECT plx.*, '|| l_adv_amount_query ||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER, MIN_MULTIPLIER,MAX_MULTIPLIER FROM po_price_differentials_v
5990: WHERE entity_type='''|| l_eventType ||''' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,

Line 5987: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||

5983: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5984: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5985: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5986: PO_COMMUNICATION_PVT.IsDocumentSigned( PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5987: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5988: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',
5989: CURSOR(SELECT plx.*, '|| l_adv_amount_query ||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER, MIN_MULTIPLIER,MAX_MULTIPLIER FROM po_price_differentials_v
5990: WHERE entity_type='''|| l_eventType ||''' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,
5991: '|| 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 ||',

Line 6002: 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 || '

5998: l_xml_query := l_xml_query || l_tax_name_query || ',' || l_shipment_short_attach_query || ',' || l_shipment_url_attach_query || ',' || l_shipment_file_attach_query ||'
5999: 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'')
6000: and pllx.revision_num = (SELECT /*+ push_subq no_unnest */ MAX(plla.REVISION_NUM) FROM PO_LINE_LOCATIONS_ARCHIVE_ALL plla
6001: where plla.LINE_LOCATION_ID = pllx.LINE_LOCATION_ID and plla.revision_num <= pcgt.revision_number )
6002: 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 || '
6003: FROM PO_LINES_ARCHIVE_XML plx WHERE plx.po_header_id = phx.po_header_id
6004: AND plx.REVISION_NUM = (SELECT /*+ push_subq no_unnest */ max(revision_num) from po_lines_archive_all pla where pla.po_line_id = plx.po_line_id
6005: and pla.revision_num <= pcgt.revision_number ) and ''Y'' = decode(nvl(plx.cancel_flag,''N''),''N'',''Y'',''Y'',decode(plx.revision_num,PO_COMMUNICATION_PVT.getRevisionNum(),''Y'',''N'') ) order by plx.line_num) AS lines
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()';

Line 6005: and pla.revision_num <= pcgt.revision_number ) and ''Y'' = decode(nvl(plx.cancel_flag,''N''),''N'',''Y'',''Y'',decode(plx.revision_num,PO_COMMUNICATION_PVT.getRevisionNum(),''Y'',''N'') ) order by plx.line_num) AS lines

6001: where plla.LINE_LOCATION_ID = pllx.LINE_LOCATION_ID and plla.revision_num <= pcgt.revision_number )
6002: 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 || '
6003: FROM PO_LINES_ARCHIVE_XML plx WHERE plx.po_header_id = phx.po_header_id
6004: AND plx.REVISION_NUM = (SELECT /*+ push_subq no_unnest */ max(revision_num) from po_lines_archive_all pla where pla.po_line_id = plx.po_line_id
6005: and pla.revision_num <= pcgt.revision_number ) and ''Y'' = decode(nvl(plx.cancel_flag,''N''),''N'',''Y'',''Y'',decode(plx.revision_num,PO_COMMUNICATION_PVT.getRevisionNum(),''Y'',''N'') ) order by plx.line_num) AS lines
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

Line 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()';

6002: 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 || '
6003: FROM PO_LINES_ARCHIVE_XML plx WHERE plx.po_header_id = phx.po_header_id
6004: AND plx.REVISION_NUM = (SELECT /*+ push_subq no_unnest */ max(revision_num) from po_lines_archive_all pla where pla.po_line_id = plx.po_line_id
6005: and pla.revision_num <= pcgt.revision_number ) and ''Y'' = decode(nvl(plx.cancel_flag,''N''),''N'',''Y'',''Y'',decode(plx.revision_num,PO_COMMUNICATION_PVT.getRevisionNum(),''Y'',''N'') ) order by plx.line_num) AS lines
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;

Line 6015: 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,

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*/
6015: 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,
6016: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
6017: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
6018: PO_COMMUNICATION_PVT.getDocumentName() document_name,
6019: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,

Line 6016: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,

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*/
6015: 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,
6016: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
6017: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
6018: PO_COMMUNICATION_PVT.getDocumentName() document_name,
6019: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
6020: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||

Line 6017: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,

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*/
6015: 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,
6016: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
6017: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
6018: PO_COMMUNICATION_PVT.getDocumentName() document_name,
6019: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
6020: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
6021: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',

Line 6018: PO_COMMUNICATION_PVT.getDocumentName() document_name,

6014: /*Bug 10388305 Added l_tax_name_query to get tax names*/
6015: 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,
6016: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
6017: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
6018: PO_COMMUNICATION_PVT.getDocumentName() document_name,
6019: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
6020: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
6021: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',
6022: CURSOR(SELECT plx.*, '|| l_adv_amount_query ||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER FROM po_price_differentials_v

Line 6019: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,

6015: 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,
6016: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
6017: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
6018: PO_COMMUNICATION_PVT.getDocumentName() document_name,
6019: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
6020: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
6021: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',
6022: CURSOR(SELECT plx.*, '|| l_adv_amount_query ||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER FROM po_price_differentials_v
6023: WHERE entity_type=''PO LINE'' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,

Line 6020: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||

6016: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
6017: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
6018: PO_COMMUNICATION_PVT.getDocumentName() document_name,
6019: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
6020: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
6021: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',
6022: CURSOR(SELECT plx.*, '|| l_adv_amount_query ||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER FROM po_price_differentials_v
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 ||',

Line 6032: 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 || '

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 )
6032: 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 || '
6033: FROM PO_LINES_ARCHIVE_XML plx WHERE plx.po_header_id = phx.po_header_id
6034: AND plx.REVISION_NUM = (select /*+ push_subq no_unnest */ max(revision_num) from po_lines_archive_all pla where pla.po_line_id = plx.po_line_id
6035: and pla.revision_num <= pcgt.revision_number ) and ''Y'' = decode(nvl(plx.cancel_flag,''N''),''N'',''Y'',''Y'',decode(plx.revision_num,PO_COMMUNICATION_PVT.getRevisionNum(),''Y'',''N'') ) order by plx.line_num) AS lines
6036: FROM PO_HEADERS_ARCHIVE_XML phx, PO_COMMUNICATION_GT pcgt WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND

Line 6035: and pla.revision_num <= pcgt.revision_number ) and ''Y'' = decode(nvl(plx.cancel_flag,''N''),''N'',''Y'',''Y'',decode(plx.revision_num,PO_COMMUNICATION_PVT.getRevisionNum(),''Y'',''N'') ) order by plx.line_num) AS lines

6031: where plla.LINE_LOCATION_ID = pllx.LINE_LOCATION_ID and plla.revision_num <= pcgt.revision_number )
6032: 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 || '
6033: FROM PO_LINES_ARCHIVE_XML plx WHERE plx.po_header_id = phx.po_header_id
6034: AND plx.REVISION_NUM = (select /*+ push_subq no_unnest */ max(revision_num) from po_lines_archive_all pla where pla.po_line_id = plx.po_line_id
6035: and pla.revision_num <= pcgt.revision_number ) and ''Y'' = decode(nvl(plx.cancel_flag,''N''),''N'',''Y'',''Y'',decode(plx.revision_num,PO_COMMUNICATION_PVT.getRevisionNum(),''Y'',''N'') ) order by plx.line_num) AS lines
6036: FROM PO_HEADERS_ARCHIVE_XML phx, PO_COMMUNICATION_GT pcgt WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND
6037: phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
6038:
6039: END IF; -- end of

Line 6036: FROM PO_HEADERS_ARCHIVE_XML phx, PO_COMMUNICATION_GT pcgt WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND

6032: 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 || '
6033: FROM PO_LINES_ARCHIVE_XML plx WHERE plx.po_header_id = phx.po_header_id
6034: AND plx.REVISION_NUM = (select /*+ push_subq no_unnest */ max(revision_num) from po_lines_archive_all pla where pla.po_line_id = plx.po_line_id
6035: and pla.revision_num <= pcgt.revision_number ) and ''Y'' = decode(nvl(plx.cancel_flag,''N''),''N'',''Y'',''Y'',decode(plx.revision_num,PO_COMMUNICATION_PVT.getRevisionNum(),''Y'',''N'') ) order by plx.line_num) AS lines
6036: FROM PO_HEADERS_ARCHIVE_XML phx, PO_COMMUNICATION_GT pcgt WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND
6037: phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
6038:
6039: END IF; -- end of
6040: END IF; -- end of balnket if condition

Line 6037: phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';

6033: FROM PO_LINES_ARCHIVE_XML plx WHERE plx.po_header_id = phx.po_header_id
6034: AND plx.REVISION_NUM = (select /*+ push_subq no_unnest */ max(revision_num) from po_lines_archive_all pla where pla.po_line_id = plx.po_line_id
6035: and pla.revision_num <= pcgt.revision_number ) and ''Y'' = decode(nvl(plx.cancel_flag,''N''),''N'',''Y'',''Y'',decode(plx.revision_num,PO_COMMUNICATION_PVT.getRevisionNum(),''Y'',''N'') ) order by plx.line_num) AS lines
6036: FROM PO_HEADERS_ARCHIVE_XML phx, PO_COMMUNICATION_GT pcgt WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND
6037: phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
6038:
6039: END IF; -- end of
6040: END IF; -- end of balnket if condition
6041: END IF; -- end of Contracts if condition

Line 6051: properly. Created a global temporary table po_communication_pvt and retrieved the values from the

6047: END IF; -- end of else if
6048:
6049: else
6050: /* Bug#3698674: In 8i db, the functions used to retrieve revision number and release id are not working
6051: properly. Created a global temporary table po_communication_pvt and retrieved the values from the
6052: global temporary table in both main and archive queries.*/
6053: IF p_which_tables = 'MAIN' THEN
6054: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_STATEMENT) THEN
6055: FND_LOG.string(FND_LOG.LEVEL_STATEMENT, g_log_head || l_api_name || 'Releases:','Entered into Release loop');

Line 6058: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,

6054: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_STATEMENT) THEN
6055: FND_LOG.string(FND_LOG.LEVEL_STATEMENT, g_log_head || l_api_name || 'Releases:','Entered into Release loop');
6056: END IF;
6057:
6058: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,
6059: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
6060: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
6061: PO_COMMUNICATION_PVT.getDocumentName() document_name,
6062: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||

Line 6059: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,

6055: FND_LOG.string(FND_LOG.LEVEL_STATEMENT, g_log_head || l_api_name || 'Releases:','Entered into Release loop');
6056: END IF;
6057:
6058: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,
6059: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
6060: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
6061: PO_COMMUNICATION_PVT.getDocumentName() document_name,
6062: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
6063: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||'

Line 6060: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,

6056: END IF;
6057:
6058: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,
6059: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
6060: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
6061: PO_COMMUNICATION_PVT.getDocumentName() document_name,
6062: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
6063: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||'
6064: FROM PO_RELEASE_XML phx WHERE phx.PO_RELEASE_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';

Line 6061: PO_COMMUNICATION_PVT.getDocumentName() document_name,

6057:
6058: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,
6059: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
6060: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
6061: PO_COMMUNICATION_PVT.getDocumentName() document_name,
6062: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
6063: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||'
6064: FROM PO_RELEASE_XML phx WHERE phx.PO_RELEASE_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
6065:

Line 6062: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||

6058: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,
6059: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
6060: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
6061: PO_COMMUNICATION_PVT.getDocumentName() document_name,
6062: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
6063: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||'
6064: FROM PO_RELEASE_XML phx WHERE phx.PO_RELEASE_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
6065:
6066:

Line 6064: FROM PO_RELEASE_XML phx WHERE phx.PO_RELEASE_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';

6060: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
6061: PO_COMMUNICATION_PVT.getDocumentName() document_name,
6062: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
6063: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||'
6064: FROM PO_RELEASE_XML phx WHERE phx.PO_RELEASE_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
6065:
6066:
6067: SELECT count(*) into l_count FROM po_line_locations_all WHERE po_release_id = p_document_id ;
6068:

Line 6082: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,

6078: These variables are null incase of RELEASE due to which PO Communication program was failing with missing expression error for Releases.
6079: As we did Pricing Enhancement in case of Standard,Blanket only we need not have these variables incase of Release while constructin the queries.
6080: */
6081: /*Bug 10388305 Added l_tax_name_query to get tax names*/
6082: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,
6083: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
6084: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
6085: PO_COMMUNICATION_PVT.getDocumentName() document_name,
6086: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||

Line 6083: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,

6079: As we did Pricing Enhancement in case of Standard,Blanket only we need not have these variables incase of Release while constructin the queries.
6080: */
6081: /*Bug 10388305 Added l_tax_name_query to get tax names*/
6082: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,
6083: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
6084: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
6085: PO_COMMUNICATION_PVT.getDocumentName() document_name,
6086: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
6087: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',

Line 6084: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,

6080: */
6081: /*Bug 10388305 Added l_tax_name_query to get tax names*/
6082: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,
6083: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
6084: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
6085: PO_COMMUNICATION_PVT.getDocumentName() document_name,
6086: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
6087: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',
6088: CURSOR(SELECT plx.*,CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER FROM po_price_differentials_v

Line 6085: PO_COMMUNICATION_PVT.getDocumentName() document_name,

6081: /*Bug 10388305 Added l_tax_name_query to get tax names*/
6082: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,
6083: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
6084: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
6085: PO_COMMUNICATION_PVT.getDocumentName() document_name,
6086: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
6087: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',
6088: CURSOR(SELECT plx.*,CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER FROM po_price_differentials_v
6089: WHERE entity_type='''|| l_eventType ||''' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,

Line 6086: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||

6082: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,
6083: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
6084: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
6085: PO_COMMUNICATION_PVT.getDocumentName() document_name,
6086: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
6087: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',
6088: CURSOR(SELECT plx.*,CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER FROM po_price_differentials_v
6089: WHERE entity_type='''|| l_eventType ||''' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,
6090: '|| l_line_short_attachment_query || ',' || l_line_url_attachment_query || ',' || l_line_file_attachment_query ||',

Line 6097: pllaa.cancel_flag= ''Y'' and pllaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) order by pllx.shipment_num ) AS line_locations

6093: 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
6094: 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
6095: and not exists (select ''x'' from po_line_locations_archive_all pllaa where
6096: pllaa.line_location_id = pllx.line_location_id and
6097: pllaa.cancel_flag= ''Y'' and pllaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) order by pllx.shipment_num ) AS line_locations
6098: FROM po_lines_xml plx WHERE exists (SELECT ''x'' from po_line_locations_all
6099: 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
6100: pllaa.line_location_id = po_line_locations_all.line_location_id and
6101: 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

Line 6101: 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

6097: pllaa.cancel_flag= ''Y'' and pllaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) order by pllx.shipment_num ) AS line_locations
6098: FROM po_lines_xml plx WHERE exists (SELECT ''x'' from po_line_locations_all
6099: 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
6100: pllaa.line_location_id = po_line_locations_all.line_location_id and
6101: 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
6102: FROM PO_RELEASE_XML phx WHERE phx.PO_RELEASE_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
6103:
6104: END IF;
6105:

Line 6102: FROM PO_RELEASE_XML phx WHERE phx.PO_RELEASE_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';

6098: FROM po_lines_xml plx WHERE exists (SELECT ''x'' from po_line_locations_all
6099: 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
6100: pllaa.line_location_id = po_line_locations_all.line_location_id and
6101: 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
6102: FROM PO_RELEASE_XML phx WHERE phx.PO_RELEASE_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
6103:
6104: END IF;
6105:
6106:

Line 6125: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,

6121: These variables are null incase of RELEASE due to which PO Communication program was failing with missing expression error for Releases.
6122: As we did Pricing Enhancement in case of Standard,Blanket only we need not have these variables incase of Release while constructin the queries.
6123: */
6124: /*Bug 10388305 Added l_tax_name_query to get tax names*/
6125: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,
6126: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
6127: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
6128: PO_COMMUNICATION_PVT.getDocumentName() document_name,
6129: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||

Line 6126: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,

6122: As we did Pricing Enhancement in case of Standard,Blanket only we need not have these variables incase of Release while constructin the queries.
6123: */
6124: /*Bug 10388305 Added l_tax_name_query to get tax names*/
6125: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,
6126: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
6127: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
6128: PO_COMMUNICATION_PVT.getDocumentName() document_name,
6129: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
6130: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',

Line 6127: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,

6123: */
6124: /*Bug 10388305 Added l_tax_name_query to get tax names*/
6125: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,
6126: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
6127: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
6128: PO_COMMUNICATION_PVT.getDocumentName() document_name,
6129: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
6130: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',
6131: CURSOR(SELECT plx.*,CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER FROM po_price_differentials_v

Line 6128: PO_COMMUNICATION_PVT.getDocumentName() document_name,

6124: /*Bug 10388305 Added l_tax_name_query to get tax names*/
6125: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,
6126: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
6127: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
6128: PO_COMMUNICATION_PVT.getDocumentName() document_name,
6129: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
6130: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',
6131: CURSOR(SELECT plx.*,CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER FROM po_price_differentials_v
6132: WHERE entity_type='''|| l_eventType ||''' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,

Line 6129: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||

6125: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,
6126: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
6127: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
6128: PO_COMMUNICATION_PVT.getDocumentName() document_name,
6129: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
6130: l_xml_message_query || ',' || l_head_short_attachment_query || ',' || l_head_url_attachment_query || ',' || l_head_file_attachment_query ||',
6131: CURSOR(SELECT plx.*,CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER FROM po_price_differentials_v
6132: WHERE entity_type='''|| l_eventType ||''' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,
6133: '|| l_line_short_attachment_query || ',' || l_line_url_attachment_query || ',' || l_line_file_attachment_query ||',

Line 6138: WHERE pda.PO_DISTRIBUTION_ID = pd.PO_DISTRIBUTION_ID AND pda.REVISION_NUM <= PO_COMMUNICATION_PVT.getRevisionNum() ) ) AS distributions

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
6142: FROM PO_LINES_ARCHIVE_XML plx

Line 6147: and ''Y'' = decode(nvl(pllaa.cancel_flag,''N''),''N'',''Y'',''Y'',decode(pllaa.revision_num,PO_COMMUNICATION_PVT.getRevisionNum(),''Y'',''N'') ) )

6143: WHERE exists (SELECT ''x'' from po_line_locations_archive_all pllaa
6144: WHERE pllaa.po_line_id = plx.po_line_id and po_release_id = phx.po_release_id
6145: and pllaa.REVISION_NUM = (select /*+ push_subq no_unnest */ max(revision_num) from po_line_locations_archive_all pllaa1 where pllaa1.line_location_id = pllaa.line_location_id
6146: and pllaa1.revision_num <= pcgt.revision_number )
6147: and ''Y'' = decode(nvl(pllaa.cancel_flag,''N''),''N'',''Y'',''Y'',decode(pllaa.revision_num,PO_COMMUNICATION_PVT.getRevisionNum(),''Y'',''N'') ) )
6148: and plx.po_header_id = phx.po_header_id
6149: AND plx.REVISION_NUM = (select /*+ push_subq no_unnest */ max(revision_num) from po_lines_archive_all pla where pla.po_line_id = plx.po_line_id
6150: and pla.revision_num <= (select max(pb.revision_num)
6151: from po_headers_archive_all pb, po_releases_archive_all pr

Line 6157: FROM PO_RELEASE_ARCHIVE_XML phx, PO_COMMUNICATION_GT pcgt WHERE phx.PO_RELEASE_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';

6153: and pr.po_release_id = pcgt.po_release_id
6154: and pr.revision_num= pcgt.revision_number
6155: and pb.approved_date <= pr.approved_date
6156: ) ) order by plx.line_num desc) AS lines
6157: FROM PO_RELEASE_ARCHIVE_XML phx, PO_COMMUNICATION_GT pcgt WHERE phx.PO_RELEASE_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
6158:
6159: END IF;
6160:
6161:

Line 6175: --bug#3823799: Replaced the hard coded p_document id with PO_COMMUNICATION_PVT.getDocumentId() function

6171: --PO_HEADERS(BPA) attachments are printed followed by PO_RELEASES
6172: --attachments and then finally PO_VENDORS. This is necessary
6173: --only for the Releases because you can display the BPA header
6174: --attachments also with a release.
6175: --bug#3823799: Replaced the hard coded p_document id with PO_COMMUNICATION_PVT.getDocumentId() function
6176: if(p_document_type = 'RELEASE')then
6177: --Bug#4683170
6178: --Appended fad.datatype_id=2 condition for retrieving the
6179: --long_text attachment for the current document only.

Line 6190: pk1_value= to_char(PO_COMMUNICATION_PVT.getDocumentId()) ) OR

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
6192: pk1_value = to_char(PO_COMMUNICATION_PVT.getReleaseHeaderId())) OR --Bug6139548
6193: (entity_name = ''PO_VENDORS'' AND
6194: pk1_value = to_char(PO_COMMUNICATION_PVT.getVendorId()))) AND

Line 6192: pk1_value = to_char(PO_COMMUNICATION_PVT.getReleaseHeaderId())) OR --Bug6139548

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
6192: pk1_value = to_char(PO_COMMUNICATION_PVT.getReleaseHeaderId())) OR --Bug6139548
6193: (entity_name = ''PO_VENDORS'' AND
6194: pk1_value = to_char(PO_COMMUNICATION_PVT.getVendorId()))) AND
6195: function_name = ''PO_PRINTPO''
6196: and fad.media_id = fdl.media_id

Line 6194: pk1_value = to_char(PO_COMMUNICATION_PVT.getVendorId()))) AND

6190: pk1_value= to_char(PO_COMMUNICATION_PVT.getDocumentId()) ) OR
6191: (entity_name = ''PO_HEADERS'' AND
6192: pk1_value = to_char(PO_COMMUNICATION_PVT.getReleaseHeaderId())) OR --Bug6139548
6193: (entity_name = ''PO_VENDORS'' AND
6194: pk1_value = to_char(PO_COMMUNICATION_PVT.getVendorId()))) AND
6195: function_name = ''PO_PRINTPO''
6196: and fad.media_id = fdl.media_id
6197: and fad.datatype_id=2
6198: order by entity_name,seq_num'; --bug6133951

Line 6214: pk1_value = to_char(PO_COMMUNICATION_PVT.getReleaseHeaderId())) OR --Bug6139548

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
6216: pk1_value = to_char(PO_COMMUNICATION_PVT.getVendorId()))) AND
6217: function_name = ''PO_PRINTPO''
6218: and fad.media_id = fdl.media_id

Line 6216: pk1_value = to_char(PO_COMMUNICATION_PVT.getVendorId()))) AND

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
6216: pk1_value = to_char(PO_COMMUNICATION_PVT.getVendorId()))) AND
6217: function_name = ''PO_PRINTPO''
6218: and fad.media_id = fdl.media_id
6219: AND fad.datatype_id=2
6220: order by seq_num'; --bug6133951

Line 6255: fad.pk1_value=to_char(PO_COMMUNICATION_PVT.getInventoryOrgId()) AND --Bug6139548

6251: (fad.entity_name=''PO_HEADERS'' AND fad.pk1_value=to_char(plx.CONTRACT_ID)
6252: AND plx.CONTRACT_ID IS NOT NULL)
6253: OR
6254: (fad.entity_name=''MTL_SYSTEM_ITEMS'' AND
6255: fad.pk1_value=to_char(PO_COMMUNICATION_PVT.getInventoryOrgId()) AND --Bug6139548
6256: fad.pk2_value=to_char(plx.item_id) AND plx.item_id is not null)
6257: ) AND
6258: function_name = ''PO_PRINTPO''
6259: AND fad.media_id = fds.media_id

Line 6261: AND plx.po_header_id = PO_COMMUNICATION_PVT.getReleaseHeaderId()

6257: ) AND
6258: function_name = ''PO_PRINTPO''
6259: AND fad.media_id = fds.media_id
6260: AND fad.datatype_id=2
6261: AND plx.po_header_id = PO_COMMUNICATION_PVT.getReleaseHeaderId()
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

Line 6290: AND plx.po_header_id = PO_COMMUNICATION_PVT.getReleaseHeaderId ()

6286: AND D.datatype_id=2
6287: AND D.DOCUMENT_ID = AD.DOCUMENT_ID
6288: AND DT.DOCUMENT_ID = D.DOCUMENT_ID
6289: AND DT.LANGUAGE = USERENV (''LANG'')
6290: AND plx.po_header_id = PO_COMMUNICATION_PVT.getReleaseHeaderId ()
6291: UNION ALL
6292: SELECT /*+ leading (plx ad) use_nl(ad) */
6293: fds.long_text text , plx.po_line_id id, seq_num
6294: FROM fnd_documents_long_text fds ,

Line 6312: AND plx.po_header_id = PO_COMMUNICATION_PVT.getReleaseHeaderId ()

6308: AND D.datatype_id=2
6309: AND D.DOCUMENT_ID = AD.DOCUMENT_ID
6310: AND DT.DOCUMENT_ID = D.DOCUMENT_ID
6311: AND DT.LANGUAGE = USERENV (''LANG'')
6312: AND plx.po_header_id = PO_COMMUNICATION_PVT.getReleaseHeaderId ()
6313: UNION ALL
6314: SELECT /*+ leading (plx ad) use_nl(ad) */
6315: fds.long_text text , plx.po_line_id id, seq_num
6316: FROM fnd_documents_long_text fds ,

Line 6334: AND plx.po_header_id = PO_COMMUNICATION_PVT.getReleaseHeaderId ()

6330: AND D.datatype_id=2
6331: AND D.DOCUMENT_ID = AD.DOCUMENT_ID
6332: AND DT.DOCUMENT_ID = D.DOCUMENT_ID
6333: AND DT.LANGUAGE = USERENV (''LANG'')
6334: AND plx.po_header_id = PO_COMMUNICATION_PVT.getReleaseHeaderId ()
6335: UNION ALL
6336: SELECT /*+ leading (plx ad) use_nl(ad) */
6337: fds.long_text text , plx.po_line_id id, seq_num
6338: FROM fnd_documents_long_text fds ,

Line 6356: AND plx.po_header_id = PO_COMMUNICATION_PVT.getReleaseHeaderId ()

6352: AND D.datatype_id=2
6353: AND D.DOCUMENT_ID = AD.DOCUMENT_ID
6354: AND DT.DOCUMENT_ID = D.DOCUMENT_ID
6355: AND DT.LANGUAGE = USERENV (''LANG'')
6356: AND plx.po_header_id = PO_COMMUNICATION_PVT.getReleaseHeaderId ()
6357: UNION ALL
6358: SELECT /*+ leading (plx ad) use_nl(ad) */
6359: fds.long_text text , plx.po_line_id id , seq_num
6360: FROM fnd_documents_long_text fds ,

Line 6368: AND ad.pk1_value=to_char ( PO_COMMUNICATION_PVT.getInventoryOrgId ( ) )

6364: FND_ATTACHMENT_FUNCTIONS AF,
6365: fnd_doc_category_usages DCU,
6366: po_lines_all plx
6367: WHERE ( ad.entity_name=''MTL_SYSTEM_ITEMS''
6368: AND ad.pk1_value=to_char ( PO_COMMUNICATION_PVT.getInventoryOrgId ( ) )
6369: AND -- Bug6139548
6370: ad.pk2_value=to_char ( plx.item_id )
6371: AND plx.item_id is not null )
6372: AND DCU.category_id = D.category_id

Line 6380: AND plx.po_header_id = PO_COMMUNICATION_PVT.getReleaseHeaderId ())

6376: AND D.datatype_id=2
6377: AND D.DOCUMENT_ID = AD.DOCUMENT_ID
6378: AND DT.DOCUMENT_ID = D.DOCUMENT_ID
6379: AND DT.LANGUAGE = USERENV (''LANG'')
6380: AND plx.po_header_id = PO_COMMUNICATION_PVT.getReleaseHeaderId ())
6381: order by seq_num';
6382:
6383: --bug#3760632 replaced the function PO_POXPOEPO
6384: --with PO_PRINTPO

Line 6410: AND pllx.po_header_id = PO_COMMUNICATION_PVT.getReleaseHeaderId()

6406: function_name = ''PO_PRINTPO''
6407: AND fad.media_id = fds.media_id
6408: AND fad.document_description not like ''POR%''
6409: AND fad.datatype_id=2
6410: AND pllx.po_header_id = PO_COMMUNICATION_PVT.getReleaseHeaderId()
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

Line 6413: l_shipmentAttachmentQuery := 'SELECT PO_COMMUNICATION_PVT.get_clob(fds.rowid) long_text, pllx.LINE_LOCATION_ID

6409: AND fad.datatype_id=2
6410: AND pllx.po_header_id = PO_COMMUNICATION_PVT.getReleaseHeaderId()
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

Line 6424: AND pllx.po_header_id = PO_COMMUNICATION_PVT.getReleaseHeaderId() ';

6420: function_name = ''PO_PRINTPO''
6421: AND fad.media_id = fds.media_id
6422: AND fad.document_description not like ''POR%''
6423: AND fad.datatype_id=2
6424: AND pllx.po_header_id = PO_COMMUNICATION_PVT.getReleaseHeaderId() ';
6425:
6426: if(p_document_type = 'RELEASE') then
6427: l_shipmentAttachmentQuery := l_shipmentAttachmentQuery || ' AND pllx.po_release_id = PO_COMMUNICATION_PVT.getReleaseId() order by seq_num';
6428: Else

Line 6427: l_shipmentAttachmentQuery := l_shipmentAttachmentQuery || ' AND pllx.po_release_id = PO_COMMUNICATION_PVT.getReleaseId() order by seq_num';

6423: AND fad.datatype_id=2
6424: AND pllx.po_header_id = PO_COMMUNICATION_PVT.getReleaseHeaderId() ';
6425:
6426: if(p_document_type = 'RELEASE') then
6427: l_shipmentAttachmentQuery := l_shipmentAttachmentQuery || ' AND pllx.po_release_id = PO_COMMUNICATION_PVT.getReleaseId() order by seq_num';
6428: Else
6429: l_shipmentAttachmentQuery := l_shipmentAttachmentQuery || ' order by seq_num';
6430: End If;
6431: -- End Bug16076162

Line 6449: g_log_head CONSTANT VARCHAR2(30) := ''po.plsql.PO_COMMUNICATION_PVT.'';

6445: l_headerAttach_query varchar2(1000);
6446: l_lineAttach_query varchar2(8000) ; --Bug13082363 : Increasing length
6447: l_disAttach_query varchar2(1200) ; --Bug5213932 increase length
6448: l_time varchar2(50);
6449: g_log_head CONSTANT VARCHAR2(30) := ''po.plsql.PO_COMMUNICATION_PVT.'';
6450: l_api_name CONSTANT VARCHAR2(30):= ''POXMLGEN'';
6451: TYPE ref_cursorType IS REF CURSOR;
6452: refcur ref_cursorType;
6453: l_fileClob CLOB := NULL;

Line 6935: if PO_COMMUNICATION_PVT.g_location_id <> p_location_id or

6931:
6932: function getLocationInfo(p_location_id in number) return number is
6933: begin
6934:
6935: if PO_COMMUNICATION_PVT.g_location_id <> p_location_id or
6936: PO_COMMUNICATION_PVT.g_location_id is null then
6937:
6938: PO_COMMUNICATION_PVT.g_location_id := p_location_id;
6939:

Line 6936: PO_COMMUNICATION_PVT.g_location_id is null then

6932: function getLocationInfo(p_location_id in number) return number is
6933: begin
6934:
6935: if PO_COMMUNICATION_PVT.g_location_id <> p_location_id or
6936: PO_COMMUNICATION_PVT.g_location_id is null then
6937:
6938: PO_COMMUNICATION_PVT.g_location_id := p_location_id;
6939:
6940: PO_COMMUNICATION_PVT.g_address_line1 := null;

Line 6938: PO_COMMUNICATION_PVT.g_location_id := p_location_id;

6934:
6935: if PO_COMMUNICATION_PVT.g_location_id <> p_location_id or
6936: PO_COMMUNICATION_PVT.g_location_id is null then
6937:
6938: PO_COMMUNICATION_PVT.g_location_id := p_location_id;
6939:
6940: PO_COMMUNICATION_PVT.g_address_line1 := null;
6941: PO_COMMUNICATION_PVT.g_address_line2 := null;
6942: PO_COMMUNICATION_PVT.g_address_line3 := null;

Line 6940: PO_COMMUNICATION_PVT.g_address_line1 := null;

6936: PO_COMMUNICATION_PVT.g_location_id is null then
6937:
6938: PO_COMMUNICATION_PVT.g_location_id := p_location_id;
6939:
6940: PO_COMMUNICATION_PVT.g_address_line1 := null;
6941: PO_COMMUNICATION_PVT.g_address_line2 := null;
6942: PO_COMMUNICATION_PVT.g_address_line3 := null;
6943: PO_COMMUNICATION_PVT.g_Territory_short_name := null;
6944: PO_COMMUNICATION_PVT.g_address_info := null;

Line 6941: PO_COMMUNICATION_PVT.g_address_line2 := null;

6937:
6938: PO_COMMUNICATION_PVT.g_location_id := p_location_id;
6939:
6940: PO_COMMUNICATION_PVT.g_address_line1 := null;
6941: PO_COMMUNICATION_PVT.g_address_line2 := null;
6942: PO_COMMUNICATION_PVT.g_address_line3 := null;
6943: PO_COMMUNICATION_PVT.g_Territory_short_name := null;
6944: PO_COMMUNICATION_PVT.g_address_info := null;
6945: PO_COMMUNICATION_PVT.g_location_name := null;

Line 6942: PO_COMMUNICATION_PVT.g_address_line3 := null;

6938: PO_COMMUNICATION_PVT.g_location_id := p_location_id;
6939:
6940: PO_COMMUNICATION_PVT.g_address_line1 := null;
6941: PO_COMMUNICATION_PVT.g_address_line2 := null;
6942: PO_COMMUNICATION_PVT.g_address_line3 := null;
6943: PO_COMMUNICATION_PVT.g_Territory_short_name := null;
6944: PO_COMMUNICATION_PVT.g_address_info := null;
6945: PO_COMMUNICATION_PVT.g_location_name := null;
6946: PO_COMMUNICATION_PVT.g_phone := null;

Line 6943: PO_COMMUNICATION_PVT.g_Territory_short_name := null;

6939:
6940: PO_COMMUNICATION_PVT.g_address_line1 := null;
6941: PO_COMMUNICATION_PVT.g_address_line2 := null;
6942: PO_COMMUNICATION_PVT.g_address_line3 := null;
6943: PO_COMMUNICATION_PVT.g_Territory_short_name := null;
6944: PO_COMMUNICATION_PVT.g_address_info := null;
6945: PO_COMMUNICATION_PVT.g_location_name := null;
6946: PO_COMMUNICATION_PVT.g_phone := null;
6947: PO_COMMUNICATION_PVT.g_fax := null;

Line 6944: PO_COMMUNICATION_PVT.g_address_info := null;

6940: PO_COMMUNICATION_PVT.g_address_line1 := null;
6941: PO_COMMUNICATION_PVT.g_address_line2 := null;
6942: PO_COMMUNICATION_PVT.g_address_line3 := null;
6943: PO_COMMUNICATION_PVT.g_Territory_short_name := null;
6944: PO_COMMUNICATION_PVT.g_address_info := null;
6945: PO_COMMUNICATION_PVT.g_location_name := null;
6946: PO_COMMUNICATION_PVT.g_phone := null;
6947: PO_COMMUNICATION_PVT.g_fax := null;
6948: PO_COMMUNICATION_PVT.g_address_line4 := null;

Line 6945: PO_COMMUNICATION_PVT.g_location_name := null;

6941: PO_COMMUNICATION_PVT.g_address_line2 := null;
6942: PO_COMMUNICATION_PVT.g_address_line3 := null;
6943: PO_COMMUNICATION_PVT.g_Territory_short_name := null;
6944: PO_COMMUNICATION_PVT.g_address_info := null;
6945: PO_COMMUNICATION_PVT.g_location_name := null;
6946: PO_COMMUNICATION_PVT.g_phone := null;
6947: PO_COMMUNICATION_PVT.g_fax := null;
6948: PO_COMMUNICATION_PVT.g_address_line4 := null;
6949: --bug#3438608

Line 6946: PO_COMMUNICATION_PVT.g_phone := null;

6942: PO_COMMUNICATION_PVT.g_address_line3 := null;
6943: PO_COMMUNICATION_PVT.g_Territory_short_name := null;
6944: PO_COMMUNICATION_PVT.g_address_info := null;
6945: PO_COMMUNICATION_PVT.g_location_name := null;
6946: PO_COMMUNICATION_PVT.g_phone := null;
6947: PO_COMMUNICATION_PVT.g_fax := null;
6948: PO_COMMUNICATION_PVT.g_address_line4 := null;
6949: --bug#3438608
6950: PO_COMMUNICATION_PVT.g_town_or_city := null;

Line 6947: PO_COMMUNICATION_PVT.g_fax := null;

6943: PO_COMMUNICATION_PVT.g_Territory_short_name := null;
6944: PO_COMMUNICATION_PVT.g_address_info := null;
6945: PO_COMMUNICATION_PVT.g_location_name := null;
6946: PO_COMMUNICATION_PVT.g_phone := null;
6947: PO_COMMUNICATION_PVT.g_fax := null;
6948: PO_COMMUNICATION_PVT.g_address_line4 := null;
6949: --bug#3438608
6950: PO_COMMUNICATION_PVT.g_town_or_city := null;
6951: PO_COMMUNICATION_PVT.g_state_or_province := null;

Line 6948: PO_COMMUNICATION_PVT.g_address_line4 := null;

6944: PO_COMMUNICATION_PVT.g_address_info := null;
6945: PO_COMMUNICATION_PVT.g_location_name := null;
6946: PO_COMMUNICATION_PVT.g_phone := null;
6947: PO_COMMUNICATION_PVT.g_fax := null;
6948: PO_COMMUNICATION_PVT.g_address_line4 := null;
6949: --bug#3438608
6950: PO_COMMUNICATION_PVT.g_town_or_city := null;
6951: PO_COMMUNICATION_PVT.g_state_or_province := null;
6952: PO_COMMUNICATION_PVT.g_postal_code := null;

Line 6950: PO_COMMUNICATION_PVT.g_town_or_city := null;

6946: PO_COMMUNICATION_PVT.g_phone := null;
6947: PO_COMMUNICATION_PVT.g_fax := null;
6948: PO_COMMUNICATION_PVT.g_address_line4 := null;
6949: --bug#3438608
6950: PO_COMMUNICATION_PVT.g_town_or_city := null;
6951: PO_COMMUNICATION_PVT.g_state_or_province := null;
6952: PO_COMMUNICATION_PVT.g_postal_code := null;
6953: --bug#3438608
6954:

Line 6951: PO_COMMUNICATION_PVT.g_state_or_province := null;

6947: PO_COMMUNICATION_PVT.g_fax := null;
6948: PO_COMMUNICATION_PVT.g_address_line4 := null;
6949: --bug#3438608
6950: PO_COMMUNICATION_PVT.g_town_or_city := null;
6951: PO_COMMUNICATION_PVT.g_state_or_province := null;
6952: PO_COMMUNICATION_PVT.g_postal_code := null;
6953: --bug#3438608
6954:
6955: --bug#3438608 passed the out variables PO_COMMUNICATION_PVT.g_town_or_city

Line 6952: PO_COMMUNICATION_PVT.g_postal_code := null;

6948: PO_COMMUNICATION_PVT.g_address_line4 := null;
6949: --bug#3438608
6950: PO_COMMUNICATION_PVT.g_town_or_city := null;
6951: PO_COMMUNICATION_PVT.g_state_or_province := null;
6952: PO_COMMUNICATION_PVT.g_postal_code := null;
6953: --bug#3438608
6954:
6955: --bug#3438608 passed the out variables PO_COMMUNICATION_PVT.g_town_or_city
6956: --PO_COMMUNICATION_PVT.g_postal_code,PO_COMMUNICATION_PVT.g_state_or_province

Line 6955: --bug#3438608 passed the out variables PO_COMMUNICATION_PVT.g_town_or_city

6951: PO_COMMUNICATION_PVT.g_state_or_province := null;
6952: PO_COMMUNICATION_PVT.g_postal_code := null;
6953: --bug#3438608
6954:
6955: --bug#3438608 passed the out variables PO_COMMUNICATION_PVT.g_town_or_city
6956: --PO_COMMUNICATION_PVT.g_postal_code,PO_COMMUNICATION_PVT.g_state_or_province
6957: --to the procedure PO_HR_LOCATION.get_alladdress_lines
6958:
6959: -- bug#3580225: changed the procedure name to get_alladdress_lines from get_address--

Line 6956: --PO_COMMUNICATION_PVT.g_postal_code,PO_COMMUNICATION_PVT.g_state_or_province

6952: PO_COMMUNICATION_PVT.g_postal_code := null;
6953: --bug#3438608
6954:
6955: --bug#3438608 passed the out variables PO_COMMUNICATION_PVT.g_town_or_city
6956: --PO_COMMUNICATION_PVT.g_postal_code,PO_COMMUNICATION_PVT.g_state_or_province
6957: --to the procedure PO_HR_LOCATION.get_alladdress_lines
6958:
6959: -- bug#3580225: changed the procedure name to get_alladdress_lines from get_address--
6960: po_hr_location.get_alladdress_lines(p_location_id,

Line 6961: PO_COMMUNICATION_PVT.g_address_line1,

6957: --to the procedure PO_HR_LOCATION.get_alladdress_lines
6958:
6959: -- bug#3580225: changed the procedure name to get_alladdress_lines from get_address--
6960: po_hr_location.get_alladdress_lines(p_location_id,
6961: PO_COMMUNICATION_PVT.g_address_line1,
6962: PO_COMMUNICATION_PVT.g_address_line2,
6963: PO_COMMUNICATION_PVT.g_address_line3,
6964: PO_COMMUNICATION_PVT.g_Territory_short_name,
6965: PO_COMMUNICATION_PVT.g_address_info,

Line 6962: PO_COMMUNICATION_PVT.g_address_line2,

6958:
6959: -- bug#3580225: changed the procedure name to get_alladdress_lines from get_address--
6960: po_hr_location.get_alladdress_lines(p_location_id,
6961: PO_COMMUNICATION_PVT.g_address_line1,
6962: PO_COMMUNICATION_PVT.g_address_line2,
6963: PO_COMMUNICATION_PVT.g_address_line3,
6964: PO_COMMUNICATION_PVT.g_Territory_short_name,
6965: PO_COMMUNICATION_PVT.g_address_info,
6966: PO_COMMUNICATION_PVT.g_location_name,

Line 6963: PO_COMMUNICATION_PVT.g_address_line3,

6959: -- bug#3580225: changed the procedure name to get_alladdress_lines from get_address--
6960: po_hr_location.get_alladdress_lines(p_location_id,
6961: PO_COMMUNICATION_PVT.g_address_line1,
6962: PO_COMMUNICATION_PVT.g_address_line2,
6963: PO_COMMUNICATION_PVT.g_address_line3,
6964: PO_COMMUNICATION_PVT.g_Territory_short_name,
6965: PO_COMMUNICATION_PVT.g_address_info,
6966: PO_COMMUNICATION_PVT.g_location_name,
6967: PO_COMMUNICATION_PVT.g_phone,

Line 6964: PO_COMMUNICATION_PVT.g_Territory_short_name,

6960: po_hr_location.get_alladdress_lines(p_location_id,
6961: PO_COMMUNICATION_PVT.g_address_line1,
6962: PO_COMMUNICATION_PVT.g_address_line2,
6963: PO_COMMUNICATION_PVT.g_address_line3,
6964: PO_COMMUNICATION_PVT.g_Territory_short_name,
6965: PO_COMMUNICATION_PVT.g_address_info,
6966: PO_COMMUNICATION_PVT.g_location_name,
6967: PO_COMMUNICATION_PVT.g_phone,
6968: PO_COMMUNICATION_PVT.g_fax,

Line 6965: PO_COMMUNICATION_PVT.g_address_info,

6961: PO_COMMUNICATION_PVT.g_address_line1,
6962: PO_COMMUNICATION_PVT.g_address_line2,
6963: PO_COMMUNICATION_PVT.g_address_line3,
6964: PO_COMMUNICATION_PVT.g_Territory_short_name,
6965: PO_COMMUNICATION_PVT.g_address_info,
6966: PO_COMMUNICATION_PVT.g_location_name,
6967: PO_COMMUNICATION_PVT.g_phone,
6968: PO_COMMUNICATION_PVT.g_fax,
6969: PO_COMMUNICATION_PVT.g_address_line4,

Line 6966: PO_COMMUNICATION_PVT.g_location_name,

6962: PO_COMMUNICATION_PVT.g_address_line2,
6963: PO_COMMUNICATION_PVT.g_address_line3,
6964: PO_COMMUNICATION_PVT.g_Territory_short_name,
6965: PO_COMMUNICATION_PVT.g_address_info,
6966: PO_COMMUNICATION_PVT.g_location_name,
6967: PO_COMMUNICATION_PVT.g_phone,
6968: PO_COMMUNICATION_PVT.g_fax,
6969: PO_COMMUNICATION_PVT.g_address_line4,
6970: PO_COMMUNICATION_PVT.g_town_or_city,

Line 6967: PO_COMMUNICATION_PVT.g_phone,

6963: PO_COMMUNICATION_PVT.g_address_line3,
6964: PO_COMMUNICATION_PVT.g_Territory_short_name,
6965: PO_COMMUNICATION_PVT.g_address_info,
6966: PO_COMMUNICATION_PVT.g_location_name,
6967: PO_COMMUNICATION_PVT.g_phone,
6968: PO_COMMUNICATION_PVT.g_fax,
6969: PO_COMMUNICATION_PVT.g_address_line4,
6970: PO_COMMUNICATION_PVT.g_town_or_city,
6971: PO_COMMUNICATION_PVT.g_postal_code,

Line 6968: PO_COMMUNICATION_PVT.g_fax,

6964: PO_COMMUNICATION_PVT.g_Territory_short_name,
6965: PO_COMMUNICATION_PVT.g_address_info,
6966: PO_COMMUNICATION_PVT.g_location_name,
6967: PO_COMMUNICATION_PVT.g_phone,
6968: PO_COMMUNICATION_PVT.g_fax,
6969: PO_COMMUNICATION_PVT.g_address_line4,
6970: PO_COMMUNICATION_PVT.g_town_or_city,
6971: PO_COMMUNICATION_PVT.g_postal_code,
6972: PO_COMMUNICATION_PVT.g_state_or_province);

Line 6969: PO_COMMUNICATION_PVT.g_address_line4,

6965: PO_COMMUNICATION_PVT.g_address_info,
6966: PO_COMMUNICATION_PVT.g_location_name,
6967: PO_COMMUNICATION_PVT.g_phone,
6968: PO_COMMUNICATION_PVT.g_fax,
6969: PO_COMMUNICATION_PVT.g_address_line4,
6970: PO_COMMUNICATION_PVT.g_town_or_city,
6971: PO_COMMUNICATION_PVT.g_postal_code,
6972: PO_COMMUNICATION_PVT.g_state_or_province);
6973:

Line 6970: PO_COMMUNICATION_PVT.g_town_or_city,

6966: PO_COMMUNICATION_PVT.g_location_name,
6967: PO_COMMUNICATION_PVT.g_phone,
6968: PO_COMMUNICATION_PVT.g_fax,
6969: PO_COMMUNICATION_PVT.g_address_line4,
6970: PO_COMMUNICATION_PVT.g_town_or_city,
6971: PO_COMMUNICATION_PVT.g_postal_code,
6972: PO_COMMUNICATION_PVT.g_state_or_province);
6973:
6974: end if;

Line 6971: PO_COMMUNICATION_PVT.g_postal_code,

6967: PO_COMMUNICATION_PVT.g_phone,
6968: PO_COMMUNICATION_PVT.g_fax,
6969: PO_COMMUNICATION_PVT.g_address_line4,
6970: PO_COMMUNICATION_PVT.g_town_or_city,
6971: PO_COMMUNICATION_PVT.g_postal_code,
6972: PO_COMMUNICATION_PVT.g_state_or_province);
6973:
6974: end if;
6975: return p_location_id;

Line 6972: PO_COMMUNICATION_PVT.g_state_or_province);

6968: PO_COMMUNICATION_PVT.g_fax,
6969: PO_COMMUNICATION_PVT.g_address_line4,
6970: PO_COMMUNICATION_PVT.g_town_or_city,
6971: PO_COMMUNICATION_PVT.g_postal_code,
6972: PO_COMMUNICATION_PVT.g_state_or_province);
6973:
6974: end if;
6975: return p_location_id;
6976:

Line 6982: return PO_COMMUNICATION_PVT.g_address_line1;

6978:
6979:
6980: function getAddressLine1 return varchar2 is
6981: begin
6982: return PO_COMMUNICATION_PVT.g_address_line1;
6983: end;
6984: function getAddressLine2 return varchar2 is
6985: begin
6986: return PO_COMMUNICATION_PVT.g_address_line2;

Line 6986: return PO_COMMUNICATION_PVT.g_address_line2;

6982: return PO_COMMUNICATION_PVT.g_address_line1;
6983: end;
6984: function getAddressLine2 return varchar2 is
6985: begin
6986: return PO_COMMUNICATION_PVT.g_address_line2;
6987: end;
6988: function getAddressLine3 return varchar2 is
6989: begin
6990: return PO_COMMUNICATION_PVT.g_address_line3;

Line 6990: return PO_COMMUNICATION_PVT.g_address_line3;

6986: return PO_COMMUNICATION_PVT.g_address_line2;
6987: end;
6988: function getAddressLine3 return varchar2 is
6989: begin
6990: return PO_COMMUNICATION_PVT.g_address_line3;
6991: end;
6992:
6993: function getTerritoryShortName return varchar2 is
6994: begin

Line 6995: return PO_COMMUNICATION_PVT.g_Territory_short_name;

6991: end;
6992:
6993: function getTerritoryShortName return varchar2 is
6994: begin
6995: return PO_COMMUNICATION_PVT.g_Territory_short_name;
6996: end;
6997:
6998: function getAddressInfo return varchar2 is
6999: begin

Line 7000: return PO_COMMUNICATION_PVT.g_address_info;

6996: end;
6997:
6998: function getAddressInfo return varchar2 is
6999: begin
7000: return PO_COMMUNICATION_PVT.g_address_info;
7001: end;
7002: --bug#3438608 added three function getTownOrCity
7003: --getPostalCode and getStateOrProvince
7004: --toreturn the values in global variables

Line 7005: --po_communication_pvt.g_town_or_city

7001: end;
7002: --bug#3438608 added three function getTownOrCity
7003: --getPostalCode and getStateOrProvince
7004: --toreturn the values in global variables
7005: --po_communication_pvt.g_town_or_city
7006: --po_communication_pvt.g_postal_code
7007: --and po_communication_pvt.g_state_or_province.
7008: --These functions are called by the PO_HEADERS_CHANGE_PRINT
7009: --report

Line 7006: --po_communication_pvt.g_postal_code

7002: --bug#3438608 added three function getTownOrCity
7003: --getPostalCode and getStateOrProvince
7004: --toreturn the values in global variables
7005: --po_communication_pvt.g_town_or_city
7006: --po_communication_pvt.g_postal_code
7007: --and po_communication_pvt.g_state_or_province.
7008: --These functions are called by the PO_HEADERS_CHANGE_PRINT
7009: --report
7010:

Line 7007: --and po_communication_pvt.g_state_or_province.

7003: --getPostalCode and getStateOrProvince
7004: --toreturn the values in global variables
7005: --po_communication_pvt.g_town_or_city
7006: --po_communication_pvt.g_postal_code
7007: --and po_communication_pvt.g_state_or_province.
7008: --These functions are called by the PO_HEADERS_CHANGE_PRINT
7009: --report
7010:
7011: function getTownOrCity return varchar2 is

Line 7013: return PO_COMMUNICATION_PVT.g_town_or_city;

7009: --report
7010:
7011: function getTownOrCity return varchar2 is
7012: begin
7013: return PO_COMMUNICATION_PVT.g_town_or_city;
7014: end;
7015:
7016: function getPostalCode return varchar2 is
7017: begin

Line 7018: return PO_COMMUNICATION_PVT.g_postal_code;

7014: end;
7015:
7016: function getPostalCode return varchar2 is
7017: begin
7018: return PO_COMMUNICATION_PVT.g_postal_code;
7019: end;
7020:
7021: function getStateOrProvince return varchar2 is
7022: begin

Line 7023: return PO_COMMUNICATION_PVT.g_state_or_province;

7019: end;
7020:
7021: function getStateOrProvince return varchar2 is
7022: begin
7023: return PO_COMMUNICATION_PVT.g_state_or_province;
7024: end;
7025: --bug#3438608
7026:
7027: /*Bug 4504228 START Retrieving the phone and email contact of buyer from

Line 7034: return PO_COMMUNICATION_PVT.g_phone;

7030: and getEmail()*/
7031:
7032: /*function getPhone return varchar2 is
7033: begin
7034: return PO_COMMUNICATION_PVT.g_phone;
7035: end; */
7036:
7037: function getPhone(p_agent_id in number) return varchar2 is
7038: begin

Line 7039: if PO_COMMUNICATION_PVT.g_person_id <> p_agent_id or

7035: end; */
7036:
7037: function getPhone(p_agent_id in number) return varchar2 is
7038: begin
7039: if PO_COMMUNICATION_PVT.g_person_id <> p_agent_id or
7040: PO_COMMUNICATION_PVT.g_person_id is null then
7041:
7042: PO_COMMUNICATION_PVT.g_person_id := p_agent_id;
7043: PO_COMMUNICATION_PVT.g_buyer_phone := null;

Line 7040: PO_COMMUNICATION_PVT.g_person_id is null then

7036:
7037: function getPhone(p_agent_id in number) return varchar2 is
7038: begin
7039: if PO_COMMUNICATION_PVT.g_person_id <> p_agent_id or
7040: PO_COMMUNICATION_PVT.g_person_id is null then
7041:
7042: PO_COMMUNICATION_PVT.g_person_id := p_agent_id;
7043: PO_COMMUNICATION_PVT.g_buyer_phone := null;
7044: PO_COMMUNICATION_PVT.g_buyer_email_address := null;

Line 7042: PO_COMMUNICATION_PVT.g_person_id := p_agent_id;

7038: begin
7039: if PO_COMMUNICATION_PVT.g_person_id <> p_agent_id or
7040: PO_COMMUNICATION_PVT.g_person_id is null then
7041:
7042: PO_COMMUNICATION_PVT.g_person_id := p_agent_id;
7043: PO_COMMUNICATION_PVT.g_buyer_phone := null;
7044: PO_COMMUNICATION_PVT.g_buyer_email_address := null;
7045: PO_COMMUNICATION_PVT.g_buyer_fax := null; --Bug5671523
7046:

Line 7043: PO_COMMUNICATION_PVT.g_buyer_phone := null;

7039: if PO_COMMUNICATION_PVT.g_person_id <> p_agent_id or
7040: PO_COMMUNICATION_PVT.g_person_id is null then
7041:
7042: PO_COMMUNICATION_PVT.g_person_id := p_agent_id;
7043: PO_COMMUNICATION_PVT.g_buyer_phone := null;
7044: PO_COMMUNICATION_PVT.g_buyer_email_address := null;
7045: PO_COMMUNICATION_PVT.g_buyer_fax := null; --Bug5671523
7046:
7047: /* Bug5191404 Buyer phone number was incorrectly taken from office details

Line 7044: PO_COMMUNICATION_PVT.g_buyer_email_address := null;

7040: PO_COMMUNICATION_PVT.g_person_id is null then
7041:
7042: PO_COMMUNICATION_PVT.g_person_id := p_agent_id;
7043: PO_COMMUNICATION_PVT.g_buyer_phone := null;
7044: PO_COMMUNICATION_PVT.g_buyer_email_address := null;
7045: PO_COMMUNICATION_PVT.g_buyer_fax := null; --Bug5671523
7046:
7047: /* Bug5191404 Buyer phone number was incorrectly taken from office details
7048: tab.Now with this fix the buyers phone willbe taken from per_phones work

Line 7045: PO_COMMUNICATION_PVT.g_buyer_fax := null; --Bug5671523

7041:
7042: PO_COMMUNICATION_PVT.g_person_id := p_agent_id;
7043: PO_COMMUNICATION_PVT.g_buyer_phone := null;
7044: PO_COMMUNICATION_PVT.g_buyer_email_address := null;
7045: PO_COMMUNICATION_PVT.g_buyer_fax := null; --Bug5671523
7046:
7047: /* Bug5191404 Buyer phone number was incorrectly taken from office details
7048: tab.Now with this fix the buyers phone willbe taken from per_phones work
7049: phone type.Commenting out the below sql and adding a new sql*/

Line 7059: INTO PO_COMMUNICATION_PVT.g_buyer_email_address,

7055: /*End Edit Akyanama Bug # 12970846 */
7056: SELECT
7057: pap.email_address,
7058: pph.phone_number
7059: INTO PO_COMMUNICATION_PVT.g_buyer_email_address,
7060: PO_COMMUNICATION_PVT.g_buyer_phone
7061: FROM per_phones pph,
7062: per_all_people_f pap
7063: WHERE pph.parent_id(+) = pap.person_id

Line 7060: PO_COMMUNICATION_PVT.g_buyer_phone

7056: SELECT
7057: pap.email_address,
7058: pph.phone_number
7059: INTO PO_COMMUNICATION_PVT.g_buyer_email_address,
7060: PO_COMMUNICATION_PVT.g_buyer_phone
7061: FROM per_phones pph,
7062: per_all_people_f pap
7063: WHERE pph.parent_id(+) = pap.person_id
7064: AND pph.parent_table(+) = 'PER_ALL_PEOPLE_F'

Line 7084: INTO PO_COMMUNICATION_PVT.g_buyer_fax

7080: BEGIN
7081: /*End Edit Akyanama Bug # 12970846 */
7082: SELECT
7083: pph.phone_number
7084: INTO PO_COMMUNICATION_PVT.g_buyer_fax
7085: FROM per_phones pph,
7086: per_all_people_f pap
7087: WHERE pph.parent_id(+) = pap.person_id
7088: AND pph.parent_table(+) = 'PER_ALL_PEOPLE_F'

Line 7104: --Bug4686436 return PO_COMMUNICATION_PVT.g_phone;

7100: /*End Edit Akyanama Bug # 12970846 */
7101:
7102: end if;
7103:
7104: --Bug4686436 return PO_COMMUNICATION_PVT.g_phone;
7105: return PO_COMMUNICATION_PVT.g_buyer_phone;
7106: end;
7107:
7108: function getEmail return varchar2 is

Line 7105: return PO_COMMUNICATION_PVT.g_buyer_phone;

7101:
7102: end if;
7103:
7104: --Bug4686436 return PO_COMMUNICATION_PVT.g_phone;
7105: return PO_COMMUNICATION_PVT.g_buyer_phone;
7106: end;
7107:
7108: function getEmail return varchar2 is
7109: begin

Line 7110: return PO_COMMUNICATION_PVT.g_buyer_email_address;

7106: end;
7107:
7108: function getEmail return varchar2 is
7109: begin
7110: return PO_COMMUNICATION_PVT.g_buyer_email_address;
7111: end;
7112:
7113: /*Bug 4504228 END */
7114:

Line 7117: --Bug5671523 return PO_COMMUNICATION_PVT.g_fax;

7113: /*Bug 4504228 END */
7114:
7115: function getFax return varchar2 is
7116: begin
7117: --Bug5671523 return PO_COMMUNICATION_PVT.g_fax;
7118: return PO_COMMUNICATION_PVT.g_buyer_fax;
7119: end;
7120: function getLocationName return varchar2 is
7121: begin

Line 7118: return PO_COMMUNICATION_PVT.g_buyer_fax;

7114:
7115: function getFax return varchar2 is
7116: begin
7117: --Bug5671523 return PO_COMMUNICATION_PVT.g_fax;
7118: return PO_COMMUNICATION_PVT.g_buyer_fax;
7119: end;
7120: function getLocationName return varchar2 is
7121: begin
7122: return PO_COMMUNICATION_PVT.g_location_name;

Line 7122: return PO_COMMUNICATION_PVT.g_location_name;

7118: return PO_COMMUNICATION_PVT.g_buyer_fax;
7119: end;
7120: function getLocationName return varchar2 is
7121: begin
7122: return PO_COMMUNICATION_PVT.g_location_name;
7123: end;
7124:
7125: /* Bug#3580225: Changed the function to call po_hr_location.get_alladdress_lines PROCEDURE*/
7126: function getOperationInfo(p_org_id in NUMBER) return varchar2 is

Line 7135: if PO_COMMUNICATION_PVT.g_org_id <> p_org_id or

7131: l_address_info varchar2(500) := null;
7132: l_location_id PO_HR_LOCATIONS.LOCATION_ID%type := null;
7133:
7134: begin
7135: if PO_COMMUNICATION_PVT.g_org_id <> p_org_id or
7136: PO_COMMUNICATION_PVT.g_org_id is null then
7137:
7138: PO_COMMUNICATION_PVT.g_org_id := p_org_id;
7139:

Line 7136: PO_COMMUNICATION_PVT.g_org_id is null then

7132: l_location_id PO_HR_LOCATIONS.LOCATION_ID%type := null;
7133:
7134: begin
7135: if PO_COMMUNICATION_PVT.g_org_id <> p_org_id or
7136: PO_COMMUNICATION_PVT.g_org_id is null then
7137:
7138: PO_COMMUNICATION_PVT.g_org_id := p_org_id;
7139:
7140: PO_COMMUNICATION_PVT.g_ou_name := null;

Line 7138: PO_COMMUNICATION_PVT.g_org_id := p_org_id;

7134: begin
7135: if PO_COMMUNICATION_PVT.g_org_id <> p_org_id or
7136: PO_COMMUNICATION_PVT.g_org_id is null then
7137:
7138: PO_COMMUNICATION_PVT.g_org_id := p_org_id;
7139:
7140: PO_COMMUNICATION_PVT.g_ou_name := null;
7141: PO_COMMUNICATION_PVT.g_ou_address_line_1 := null;
7142: PO_COMMUNICATION_PVT.g_ou_address_line_2 := null;

Line 7140: PO_COMMUNICATION_PVT.g_ou_name := null;

7136: PO_COMMUNICATION_PVT.g_org_id is null then
7137:
7138: PO_COMMUNICATION_PVT.g_org_id := p_org_id;
7139:
7140: PO_COMMUNICATION_PVT.g_ou_name := null;
7141: PO_COMMUNICATION_PVT.g_ou_address_line_1 := null;
7142: PO_COMMUNICATION_PVT.g_ou_address_line_2 := null;
7143: PO_COMMUNICATION_PVT.g_ou_address_line_3 := null;
7144: PO_COMMUNICATION_PVT.g_ou_town_or_city := null;

Line 7141: PO_COMMUNICATION_PVT.g_ou_address_line_1 := null;

7137:
7138: PO_COMMUNICATION_PVT.g_org_id := p_org_id;
7139:
7140: PO_COMMUNICATION_PVT.g_ou_name := null;
7141: PO_COMMUNICATION_PVT.g_ou_address_line_1 := null;
7142: PO_COMMUNICATION_PVT.g_ou_address_line_2 := null;
7143: PO_COMMUNICATION_PVT.g_ou_address_line_3 := null;
7144: PO_COMMUNICATION_PVT.g_ou_town_or_city := null;
7145: PO_COMMUNICATION_PVT.g_ou_region2 := null;

Line 7142: PO_COMMUNICATION_PVT.g_ou_address_line_2 := null;

7138: PO_COMMUNICATION_PVT.g_org_id := p_org_id;
7139:
7140: PO_COMMUNICATION_PVT.g_ou_name := null;
7141: PO_COMMUNICATION_PVT.g_ou_address_line_1 := null;
7142: PO_COMMUNICATION_PVT.g_ou_address_line_2 := null;
7143: PO_COMMUNICATION_PVT.g_ou_address_line_3 := null;
7144: PO_COMMUNICATION_PVT.g_ou_town_or_city := null;
7145: PO_COMMUNICATION_PVT.g_ou_region2 := null;
7146: PO_COMMUNICATION_PVT.g_ou_postal_code := null;

Line 7143: PO_COMMUNICATION_PVT.g_ou_address_line_3 := null;

7139:
7140: PO_COMMUNICATION_PVT.g_ou_name := null;
7141: PO_COMMUNICATION_PVT.g_ou_address_line_1 := null;
7142: PO_COMMUNICATION_PVT.g_ou_address_line_2 := null;
7143: PO_COMMUNICATION_PVT.g_ou_address_line_3 := null;
7144: PO_COMMUNICATION_PVT.g_ou_town_or_city := null;
7145: PO_COMMUNICATION_PVT.g_ou_region2 := null;
7146: PO_COMMUNICATION_PVT.g_ou_postal_code := null;
7147: PO_COMMUNICATION_PVT.g_ou_country := null;

Line 7144: PO_COMMUNICATION_PVT.g_ou_town_or_city := null;

7140: PO_COMMUNICATION_PVT.g_ou_name := null;
7141: PO_COMMUNICATION_PVT.g_ou_address_line_1 := null;
7142: PO_COMMUNICATION_PVT.g_ou_address_line_2 := null;
7143: PO_COMMUNICATION_PVT.g_ou_address_line_3 := null;
7144: PO_COMMUNICATION_PVT.g_ou_town_or_city := null;
7145: PO_COMMUNICATION_PVT.g_ou_region2 := null;
7146: PO_COMMUNICATION_PVT.g_ou_postal_code := null;
7147: PO_COMMUNICATION_PVT.g_ou_country := null;
7148:

Line 7145: PO_COMMUNICATION_PVT.g_ou_region2 := null;

7141: PO_COMMUNICATION_PVT.g_ou_address_line_1 := null;
7142: PO_COMMUNICATION_PVT.g_ou_address_line_2 := null;
7143: PO_COMMUNICATION_PVT.g_ou_address_line_3 := null;
7144: PO_COMMUNICATION_PVT.g_ou_town_or_city := null;
7145: PO_COMMUNICATION_PVT.g_ou_region2 := null;
7146: PO_COMMUNICATION_PVT.g_ou_postal_code := null;
7147: PO_COMMUNICATION_PVT.g_ou_country := null;
7148:
7149: /*select name and location id from hr_all_organization_units*/

Line 7146: PO_COMMUNICATION_PVT.g_ou_postal_code := null;

7142: PO_COMMUNICATION_PVT.g_ou_address_line_2 := null;
7143: PO_COMMUNICATION_PVT.g_ou_address_line_3 := null;
7144: PO_COMMUNICATION_PVT.g_ou_town_or_city := null;
7145: PO_COMMUNICATION_PVT.g_ou_region2 := null;
7146: PO_COMMUNICATION_PVT.g_ou_postal_code := null;
7147: PO_COMMUNICATION_PVT.g_ou_country := null;
7148:
7149: /*select name and location id from hr_all_organization_units*/
7150:

Line 7147: PO_COMMUNICATION_PVT.g_ou_country := null;

7143: PO_COMMUNICATION_PVT.g_ou_address_line_3 := null;
7144: PO_COMMUNICATION_PVT.g_ou_town_or_city := null;
7145: PO_COMMUNICATION_PVT.g_ou_region2 := null;
7146: PO_COMMUNICATION_PVT.g_ou_postal_code := null;
7147: PO_COMMUNICATION_PVT.g_ou_country := null;
7148:
7149: /*select name and location id from hr_all_organization_units*/
7150:
7151: SELECT name, location_id into PO_COMMUNICATION_PVT.g_ou_name, l_location_id

Line 7151: SELECT name, location_id into PO_COMMUNICATION_PVT.g_ou_name, l_location_id

7147: PO_COMMUNICATION_PVT.g_ou_country := null;
7148:
7149: /*select name and location id from hr_all_organization_units*/
7150:
7151: SELECT name, location_id into PO_COMMUNICATION_PVT.g_ou_name, l_location_id
7152: FROM hr_all_organization_units
7153: WHERE organization_id = p_org_id;
7154:
7155: /* Call get_alladdress_lines procedure to retrieve address details*/

Line 7158: PO_COMMUNICATION_PVT.g_ou_address_line_1,

7154:
7155: /* Call get_alladdress_lines procedure to retrieve address details*/
7156:
7157: po_hr_location.get_alladdress_lines(l_location_id,
7158: PO_COMMUNICATION_PVT.g_ou_address_line_1,
7159: PO_COMMUNICATION_PVT.g_ou_address_line_2,
7160: PO_COMMUNICATION_PVT.g_ou_address_line_3,
7161: PO_COMMUNICATION_PVT.g_ou_country,
7162: l_address_info,

Line 7159: PO_COMMUNICATION_PVT.g_ou_address_line_2,

7155: /* Call get_alladdress_lines procedure to retrieve address details*/
7156:
7157: po_hr_location.get_alladdress_lines(l_location_id,
7158: PO_COMMUNICATION_PVT.g_ou_address_line_1,
7159: PO_COMMUNICATION_PVT.g_ou_address_line_2,
7160: PO_COMMUNICATION_PVT.g_ou_address_line_3,
7161: PO_COMMUNICATION_PVT.g_ou_country,
7162: l_address_info,
7163: l_ou_location_code,

Line 7160: PO_COMMUNICATION_PVT.g_ou_address_line_3,

7156:
7157: po_hr_location.get_alladdress_lines(l_location_id,
7158: PO_COMMUNICATION_PVT.g_ou_address_line_1,
7159: PO_COMMUNICATION_PVT.g_ou_address_line_2,
7160: PO_COMMUNICATION_PVT.g_ou_address_line_3,
7161: PO_COMMUNICATION_PVT.g_ou_country,
7162: l_address_info,
7163: l_ou_location_code,
7164: l_ou_phone,

Line 7161: PO_COMMUNICATION_PVT.g_ou_country,

7157: po_hr_location.get_alladdress_lines(l_location_id,
7158: PO_COMMUNICATION_PVT.g_ou_address_line_1,
7159: PO_COMMUNICATION_PVT.g_ou_address_line_2,
7160: PO_COMMUNICATION_PVT.g_ou_address_line_3,
7161: PO_COMMUNICATION_PVT.g_ou_country,
7162: l_address_info,
7163: l_ou_location_code,
7164: l_ou_phone,
7165: l_ou_fax,

Line 7167: PO_COMMUNICATION_PVT.g_ou_town_or_city,

7163: l_ou_location_code,
7164: l_ou_phone,
7165: l_ou_fax,
7166: l_address_line4,
7167: PO_COMMUNICATION_PVT.g_ou_town_or_city,
7168: PO_COMMUNICATION_PVT.g_ou_postal_code,
7169: PO_COMMUNICATION_PVT.g_ou_region2);
7170:
7171:

Line 7168: PO_COMMUNICATION_PVT.g_ou_postal_code,

7164: l_ou_phone,
7165: l_ou_fax,
7166: l_address_line4,
7167: PO_COMMUNICATION_PVT.g_ou_town_or_city,
7168: PO_COMMUNICATION_PVT.g_ou_postal_code,
7169: PO_COMMUNICATION_PVT.g_ou_region2);
7170:
7171:
7172: end if;

Line 7169: PO_COMMUNICATION_PVT.g_ou_region2);

7165: l_ou_fax,
7166: l_address_line4,
7167: PO_COMMUNICATION_PVT.g_ou_town_or_city,
7168: PO_COMMUNICATION_PVT.g_ou_postal_code,
7169: PO_COMMUNICATION_PVT.g_ou_region2);
7170:
7171:
7172: end if;
7173: return PO_COMMUNICATION_PVT.g_ou_name;

Line 7173: return PO_COMMUNICATION_PVT.g_ou_name;

7169: PO_COMMUNICATION_PVT.g_ou_region2);
7170:
7171:
7172: end if;
7173: return PO_COMMUNICATION_PVT.g_ou_name;
7174: end;
7175:
7176:
7177: function getOUAddressLine1 return varchar2 is

Line 7179: return PO_COMMUNICATION_PVT.g_ou_address_line_1;

7175:
7176:
7177: function getOUAddressLine1 return varchar2 is
7178: begin
7179: return PO_COMMUNICATION_PVT.g_ou_address_line_1;
7180: end;
7181: function getOUAddressLine2 return varchar2 is
7182: begin
7183: return PO_COMMUNICATION_PVT.g_ou_address_line_2;

Line 7183: return PO_COMMUNICATION_PVT.g_ou_address_line_2;

7179: return PO_COMMUNICATION_PVT.g_ou_address_line_1;
7180: end;
7181: function getOUAddressLine2 return varchar2 is
7182: begin
7183: return PO_COMMUNICATION_PVT.g_ou_address_line_2;
7184: end;
7185: function getOUAddressLine3 return varchar2 is
7186: begin
7187: return PO_COMMUNICATION_PVT.g_ou_address_line_3;

Line 7187: return PO_COMMUNICATION_PVT.g_ou_address_line_3;

7183: return PO_COMMUNICATION_PVT.g_ou_address_line_2;
7184: end;
7185: function getOUAddressLine3 return varchar2 is
7186: begin
7187: return PO_COMMUNICATION_PVT.g_ou_address_line_3;
7188: end;
7189: function getOUTownCity return varchar2 is
7190: begin
7191: return PO_COMMUNICATION_PVT.g_ou_town_or_city;

Line 7191: return PO_COMMUNICATION_PVT.g_ou_town_or_city;

7187: return PO_COMMUNICATION_PVT.g_ou_address_line_3;
7188: end;
7189: function getOUTownCity return varchar2 is
7190: begin
7191: return PO_COMMUNICATION_PVT.g_ou_town_or_city;
7192: end;
7193: function getOURegion2 return varchar2 is
7194: begin
7195: return PO_COMMUNICATION_PVT.g_ou_region2;

Line 7195: return PO_COMMUNICATION_PVT.g_ou_region2;

7191: return PO_COMMUNICATION_PVT.g_ou_town_or_city;
7192: end;
7193: function getOURegion2 return varchar2 is
7194: begin
7195: return PO_COMMUNICATION_PVT.g_ou_region2;
7196: end;
7197: function getOUPostalCode return varchar2 is
7198: begin
7199: return PO_COMMUNICATION_PVT.g_ou_postal_code;

Line 7199: return PO_COMMUNICATION_PVT.g_ou_postal_code;

7195: return PO_COMMUNICATION_PVT.g_ou_region2;
7196: end;
7197: function getOUPostalCode return varchar2 is
7198: begin
7199: return PO_COMMUNICATION_PVT.g_ou_postal_code;
7200: end;
7201:
7202: /* Function retuns the Operation Unit country value that
7203: retreived in getOperationInfo function.

Line 7208: return PO_COMMUNICATION_PVT.g_ou_country;

7204: */
7205:
7206: function getOUCountry return varchar2 is
7207: begin
7208: return PO_COMMUNICATION_PVT.g_ou_country;
7209: end;
7210:
7211:
7212:

Line 7220: PO_COMMUNICATION_PVT.g_header_id := NULL;

7216: -- bug5386806
7217: -- If p_header_id is null, set all dependent fields to NULL
7218: IF (p_header_id IS NULL) THEN
7219:
7220: PO_COMMUNICATION_PVT.g_header_id := NULL;
7221: PO_COMMUNICATION_PVT.g_quote_number := NULL;
7222: PO_COMMUNICATION_PVT.g_agreement_number := NULL;
7223: PO_COMMUNICATION_PVT.g_agreement_flag := NULL;
7224:

Line 7221: PO_COMMUNICATION_PVT.g_quote_number := NULL;

7217: -- If p_header_id is null, set all dependent fields to NULL
7218: IF (p_header_id IS NULL) THEN
7219:
7220: PO_COMMUNICATION_PVT.g_header_id := NULL;
7221: PO_COMMUNICATION_PVT.g_quote_number := NULL;
7222: PO_COMMUNICATION_PVT.g_agreement_number := NULL;
7223: PO_COMMUNICATION_PVT.g_agreement_flag := NULL;
7224:
7225: ELSIF PO_COMMUNICATION_PVT.g_header_id <> p_header_id or

Line 7222: PO_COMMUNICATION_PVT.g_agreement_number := NULL;

7218: IF (p_header_id IS NULL) THEN
7219:
7220: PO_COMMUNICATION_PVT.g_header_id := NULL;
7221: PO_COMMUNICATION_PVT.g_quote_number := NULL;
7222: PO_COMMUNICATION_PVT.g_agreement_number := NULL;
7223: PO_COMMUNICATION_PVT.g_agreement_flag := NULL;
7224:
7225: ELSIF PO_COMMUNICATION_PVT.g_header_id <> p_header_id or
7226: PO_COMMUNICATION_PVT.g_header_id is null then

Line 7223: PO_COMMUNICATION_PVT.g_agreement_flag := NULL;

7219:
7220: PO_COMMUNICATION_PVT.g_header_id := NULL;
7221: PO_COMMUNICATION_PVT.g_quote_number := NULL;
7222: PO_COMMUNICATION_PVT.g_agreement_number := NULL;
7223: PO_COMMUNICATION_PVT.g_agreement_flag := NULL;
7224:
7225: ELSIF PO_COMMUNICATION_PVT.g_header_id <> p_header_id or
7226: PO_COMMUNICATION_PVT.g_header_id is null then
7227:

Line 7225: ELSIF PO_COMMUNICATION_PVT.g_header_id <> p_header_id or

7221: PO_COMMUNICATION_PVT.g_quote_number := NULL;
7222: PO_COMMUNICATION_PVT.g_agreement_number := NULL;
7223: PO_COMMUNICATION_PVT.g_agreement_flag := NULL;
7224:
7225: ELSIF PO_COMMUNICATION_PVT.g_header_id <> p_header_id or
7226: PO_COMMUNICATION_PVT.g_header_id is null then
7227:
7228: PO_COMMUNICATION_PVT.g_header_id := p_header_id;
7229:

Line 7226: PO_COMMUNICATION_PVT.g_header_id is null then

7222: PO_COMMUNICATION_PVT.g_agreement_number := NULL;
7223: PO_COMMUNICATION_PVT.g_agreement_flag := NULL;
7224:
7225: ELSIF PO_COMMUNICATION_PVT.g_header_id <> p_header_id or
7226: PO_COMMUNICATION_PVT.g_header_id is null then
7227:
7228: PO_COMMUNICATION_PVT.g_header_id := p_header_id;
7229:
7230: Select ph.QUOTE_VENDOR_QUOTE_NUMBER, ph.SEGMENT1, ph.GLOBAL_AGREEMENT_FLAG into

Line 7228: PO_COMMUNICATION_PVT.g_header_id := p_header_id;

7224:
7225: ELSIF PO_COMMUNICATION_PVT.g_header_id <> p_header_id or
7226: PO_COMMUNICATION_PVT.g_header_id is null then
7227:
7228: PO_COMMUNICATION_PVT.g_header_id := p_header_id;
7229:
7230: Select ph.QUOTE_VENDOR_QUOTE_NUMBER, ph.SEGMENT1, ph.GLOBAL_AGREEMENT_FLAG into
7231: PO_COMMUNICATION_PVT.g_quote_number, PO_COMMUNICATION_PVT.g_agreement_number,
7232: PO_COMMUNICATION_PVT.g_agreement_flag

Line 7231: PO_COMMUNICATION_PVT.g_quote_number, PO_COMMUNICATION_PVT.g_agreement_number,

7227:
7228: PO_COMMUNICATION_PVT.g_header_id := p_header_id;
7229:
7230: Select ph.QUOTE_VENDOR_QUOTE_NUMBER, ph.SEGMENT1, ph.GLOBAL_AGREEMENT_FLAG into
7231: PO_COMMUNICATION_PVT.g_quote_number, PO_COMMUNICATION_PVT.g_agreement_number,
7232: PO_COMMUNICATION_PVT.g_agreement_flag
7233: FROM
7234: po_headers_all ph
7235: WHERE

Line 7232: PO_COMMUNICATION_PVT.g_agreement_flag

7228: PO_COMMUNICATION_PVT.g_header_id := p_header_id;
7229:
7230: Select ph.QUOTE_VENDOR_QUOTE_NUMBER, ph.SEGMENT1, ph.GLOBAL_AGREEMENT_FLAG into
7231: PO_COMMUNICATION_PVT.g_quote_number, PO_COMMUNICATION_PVT.g_agreement_number,
7232: PO_COMMUNICATION_PVT.g_agreement_flag
7233: FROM
7234: po_headers_all ph
7235: WHERE
7236: ph.PO_HEADER_ID = p_header_id;

Line 7241: RETURN PO_COMMUNICATION_PVT.g_agreement_number;

7237:
7238:
7239: end if;
7240:
7241: RETURN PO_COMMUNICATION_PVT.g_agreement_number;
7242:
7243: end;
7244:
7245: function getAgreementLineNumber return VARCHAR2 is

Line 7247: return PO_COMMUNICATION_PVT.g_agreementLine_number;

7243: end;
7244:
7245: function getAgreementLineNumber return VARCHAR2 is
7246: begin
7247: return PO_COMMUNICATION_PVT.g_agreementLine_number;
7248: end;
7249: function getQuoteNumber return VARCHAR2 is
7250: begin
7251: return PO_COMMUNICATION_PVT.g_quote_number;

Line 7251: return PO_COMMUNICATION_PVT.g_quote_number;

7247: return PO_COMMUNICATION_PVT.g_agreementLine_number;
7248: end;
7249: function getQuoteNumber return VARCHAR2 is
7250: begin
7251: return PO_COMMUNICATION_PVT.g_quote_number;
7252: end;
7253:
7254: function getAgreementFlag return VARCHAR2 is
7255: begin

Line 7256: return PO_COMMUNICATION_PVT.g_agreement_flag;

7252: end;
7253:
7254: function getAgreementFlag return VARCHAR2 is
7255: begin
7256: return PO_COMMUNICATION_PVT.g_agreement_flag;
7257: end;
7258:
7259: function getAgreementLineNumber(p_line_id in NUMBER) return NUMBER is
7260: begin

Line 7261: if PO_COMMUNICATION_PVT.g_line_id <> p_line_id or

7257: end;
7258:
7259: function getAgreementLineNumber(p_line_id in NUMBER) return NUMBER is
7260: begin
7261: if PO_COMMUNICATION_PVT.g_line_id <> p_line_id or
7262: PO_COMMUNICATION_PVT.g_line_id is null then
7263:
7264: PO_COMMUNICATION_PVT.g_line_id := p_line_id;
7265:

Line 7262: PO_COMMUNICATION_PVT.g_line_id is null then

7258:
7259: function getAgreementLineNumber(p_line_id in NUMBER) return NUMBER is
7260: begin
7261: if PO_COMMUNICATION_PVT.g_line_id <> p_line_id or
7262: PO_COMMUNICATION_PVT.g_line_id is null then
7263:
7264: PO_COMMUNICATION_PVT.g_line_id := p_line_id;
7265:
7266: Select LINE_NUM into PO_COMMUNICATION_PVT.g_agreementLine_number

Line 7264: PO_COMMUNICATION_PVT.g_line_id := p_line_id;

7260: begin
7261: if PO_COMMUNICATION_PVT.g_line_id <> p_line_id or
7262: PO_COMMUNICATION_PVT.g_line_id is null then
7263:
7264: PO_COMMUNICATION_PVT.g_line_id := p_line_id;
7265:
7266: Select LINE_NUM into PO_COMMUNICATION_PVT.g_agreementLine_number
7267: FROM PO_LINES_ALL
7268: WHERE PO_LINE_ID = p_line_id;

Line 7266: Select LINE_NUM into PO_COMMUNICATION_PVT.g_agreementLine_number

7262: PO_COMMUNICATION_PVT.g_line_id is null then
7263:
7264: PO_COMMUNICATION_PVT.g_line_id := p_line_id;
7265:
7266: Select LINE_NUM into PO_COMMUNICATION_PVT.g_agreementLine_number
7267: FROM PO_LINES_ALL
7268: WHERE PO_LINE_ID = p_line_id;
7269: end if;
7270: return PO_COMMUNICATION_PVT.g_agreementLine_number;

Line 7270: return PO_COMMUNICATION_PVT.g_agreementLine_number;

7266: Select LINE_NUM into PO_COMMUNICATION_PVT.g_agreementLine_number
7267: FROM PO_LINES_ALL
7268: WHERE PO_LINE_ID = p_line_id;
7269: end if;
7270: return PO_COMMUNICATION_PVT.g_agreementLine_number;
7271:
7272: end;
7273:
7274: function getArcBuyerAgentID(p_header_id in NUMBER) return NUMBER is

Line 7276: if PO_COMMUNICATION_PVT.g_header_id1 <> p_header_id or

7272: end;
7273:
7274: function getArcBuyerAgentID(p_header_id in NUMBER) return NUMBER is
7275: begin
7276: if PO_COMMUNICATION_PVT.g_header_id1 <> p_header_id or
7277: PO_COMMUNICATION_PVT.g_header_id1 is null then
7278:
7279: PO_COMMUNICATION_PVT.g_header_id1 := p_header_id;
7280:

Line 7277: PO_COMMUNICATION_PVT.g_header_id1 is null then

7273:
7274: function getArcBuyerAgentID(p_header_id in NUMBER) return NUMBER is
7275: begin
7276: if PO_COMMUNICATION_PVT.g_header_id1 <> p_header_id or
7277: PO_COMMUNICATION_PVT.g_header_id1 is null then
7278:
7279: PO_COMMUNICATION_PVT.g_header_id1 := p_header_id;
7280:
7281: PO_COMMUNICATION_PVT.g_arcBuyer_fname := null;

Line 7279: PO_COMMUNICATION_PVT.g_header_id1 := p_header_id;

7275: begin
7276: if PO_COMMUNICATION_PVT.g_header_id1 <> p_header_id or
7277: PO_COMMUNICATION_PVT.g_header_id1 is null then
7278:
7279: PO_COMMUNICATION_PVT.g_header_id1 := p_header_id;
7280:
7281: PO_COMMUNICATION_PVT.g_arcBuyer_fname := null;
7282: PO_COMMUNICATION_PVT.g_arcBuyer_lname := null;
7283: PO_COMMUNICATION_PVT.g_arcAgent_id := null;

Line 7281: PO_COMMUNICATION_PVT.g_arcBuyer_fname := null;

7277: PO_COMMUNICATION_PVT.g_header_id1 is null then
7278:
7279: PO_COMMUNICATION_PVT.g_header_id1 := p_header_id;
7280:
7281: PO_COMMUNICATION_PVT.g_arcBuyer_fname := null;
7282: PO_COMMUNICATION_PVT.g_arcBuyer_lname := null;
7283: PO_COMMUNICATION_PVT.g_arcAgent_id := null;
7284:
7285: SELECT HRE.FIRST_NAME,

Line 7282: PO_COMMUNICATION_PVT.g_arcBuyer_lname := null;

7278:
7279: PO_COMMUNICATION_PVT.g_header_id1 := p_header_id;
7280:
7281: PO_COMMUNICATION_PVT.g_arcBuyer_fname := null;
7282: PO_COMMUNICATION_PVT.g_arcBuyer_lname := null;
7283: PO_COMMUNICATION_PVT.g_arcAgent_id := null;
7284:
7285: SELECT HRE.FIRST_NAME,
7286: HRE.LAST_NAME,

Line 7283: PO_COMMUNICATION_PVT.g_arcAgent_id := null;

7279: PO_COMMUNICATION_PVT.g_header_id1 := p_header_id;
7280:
7281: PO_COMMUNICATION_PVT.g_arcBuyer_fname := null;
7282: PO_COMMUNICATION_PVT.g_arcBuyer_lname := null;
7283: PO_COMMUNICATION_PVT.g_arcAgent_id := null;
7284:
7285: SELECT HRE.FIRST_NAME,
7286: HRE.LAST_NAME,
7287: HRL.MEANING,

Line 7289: INTO PO_COMMUNICATION_PVT.g_arcBuyer_fname, PO_COMMUNICATION_PVT.g_arcBuyer_lname,

7285: SELECT HRE.FIRST_NAME,
7286: HRE.LAST_NAME,
7287: HRL.MEANING,
7288: PHA.AGENT_ID
7289: INTO PO_COMMUNICATION_PVT.g_arcBuyer_fname, PO_COMMUNICATION_PVT.g_arcBuyer_lname,
7290: PO_COMMUNICATION_PVT.g_arcBuyer_title, PO_COMMUNICATION_PVT.g_arcAgent_id
7291:
7292: FROM
7293: PER_ALL_PEOPLE_F HRE,

Line 7290: PO_COMMUNICATION_PVT.g_arcBuyer_title, PO_COMMUNICATION_PVT.g_arcAgent_id

7286: HRE.LAST_NAME,
7287: HRL.MEANING,
7288: PHA.AGENT_ID
7289: INTO PO_COMMUNICATION_PVT.g_arcBuyer_fname, PO_COMMUNICATION_PVT.g_arcBuyer_lname,
7290: PO_COMMUNICATION_PVT.g_arcBuyer_title, PO_COMMUNICATION_PVT.g_arcAgent_id
7291:
7292: FROM
7293: PER_ALL_PEOPLE_F HRE,
7294: PO_HEADERS_ARCHIVE_ALL PHA,

Line 7311: return PO_COMMUNICATION_PVT.g_arcBuyer_fname;

7307: end;
7308:
7309: function getArcBuyerFName return VARCHAR2 is
7310: begin
7311: return PO_COMMUNICATION_PVT.g_arcBuyer_fname;
7312: end;
7313:
7314: function getArcBuyerLName return VARCHAR2 is
7315: begin

Line 7316: return PO_COMMUNICATION_PVT.g_arcBuyer_lname;

7312: end;
7313:
7314: function getArcBuyerLName return VARCHAR2 is
7315: begin
7316: return PO_COMMUNICATION_PVT.g_arcBuyer_lname;
7317: end;
7318:
7319: function getArcBuyerTitle return VARCHAR2 is
7320: begin

Line 7321: return PO_COMMUNICATION_PVT.g_arcBuyer_title;

7317: end;
7318:
7319: function getArcBuyerTitle return VARCHAR2 is
7320: begin
7321: return PO_COMMUNICATION_PVT.g_arcBuyer_title;
7322: end;
7323:
7324:
7325: function getRelArcBuyerAgentID(p_release_id in NUMBER) return NUMBER is

Line 7327: if PO_COMMUNICATION_PVT.g_release_id <> p_release_id or

7323:
7324:
7325: function getRelArcBuyerAgentID(p_release_id in NUMBER) return NUMBER is
7326: begin
7327: if PO_COMMUNICATION_PVT.g_release_id <> p_release_id or
7328: PO_COMMUNICATION_PVT.g_release_id is null then
7329:
7330: PO_COMMUNICATION_PVT.g_release_id := p_release_id;
7331:

Line 7328: PO_COMMUNICATION_PVT.g_release_id is null then

7324:
7325: function getRelArcBuyerAgentID(p_release_id in NUMBER) return NUMBER is
7326: begin
7327: if PO_COMMUNICATION_PVT.g_release_id <> p_release_id or
7328: PO_COMMUNICATION_PVT.g_release_id is null then
7329:
7330: PO_COMMUNICATION_PVT.g_release_id := p_release_id;
7331:
7332: PO_COMMUNICATION_PVT.g_arcBuyer_fname := null;

Line 7330: PO_COMMUNICATION_PVT.g_release_id := p_release_id;

7326: begin
7327: if PO_COMMUNICATION_PVT.g_release_id <> p_release_id or
7328: PO_COMMUNICATION_PVT.g_release_id is null then
7329:
7330: PO_COMMUNICATION_PVT.g_release_id := p_release_id;
7331:
7332: PO_COMMUNICATION_PVT.g_arcBuyer_fname := null;
7333: PO_COMMUNICATION_PVT.g_arcBuyer_lname := null;
7334: PO_COMMUNICATION_PVT.g_arcAgent_id := null;

Line 7332: PO_COMMUNICATION_PVT.g_arcBuyer_fname := null;

7328: PO_COMMUNICATION_PVT.g_release_id is null then
7329:
7330: PO_COMMUNICATION_PVT.g_release_id := p_release_id;
7331:
7332: PO_COMMUNICATION_PVT.g_arcBuyer_fname := null;
7333: PO_COMMUNICATION_PVT.g_arcBuyer_lname := null;
7334: PO_COMMUNICATION_PVT.g_arcAgent_id := null;
7335:
7336: SELECT HRE.FIRST_NAME,

Line 7333: PO_COMMUNICATION_PVT.g_arcBuyer_lname := null;

7329:
7330: PO_COMMUNICATION_PVT.g_release_id := p_release_id;
7331:
7332: PO_COMMUNICATION_PVT.g_arcBuyer_fname := null;
7333: PO_COMMUNICATION_PVT.g_arcBuyer_lname := null;
7334: PO_COMMUNICATION_PVT.g_arcAgent_id := null;
7335:
7336: SELECT HRE.FIRST_NAME,
7337: HRE.LAST_NAME,

Line 7334: PO_COMMUNICATION_PVT.g_arcAgent_id := null;

7330: PO_COMMUNICATION_PVT.g_release_id := p_release_id;
7331:
7332: PO_COMMUNICATION_PVT.g_arcBuyer_fname := null;
7333: PO_COMMUNICATION_PVT.g_arcBuyer_lname := null;
7334: PO_COMMUNICATION_PVT.g_arcAgent_id := null;
7335:
7336: SELECT HRE.FIRST_NAME,
7337: HRE.LAST_NAME,
7338: PHA.AGENT_ID

Line 7339: INTO PO_COMMUNICATION_PVT.g_arcBuyer_fname, PO_COMMUNICATION_PVT.g_arcBuyer_lname, PO_COMMUNICATION_PVT.g_arcAgent_id

7335:
7336: SELECT HRE.FIRST_NAME,
7337: HRE.LAST_NAME,
7338: PHA.AGENT_ID
7339: INTO PO_COMMUNICATION_PVT.g_arcBuyer_fname, PO_COMMUNICATION_PVT.g_arcBuyer_lname, PO_COMMUNICATION_PVT.g_arcAgent_id
7340:
7341: FROM
7342: PER_ALL_PEOPLE_F HRE,
7343: PO_RELEASES_ARCHIVE_ALL PHA

Line 7365: if PO_COMMUNICATION_PVT.g_vendor_site_id <> p_vendor_site_id or

7361: l_address_line_1 PO_VENDOR_SITES.ADDRESS_LINE1%type := null;
7362:
7363: begin
7364:
7365: if PO_COMMUNICATION_PVT.g_vendor_site_id <> p_vendor_site_id or
7366: PO_COMMUNICATION_PVT.g_vendor_site_id is null then
7367:
7368: PO_COMMUNICATION_PVT.g_vendor_address_line_2 := null;
7369: PO_COMMUNICATION_PVT.g_vendor_address_line_3 := null;

Line 7366: PO_COMMUNICATION_PVT.g_vendor_site_id is null then

7362:
7363: begin
7364:
7365: if PO_COMMUNICATION_PVT.g_vendor_site_id <> p_vendor_site_id or
7366: PO_COMMUNICATION_PVT.g_vendor_site_id is null then
7367:
7368: PO_COMMUNICATION_PVT.g_vendor_address_line_2 := null;
7369: PO_COMMUNICATION_PVT.g_vendor_address_line_3 := null;
7370: PO_COMMUNICATION_PVT.g_vendor_country := null;

Line 7368: PO_COMMUNICATION_PVT.g_vendor_address_line_2 := null;

7364:
7365: if PO_COMMUNICATION_PVT.g_vendor_site_id <> p_vendor_site_id or
7366: PO_COMMUNICATION_PVT.g_vendor_site_id is null then
7367:
7368: PO_COMMUNICATION_PVT.g_vendor_address_line_2 := null;
7369: PO_COMMUNICATION_PVT.g_vendor_address_line_3 := null;
7370: PO_COMMUNICATION_PVT.g_vendor_country := null;
7371: PO_COMMUNICATION_PVT.g_vendor_city_state_zipInfo := null;
7372: PO_COMMUNICATION_PVT.g_vendor_address_line_4 := null; --bug: 3463617

Line 7369: PO_COMMUNICATION_PVT.g_vendor_address_line_3 := null;

7365: if PO_COMMUNICATION_PVT.g_vendor_site_id <> p_vendor_site_id or
7366: PO_COMMUNICATION_PVT.g_vendor_site_id is null then
7367:
7368: PO_COMMUNICATION_PVT.g_vendor_address_line_2 := null;
7369: PO_COMMUNICATION_PVT.g_vendor_address_line_3 := null;
7370: PO_COMMUNICATION_PVT.g_vendor_country := null;
7371: PO_COMMUNICATION_PVT.g_vendor_city_state_zipInfo := null;
7372: PO_COMMUNICATION_PVT.g_vendor_address_line_4 := null; --bug: 3463617
7373:

Line 7370: PO_COMMUNICATION_PVT.g_vendor_country := null;

7366: PO_COMMUNICATION_PVT.g_vendor_site_id is null then
7367:
7368: PO_COMMUNICATION_PVT.g_vendor_address_line_2 := null;
7369: PO_COMMUNICATION_PVT.g_vendor_address_line_3 := null;
7370: PO_COMMUNICATION_PVT.g_vendor_country := null;
7371: PO_COMMUNICATION_PVT.g_vendor_city_state_zipInfo := null;
7372: PO_COMMUNICATION_PVT.g_vendor_address_line_4 := null; --bug: 3463617
7373:
7374: --bug: 3463617 : Retreived address_line4 from po_vendor_sites_all.

Line 7371: PO_COMMUNICATION_PVT.g_vendor_city_state_zipInfo := null;

7367:
7368: PO_COMMUNICATION_PVT.g_vendor_address_line_2 := null;
7369: PO_COMMUNICATION_PVT.g_vendor_address_line_3 := null;
7370: PO_COMMUNICATION_PVT.g_vendor_country := null;
7371: PO_COMMUNICATION_PVT.g_vendor_city_state_zipInfo := null;
7372: PO_COMMUNICATION_PVT.g_vendor_address_line_4 := null; --bug: 3463617
7373:
7374: --bug: 3463617 : Retreived address_line4 from po_vendor_sites_all.
7375: SELECT PVS.ADDRESS_LINE1 ,

Line 7372: PO_COMMUNICATION_PVT.g_vendor_address_line_4 := null; --bug: 3463617

7368: PO_COMMUNICATION_PVT.g_vendor_address_line_2 := null;
7369: PO_COMMUNICATION_PVT.g_vendor_address_line_3 := null;
7370: PO_COMMUNICATION_PVT.g_vendor_country := null;
7371: PO_COMMUNICATION_PVT.g_vendor_city_state_zipInfo := null;
7372: PO_COMMUNICATION_PVT.g_vendor_address_line_4 := null; --bug: 3463617
7373:
7374: --bug: 3463617 : Retreived address_line4 from po_vendor_sites_all.
7375: SELECT PVS.ADDRESS_LINE1 ,
7376: PVS.ADDRESS_LINE2 ,

Line 7384: l_address_line_1, PO_COMMUNICATION_PVT.g_vendor_address_line_2, PO_COMMUNICATION_PVT.g_vendor_address_line_3,

7380: PVS.ZIP ,
7381: FTE.TERRITORY_SHORT_NAME,
7382: PVS.ADDRESS_LINE4 --bug: 3463617
7383: INTO
7384: l_address_line_1, PO_COMMUNICATION_PVT.g_vendor_address_line_2, PO_COMMUNICATION_PVT.g_vendor_address_line_3,
7385: l_city, l_state, l_zip, PO_COMMUNICATION_PVT.g_vendor_country, PO_COMMUNICATION_PVT.g_vendor_address_line_4
7386: FROM
7387: PO_VENDOR_SITES_ALL PVS,
7388: FND_TERRITORIES_TL FTE

Line 7385: l_city, l_state, l_zip, PO_COMMUNICATION_PVT.g_vendor_country, PO_COMMUNICATION_PVT.g_vendor_address_line_4

7381: FTE.TERRITORY_SHORT_NAME,
7382: PVS.ADDRESS_LINE4 --bug: 3463617
7383: INTO
7384: l_address_line_1, PO_COMMUNICATION_PVT.g_vendor_address_line_2, PO_COMMUNICATION_PVT.g_vendor_address_line_3,
7385: l_city, l_state, l_zip, PO_COMMUNICATION_PVT.g_vendor_country, PO_COMMUNICATION_PVT.g_vendor_address_line_4
7386: FROM
7387: PO_VENDOR_SITES_ALL PVS,
7388: FND_TERRITORIES_TL FTE
7389: WHERE

Line 7396: PO_COMMUNICATION_PVT.g_vendor_city_state_zipInfo := l_state ||' '|| l_zip;

7392: PVS.VENDOR_SITE_ID = p_vendor_site_id ;
7393:
7394:
7395: If (l_city is null) then
7396: PO_COMMUNICATION_PVT.g_vendor_city_state_zipInfo := l_state ||' '|| l_zip;
7397: else
7398: PO_COMMUNICATION_PVT.g_vendor_city_state_zipInfo := l_city || ',' || l_state ||' '|| l_zip;
7399: end if;
7400: end if;

Line 7398: PO_COMMUNICATION_PVT.g_vendor_city_state_zipInfo := l_city || ',' || l_state ||' '|| l_zip;

7394:
7395: If (l_city is null) then
7396: PO_COMMUNICATION_PVT.g_vendor_city_state_zipInfo := l_state ||' '|| l_zip;
7397: else
7398: PO_COMMUNICATION_PVT.g_vendor_city_state_zipInfo := l_city || ',' || l_state ||' '|| l_zip;
7399: end if;
7400: end if;
7401:
7402: return l_address_line_1;

Line 7408: return PO_COMMUNICATION_PVT.g_vendor_address_line_2;

7404: end;
7405:
7406: function getVendorAddressLine2 return VARCHAR2 is
7407: begin
7408: return PO_COMMUNICATION_PVT.g_vendor_address_line_2;
7409: end;
7410: function getVendorAddressLine3 return VARCHAR2 is
7411: begin
7412: return PO_COMMUNICATION_PVT.g_vendor_address_line_3;

Line 7412: return PO_COMMUNICATION_PVT.g_vendor_address_line_3;

7408: return PO_COMMUNICATION_PVT.g_vendor_address_line_2;
7409: end;
7410: function getVendorAddressLine3 return VARCHAR2 is
7411: begin
7412: return PO_COMMUNICATION_PVT.g_vendor_address_line_3;
7413: end;
7414: function getVendorCityStateZipInfo return VARCHAR2 is
7415: begin
7416: return PO_COMMUNICATION_PVT.g_vendor_city_state_zipInfo;

Line 7416: return PO_COMMUNICATION_PVT.g_vendor_city_state_zipInfo;

7412: return PO_COMMUNICATION_PVT.g_vendor_address_line_3;
7413: end;
7414: function getVendorCityStateZipInfo return VARCHAR2 is
7415: begin
7416: return PO_COMMUNICATION_PVT.g_vendor_city_state_zipInfo;
7417: end;
7418: function getVendorCountry return VARCHAR2 is
7419: begin
7420: return PO_COMMUNICATION_PVT.g_vendor_country ;

Line 7420: return PO_COMMUNICATION_PVT.g_vendor_country ;

7416: return PO_COMMUNICATION_PVT.g_vendor_city_state_zipInfo;
7417: end;
7418: function getVendorCountry return VARCHAR2 is
7419: begin
7420: return PO_COMMUNICATION_PVT.g_vendor_country ;
7421: end;
7422:
7423:
7424: function getJob(p_job_id in NUMBER) return VARCHAR2 is

Line 7426: if PO_COMMUNICATION_PVT.g_job_id <> p_job_id or

7422:
7423:
7424: function getJob(p_job_id in NUMBER) return VARCHAR2 is
7425: begin
7426: if PO_COMMUNICATION_PVT.g_job_id <> p_job_id or
7427: PO_COMMUNICATION_PVT.g_job_id is null then
7428:
7429: PO_COMMUNICATION_PVT.g_job_name := null;
7430:

Line 7427: PO_COMMUNICATION_PVT.g_job_id is null then

7423:
7424: function getJob(p_job_id in NUMBER) return VARCHAR2 is
7425: begin
7426: if PO_COMMUNICATION_PVT.g_job_id <> p_job_id or
7427: PO_COMMUNICATION_PVT.g_job_id is null then
7428:
7429: PO_COMMUNICATION_PVT.g_job_name := null;
7430:
7431: SELECT

Line 7429: PO_COMMUNICATION_PVT.g_job_name := null;

7425: begin
7426: if PO_COMMUNICATION_PVT.g_job_id <> p_job_id or
7427: PO_COMMUNICATION_PVT.g_job_id is null then
7428:
7429: PO_COMMUNICATION_PVT.g_job_name := null;
7430:
7431: SELECT
7432: name
7433: INTO

Line 7434: PO_COMMUNICATION_PVT.g_job_name

7430:
7431: SELECT
7432: name
7433: INTO
7434: PO_COMMUNICATION_PVT.g_job_name
7435: FROM
7436: PER_JOBS_VL
7437: WHERE
7438: job_id = p_job_id;

Line 7441: return PO_COMMUNICATION_PVT.g_job_name;

7437: WHERE
7438: job_id = p_job_id;
7439: end if;
7440:
7441: return PO_COMMUNICATION_PVT.g_job_name;
7442: end;
7443:
7444: function getDocumentType return VARCHAR2 is
7445: begin

Line 7446: return PO_COMMUNICATION_PVT.g_documentType;

7442: end;
7443:
7444: function getDocumentType return VARCHAR2 is
7445: begin
7446: return PO_COMMUNICATION_PVT.g_documentType;
7447: end;
7448:
7449: function getFormatMask return VARCHAR2 is
7450: begin

Line 7451: if PO_COMMUNICATION_PVT.g_currency_code <> g_current_currency_code or

7447: end;
7448:
7449: function getFormatMask return VARCHAR2 is
7450: begin
7451: if PO_COMMUNICATION_PVT.g_currency_code <> g_current_currency_code or
7452: PO_COMMUNICATION_PVT.g_currency_code is null then
7453:
7454: PO_COMMUNICATION_PVT.g_currency_code := PO_COMMUNICATION_PVT.g_current_currency_code;
7455: PO_COMMUNICATION_PVT.g_format_mask := null;

Line 7452: PO_COMMUNICATION_PVT.g_currency_code is null then

7448:
7449: function getFormatMask return VARCHAR2 is
7450: begin
7451: if PO_COMMUNICATION_PVT.g_currency_code <> g_current_currency_code or
7452: PO_COMMUNICATION_PVT.g_currency_code is null then
7453:
7454: PO_COMMUNICATION_PVT.g_currency_code := PO_COMMUNICATION_PVT.g_current_currency_code;
7455: PO_COMMUNICATION_PVT.g_format_mask := null;
7456:

Line 7454: PO_COMMUNICATION_PVT.g_currency_code := PO_COMMUNICATION_PVT.g_current_currency_code;

7450: begin
7451: if PO_COMMUNICATION_PVT.g_currency_code <> g_current_currency_code or
7452: PO_COMMUNICATION_PVT.g_currency_code is null then
7453:
7454: PO_COMMUNICATION_PVT.g_currency_code := PO_COMMUNICATION_PVT.g_current_currency_code;
7455: PO_COMMUNICATION_PVT.g_format_mask := null;
7456:
7457: g_format_mask := FND_CURRENCY.GET_FORMAT_MASK(g_current_currency_code, 60);
7458: end if;

Line 7455: PO_COMMUNICATION_PVT.g_format_mask := null;

7451: if PO_COMMUNICATION_PVT.g_currency_code <> g_current_currency_code or
7452: PO_COMMUNICATION_PVT.g_currency_code is null then
7453:
7454: PO_COMMUNICATION_PVT.g_currency_code := PO_COMMUNICATION_PVT.g_current_currency_code;
7455: PO_COMMUNICATION_PVT.g_format_mask := null;
7456:
7457: g_format_mask := FND_CURRENCY.GET_FORMAT_MASK(g_current_currency_code, 60);
7458: end if;
7459:

Line 7460: return PO_COMMUNICATION_PVT.g_format_mask;

7456:
7457: g_format_mask := FND_CURRENCY.GET_FORMAT_MASK(g_current_currency_code, 60);
7458: end if;
7459:
7460: return PO_COMMUNICATION_PVT.g_format_mask;
7461:
7462: end;
7463:
7464: function getLegalEntityName return VARCHAR2 is

Line 7466: return PO_COMMUNICATION_PVT.g_buyer_org;

7462: end;
7463:
7464: function getLegalEntityName return VARCHAR2 is
7465: begin
7466: return PO_COMMUNICATION_PVT.g_buyer_org;
7467: end;
7468:
7469: function IsDocumentSigned(p_header_id in Number) return VARCHAR2 is
7470: l_signed boolean;

Line 7500: AND OBJECT_REVISION_NUM < PO_COMMUNICATION_PVT.g_revision_num);

7496: FROM PO_ACTION_HISTORY
7497: WHERE object_id = p_header_id
7498: AND object_type_code IN ('PO', 'PA')
7499: AND action_code = 'SIGNED'
7500: AND OBJECT_REVISION_NUM < PO_COMMUNICATION_PVT.g_revision_num);
7501:
7502: IF l_signatures = 'Y' THEN
7503: l_signed := TRUE;
7504: ELSE

Line 7789: d_module VARCHAR2(70) := 'PO_COMMUNICATION_PVT.getZIPFileName';

7785: FUNCTION getZIPFileName(p_org_id in number) RETURN VARCHAR2 IS
7786: l_email_attachment_filename po_system_parameters_all.email_attachment_filename%type;
7787: l_progress varchar2(200);
7788: d_progress NUMBER;
7789: d_module VARCHAR2(70) := 'PO_COMMUNICATION_PVT.getZIPFileName';
7790: BEGIN
7791: d_progress := 0;
7792: IF (PO_LOG.d_proc) THEN
7793: PO_LOG.proc_begin(d_module);

Line 7817: return PO_COMMUNICATION_PVT.g_address_line4;

7813:
7814: --bug:346361
7815: function getAddressLine4 return varchar2 is
7816: begin
7817: return PO_COMMUNICATION_PVT.g_address_line4;
7818: end;
7819:
7820: --bug:346361
7821: function getVendorAddressLine4 return VARCHAR2 is

Line 7823: return PO_COMMUNICATION_PVT.g_vendor_address_line_4;

7819:
7820: --bug:346361
7821: function getVendorAddressLine4 return VARCHAR2 is
7822: begin
7823: return PO_COMMUNICATION_PVT.g_vendor_address_line_4;
7824: end;
7825:
7826:
7827: /* function to retrieve legal entity details for given Inventory Organization */

Line 7849: if PO_COMMUNICATION_PVT.g_legal_entity_org_id <> p_org_id or

7845:
7846:
7847: begin
7848:
7849: if PO_COMMUNICATION_PVT.g_legal_entity_org_id <> p_org_id or
7850: PO_COMMUNICATION_PVT.g_legal_entity_org_id is null then
7851:
7852: PO_COMMUNICATION_PVT.g_legal_entity_org_id := p_org_id;
7853:

Line 7850: PO_COMMUNICATION_PVT.g_legal_entity_org_id is null then

7846:
7847: begin
7848:
7849: if PO_COMMUNICATION_PVT.g_legal_entity_org_id <> p_org_id or
7850: PO_COMMUNICATION_PVT.g_legal_entity_org_id is null then
7851:
7852: PO_COMMUNICATION_PVT.g_legal_entity_org_id := p_org_id;
7853:
7854: PO_COMMUNICATION_PVT.g_legal_entity_name := null;

Line 7852: PO_COMMUNICATION_PVT.g_legal_entity_org_id := p_org_id;

7848:
7849: if PO_COMMUNICATION_PVT.g_legal_entity_org_id <> p_org_id or
7850: PO_COMMUNICATION_PVT.g_legal_entity_org_id is null then
7851:
7852: PO_COMMUNICATION_PVT.g_legal_entity_org_id := p_org_id;
7853:
7854: PO_COMMUNICATION_PVT.g_legal_entity_name := null;
7855: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1 := null;
7856: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;

Line 7854: PO_COMMUNICATION_PVT.g_legal_entity_name := null;

7850: PO_COMMUNICATION_PVT.g_legal_entity_org_id is null then
7851:
7852: PO_COMMUNICATION_PVT.g_legal_entity_org_id := p_org_id;
7853:
7854: PO_COMMUNICATION_PVT.g_legal_entity_name := null;
7855: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1 := null;
7856: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;
7857: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;
7858: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;

Line 7855: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1 := null;

7851:
7852: PO_COMMUNICATION_PVT.g_legal_entity_org_id := p_org_id;
7853:
7854: PO_COMMUNICATION_PVT.g_legal_entity_name := null;
7855: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1 := null;
7856: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;
7857: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;
7858: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;
7859: PO_COMMUNICATION_PVT.g_legal_entity_state := null;

Line 7856: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;

7852: PO_COMMUNICATION_PVT.g_legal_entity_org_id := p_org_id;
7853:
7854: PO_COMMUNICATION_PVT.g_legal_entity_name := null;
7855: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1 := null;
7856: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;
7857: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;
7858: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;
7859: PO_COMMUNICATION_PVT.g_legal_entity_state := null;
7860: PO_COMMUNICATION_PVT.g_legal_entity_postal_code := null;

Line 7857: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;

7853:
7854: PO_COMMUNICATION_PVT.g_legal_entity_name := null;
7855: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1 := null;
7856: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;
7857: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;
7858: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;
7859: PO_COMMUNICATION_PVT.g_legal_entity_state := null;
7860: PO_COMMUNICATION_PVT.g_legal_entity_postal_code := null;
7861:

Line 7858: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;

7854: PO_COMMUNICATION_PVT.g_legal_entity_name := null;
7855: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1 := null;
7856: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;
7857: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;
7858: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;
7859: PO_COMMUNICATION_PVT.g_legal_entity_state := null;
7860: PO_COMMUNICATION_PVT.g_legal_entity_postal_code := null;
7861:
7862: /*Bug5983107 Commenting out the sql below and replacing the API's provided by XLE*/

Line 7859: PO_COMMUNICATION_PVT.g_legal_entity_state := null;

7855: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1 := null;
7856: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;
7857: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;
7858: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;
7859: PO_COMMUNICATION_PVT.g_legal_entity_state := null;
7860: PO_COMMUNICATION_PVT.g_legal_entity_postal_code := null;
7861:
7862: /*Bug5983107 Commenting out the sql below and replacing the API's provided by XLE*/
7863:

Line 7860: PO_COMMUNICATION_PVT.g_legal_entity_postal_code := null;

7856: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;
7857: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;
7858: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;
7859: PO_COMMUNICATION_PVT.g_legal_entity_state := null;
7860: PO_COMMUNICATION_PVT.g_legal_entity_postal_code := null;
7861:
7862: /*Bug5983107 Commenting out the sql below and replacing the API's provided by XLE*/
7863:
7864: /* SELECT name, LOCATION_ID

Line 7865: INTO PO_COMMUNICATION_PVT.g_legal_entity_name, l_location_id

7861:
7862: /*Bug5983107 Commenting out the sql below and replacing the API's provided by XLE*/
7863:
7864: /* SELECT name, LOCATION_ID
7865: INTO PO_COMMUNICATION_PVT.g_legal_entity_name, l_location_id
7866: FROM hr_all_organization_units
7867: WHERE to_char(organization_id) = ( SELECT org_information2 FROM hr_organization_information WHERE org_information_context = 'Accounting Information'
7868: and organization_id = p_org_id ) ; */
7869:

Line 7880: PO_COMMUNICATION_PVT.g_legal_entity_name := x_legalentity_info.name;

7876: null,
7877: l_legal_entity_id,
7878: x_legalentity_info);
7879:
7880: PO_COMMUNICATION_PVT.g_legal_entity_name := x_legalentity_info.name;
7881: l_location_id := x_legalentity_info.location_id;
7882:
7883: /*End bug5983107 */
7884:

Line 7890: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1,

7886: /* call procedure get_address in po_hr_location package to retrieve
7887: address information for given location id*/
7888:
7889: po_hr_location.get_alladdress_lines(l_location_id,
7890: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1,
7891: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2,
7892: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3,
7893: PO_COMMUNICATION_PVT.g_legal_entity_country,
7894: l_address_info,

Line 7891: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2,

7887: address information for given location id*/
7888:
7889: po_hr_location.get_alladdress_lines(l_location_id,
7890: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1,
7891: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2,
7892: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3,
7893: PO_COMMUNICATION_PVT.g_legal_entity_country,
7894: l_address_info,
7895: l_legal_entity_location_code,

Line 7892: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3,

7888:
7889: po_hr_location.get_alladdress_lines(l_location_id,
7890: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1,
7891: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2,
7892: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3,
7893: PO_COMMUNICATION_PVT.g_legal_entity_country,
7894: l_address_info,
7895: l_legal_entity_location_code,
7896: l_legal_entity_phone,

Line 7893: PO_COMMUNICATION_PVT.g_legal_entity_country,

7889: po_hr_location.get_alladdress_lines(l_location_id,
7890: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1,
7891: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2,
7892: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3,
7893: PO_COMMUNICATION_PVT.g_legal_entity_country,
7894: l_address_info,
7895: l_legal_entity_location_code,
7896: l_legal_entity_phone,
7897: l_legal_entity_fax,

Line 7899: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city,

7895: l_legal_entity_location_code,
7896: l_legal_entity_phone,
7897: l_legal_entity_fax,
7898: l_address_line4,
7899: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city,
7900: PO_COMMUNICATION_PVT.g_legal_entity_postal_code,
7901: PO_COMMUNICATION_PVT.g_legal_entity_state);
7902:
7903: end if;

Line 7900: PO_COMMUNICATION_PVT.g_legal_entity_postal_code,

7896: l_legal_entity_phone,
7897: l_legal_entity_fax,
7898: l_address_line4,
7899: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city,
7900: PO_COMMUNICATION_PVT.g_legal_entity_postal_code,
7901: PO_COMMUNICATION_PVT.g_legal_entity_state);
7902:
7903: end if;
7904: return PO_COMMUNICATION_PVT.g_legal_entity_name ;

Line 7901: PO_COMMUNICATION_PVT.g_legal_entity_state);

7897: l_legal_entity_fax,
7898: l_address_line4,
7899: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city,
7900: PO_COMMUNICATION_PVT.g_legal_entity_postal_code,
7901: PO_COMMUNICATION_PVT.g_legal_entity_state);
7902:
7903: end if;
7904: return PO_COMMUNICATION_PVT.g_legal_entity_name ;
7905:

Line 7904: return PO_COMMUNICATION_PVT.g_legal_entity_name ;

7900: PO_COMMUNICATION_PVT.g_legal_entity_postal_code,
7901: PO_COMMUNICATION_PVT.g_legal_entity_state);
7902:
7903: end if;
7904: return PO_COMMUNICATION_PVT.g_legal_entity_name ;
7905:
7906: EXCEPTION
7907: WHEN OTHERS THEN
7908: PO_COMMUNICATION_PVT.g_legal_entity_name := null;

Line 7908: PO_COMMUNICATION_PVT.g_legal_entity_name := null;

7904: return PO_COMMUNICATION_PVT.g_legal_entity_name ;
7905:
7906: EXCEPTION
7907: WHEN OTHERS THEN
7908: PO_COMMUNICATION_PVT.g_legal_entity_name := null;
7909: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1 := null;
7910: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;
7911: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;
7912: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;

Line 7909: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1 := null;

7905:
7906: EXCEPTION
7907: WHEN OTHERS THEN
7908: PO_COMMUNICATION_PVT.g_legal_entity_name := null;
7909: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1 := null;
7910: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;
7911: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;
7912: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;
7913: PO_COMMUNICATION_PVT.g_legal_entity_state := null;

Line 7910: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;

7906: EXCEPTION
7907: WHEN OTHERS THEN
7908: PO_COMMUNICATION_PVT.g_legal_entity_name := null;
7909: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1 := null;
7910: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;
7911: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;
7912: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;
7913: PO_COMMUNICATION_PVT.g_legal_entity_state := null;
7914: PO_COMMUNICATION_PVT.g_legal_entity_postal_code := null;

Line 7911: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;

7907: WHEN OTHERS THEN
7908: PO_COMMUNICATION_PVT.g_legal_entity_name := null;
7909: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1 := null;
7910: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;
7911: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;
7912: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;
7913: PO_COMMUNICATION_PVT.g_legal_entity_state := null;
7914: PO_COMMUNICATION_PVT.g_legal_entity_postal_code := null;
7915: return PO_COMMUNICATION_PVT.g_legal_entity_name ;

Line 7912: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;

7908: PO_COMMUNICATION_PVT.g_legal_entity_name := null;
7909: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1 := null;
7910: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;
7911: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;
7912: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;
7913: PO_COMMUNICATION_PVT.g_legal_entity_state := null;
7914: PO_COMMUNICATION_PVT.g_legal_entity_postal_code := null;
7915: return PO_COMMUNICATION_PVT.g_legal_entity_name ;
7916:

Line 7913: PO_COMMUNICATION_PVT.g_legal_entity_state := null;

7909: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1 := null;
7910: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;
7911: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;
7912: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;
7913: PO_COMMUNICATION_PVT.g_legal_entity_state := null;
7914: PO_COMMUNICATION_PVT.g_legal_entity_postal_code := null;
7915: return PO_COMMUNICATION_PVT.g_legal_entity_name ;
7916:
7917:

Line 7914: PO_COMMUNICATION_PVT.g_legal_entity_postal_code := null;

7910: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;
7911: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;
7912: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;
7913: PO_COMMUNICATION_PVT.g_legal_entity_state := null;
7914: PO_COMMUNICATION_PVT.g_legal_entity_postal_code := null;
7915: return PO_COMMUNICATION_PVT.g_legal_entity_name ;
7916:
7917:
7918: end getLegalEntityDetails;

Line 7915: return PO_COMMUNICATION_PVT.g_legal_entity_name ;

7911: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;
7912: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;
7913: PO_COMMUNICATION_PVT.g_legal_entity_state := null;
7914: PO_COMMUNICATION_PVT.g_legal_entity_postal_code := null;
7915: return PO_COMMUNICATION_PVT.g_legal_entity_name ;
7916:
7917:
7918: end getLegalEntityDetails;
7919:

Line 7924: return PO_COMMUNICATION_PVT.g_legal_entity_address_line_1;

7920: /* start of functions to return legal entity address details */
7921:
7922: function getLEAddressLine1 return varchar2 is
7923: begin
7924: return PO_COMMUNICATION_PVT.g_legal_entity_address_line_1;
7925: end;
7926:
7927: function getLEAddressLine2 return varchar2 is
7928: begin

Line 7929: return PO_COMMUNICATION_PVT.g_legal_entity_address_line_2;

7925: end;
7926:
7927: function getLEAddressLine2 return varchar2 is
7928: begin
7929: return PO_COMMUNICATION_PVT.g_legal_entity_address_line_2;
7930: end;
7931:
7932: function getLEAddressLine3 return varchar2 is
7933: begin

Line 7934: return PO_COMMUNICATION_PVT.g_legal_entity_address_line_3;

7930: end;
7931:
7932: function getLEAddressLine3 return varchar2 is
7933: begin
7934: return PO_COMMUNICATION_PVT.g_legal_entity_address_line_3;
7935: end;
7936:
7937: function getLECountry return varchar2 is
7938: begin

Line 7939: return PO_COMMUNICATION_PVT.g_legal_entity_country;

7935: end;
7936:
7937: function getLECountry return varchar2 is
7938: begin
7939: return PO_COMMUNICATION_PVT.g_legal_entity_country;
7940: end;
7941:
7942: function getLETownOrCity return varchar2 is
7943: begin

Line 7944: return PO_COMMUNICATION_PVT.g_legal_entity_town_or_city;

7940: end;
7941:
7942: function getLETownOrCity return varchar2 is
7943: begin
7944: return PO_COMMUNICATION_PVT.g_legal_entity_town_or_city;
7945: end;
7946:
7947: function getLEPostalCode return varchar2 is
7948: begin

Line 7949: return PO_COMMUNICATION_PVT.g_legal_entity_postal_code;

7945: end;
7946:
7947: function getLEPostalCode return varchar2 is
7948: begin
7949: return PO_COMMUNICATION_PVT.g_legal_entity_postal_code;
7950: end;
7951:
7952: function getLEStateOrProvince return varchar2 is
7953: begin

Line 7954: return PO_COMMUNICATION_PVT.g_legal_entity_state;

7950: end;
7951:
7952: function getLEStateOrProvince return varchar2 is
7953: begin
7954: return PO_COMMUNICATION_PVT.g_legal_entity_state;
7955: end;
7956:
7957: -- end of functions to return legal entity address details --
7958:

Line 7965: return PO_COMMUNICATION_PVT.g_dist_shipto_count;

7961: used in XSL to identify what to display in ship to address at header and shipment level
7962: */
7963: function getDistinctShipmentCount return number is
7964: begin
7965: return PO_COMMUNICATION_PVT.g_dist_shipto_count;
7966: end;
7967:
7968: /*
7969: Function to retrieve cancel date for Standard, Blanket and Contract PO's

Line 8027: PO_COMMUNICATION_PVT.g_line_org_amount := l_canceled_amount + l_amount ;

8023: pll.CANCEL_FLAG = 'Y'
8024: AND pll.shipment_type <> 'PREPAYMENT' --
8025: group by pl.amount;
8026:
8027: PO_COMMUNICATION_PVT.g_line_org_amount := l_canceled_amount + l_amount ;
8028:
8029: return l_canceled_amount;
8030:
8031: EXCEPTION

Line 8046: PO_COMMUNICATION_PVT.g_line_org_amount := l_canceled_amount + l_amount ;

8042: plla.CANCEL_FLAG = 'Y'
8043: AND plla.shipment_type <> 'PREPAYMENT' --
8044: group by pl.amount;
8045:
8046: PO_COMMUNICATION_PVT.g_line_org_amount := l_canceled_amount + l_amount ;
8047:
8048: EXCEPTION
8049: WHEN OTHERS THEN
8050: l_canceled_amount := null;

Line 8052: PO_COMMUNICATION_PVT.g_line_org_amount := null;

8048: EXCEPTION
8049: WHEN OTHERS THEN
8050: l_canceled_amount := null;
8051: l_amount := null;
8052: PO_COMMUNICATION_PVT.g_line_org_amount := null;
8053: return l_canceled_amount;
8054: end;
8055:
8056: end getCanceledAmount;

Line 8061: return PO_COMMUNICATION_PVT.g_line_org_amount;

8057:
8058:
8059: function getLineOriginalAmount return number is
8060: begin
8061: return PO_COMMUNICATION_PVT.g_line_org_amount;
8062: end;
8063:
8064: /*Bug#3583910 return the global variable g_with_terms */
8065: function getWithTerms return varchar2 is

Line 8067: return PO_COMMUNICATION_PVT.g_with_terms;

8063:
8064: /*Bug#3583910 return the global variable g_with_terms */
8065: function getWithTerms return varchar2 is
8066: begin
8067: return PO_COMMUNICATION_PVT.g_with_terms;
8068: end;
8069:
8070:
8071: /*******************************************************************************

Line 8093: -- as PO_COMMUNICATION_PVT.g_ou_name was never being populated anywhere

8089:
8090: BEGIN
8091:
8092: -- Bug 4044904: Get organization name from database
8093: -- as PO_COMMUNICATION_PVT.g_ou_name was never being populated anywhere
8094: -- Moved query up from below
8095:
8096: SELECT NVL(poh.pending_signature_flag, 'N')
8097: , hou.name

Line 8099: , PO_COMMUNICATION_PVT.g_ou_name

8095:
8096: SELECT NVL(poh.pending_signature_flag, 'N')
8097: , hou.name
8098: INTO x_pendingSignatureFlag
8099: , PO_COMMUNICATION_PVT.g_ou_name
8100: -- FROM po_headers_all poh
8101: FROM po_headers_merge_v poh
8102: , hr_all_organization_units hou
8103: WHERE poh.po_header_id = p_documentID

Line 8107: x_organizationName := PO_COMMUNICATION_PVT.g_ou_name; -- operating unit name

8103: WHERE poh.po_header_id = p_documentID
8104: AND poh.draft_id = p_draftId --CLM
8105: AND hou.organization_id = poh.org_id;
8106:
8107: x_organizationName := PO_COMMUNICATION_PVT.g_ou_name; -- operating unit name
8108: x_documentName := PO_COMMUNICATION_PVT.g_documentName; -- document name
8109:
8110: -- Bug 4044904 : Moved query above
8111:

Line 8108: x_documentName := PO_COMMUNICATION_PVT.g_documentName; -- document name

8104: AND poh.draft_id = p_draftId --CLM
8105: AND hou.organization_id = poh.org_id;
8106:
8107: x_organizationName := PO_COMMUNICATION_PVT.g_ou_name; -- operating unit name
8108: x_documentName := PO_COMMUNICATION_PVT.g_documentName; -- document name
8109:
8110: -- Bug 4044904 : Moved query above
8111:
8112: --retrieve draf from fnd_new_messages.

Line 8128: return PO_COMMUNICATION_PVT.g_documentName;

8124: END;
8125:
8126: function getDocumentName return VARCHAR2 is
8127: BEGIN
8128: return PO_COMMUNICATION_PVT.g_documentName;
8129: END;
8130:
8131: --Start Bug#3771735
8132: --The function returns DocumentTypeCode

Line 8135: return PO_COMMUNICATION_PVT.g_documentTypeCode;

8131: --Start Bug#3771735
8132: --The function returns DocumentTypeCode
8133: function getDocumentTypeCode return VARCHAR2 is
8134: BEGIN
8135: return PO_COMMUNICATION_PVT.g_documentTypeCode;
8136: END;
8137: --End Bug#3771735
8138:
8139: -- Start Bug 4026592

Line 8143: return PO_COMMUNICATION_PVT.g_is_contract_attached_doc;

8139: -- Start Bug 4026592
8140: FUNCTION getIsContractAttachedDoc return VARCHAR2
8141: IS
8142: BEGIN
8143: return PO_COMMUNICATION_PVT.g_is_contract_attached_doc;
8144: END getIsContractAttachedDoc;
8145: -- End Bug 4026592
8146:
8147: --

Line 8159: d_module VARCHAR2(70) := 'po.plsql.PO_COMMUNICATION_PVT.setIsComplexWorkPO';

8155: )
8156: IS
8157:
8158: d_progress NUMBER;
8159: d_module VARCHAR2(70) := 'po.plsql.PO_COMMUNICATION_PVT.setIsComplexWorkPO';
8160: l_is_complex BOOLEAN;
8161: l_style_id PO_HEADERS_ALL.style_id%TYPE;
8162:
8163:

Line 8257: PO_LOG.exc('PO_COMMUNICATION_PVT.getInventoryOrgId', 0, SQLCODE || SQLERRM);

8253: FROM FINANCIALS_SYSTEM_PARAMETERS;
8254: EXCEPTION
8255: WHEN OTHERS THEN
8256: IF (PO_LOG.d_exc) THEN
8257: PO_LOG.exc('PO_COMMUNICATION_PVT.getInventoryOrgId', 0, SQLCODE || SQLERRM);
8258: END IF;
8259: l_inventory_org_id := null;
8260: END;
8261: return l_inventory_org_id;

Line 8489: end PO_COMMUNICATION_PVT;

8485: return NULL;
8486:
8487: end get_item_num;
8488:
8489: end PO_COMMUNICATION_PVT;