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.61.12010000.5 2008/10/01 06:37:07 lgoyal 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.61.12010000.5 2008/10/01 06:37:07 lgoyal 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 160: | PL/SQL body for package: PO_COMMUNICATION_PVT

156: | FILENAME
157: | POXVCOMB.pls
158: |
159: | DESCRIPTION
160: | PL/SQL body for package: PO_COMMUNICATION_PVT
161: |
162: | NOTES VSANJAY Created 08/07/2003
163: | MODIFIED (MM/DD/YY)
164: | VSANJAY 08/07/2003

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

185:
186:
187: BEGIN
188:
189: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF';
190:
191: IF (g_po_wf_debug = 'Y') THEN
192: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,x_progress);
193: END IF;

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

211: l_with_terms := PO_WF_UTIL_PKG.GetItemAttrText (itemtype =>itemtype,
212: itemkey => itemkey,
213: aname => 'WITH_TERMS');
214:
215: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF :launching the java concurrent program ';
216:
217: IF (g_po_wf_debug = 'Y') THEN
218: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,x_progress);
219: END IF;

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

277: itemkey => itemkey,
278: aname => 'REQUEST_ID',
279: avalue => l_request_id);
280:
281: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF : Request id is '|| l_request_id;
282:
283: IF (g_po_wf_debug = 'Y') THEN
284: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,x_progress);
285: END IF;

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

289:
290: EXCEPTION
291:
292: WHEN OTHERS THEN
293: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF : In Exception handler';
294: IF (g_po_wf_debug = 'Y') THEN
295: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
296: END IF;
297: wf_core.context('PO_COMMUNICATION_PVT','GENERATE_PDF',x_progress);

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

293: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF : In Exception handler';
294: IF (g_po_wf_debug = 'Y') THEN
295: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
296: END IF;
297: wf_core.context('PO_COMMUNICATION_PVT','GENERATE_PDF',x_progress);
298: RAISE;
299:
300: END GENERATE_PDF;
301:

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

308: l_document_subtype po_headers.type_lookup_code%TYPE;
309: l_document_type po_headers.type_lookup_code%TYPE;
310:
311: Begin
312: x_progress := 'PO_COMMUNICATION_PVT.PO_NEW_COMMUNICATION';
313:
314: IF (g_po_wf_debug = 'Y') THEN
315: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
316: END IF;

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

335: l_document_subtype := PO_WF_UTIL_PKG.GetItemAttrText (itemtype => itemtype,
336: itemkey => itemkey,
337: aname => 'DOCUMENT_SUBTYPE');
338:
339: x_progress := 'PO_COMMUNICATION_PVT.PO_NEW_COMMUNICATION: Verify whether XDO Product is installed or not';
340:
341: IF (g_po_wf_debug = 'Y') THEN
342: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
343: END IF;

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

357:
358: EXCEPTION
359:
360: WHEN OTHERS THEN
361: x_progress := 'PO_COMMUNICATION_PVT.PO_NEW_COMMUNICATION: In Exception handler';
362: IF (g_po_wf_debug = 'Y') THEN
363: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
364: END IF;
365: wf_core.context('PO_COMMUNICATION_PVT','PO_NEW_COMMUNICATION',x_progress);

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

361: x_progress := 'PO_COMMUNICATION_PVT.PO_NEW_COMMUNICATION: In Exception handler';
362: IF (g_po_wf_debug = 'Y') THEN
363: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
364: END IF;
365: wf_core.context('PO_COMMUNICATION_PVT','PO_NEW_COMMUNICATION',x_progress);
366: raise;
367:
368: END PO_NEW_COMMUNICATION;
369:

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

381: x_progress varchar2(100);
382: l_document_type po_headers.type_lookup_code%TYPE;
383:
384: Begin
385: x_progress := 'PO_COMMUNICATION_PVT.DELETE_PDF_ATTACHMENTS';
386:
387: IF (g_po_wf_debug = 'Y') THEN
388: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
389: END IF;

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

419: ELSIF l_document_type = 'RELEASE' and l_document_subtype = 'BLANKET' THEN
420: l_entity_name :='PO_REL';
421: END IF;
422:
423: x_progress := 'PO_COMMUNICATION_PVT.DELETE_PDF_ATTACHMENTS :Calling the Delete attachments procedure';
424:
425: IF (g_po_wf_debug = 'Y') THEN
426: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
427: END IF;

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

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

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

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

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

474: l_with_terms PO_HEADERS_ALL.CONTERMS_EXIST_FLAG%TYPE;
475: l_terms varchar2(10);
476:
477: Begin
478: x_progress := 'PO_COMMUNICATION_PVT.PO_PDF_EXISTS';
479:
480: IF (g_po_wf_debug = 'Y') THEN
481: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
482: END IF;

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

519:
520: --frame the file name based on po_has_terms_conditions (eg POTERMS_204_1234_1_US.pdf, PO_204_1234_1_US.pdf)
521:
522: --bug#3463617:
523: l_filename := po_communication_pvt.getPDFFileName(l_document_type,l_terms,l_orgid,l_document_id,l_revision_num,l_language_code);
524:
525: x_progress := 'PO_COMMUNICATION_PVT.PO_PDF_EXISTS: Verify whether the pdf exists for the document';
526:
527: IF (g_po_wf_debug = 'Y') THEN

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

521:
522: --bug#3463617:
523: l_filename := po_communication_pvt.getPDFFileName(l_document_type,l_terms,l_orgid,l_document_id,l_revision_num,l_language_code);
524:
525: x_progress := 'PO_COMMUNICATION_PVT.PO_PDF_EXISTS: Verify whether the pdf exists for the document';
526:
527: IF (g_po_wf_debug = 'Y') THEN
528: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
529: END IF;

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

531: BEGIN
532:
533: IF l_with_terms = 'Y' THEN
534: --search in contracts repository
535: x_progress := 'PO_COMMUNICATION_PVT.PO_PDF_EXISTS:Searching in the Contracts Repository';
536:
537: IF (g_po_wf_debug = 'Y') THEN
538: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
539: END IF;

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

547: fl.file_name =l_filename and
548: fad.entity_name in ('PO_HEAD', 'PO_REL');
549: ELSE
550: --search in PO repository
551: x_progress := 'PO_COMMUNICATION_PVT.PO_PDF_EXISTS: Searching in the PO Repository';
552:
553: IF (g_po_wf_debug = 'Y') THEN
554: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
555: END IF;

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

583: End if;
584:
585: EXCEPTION
586: When others then
587: x_progress := 'PO_COMMUNICATION_PVT.PO_PDF_EXISTS: In Exception handler';
588: IF (g_po_wf_debug = 'Y') THEN
589: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
590: END IF;
591: wf_core.context('PO_COMMUNICATION_PVT','PO_PDF_EXISTS',x_progress);

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

587: x_progress := 'PO_COMMUNICATION_PVT.PO_PDF_EXISTS: In Exception handler';
588: IF (g_po_wf_debug = 'Y') THEN
589: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
590: END IF;
591: wf_core.context('PO_COMMUNICATION_PVT','PO_PDF_EXISTS',x_progress);
592: resultout := wf_engine.eng_completed || ':' || 'N';
593: raise;
594:
595: END PO_PDF_EXISTS;

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

643:
644: l_itemtype := 'POAPPRV';
645:
646:
647: l_progress := 'PO_COMMUNICATION_PVT.Start_Email_WF_Process: at beginning of Start_Email_WF_Process';
648:
649: IF (g_po_wf_debug = 'Y') THEN
650: PO_WF_DEBUG_PKG.insert_debug (l_itemtype, l_itemkey,l_progress);
651: END IF;

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

780: aname => 'DOCUMENT_DISPLAY_NAME',
781: avalue => l_doc_display_name );
782: -- Bug # 3290385 End
783:
784: l_progress := 'PO_COMMUNICATION_PVT.Start_Email_WF_Process: Get the Supplier site language';
785:
786: IF (g_po_wf_debug = 'Y') THEN
787: PO_WF_DEBUG_PKG.insert_debug (l_itemtype, l_itemkey,l_progress);
788: END IF;

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

819: l_po_email_performer := p_email_address||'.'||l_adhocuser_lang;
820: l_po_email_performer := upper(l_po_email_performer);
821: l_display_name := p_email_address; -- Bug # 3290385
822:
823: l_progress := 'PO_COMMUNICATION_PVT.Start_Email_WF_Process: Verify whether the role exists in wf_users';
824:
825: IF (g_po_wf_debug = 'Y') THEN
826: PO_WF_DEBUG_PKG.insert_debug (l_itemtype, l_itemkey,l_progress);
827: END IF;

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

848: avalue => l_po_email_performer);
849: PO_WF_UTIL_PKG.SetItemAttrText (itemtype => l_itemtype,
850: itemkey => l_itemkey,
851: aname => 'PDF_ATTACHMENT',
852: avalue => 'PLSQLBLOB:PO_COMMUNICATION_PVT.PDF_ATTACH_SUPP/'||l_itemtype||':'||l_itemkey);
853:
854: --Bug6998166, to increase print_count
855: PO_REQAPPROVAL_INIT1.update_print_count(p_document_id,p_document_type);
856:

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

870: PO_WF_UTIL_PKG.SetItemAttrText
871: ( itemtype => l_itemtype,
872: itemkey => l_itemkey,
873: aname => 'OKC_DOC_ATTACHMENT',
874: avalue => 'PLSQLBLOB:PO_COMMUNICATION_PVT.OKC_DOC_ATTACH/'||
875: l_itemtype||':'||l_itemkey);
876: END IF; -- not structured and not mergeable
877:
878: END IF; --IF (p_with_terms = 'Y')

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

893: IF l_attachments_exist = 'Y' THEN
894: PO_WF_UTIL_PKG.SetItemAttrText (itemtype => l_itemtype,
895: itemkey => l_itemkey,
896: aname => 'ZIP_ATTACHMENT',
897: avalue => 'PLSQLBLOB:PO_COMMUNICATION_PVT.ZIP_ATTACH/'||l_itemtype||':'||l_itemkey);
898: END IF;
899: END IF;
900:
901: l_progress := 'PO_COMMUNICATION_PVT.Start_Email_WF_Process:Start the workflow process';

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

897: avalue => 'PLSQLBLOB:PO_COMMUNICATION_PVT.ZIP_ATTACH/'||l_itemtype||':'||l_itemkey);
898: END IF;
899: END IF;
900:
901: l_progress := 'PO_COMMUNICATION_PVT.Start_Email_WF_Process:Start the workflow process';
902:
903: IF (g_po_wf_debug = 'Y') THEN
904: PO_WF_DEBUG_PKG.insert_debug (l_itemtype, l_itemkey,l_progress);
905: END IF;

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

909:
910: EXCEPTION
911: WHEN OTHERS THEN
912:
913: l_progress := 'PO_COMMUNICATION_PVT.Start_WF_Process_Email: In Exception handler';
914:
915: IF (g_po_wf_debug = 'Y') THEN
916: PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,l_progress);
917: END IF;

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

948:
949: x_progress varchar2(100);
950:
951: begin
952: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP';
953:
954: IF (g_po_wf_debug = 'Y') THEN
955: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,x_progress);
956: END IF;

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

998: WHERE ph.po_header_id = l_header_id
999: AND ph.vendor_site_id = pv.vendor_site_id;
1000:
1001:
1002: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP_TC :launching the Dispatch Purchase Order concurrent program ';
1003:
1004: IF (g_po_wf_debug = 'Y') THEN
1005: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,x_progress);
1006: END IF;

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

1081: aname => 'REQUEST_ID',
1082: avalue => l_request_id);
1083: -- End Bug 7299381
1084:
1085: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP_TC : Request id is - '|| l_request_id;
1086:
1087: IF (g_po_wf_debug = 'Y') THEN
1088: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,x_progress);
1089: END IF;

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

1094:
1095: EXCEPTION
1096:
1097: WHEN OTHERS THEN
1098: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP_TC: In Exception handler';
1099:
1100: IF (g_po_wf_debug = 'Y') THEN
1101: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
1102: END IF;

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

1099:
1100: IF (g_po_wf_debug = 'Y') THEN
1101: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
1102: END IF;
1103: wf_core.context('PO_COMMUNICATION_PVT','GENERATE_PDF_SUPP_TC',x_progress);
1104: raise;
1105:
1106: END GENERATE_PDF_SUPP_TC;
1107: --

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

1171: ) and ad.entity_name='PO_SHIPMENTS')
1172: OR
1173: (ad.pk2_value in (select item_id from po_lines_all
1174: where po_header_id=l_po_header_id
1175: and to_char(PO_COMMUNICATION_PVT.getInventoryOrgId())=ad.pk1_value --Bug 4673653 Use Inventory OrgId
1176: and item_id is not null
1177: ) and ad.entity_name='MTL_SYSTEM_ITEMS')
1178: )
1179: and d.document_id = ad.document_id

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

1221: from po_lines_all pl, po_line_locations_all pll
1222: where pll.po_release_id=l_po_release_id
1223: and pll.shipment_type='BLANKET'
1224: and pll.po_line_id=pl.po_line_id
1225: and to_char(PO_COMMUNICATION_PVT.getInventoryOrgId())=ad.pk1_value --Bug 4673653 Use Inventory OrgId
1226: and pl.item_id is not null
1227: ) AND ad.entity_name='MTL_SYSTEM_ITEMS')
1228: )
1229: and d.document_id = ad.document_id

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

1237: order by fl.file_name;
1238: --
1239:
1240: begin
1241: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer ';
1242:
1243: IF (g_po_wf_debug = 'Y') THEN
1244: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,l_progress);
1245: END IF;

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

1302: l_withterms :='N';
1303: END IF;
1304: */ --End Bug6841986/6528046
1305:
1306: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer :Launching the Dispatch Purchase Order program ';
1307:
1308: IF (g_po_wf_debug = 'Y') THEN
1309: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,l_progress);
1310: END IF;

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

1327: -- that Zip file is not generated.
1328: Begin
1329: -- Get the 'Maximum Attachment Size' value from Purchasing Options
1330: -- A value of 0 means Zip Attachments are not supported
1331: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer: Get max zip attachment size ';
1332: l_max_attachment_size := get_max_zip_size(itemtype,itemkey);
1333:
1334: IF l_max_attachment_size > 0 THEN
1335: -- If PO has no 'To Supplier' file attachments then 'Zip Attachment' link

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

1334: IF l_max_attachment_size > 0 THEN
1335: -- If PO has no 'To Supplier' file attachments then 'Zip Attachment' link
1336: -- should not show up in the notifications and Zip file should not be generated
1337: l_attachments_exist := 'N';
1338: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer: Checking for supplier file attachments';
1339: Begin
1340: l_attachments_exist := check_for_attachments(p_document_type => l_document_type,
1341: p_document_id => l_document_id);
1342: Exception when no_data_found then

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

1339: Begin
1340: l_attachments_exist := check_for_attachments(p_document_type => l_document_type,
1341: p_document_id => l_document_id);
1342: Exception when no_data_found then
1343: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer: No supplier file attachments exist for this document';
1344: IF (g_po_wf_debug = 'Y') THEN
1345: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,l_progress);
1346: END IF;
1347: l_max_attachment_size := 0; -- No need to generate zip file if no 'To Supplier' file attachments exist

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

1347: l_max_attachment_size := 0; -- No need to generate zip file if no 'To Supplier' file attachments exist
1348: End;
1349:
1350: IF l_attachments_exist = 'Y' THEN
1351: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer: Setting workflow attribute to display Zip Attachment';
1352: PO_WF_UTIL_PKG.SetItemAttrText (itemtype => itemtype,
1353: itemkey => itemkey,
1354: aname => 'ZIP_ATTACHMENT',
1355: avalue => 'PLSQLBLOB:PO_COMMUNICATION_PVT.ZIP_ATTACH/'||itemtype||':'||itemkey);

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

1351: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer: Setting workflow attribute to display Zip Attachment';
1352: PO_WF_UTIL_PKG.SetItemAttrText (itemtype => itemtype,
1353: itemkey => itemkey,
1354: aname => 'ZIP_ATTACHMENT',
1355: avalue => 'PLSQLBLOB:PO_COMMUNICATION_PVT.ZIP_ATTACH/'||itemtype||':'||itemkey);
1356:
1357:
1358: -- An error condition is when two or more file attachments have the same file name
1359: -- but different file sizes. In this case a zip error notification should be sent

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

1364: -- Case 1 would be most common and is given highest priority in terms of performance.
1365: -- So a separate query for finding duplicate file names is written. If no duplicate
1366: -- file names then cursors for checking the error condition are not opened.
1367:
1368: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer : Check for duplicate filenames';
1369: l_duplicate_filenames := 'N';
1370:
1371:
1372: IF (l_document_subtype='RELEASE') THEN

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

1409: from po_lines_all pl, po_line_locations_all pll
1410: where pll.po_release_id=l_document_id
1411: and pll.shipment_type='BLANKET'
1412: and pll.po_line_id=pl.po_line_id
1413: and to_char(PO_COMMUNICATION_PVT.getInventoryOrgId())=ad.pk1_value --Bug 4673653 Use Inventory OrgId
1414: and pl.item_id is not null
1415: ) AND ad.entity_name='MTL_SYSTEM_ITEMS')
1416: )
1417: and d.document_id = ad.document_id

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

1427: -- If no_data_found then let l_duplicate_filename remain 'N'
1428: -- so that cursor is not opened. All other exceptions raised
1429: -- until caught by outer exception handler
1430: Exception when no_data_found then
1431: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer: No duplicate filenames exist in the attachments for this Release';
1432: IF (g_po_wf_debug = 'Y') THEN
1433: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,l_progress);
1434: END IF;
1435: End;

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

1471: ) and ad.entity_name='PO_SHIPMENTS')
1472: OR
1473: (ad.pk2_value in (select item_id from po_lines_all
1474: where po_header_id=l_document_id
1475: and to_char(PO_COMMUNICATION_PVT.getInventoryOrgId())=ad.pk1_value --Bug 4673653 Use Inventory OrgId
1476: and item_id is not null
1477: ) and ad.entity_name='MTL_SYSTEM_ITEMS')
1478: )
1479: and d.document_id = ad.document_id

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

1489: -- If no_data_found then let l_duplicate_filename remain 'N'
1490: -- so that cursor is not opened. All other exceptions raised
1491: -- until caught by outer exception handler
1492: Exception when no_data_found then
1493: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer: No duplicate filenames exist in the attachments for this PO';
1494: IF (g_po_wf_debug = 'Y') THEN
1495: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,l_progress);
1496: END IF;
1497: End;

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

1497: End;
1498: END IF;
1499:
1500: IF l_duplicate_filenames = 'Y' THEN
1501: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer : Duplicate filenames found.';
1502: IF (l_document_subtype='RELEASE') THEN
1503: open l_get_release_attachments_csr(l_document_id);
1504: ELSE
1505: open l_get_po_attachments_csr(l_document_id);

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

1504: ELSE
1505: open l_get_po_attachments_csr(l_document_id);
1506: END IF;
1507:
1508: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer : execute loop to get duplicate filenames with error condition';
1509: IF (g_po_wf_debug = 'Y') THEN
1510: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,l_progress);
1511: END IF;
1512:

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

1530: ELSE
1531: close l_get_po_attachments_csr;
1532: END IF;
1533:
1534: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer : error flag = '||l_error_flag;
1535: IF (g_po_wf_debug = 'Y') THEN
1536: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,l_progress);
1537: END IF;
1538:

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

1545: END IF; --IF l_max_attachment_size > 0
1546: Exception when others then
1547: IF (g_po_wf_debug = 'Y') THEN
1548: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,l_progress);
1549: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,'PO_COMMUNICATION_PVT.generate_pdf_buyer: Caught Zip generation exception '||SQLERRM);
1550: END IF;
1551: set_zip_error_code(itemtype,itemkey,'UNEXPECTED');
1552: l_max_attachment_size := 0; -- No need to generate zip file if it is an error
1553: End;

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

1606: NULL, NULL, NULL, NULL, NULL, NULL, NULL,
1607: NULL, NULL, NULL, NULL, NULL, NULL, NULL,
1608: NULL, NULL);
1609:
1610: l_progress := 'PO_COMMUNICATION_PVT.generate_pdf_buyer : Request id is - '|| l_request_id;
1611:
1612: IF (g_po_wf_debug = 'Y') THEN
1613: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,l_progress);
1614: END IF;

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

1625: IF (g_po_wf_debug = 'Y') THEN
1626: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,l_progress);
1627: END IF;
1628:
1629: wf_core.context('PO_COMMUNICATION_PVT','GENERATE_PDF_BUYER',l_progress);
1630: raise;
1631:
1632: END GENERATE_PDF_BUYER;
1633:

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

1655: --Bug6841986/6528046
1656: l_withterms varchar2(1);
1657: --End Bug6841986/6528046
1658: begin
1659: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP';
1660:
1661: IF (g_po_wf_debug = 'Y') THEN
1662: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,x_progress);
1663: END IF;

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

1706: WHERE
1707: ph.po_header_id = l_header_id and ph.vendor_site_id = pv.vendor_site_id;
1708:
1709:
1710: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP :launching the Dispatch Purchase Order concurrent program ';
1711:
1712: IF (g_po_wf_debug = 'Y') THEN
1713: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,x_progress);
1714: END IF;

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

1782: NULL, NULL, NULL, NULL, NULL, NULL, NULL,
1783: NULL, NULL);
1784:
1785:
1786: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP : Request id is - '|| l_request_id;
1787:
1788: IF (g_po_wf_debug = 'Y') THEN
1789: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,x_progress);
1790: END IF;

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

1800:
1801: EXCEPTION
1802:
1803: WHEN OTHERS THEN
1804: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP: In Exception handler';
1805:
1806: IF (g_po_wf_debug = 'Y') THEN
1807: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
1808: END IF;

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

1805:
1806: IF (g_po_wf_debug = 'Y') THEN
1807: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
1808: END IF;
1809: wf_core.context('PO_COMMUNICATION_PVT','GENERATE_PDF_SUPP',x_progress);
1810: raise;
1811:
1812: END GENERATE_PDF_SUPP;
1813:

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

1829: l_territory varchar2(30);
1830: l_authorization_status varchar2(25);
1831: l_language varchar2(10);
1832: begin
1833: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_EMAIL_PROCESS';
1834:
1835: IF (g_po_wf_debug = 'Y') THEN
1836: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,x_progress);
1837: END IF;

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

1865: l_authorization_status := PO_WF_UTIL_PKG.GetItemAttrText (itemtype =>itemtype,
1866: itemkey => itemkey,
1867: aname => 'AUTHORIZATION_STATUS');
1868:
1869: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_EMAIL_PROCESS:launching the Dispatch Purchase Order concurrent program ';
1870:
1871: IF (g_po_wf_debug = 'Y') THEN
1872: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,x_progress);
1873: END IF;

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

1942:
1943: EXCEPTION
1944:
1945: WHEN OTHERS THEN
1946: x_progress := 'PO_COMMUNICATION_PVT.GENERATE_PDF_EMAIL_PROCESS: In Exception handler';
1947:
1948: IF (g_po_wf_debug = 'Y') THEN
1949: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
1950: END IF;

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

1947:
1948: IF (g_po_wf_debug = 'Y') THEN
1949: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
1950: END IF;
1951: wf_core.context('PO_COMMUNICATION_PVT','GENERATE_PDF_EMAIL_PROCESS',x_progress);
1952: RAISE ;
1953:
1954: END GENERATE_PDF_EMAIL_PROCESS;
1955:

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

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

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

2397: p_token => l_progress,
2398: p_message => 'Checking for latest PDF without terms in suppliers language in PO Repository');
2399: END IF;
2400:
2401: l_pdf_file_name := po_communication_pvt.getPDFFileName(l_doctype,'_TERMS_',l_org_id,p_document_id,
2402: l_revision_num,l_buyer_language_code); --bug#3463617
2403: --Bug #4865352 - Added a join with fnd_documents
2404: select count(1) into l_pdf_tc_sup_exists from fnd_lobs fl,fnd_attached_documents fad, fnd_documents fd, fnd_documents_tl fdl
2405: where

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

2430: END IF;
2431:
2432: --
2433: -- Brought the call out of the select
2434: l_pdf_file_name := po_communication_pvt.getPDFFileName(l_doctype,'_TERMS_',l_org_id,p_document_id,
2435: l_revision_num,l_buyer_language_code);
2436: --Bug #4865352
2437: select count(1) into l_pdf_nt_buyer_exists from fnd_lobs fl,fnd_attached_documents fad, fnd_documents_vl fdl
2438: where

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

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

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

3107: l_itemtype := substr(document_id, 1, instr(document_id, ':') - 1);
3108:
3109: l_itemkey := substr(document_id, instr(document_id, ':') + 1, length(document_id) - 2);
3110:
3111: x_progress := 'PO_COMMUNICATION_PVT.pdf_attach_app ';
3112:
3113: IF (g_po_wf_debug = 'Y') THEN
3114: PO_WF_DEBUG_PKG.INSERT_DEBUG(l_itemtype, l_itemkey,x_progress);
3115: END IF;

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

3146: --if PO_CONTERMS_UTL_GRP.is_procurement_contract_doc(document_id) then
3147: --if l_withTerms ='Y' then
3148:
3149: --bug#3463617
3150: --l_filename := po_communication_pvt.getPDFFileName(l_document_type,'_TERMS_',l_org_id,l_document_id,l_revision_number,l_language);
3151: --else
3152: --bug#3463617
3153: l_filename := po_communication_pvt.getPDFFileName(l_document_type,'_',l_org_id,l_document_id,l_revision_number,l_language);
3154: --end if;

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

3149: --bug#3463617
3150: --l_filename := po_communication_pvt.getPDFFileName(l_document_type,'_TERMS_',l_org_id,l_document_id,l_revision_number,l_language);
3151: --else
3152: --bug#3463617
3153: l_filename := po_communication_pvt.getPDFFileName(l_document_type,'_',l_org_id,l_document_id,l_revision_number,l_language);
3154: --end if;
3155: /* End Bug 7424634 */
3156:
3157: if l_document_type = 'RELEASE' then

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

3182: EXCEPTION
3183: WHEN OTHERS THEN
3184: --l_document:=fnd_message.get_string('PO','PO_PDF_FAILED');
3185: --WF_NOTIFICATION.WriteToBlob(document, l_document);
3186: x_progress := 'PO_COMMUNICATION_PVT.pdf_attach_app-Exception ';
3187:
3188: IF (g_po_wf_debug = 'Y') THEN
3189: PO_WF_DEBUG_PKG.INSERT_DEBUG(l_itemtype, l_itemkey,x_progress);
3190: END IF;

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

3220:
3221: x_progress varchar2(300);
3222:
3223: BEGIN
3224: x_progress := 'PO_COMMUNICATION_PVT.pdf_attach_supp';
3225:
3226: l_itemtype := substr(document_id, 1, instr(document_id, ':') - 1);
3227: l_itemkey := substr(document_id, instr(document_id, ':') + 1, length(document_id) - 2);
3228:

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

3254: itemkey => l_itemkey,
3255: aname => 'WITH_TERMS');
3256:
3257: IF l_withTerms ='Y' THEN
3258: l_filename := po_communication_pvt.getPDFFileName(l_document_type,'_TERMS_',l_org_id,l_document_id,l_revision_number,l_language);
3259: ELSE
3260: l_filename := po_communication_pvt.getPDFFileName(l_document_type,'_',l_org_id,l_document_id,l_revision_number,l_language);
3261: END IF;
3262: --Bug #4865352 - Added join with fnd_documents and selected media_id from it

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

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

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

3297: document_type:='application/pdf; name='||l_filename;
3298:
3299: EXCEPTION
3300: WHEN OTHERS THEN
3301: x_progress := 'PO_COMMUNICATION_PVT.pdf_attach_supp - Exception ';
3302:
3303: IF (g_po_wf_debug = 'Y') THEN
3304: PO_WF_DEBUG_PKG.INSERT_DEBUG(l_itemtype, l_itemkey,x_progress);
3305: END IF;

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

3334:
3335: x_progress varchar2(300);
3336:
3337: begin
3338: x_progress := 'PO_COMMUNICATION_PVT.pdf_attach';
3339:
3340: l_itemtype := substr(document_id, 1, instr(document_id, ':') - 1);
3341: l_itemkey := substr(document_id, instr(document_id, ':') + 1, length(document_id) - 2);
3342:

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

3369: aname => 'WITH_TERMS');
3370:
3371: if l_withTerms ='Y' then
3372: --bug#3463617
3373: l_filename := po_communication_pvt.getPDFFileName(l_document_type,'_TERMS_',l_org_id,l_document_id,l_revision_number,l_language);
3374: else
3375: /* Bug 3849854. PDF is not communicated in Suppliers language
3376: According to the document_id (po_header_id/po_release_id),
3377: the language is found from po_vendor_sites and corresponding

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

3406: null;
3407: End;
3408:
3409: --bug#3463617
3410: l_filename := po_communication_pvt.getPDFFileName(l_document_type,'_',l_org_id,l_document_id,l_revision_number,l_language);
3411:
3412: end if;
3413:
3414:

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

3462: EXCEPTION
3463: WHEN OTHERS THEN
3464: --l_document:=fnd_message.get_string('PO','PO_PDF_FAILED');
3465: --WF_NOTIFICATION.WriteToBlob(document, l_document);
3466: x_progress := 'PO_COMMUNICATION_PVT.pdf_attach - Exception ';
3467:
3468: IF (g_po_wf_debug = 'Y') THEN
3469: PO_WF_DEBUG_PKG.INSERT_DEBUG(l_itemtype, l_itemkey,x_progress);
3470: END IF;

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

3526: x_progress varchar2(300);
3527:
3528: BEGIN
3529:
3530: x_progress := 'PO_COMMUNICATION_PVT.okc_doc_attach:010';
3531:
3532: l_itemtype := substr(document_id, 1, instr(document_id, ':') - 1);
3533: l_itemkey := substr(document_id, instr(document_id, ':') + 1,
3534: length(document_id) - 2);

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

3627: EXCEPTION
3628:
3629: /* Handle Exceptions */
3630: WHEN others THEN
3631: x_progress := 'PO_COMMUNICATION_PVT.pdf_attach - Exception ';
3632:
3633: IF (g_po_wf_debug = 'Y') THEN
3634: PO_WF_DEBUG_PKG.INSERT_DEBUG(l_itemtype, l_itemkey,x_progress);
3635: END IF;

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

3694: l_message FND_NEW_MESSAGES.message_text%TYPE;
3695:
3696:
3697: BEGIN
3698: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Begin';
3699:
3700: l_itemtype := substr(document_id, 1, instr(document_id, ':') - 1);
3701: l_itemkey := substr(document_id, instr(document_id, ':') + 1, length(document_id) - 2);
3702:

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

3703: IF (g_po_wf_debug = 'Y') THEN
3704: PO_WF_DEBUG_PKG.INSERT_DEBUG(l_itemtype, l_itemkey,l_progress);
3705: END IF;
3706:
3707: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Get item attributes';
3708: l_document_id :=wf_engine.GetItemAttrNumber (itemtype => l_itemtype,
3709: itemkey => l_itemkey,
3710: aname => 'DOCUMENT_ID');
3711:

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

3724: l_revision_number := wf_engine.GetItemAttrNumber (itemtype => l_itemtype,
3725: itemkey => l_itemkey,
3726: aname => 'REVISION_NUMBER');
3727:
3728: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Decide Entity to query';
3729: IF l_document_type in ('PO','PA') THEN
3730: l_entity_name :='PO_HEAD';
3731: ELSIF l_document_type = 'RELEASE' THEN
3732: l_entity_name :='PO_REL';

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

3731: ELSIF l_document_type = 'RELEASE' THEN
3732: l_entity_name :='PO_REL';
3733: END IF;
3734:
3735: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Get Zip file name';
3736: Begin
3737: --Bug# 5240634 Pass in the org_id to getZIPFileName
3738: l_filename := getZIPFileName(l_org_id);
3739: Exception When others Then

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

3736: Begin
3737: --Bug# 5240634 Pass in the org_id to getZIPFileName
3738: l_filename := getZIPFileName(l_org_id);
3739: Exception When others Then
3740: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Exception in getZIPFileName';
3741: raise;
3742: End;
3743:
3744: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Query the Zip blob';

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

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

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

3760: and fd.media_id = fl.file_id
3761: and fl.file_name = l_filename;
3762: Exception
3763: When others Then
3764: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : no_data_found';
3765: raise;
3766: End;
3767:
3768: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Get blob length';

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

3764: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : no_data_found';
3765: raise;
3766: End;
3767:
3768: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Get blob length';
3769: l_document_length := dbms_lob.GetLength(l_document);
3770:
3771: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Copy zip blob';
3772: dbms_lob.copy(document, l_document, l_document_length, 1, 1);

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

3767:
3768: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Get blob length';
3769: l_document_length := dbms_lob.GetLength(l_document);
3770:
3771: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Copy zip blob';
3772: dbms_lob.copy(document, l_document, l_document_length, 1, 1);
3773:
3774: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Set document type';
3775: document_type:=l_filecontent_type||'; name='||l_filename;

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

3770:
3771: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Copy zip blob';
3772: dbms_lob.copy(document, l_document, l_document_length, 1, 1);
3773:
3774: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Set document type';
3775: document_type:=l_filecontent_type||'; name='||l_filename;
3776:
3777: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : End';
3778: EXCEPTION

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

3773:
3774: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : Set document type';
3775: document_type:=l_filecontent_type||'; name='||l_filename;
3776:
3777: l_progress := 'PO_COMMUNICATION_PVT.zip_attach : End';
3778: EXCEPTION
3779: WHEN OTHERS THEN
3780:
3781: IF (g_po_wf_debug = 'Y') THEN

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

3862: resultout OUT NOCOPY VARCHAR2) IS
3863: l_progress varchar2(200);
3864: BEGIN
3865: -- Get the value of the workflow attribute zip_error_code
3866: l_progress := 'PO_COMMUNICATION_PVT.get_zip_error_code: 01';
3867: resultout := PO_WF_UTIL_PKG.GetItemAttrText(itemtype => itemtype,
3868: itemkey => itemkey,
3869: aname => 'ZIP_ERROR_CODE');
3870: l_progress := 'PO_COMMUNICATION_PVT.get_zip_error_code: 02';

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

3866: l_progress := 'PO_COMMUNICATION_PVT.get_zip_error_code: 01';
3867: resultout := PO_WF_UTIL_PKG.GetItemAttrText(itemtype => itemtype,
3868: itemkey => itemkey,
3869: aname => 'ZIP_ERROR_CODE');
3870: l_progress := 'PO_COMMUNICATION_PVT.get_zip_error_code: 02';
3871: resultout := wf_engine.eng_completed || ':' ||resultout;
3872: EXCEPTION when others THEN
3873: WF_CORE.context('PO_COMMUNICATION_PVT', 'get_zip_error_code', l_progress);
3874: raise;

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

3869: aname => 'ZIP_ERROR_CODE');
3870: l_progress := 'PO_COMMUNICATION_PVT.get_zip_error_code: 02';
3871: resultout := wf_engine.eng_completed || ':' ||resultout;
3872: EXCEPTION when others THEN
3873: WF_CORE.context('PO_COMMUNICATION_PVT', 'get_zip_error_code', l_progress);
3874: raise;
3875: END get_zip_error_code;
3876:
3877: -------------------------------------------------------------------------------

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

3907: p_itemkey IN VARCHAR2) RETURN NUMBER IS
3908: l_max_attachment_size po_system_parameters_all.max_attachment_size%type;
3909: l_progress varchar2(200);
3910: BEGIN
3911: l_progress := 'PO_COMMUNICATION_PVT.get_max_zip_size : Querying max_attachment_size';
3912: IF (g_po_wf_debug = 'Y') THEN
3913: PO_WF_DEBUG_PKG.insert_debug(p_itemtype,p_itemkey,l_progress);
3914: END IF;
3915: select nvl(psp.max_attachment_size,0)

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

3914: END IF;
3915: select nvl(psp.max_attachment_size,0)
3916: into l_max_attachment_size
3917: from po_system_parameters psp;
3918: l_progress := 'PO_COMMUNICATION_PVT.get_max_zip_size : maximum attachment size = '||l_max_attachment_size;
3919: IF (g_po_wf_debug = 'Y') THEN
3920: PO_WF_DEBUG_PKG.insert_debug(p_itemtype,p_itemkey,l_progress);
3921: END IF;
3922: return l_max_attachment_size;

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

3921: END IF;
3922: return l_max_attachment_size;
3923: Exception
3924: when others then
3925: l_progress := 'PO_COMMUNICATION_PVT.get_max_zip_size : handled exception while getting Maximum Attachment Size ';
3926: IF (g_po_wf_debug = 'Y') THEN
3927: PO_WF_DEBUG_PKG.insert_debug(p_itemtype,p_itemkey,l_progress);
3928: END IF;
3929: l_max_attachment_size := 0;

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

4002: from po_lines_all pl, po_line_locations_all pll
4003: where pll.po_release_id=p_document_id
4004: and pll.shipment_type='BLANKET'
4005: and pll.po_line_id=pl.po_line_id
4006: and to_char(PO_COMMUNICATION_PVT.getInventoryOrgId())=ad.pk1_value --Bug 4673653 Use Inventory OrgId
4007: and pl.item_id is not null
4008: ) AND ad.entity_name='MTL_SYSTEM_ITEMS')
4009: )
4010: and d.document_id = ad.document_id

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

4054: ) and ad.entity_name='PO_SHIPMENTS')
4055: OR
4056: (ad.pk2_value in (select item_id from po_lines_all
4057: where po_header_id=p_document_id
4058: and to_char(PO_COMMUNICATION_PVT.getInventoryOrgId())=ad.pk1_value --Bug 4673653 Use Inventory OrgId
4059: and item_id is not null
4060: ) and ad.entity_name='MTL_SYSTEM_ITEMS')
4061: )
4062: and d.document_id = ad.document_id

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

4105: --
4106: l_headerAttachments clob;
4107: l_headerAttachmentsQuery varchar2(1000);
4108: l_count number;
4109: g_log_head CONSTANT VARCHAR2(30) := 'po.plsql.PO_COMMUNICATION_PVT.';
4110: l_eventType varchar2(20);
4111: l_lineAttachQuery varchar2(1200); --Bug5213932 increase length
4112: l_line_Attachments clob;
4113: l_shipmentAttachmentQuery varchar2(1200); --Bug5213932 increase length

Line 4175: PO_COMMUNICATION_PVT.g_document_id := p_document_id;

4171: THEN
4172: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
4173: END IF;
4174:
4175: PO_COMMUNICATION_PVT.g_document_id := p_document_id;
4176: PO_COMMUNICATION_PVT.g_revision_num := p_revision_num;
4177: PO_COMMUNICATION_PVT.g_test_flag := p_test_flag;
4178:
4179:

Line 4176: PO_COMMUNICATION_PVT.g_revision_num := p_revision_num;

4172: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
4173: END IF;
4174:
4175: PO_COMMUNICATION_PVT.g_document_id := p_document_id;
4176: PO_COMMUNICATION_PVT.g_revision_num := p_revision_num;
4177: PO_COMMUNICATION_PVT.g_test_flag := p_test_flag;
4178:
4179:
4180: --Start Bug#3771735

Line 4177: PO_COMMUNICATION_PVT.g_test_flag := p_test_flag;

4173: END IF;
4174:
4175: PO_COMMUNICATION_PVT.g_document_id := p_document_id;
4176: PO_COMMUNICATION_PVT.g_revision_num := p_revision_num;
4177: PO_COMMUNICATION_PVT.g_test_flag := p_test_flag;
4178:
4179:
4180: --Start Bug#3771735
4181: --Assigned the Document Type Code to global variable

Line 4182: PO_COMMUNICATION_PVT.g_documentTypeCode := p_document_type;

4178:
4179:
4180: --Start Bug#3771735
4181: --Assigned the Document Type Code to global variable
4182: PO_COMMUNICATION_PVT.g_documentTypeCode := p_document_type;
4183: --End Bug#3771735
4184:
4185: /*Bug#3583910 Assigned the parameter value to the g_with_terms variable*/
4186: PO_COMMUNICATION_PVT.g_with_terms := p_with_terms;

Line 4186: PO_COMMUNICATION_PVT.g_with_terms := p_with_terms;

4182: PO_COMMUNICATION_PVT.g_documentTypeCode := p_document_type;
4183: --End Bug#3771735
4184:
4185: /*Bug#3583910 Assigned the parameter value to the g_with_terms variable*/
4186: PO_COMMUNICATION_PVT.g_with_terms := p_with_terms;
4187:
4188:
4189: -- SQl What: Querying for document type.
4190: -- SQL why: To display the Document type at header level in PO cover and details page.

Line 4193: PO_COMMUNICATION_PVT.g_documentType := null;

4189: -- SQl What: Querying for document type.
4190: -- SQL why: To display the Document type at header level in PO cover and details page.
4191: -- SQL Join:
4192:
4193: PO_COMMUNICATION_PVT.g_documentType := null;
4194: --Bug#3279968 Added the language column to the below sql statement to fetch onlyone record.
4195:
4196: SELECT TYPE_NAME into PO_COMMUNICATION_PVT.g_documentType FROM PO_DOCUMENT_TYPES_TL
4197: WHERE document_type_code = p_document_type and document_subtype = p_document_subtype and language = USERENV('LANG');

Line 4196: SELECT TYPE_NAME into PO_COMMUNICATION_PVT.g_documentType FROM PO_DOCUMENT_TYPES_TL

4192:
4193: PO_COMMUNICATION_PVT.g_documentType := null;
4194: --Bug#3279968 Added the language column to the below sql statement to fetch onlyone record.
4195:
4196: SELECT TYPE_NAME into PO_COMMUNICATION_PVT.g_documentType FROM PO_DOCUMENT_TYPES_TL
4197: WHERE document_type_code = p_document_type and document_subtype = p_document_subtype and language = USERENV('LANG');
4198:
4199: /* For balnket documents eventtype is 'BLANKET LINE' and
4200: for other documents 'PO LINE' is event type, to get the price differentials*/

Line 4218: PO_COMMUNICATION_PVT.g_current_currency_code :=null;

4214: -- Added the sql conditions to find the distinct count of shipment level ship to from header level ship to. This count is
4215: -- used in XSL to identify what to display in ship to address at header and shipment level
4216:
4217: BEGIN
4218: PO_COMMUNICATION_PVT.g_current_currency_code :=null;
4219:
4220: IF(p_document_type in ('PO','PA')) THEN
4221: IF p_which_tables = 'MAIN' THEN
4222:

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

4221: IF p_which_tables = 'MAIN' THEN
4222:
4223: /*Bug5983107 Commenting out the below sql and writing the new sql below without reference to hr_all_organization_units*/
4224: /* SELECT hle.name, vn.vendor_name, ph.segment1, ph.change_summary, ph.vendor_id, ph.currency_code
4225: INTO po_communication_pvt.g_buyer_org, l_supp_org, l_po_number, l_change_summary, l_vendor_id, g_current_currency_code
4226: FROM hr_all_organization_units hle, po_vendors vn, po_headers_all ph
4227: WHERE to_char(hle.organization_id) = (select org_information2 from hr_organization_information where
4228: org_information_context = 'Operating Unit Information' and organization_id = ph.org_id) AND vn.vendor_id = ph.vendor_id
4229: AND ph.po_header_id = p_document_id AND ph.revision_num = p_revision_num; */

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

4234: WHERE vn.vendor_id = ph.vendor_id
4235: AND ph.po_header_id = p_document_id AND ph.revision_num = p_revision_num;
4236:
4237:
4238: SELECT count(distinct(plla.SHIP_TO_LOCATION_ID)) INTO PO_COMMUNICATION_PVT.g_dist_shipto_count
4239: FROM po_line_locations_all plla
4240: WHERE plla.po_header_id = p_document_id
4241: AND NVL(plla.payment_type, 'NONE') NOT IN ('ADVANCE', 'DELIVERY'); --
4242:

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

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

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

4271: null,
4272: l_legal_entity_id,
4273: x_legalentity_info);
4274:
4275: PO_COMMUNICATION_PVT.g_buyer_org := x_legalentity_info.name;
4276:
4277: EXCEPTION
4278: WHEN OTHERS then
4279: po_communication_pvt.g_buyer_org := null;

Line 4279: po_communication_pvt.g_buyer_org := null;

4275: PO_COMMUNICATION_PVT.g_buyer_org := x_legalentity_info.name;
4276:
4277: EXCEPTION
4278: WHEN OTHERS then
4279: po_communication_pvt.g_buyer_org := null;
4280: END;
4281:
4282: /*Bug5983107 */
4283:

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

4285: -- bug#3823799: Moved the query from top to here to insert data in table based on the document type.
4286: -- po_release_id is inserted as null
4287: -- bug#3853109: Added the column names in the insert clause as per the review comments
4288: insert into PO_COMMUNICATION_GT(po_header_id, po_release_id, revision_number, format_mask)
4289: values(p_document_id, null, p_revision_num, PO_COMMUNICATION_PVT.getFormatMask);
4290: ELSE
4291: -- Modified as a part of bug #3274076
4292: -- Vendor id is same for revisied and non revised documents. So vendor id is retreived from the releases table.
4293:

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

4291: -- Modified as a part of bug #3274076
4292: -- Vendor id is same for revisied and non revised documents. So vendor id is retreived from the releases table.
4293:
4294: -- select the header id into g_release_header_id global variable for a given release id.
4295: SELECT po_header_id INTO PO_COMMUNICATION_PVT.g_release_header_id FROM po_releases_all WHERE po_release_id = p_document_id;
4296:
4297: SELECT ph.vendor_id, ph.currency_code INTO l_vendor_id, g_current_currency_code
4298: FROM po_vendors vn, po_headers_all ph
4299: WHERE vn.vendor_id = ph.vendor_id

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

4296:
4297: SELECT ph.vendor_id, ph.currency_code INTO l_vendor_id, g_current_currency_code
4298: FROM po_vendors vn, po_headers_all ph
4299: WHERE vn.vendor_id = ph.vendor_id
4300: AND ph.po_header_id = PO_COMMUNICATION_PVT.g_release_header_id ;
4301:
4302: IF p_which_tables = 'MAIN' THEN
4303: SELECT count(distinct(plla.SHIP_TO_LOCATION_ID)) INTO PO_COMMUNICATION_PVT.g_dist_shipto_count
4304: FROM po_line_locations_all plla

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

4299: WHERE vn.vendor_id = ph.vendor_id
4300: AND ph.po_header_id = PO_COMMUNICATION_PVT.g_release_header_id ;
4301:
4302: IF p_which_tables = 'MAIN' THEN
4303: SELECT count(distinct(plla.SHIP_TO_LOCATION_ID)) INTO PO_COMMUNICATION_PVT.g_dist_shipto_count
4304: FROM po_line_locations_all plla
4305: WHERE plla.po_release_id = p_document_id;
4306:
4307: ELSE

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

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

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

4315: -- bug#3823799: Moved the query from top to here to insert data in table based on the document type.
4316: -- po_header_id is inserted as null
4317: -- bug#3853109: Added the column names in the insert clause as per the review comments
4318: insert into PO_COMMUNICATION_GT(po_header_id, po_release_id, revision_number, format_mask)
4319: values(null, p_document_id, p_revision_num, PO_COMMUNICATION_PVT.getFormatMask);
4320: END IF;
4321:
4322: EXCEPTION
4323: WHEN OTHERS then

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

4320: END IF;
4321:
4322: EXCEPTION
4323: WHEN OTHERS then
4324: --Bug5983107 po_communication_pvt.g_buyer_org := null;
4325: l_supp_org := null;
4326: l_po_number := null;
4327: l_change_summary := null;
4328: l_vendor_id := null;

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

4377: -- so, show old cover page message (with no mention to look elsewhere for terms)
4378:
4379: /*Get the messages in covering page by replacing the tokens with correponding value.*/
4380: FND_MESSAGE.SET_NAME('PO','PO_FO_COVERING_MESSAGE');
4381: FND_MESSAGE.SET_TOKEN('BUYER_ORG',po_communication_pvt.g_buyer_org);
4382: FND_MESSAGE.SET_TOKEN('SUPP_ORG',l_supp_org);
4383: PO_COMMUNICATION_PVT.g_cover_message := FND_MESSAGE.GET;
4384:
4385:

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

4379: /*Get the messages in covering page by replacing the tokens with correponding value.*/
4380: FND_MESSAGE.SET_NAME('PO','PO_FO_COVERING_MESSAGE');
4381: FND_MESSAGE.SET_TOKEN('BUYER_ORG',po_communication_pvt.g_buyer_org);
4382: FND_MESSAGE.SET_TOKEN('SUPP_ORG',l_supp_org);
4383: PO_COMMUNICATION_PVT.g_cover_message := FND_MESSAGE.GET;
4384:
4385:
4386: FND_MESSAGE.SET_NAME('PO','PO_FO_AMENDMENT_MESSAGE');
4387: FND_MESSAGE.SET_TOKEN('PO_NUM',l_po_number);

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

4385:
4386: FND_MESSAGE.SET_NAME('PO','PO_FO_AMENDMENT_MESSAGE');
4387: FND_MESSAGE.SET_TOKEN('PO_NUM',l_po_number);
4388: FND_MESSAGE.SET_TOKEN('CHANGE_SUMMARY',l_change_summary);
4389: PO_COMMUNICATION_PVT.g_amendment_message := FND_MESSAGE.GET;
4390:
4391: g_is_contract_attached_doc := 'N'; -- bug4026592
4392:
4393: ELSIF (-1 <> OKC_TERMS_UTIL_GRP.get_primary_terms_doc_file_id(p_document_id => p_document_id

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

4397: -- Primary document exists, but is not mergeable
4398:
4399: /*Get the messages in covering page by replacing the tokens with correponding value.*/
4400: FND_MESSAGE.SET_NAME('PO','PO_FO_COVER_MSG_NOT_MERGED');
4401: FND_MESSAGE.SET_TOKEN('BUYER_ORG',po_communication_pvt.g_buyer_org);
4402: FND_MESSAGE.SET_TOKEN('SUPP_ORG',l_supp_org);
4403: PO_COMMUNICATION_PVT.g_cover_message := FND_MESSAGE.GET;
4404:
4405:

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

4399: /*Get the messages in covering page by replacing the tokens with correponding value.*/
4400: FND_MESSAGE.SET_NAME('PO','PO_FO_COVER_MSG_NOT_MERGED');
4401: FND_MESSAGE.SET_TOKEN('BUYER_ORG',po_communication_pvt.g_buyer_org);
4402: FND_MESSAGE.SET_TOKEN('SUPP_ORG',l_supp_org);
4403: PO_COMMUNICATION_PVT.g_cover_message := FND_MESSAGE.GET;
4404:
4405:
4406: FND_MESSAGE.SET_NAME('PO','PO_FO_AMEND_MSG_NOT_MERGED');
4407: FND_MESSAGE.SET_TOKEN('PO_NUM',l_po_number);

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

4405:
4406: FND_MESSAGE.SET_NAME('PO','PO_FO_AMEND_MSG_NOT_MERGED');
4407: FND_MESSAGE.SET_TOKEN('PO_NUM',l_po_number);
4408: FND_MESSAGE.SET_TOKEN('CHANGE_SUMMARY',l_change_summary);
4409: PO_COMMUNICATION_PVT.g_amendment_message := FND_MESSAGE.GET;
4410:
4411: g_is_contract_attached_doc := 'Y'; -- bug4026592
4412:
4413: ELSE

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

4415: -- Primary attached document does not exist!
4416: -- Bug 4014230: Get buyer and supplier org tokens
4417:
4418: FND_MESSAGE.SET_NAME('PO','PO_FO_MSG_TERMS_DOC_MISSING');
4419: FND_MESSAGE.SET_TOKEN('BUYER_ORG',po_communication_pvt.g_buyer_org);
4420: FND_MESSAGE.SET_TOKEN('SUPP_ORG',l_supp_org);
4421: PO_COMMUNICATION_PVT.g_cover_message := FND_MESSAGE.GET;
4422:
4423: FND_MESSAGE.SET_NAME('PO','PO_FO_MSG_TERMS_DOC_MISSING');

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

4417:
4418: FND_MESSAGE.SET_NAME('PO','PO_FO_MSG_TERMS_DOC_MISSING');
4419: FND_MESSAGE.SET_TOKEN('BUYER_ORG',po_communication_pvt.g_buyer_org);
4420: FND_MESSAGE.SET_TOKEN('SUPP_ORG',l_supp_org);
4421: PO_COMMUNICATION_PVT.g_cover_message := FND_MESSAGE.GET;
4422:
4423: FND_MESSAGE.SET_NAME('PO','PO_FO_MSG_TERMS_DOC_MISSING');
4424: FND_MESSAGE.SET_TOKEN('BUYER_ORG',po_communication_pvt.g_buyer_org);
4425: FND_MESSAGE.SET_TOKEN('SUPP_ORG',l_supp_org);

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

4420: FND_MESSAGE.SET_TOKEN('SUPP_ORG',l_supp_org);
4421: PO_COMMUNICATION_PVT.g_cover_message := FND_MESSAGE.GET;
4422:
4423: FND_MESSAGE.SET_NAME('PO','PO_FO_MSG_TERMS_DOC_MISSING');
4424: FND_MESSAGE.SET_TOKEN('BUYER_ORG',po_communication_pvt.g_buyer_org);
4425: FND_MESSAGE.SET_TOKEN('SUPP_ORG',l_supp_org);
4426: PO_COMMUNICATION_PVT.g_amendment_message := FND_MESSAGE.GET;
4427:
4428: g_is_contract_attached_doc := 'Y'; -- bug4026592

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

4422:
4423: FND_MESSAGE.SET_NAME('PO','PO_FO_MSG_TERMS_DOC_MISSING');
4424: FND_MESSAGE.SET_TOKEN('BUYER_ORG',po_communication_pvt.g_buyer_org);
4425: FND_MESSAGE.SET_TOKEN('SUPP_ORG',l_supp_org);
4426: PO_COMMUNICATION_PVT.g_amendment_message := FND_MESSAGE.GET;
4427:
4428: g_is_contract_attached_doc := 'Y'; -- bug4026592
4429:
4430: END IF;

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

4448: END;
4449: FND_MESSAGE.SET_NAME('PO','PO_FO_TIMEZONE');
4450: FND_MESSAGE.SET_TOKEN('TIME_OFFSET',l_offset);
4451: FND_MESSAGE.SET_TOKEN('TIMEZONE_NAME',l_timezone);
4452: PO_COMMUNICATION_PVT.g_timezone :=FND_MESSAGE.GET;
4453: END IF;
4454:
4455: PO_COMMUNICATION_PVT.g_vendor_id := l_vendor_id;
4456:

Line 4455: PO_COMMUNICATION_PVT.g_vendor_id := l_vendor_id;

4451: FND_MESSAGE.SET_TOKEN('TIMEZONE_NAME',l_timezone);
4452: PO_COMMUNICATION_PVT.g_timezone :=FND_MESSAGE.GET;
4453: END IF;
4454:
4455: PO_COMMUNICATION_PVT.g_vendor_id := l_vendor_id;
4456:
4457: /*bug#3630737.
4458: Retrieve PO_FO_DOCUMENT_NAME from fnd_new_messages by passing
4459: DocumentType, po number and revision number as tokens*/

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

4457: /*bug#3630737.
4458: Retrieve PO_FO_DOCUMENT_NAME from fnd_new_messages by passing
4459: DocumentType, po number and revision number as tokens*/
4460: FND_MESSAGE.SET_NAME('PO','PO_FO_DOCUMENT_NAME');
4461: FND_MESSAGE.SET_TOKEN('DOCUMENT_TYPE',PO_COMMUNICATION_PVT.g_documentType);
4462: FND_MESSAGE.SET_TOKEN('PO_NUMBER',l_po_number);
4463: FND_MESSAGE.SET_TOKEN('REVISION_NUMBER',PO_COMMUNICATION_PVT.g_revision_num);
4464: PO_COMMUNICATION_PVT.g_documentName := FND_MESSAGE.GET;
4465:

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

4459: DocumentType, po number and revision number as tokens*/
4460: FND_MESSAGE.SET_NAME('PO','PO_FO_DOCUMENT_NAME');
4461: FND_MESSAGE.SET_TOKEN('DOCUMENT_TYPE',PO_COMMUNICATION_PVT.g_documentType);
4462: FND_MESSAGE.SET_TOKEN('PO_NUMBER',l_po_number);
4463: FND_MESSAGE.SET_TOKEN('REVISION_NUMBER',PO_COMMUNICATION_PVT.g_revision_num);
4464: PO_COMMUNICATION_PVT.g_documentName := FND_MESSAGE.GET;
4465:
4466: -- SQl What: Querying for header short attachments
4467: -- SQL why: To display note to supplier data in header part of pdf document.

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

4460: FND_MESSAGE.SET_NAME('PO','PO_FO_DOCUMENT_NAME');
4461: FND_MESSAGE.SET_TOKEN('DOCUMENT_TYPE',PO_COMMUNICATION_PVT.g_documentType);
4462: FND_MESSAGE.SET_TOKEN('PO_NUMBER',l_po_number);
4463: FND_MESSAGE.SET_TOKEN('REVISION_NUMBER',PO_COMMUNICATION_PVT.g_revision_num);
4464: PO_COMMUNICATION_PVT.g_documentName := FND_MESSAGE.GET;
4465:
4466: -- SQl What: Querying for header short attachments
4467: -- SQL why: To display note to supplier data in header part of pdf document.
4468: -- SQL Join: vendor_id and header_id

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

4588: fnd_documents_short_text fds
4589: WHERE ((fad.entity_name=''PO_LINES'' AND fad.pk1_value=to_char(plx.po_line_id))
4590: OR
4591: (fad.entity_name=''MTL_SYSTEM_ITEMS'' AND
4592: fad.pk1_value=to_char(PO_COMMUNICATION_PVT.getInventoryOrgId()) AND --Bug6139548
4593: fad.pk2_value=to_char(plx.item_id) AND plx.item_id is not null)
4594: ) AND
4595: function_name = ''PO_PRINTPO''
4596: AND fad.media_id = fds.media_id

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

4609: (fad.entity_name=''PO_LINES'' AND fad.pk1_value=to_char(plx.from_line_id)
4610: AND plx.from_line_id IS NOT NULL)
4611: OR
4612: (fad.entity_name=''MTL_SYSTEM_ITEMS'' AND
4613: fad.pk1_value=to_char(PO_COMMUNICATION_PVT.getInventoryOrgId()) AND
4614: fad.pk2_value=to_char(plx.item_id) AND plx.item_id is not null)
4615: )
4616: AND fad.datatype_id=5
4617: AND fad.function_name=''PO_PRINTPO'' order by fad.seq_num) AS line_url_attachments'; --bug6133951

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

4628: (fad.entity_name=''PO_LINES'' AND fad.pk1_value=to_char(plx.from_line_id)
4629: AND plx.from_line_id IS NOT NULL)
4630: OR
4631: (fad.entity_name=''MTL_SYSTEM_ITEMS'' AND
4632: fad.pk1_value=to_char(PO_COMMUNICATION_PVT.getInventoryOrgId()) AND
4633: fad.pk2_value=to_char(plx.item_id) AND plx.item_id is not null)
4634: )
4635: AND fad.datatype_id=6
4636: AND fad.function_name=''PO_PRINTPO''

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

4899: /*
4900: These are the queries used to get purchasing organization and purchasing supplier details for main
4901: and archive tables.
4902: */
4903: l_agreement_assign_query := ' CURSOR( select rownum, PO_COMMUNICATION_PVT.GETOPERATIONINFO(PGA.PURCHASING_ORG_ID) OU_NAME,
4904: PO_COMMUNICATION_PVT.getVendorAddressLine1(PGA.vendor_site_id) VENDOR_ADDRESS_LINE1,
4905: PO_COMMUNICATION_PVT.getVendorAddressLine2() VENDOR_ADDRESS_LINE2,
4906: PO_COMMUNICATION_PVT.getVendorAddressLine3() VENDOR_ADDRESS_LINE3,
4907: PO_COMMUNICATION_PVT.getVendorCityStateZipInfo() VENDOR_CITY_STATE_ZIP,

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

4900: These are the queries used to get purchasing organization and purchasing supplier details for main
4901: and archive tables.
4902: */
4903: l_agreement_assign_query := ' CURSOR( select rownum, PO_COMMUNICATION_PVT.GETOPERATIONINFO(PGA.PURCHASING_ORG_ID) OU_NAME,
4904: PO_COMMUNICATION_PVT.getVendorAddressLine1(PGA.vendor_site_id) VENDOR_ADDRESS_LINE1,
4905: PO_COMMUNICATION_PVT.getVendorAddressLine2() VENDOR_ADDRESS_LINE2,
4906: PO_COMMUNICATION_PVT.getVendorAddressLine3() VENDOR_ADDRESS_LINE3,
4907: PO_COMMUNICATION_PVT.getVendorCityStateZipInfo() VENDOR_CITY_STATE_ZIP,
4908: PO_COMMUNICATION_PVT.getVendorCountry() VENDOR_COUNTRY

Line 4905: PO_COMMUNICATION_PVT.getVendorAddressLine2() VENDOR_ADDRESS_LINE2,

4901: and archive tables.
4902: */
4903: l_agreement_assign_query := ' CURSOR( select rownum, PO_COMMUNICATION_PVT.GETOPERATIONINFO(PGA.PURCHASING_ORG_ID) OU_NAME,
4904: PO_COMMUNICATION_PVT.getVendorAddressLine1(PGA.vendor_site_id) VENDOR_ADDRESS_LINE1,
4905: PO_COMMUNICATION_PVT.getVendorAddressLine2() VENDOR_ADDRESS_LINE2,
4906: PO_COMMUNICATION_PVT.getVendorAddressLine3() VENDOR_ADDRESS_LINE3,
4907: PO_COMMUNICATION_PVT.getVendorCityStateZipInfo() VENDOR_CITY_STATE_ZIP,
4908: PO_COMMUNICATION_PVT.getVendorCountry() VENDOR_COUNTRY
4909: FROM po_ga_org_assignments PGA

Line 4906: PO_COMMUNICATION_PVT.getVendorAddressLine3() VENDOR_ADDRESS_LINE3,

4902: */
4903: l_agreement_assign_query := ' CURSOR( select rownum, PO_COMMUNICATION_PVT.GETOPERATIONINFO(PGA.PURCHASING_ORG_ID) OU_NAME,
4904: PO_COMMUNICATION_PVT.getVendorAddressLine1(PGA.vendor_site_id) VENDOR_ADDRESS_LINE1,
4905: PO_COMMUNICATION_PVT.getVendorAddressLine2() VENDOR_ADDRESS_LINE2,
4906: PO_COMMUNICATION_PVT.getVendorAddressLine3() VENDOR_ADDRESS_LINE3,
4907: PO_COMMUNICATION_PVT.getVendorCityStateZipInfo() VENDOR_CITY_STATE_ZIP,
4908: PO_COMMUNICATION_PVT.getVendorCountry() VENDOR_COUNTRY
4909: FROM po_ga_org_assignments PGA
4910: WHERE PGA.ENABLED_FLAG = ''Y'' and PGA.PO_HEADER_ID = PHX.PO_HEADER_ID) as organization_details ';

Line 4907: PO_COMMUNICATION_PVT.getVendorCityStateZipInfo() VENDOR_CITY_STATE_ZIP,

4903: l_agreement_assign_query := ' CURSOR( select rownum, PO_COMMUNICATION_PVT.GETOPERATIONINFO(PGA.PURCHASING_ORG_ID) OU_NAME,
4904: PO_COMMUNICATION_PVT.getVendorAddressLine1(PGA.vendor_site_id) VENDOR_ADDRESS_LINE1,
4905: PO_COMMUNICATION_PVT.getVendorAddressLine2() VENDOR_ADDRESS_LINE2,
4906: PO_COMMUNICATION_PVT.getVendorAddressLine3() VENDOR_ADDRESS_LINE3,
4907: PO_COMMUNICATION_PVT.getVendorCityStateZipInfo() VENDOR_CITY_STATE_ZIP,
4908: PO_COMMUNICATION_PVT.getVendorCountry() VENDOR_COUNTRY
4909: FROM po_ga_org_assignments PGA
4910: WHERE PGA.ENABLED_FLAG = ''Y'' and PGA.PO_HEADER_ID = PHX.PO_HEADER_ID) as organization_details ';
4911:

Line 4908: PO_COMMUNICATION_PVT.getVendorCountry() VENDOR_COUNTRY

4904: PO_COMMUNICATION_PVT.getVendorAddressLine1(PGA.vendor_site_id) VENDOR_ADDRESS_LINE1,
4905: PO_COMMUNICATION_PVT.getVendorAddressLine2() VENDOR_ADDRESS_LINE2,
4906: PO_COMMUNICATION_PVT.getVendorAddressLine3() VENDOR_ADDRESS_LINE3,
4907: PO_COMMUNICATION_PVT.getVendorCityStateZipInfo() VENDOR_CITY_STATE_ZIP,
4908: PO_COMMUNICATION_PVT.getVendorCountry() VENDOR_COUNTRY
4909: FROM po_ga_org_assignments PGA
4910: WHERE PGA.ENABLED_FLAG = ''Y'' and PGA.PO_HEADER_ID = PHX.PO_HEADER_ID) as organization_details ';
4911:
4912: l_arc_agreement_assign_query := ' CURSOR( select rownum, PO_COMMUNICATION_PVT.GETOPERATIONINFO(PGA.PURCHASING_ORG_ID) OU_NAME,

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

4908: PO_COMMUNICATION_PVT.getVendorCountry() VENDOR_COUNTRY
4909: FROM po_ga_org_assignments PGA
4910: WHERE PGA.ENABLED_FLAG = ''Y'' and PGA.PO_HEADER_ID = PHX.PO_HEADER_ID) as organization_details ';
4911:
4912: l_arc_agreement_assign_query := ' CURSOR( select rownum, PO_COMMUNICATION_PVT.GETOPERATIONINFO(PGA.PURCHASING_ORG_ID) OU_NAME,
4913: PO_COMMUNICATION_PVT.getVendorAddressLine1(PGA.vendor_site_id) VENDOR_ADDRESS_LINE1,
4914: PO_COMMUNICATION_PVT.getVendorAddressLine2() VENDOR_ADDRESS_LINE2,
4915: PO_COMMUNICATION_PVT.getVendorAddressLine3() VENDOR_ADDRESS_LINE3,
4916: PO_COMMUNICATION_PVT.getVendorCityStateZipInfo() VENDOR_CITY_STATE_ZIP,

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

4909: FROM po_ga_org_assignments PGA
4910: WHERE PGA.ENABLED_FLAG = ''Y'' and PGA.PO_HEADER_ID = PHX.PO_HEADER_ID) as organization_details ';
4911:
4912: l_arc_agreement_assign_query := ' CURSOR( select rownum, PO_COMMUNICATION_PVT.GETOPERATIONINFO(PGA.PURCHASING_ORG_ID) OU_NAME,
4913: PO_COMMUNICATION_PVT.getVendorAddressLine1(PGA.vendor_site_id) VENDOR_ADDRESS_LINE1,
4914: PO_COMMUNICATION_PVT.getVendorAddressLine2() VENDOR_ADDRESS_LINE2,
4915: PO_COMMUNICATION_PVT.getVendorAddressLine3() VENDOR_ADDRESS_LINE3,
4916: PO_COMMUNICATION_PVT.getVendorCityStateZipInfo() VENDOR_CITY_STATE_ZIP,
4917: PO_COMMUNICATION_PVT.getVendorCountry() VENDOR_COUNTRY

Line 4914: PO_COMMUNICATION_PVT.getVendorAddressLine2() VENDOR_ADDRESS_LINE2,

4910: WHERE PGA.ENABLED_FLAG = ''Y'' and PGA.PO_HEADER_ID = PHX.PO_HEADER_ID) as organization_details ';
4911:
4912: l_arc_agreement_assign_query := ' CURSOR( select rownum, PO_COMMUNICATION_PVT.GETOPERATIONINFO(PGA.PURCHASING_ORG_ID) OU_NAME,
4913: PO_COMMUNICATION_PVT.getVendorAddressLine1(PGA.vendor_site_id) VENDOR_ADDRESS_LINE1,
4914: PO_COMMUNICATION_PVT.getVendorAddressLine2() VENDOR_ADDRESS_LINE2,
4915: PO_COMMUNICATION_PVT.getVendorAddressLine3() VENDOR_ADDRESS_LINE3,
4916: PO_COMMUNICATION_PVT.getVendorCityStateZipInfo() VENDOR_CITY_STATE_ZIP,
4917: PO_COMMUNICATION_PVT.getVendorCountry() VENDOR_COUNTRY
4918: FROM po_ga_org_assignments_archive PGA

Line 4915: PO_COMMUNICATION_PVT.getVendorAddressLine3() VENDOR_ADDRESS_LINE3,

4911:
4912: l_arc_agreement_assign_query := ' CURSOR( select rownum, PO_COMMUNICATION_PVT.GETOPERATIONINFO(PGA.PURCHASING_ORG_ID) OU_NAME,
4913: PO_COMMUNICATION_PVT.getVendorAddressLine1(PGA.vendor_site_id) VENDOR_ADDRESS_LINE1,
4914: PO_COMMUNICATION_PVT.getVendorAddressLine2() VENDOR_ADDRESS_LINE2,
4915: PO_COMMUNICATION_PVT.getVendorAddressLine3() VENDOR_ADDRESS_LINE3,
4916: PO_COMMUNICATION_PVT.getVendorCityStateZipInfo() VENDOR_CITY_STATE_ZIP,
4917: PO_COMMUNICATION_PVT.getVendorCountry() VENDOR_COUNTRY
4918: FROM po_ga_org_assignments_archive PGA
4919: WHERE PGA.ENABLED_FLAG = ''Y'' and PGA.PO_HEADER_ID = PHX.PO_HEADER_ID) as organization_details ';

Line 4916: PO_COMMUNICATION_PVT.getVendorCityStateZipInfo() VENDOR_CITY_STATE_ZIP,

4912: l_arc_agreement_assign_query := ' CURSOR( select rownum, PO_COMMUNICATION_PVT.GETOPERATIONINFO(PGA.PURCHASING_ORG_ID) OU_NAME,
4913: PO_COMMUNICATION_PVT.getVendorAddressLine1(PGA.vendor_site_id) VENDOR_ADDRESS_LINE1,
4914: PO_COMMUNICATION_PVT.getVendorAddressLine2() VENDOR_ADDRESS_LINE2,
4915: PO_COMMUNICATION_PVT.getVendorAddressLine3() VENDOR_ADDRESS_LINE3,
4916: PO_COMMUNICATION_PVT.getVendorCityStateZipInfo() VENDOR_CITY_STATE_ZIP,
4917: PO_COMMUNICATION_PVT.getVendorCountry() VENDOR_COUNTRY
4918: FROM po_ga_org_assignments_archive PGA
4919: WHERE PGA.ENABLED_FLAG = ''Y'' and PGA.PO_HEADER_ID = PHX.PO_HEADER_ID) as organization_details ';
4920:

Line 4917: PO_COMMUNICATION_PVT.getVendorCountry() VENDOR_COUNTRY

4913: PO_COMMUNICATION_PVT.getVendorAddressLine1(PGA.vendor_site_id) VENDOR_ADDRESS_LINE1,
4914: PO_COMMUNICATION_PVT.getVendorAddressLine2() VENDOR_ADDRESS_LINE2,
4915: PO_COMMUNICATION_PVT.getVendorAddressLine3() VENDOR_ADDRESS_LINE3,
4916: PO_COMMUNICATION_PVT.getVendorCityStateZipInfo() VENDOR_CITY_STATE_ZIP,
4917: PO_COMMUNICATION_PVT.getVendorCountry() VENDOR_COUNTRY
4918: FROM po_ga_org_assignments_archive PGA
4919: WHERE PGA.ENABLED_FLAG = ''Y'' and PGA.PO_HEADER_ID = PHX.PO_HEADER_ID) as organization_details ';
4920:
4921: -- SQl What: Query for header, line, locations, line locations, shipments and distribution information based on

Line 4952: 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.

4948: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_STATEMENT) THEN
4949: FND_LOG.string(FND_LOG.LEVEL_STATEMENT,g_log_head || l_api_name ||'NON Release:','Entered into Non Release Query Loop');
4950: END IF;
4951:
4952: 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.
4953: IF p_which_tables = 'MAIN' THEN
4954:
4955: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type,
4956: PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,

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

4951:
4952: 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.
4953: IF p_which_tables = 'MAIN' THEN
4954:
4955: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type,
4956: PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,
4957: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
4958: PO_COMMUNICATION_PVT.getDocumentName() document_name,
4959: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,

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

4952: 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.
4953: IF p_which_tables = 'MAIN' THEN
4954:
4955: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type,
4956: PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,
4957: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
4958: PO_COMMUNICATION_PVT.getDocumentName() document_name,
4959: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
4960: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,

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

4953: IF p_which_tables = 'MAIN' THEN
4954:
4955: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type,
4956: PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,
4957: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
4958: PO_COMMUNICATION_PVT.getDocumentName() document_name,
4959: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
4960: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,
4961: PO_COMMUNICATION_PVT.getWithTerms() With_Terms , 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 4958: PO_COMMUNICATION_PVT.getDocumentName() document_name,

4954:
4955: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type,
4956: PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,
4957: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
4958: PO_COMMUNICATION_PVT.getDocumentName() document_name,
4959: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
4960: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,
4961: PO_COMMUNICATION_PVT.getWithTerms() With_Terms , 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||'
4962: FROM PO_HEADERS_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';

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

4955: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type,
4956: PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,
4957: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
4958: PO_COMMUNICATION_PVT.getDocumentName() document_name,
4959: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
4960: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,
4961: PO_COMMUNICATION_PVT.getWithTerms() With_Terms , 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||'
4962: FROM PO_HEADERS_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
4963:

Line 4961: PO_COMMUNICATION_PVT.getWithTerms() With_Terms , 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||'

4957: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
4958: PO_COMMUNICATION_PVT.getDocumentName() document_name,
4959: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
4960: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,
4961: PO_COMMUNICATION_PVT.getWithTerms() With_Terms , 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||'
4962: FROM PO_HEADERS_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
4963:
4964: IF(p_document_subtype <> 'CONTRACTS') THEN -- contracts will have only headers
4965:

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

4958: PO_COMMUNICATION_PVT.getDocumentName() document_name,
4959: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
4960: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,
4961: PO_COMMUNICATION_PVT.getWithTerms() With_Terms , 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||'
4962: FROM PO_HEADERS_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
4963:
4964: IF(p_document_subtype <> 'CONTRACTS') THEN -- contracts will have only headers
4965:
4966: SELECT count(*) into l_count FROM po_lines_all WHERE po_header_id = p_document_id;

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

4972: the entity _name is 'PO LINE' except for blanket AND entity_name is 'BLANKET LINE'
4973: for blanket
4974: */
4975: --Bug 5506417: Added order by plx.line_num clause
4976: 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,
4977: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
4978: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
4979: PO_COMMUNICATION_PVT.getDocumentName() document_name,
4980: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,

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

4973: for blanket
4974: */
4975: --Bug 5506417: Added order by plx.line_num clause
4976: 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,
4977: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
4978: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
4979: PO_COMMUNICATION_PVT.getDocumentName() document_name,
4980: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
4981: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||

Line 4978: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,

4974: */
4975: --Bug 5506417: Added order by plx.line_num clause
4976: 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,
4977: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
4978: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
4979: PO_COMMUNICATION_PVT.getDocumentName() document_name,
4980: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
4981: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
4982: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||',

Line 4979: PO_COMMUNICATION_PVT.getDocumentName() document_name,

4975: --Bug 5506417: Added order by plx.line_num clause
4976: 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,
4977: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
4978: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
4979: PO_COMMUNICATION_PVT.getDocumentName() document_name,
4980: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
4981: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
4982: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||',
4983: 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 4980: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,

4976: 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,
4977: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
4978: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
4979: PO_COMMUNICATION_PVT.getDocumentName() document_name,
4980: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
4981: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
4982: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||',
4983: CURSOR(SELECT plx.*, '||l_adv_amount_query||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER,MIN_MULTIPLIER, MAX_MULTIPLIER FROM po_price_differentials_v
4984: WHERE entity_type='''||l_eventType||''' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,

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

4977: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
4978: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
4979: PO_COMMUNICATION_PVT.getDocumentName() document_name,
4980: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
4981: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
4982: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||',
4983: CURSOR(SELECT plx.*, '||l_adv_amount_query||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER,MIN_MULTIPLIER, MAX_MULTIPLIER FROM po_price_differentials_v
4984: WHERE entity_type='''||l_eventType||''' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,
4985: '|| l_line_short_attachment_query ||','||l_line_url_attachment_query||','||l_line_file_attachment_query||' FROM po_lines_xml plx

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

4985: '|| l_line_short_attachment_query ||','||l_line_url_attachment_query||','||l_line_file_attachment_query||' FROM po_lines_xml plx
4986: WHERE plx.po_header_id = phx.po_header_id and not exists
4987: (select ''x'' from po_lines_archive_all plaa where
4988: plaa.po_line_id = plx.po_line_id and
4989: plaa.cancel_flag= ''Y'' and plaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) order by plx.line_num) AS lines
4990: FROM PO_HEADERS_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
4991:
4992: END IF;
4993:

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

4986: WHERE plx.po_header_id = phx.po_header_id and not exists
4987: (select ''x'' from po_lines_archive_all plaa where
4988: plaa.po_line_id = plx.po_line_id and
4989: plaa.cancel_flag= ''Y'' and plaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) order by plx.line_num) AS lines
4990: FROM PO_HEADERS_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
4991:
4992: END IF;
4993:
4994: SELECT count(*) into l_count FROM po_line_locations_all WHERE po_header_id = p_document_id;

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

4996: IF l_count >0 THEN
4997:
4998: /* Bug#3574748: Added the condition SHIPMENT_TYPE in ('BLANKET','STANDARD') in shipment query. */
4999: --Bug 5506417: Added order by pllx.shipment_num and order by plx.line_num clauses
5000: 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,
5001: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5002: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5003: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5004: PO_COMMUNICATION_PVT.IsDocumentSigned( PO_COMMUNICATION_PVT.getDocumentId()) Signed,

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

4997:
4998: /* Bug#3574748: Added the condition SHIPMENT_TYPE in ('BLANKET','STANDARD') in shipment query. */
4999: --Bug 5506417: Added order by pllx.shipment_num and order by plx.line_num clauses
5000: 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,
5001: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5002: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5003: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5004: PO_COMMUNICATION_PVT.IsDocumentSigned( PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5005: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , '||

Line 5002: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,

4998: /* Bug#3574748: Added the condition SHIPMENT_TYPE in ('BLANKET','STANDARD') in shipment query. */
4999: --Bug 5506417: Added order by pllx.shipment_num and order by plx.line_num clauses
5000: 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,
5001: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5002: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5003: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5004: PO_COMMUNICATION_PVT.IsDocumentSigned( PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5005: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , '||
5006: ' 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 5003: PO_COMMUNICATION_PVT.getDocumentName() document_name,

4999: --Bug 5506417: Added order by pllx.shipment_num and order by plx.line_num clauses
5000: 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,
5001: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5002: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5003: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5004: PO_COMMUNICATION_PVT.IsDocumentSigned( PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5005: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , '||
5006: ' 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||',
5007: 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 5004: PO_COMMUNICATION_PVT.IsDocumentSigned( PO_COMMUNICATION_PVT.getDocumentId()) Signed,

5000: 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,
5001: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5002: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5003: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5004: PO_COMMUNICATION_PVT.IsDocumentSigned( PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5005: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , '||
5006: ' 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||',
5007: CURSOR(SELECT plx.*, '||l_adv_amount_query||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER, MIN_MULTIPLIER,MAX_MULTIPLIER FROM po_price_differentials_v
5008: WHERE entity_type='''||l_eventType||''' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,

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

5001: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5002: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5003: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5004: PO_COMMUNICATION_PVT.IsDocumentSigned( PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5005: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , '||
5006: ' 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||',
5007: CURSOR(SELECT plx.*, '||l_adv_amount_query||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER, MIN_MULTIPLIER,MAX_MULTIPLIER FROM po_price_differentials_v
5008: WHERE entity_type='''||l_eventType||''' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,
5009: '|| l_line_short_attachment_query ||','||l_line_url_attachment_query||','||l_line_file_attachment_query||',

Line 5006: ' 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||',

5002: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5003: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5004: PO_COMMUNICATION_PVT.IsDocumentSigned( PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5005: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , '||
5006: ' 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||',
5007: CURSOR(SELECT plx.*, '||l_adv_amount_query||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER, MIN_MULTIPLIER,MAX_MULTIPLIER FROM po_price_differentials_v
5008: WHERE entity_type='''||l_eventType||''' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,
5009: '|| l_line_short_attachment_query ||','||l_line_url_attachment_query||','||l_line_file_attachment_query||',
5010: CURSOR(SELECT pllx.*,';

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

5015:
5016: l_xml_query := l_xml_query || l_shipment_short_attach_query ||','||l_shipment_url_attach_query||','||l_shipment_file_attach_query||'
5017: FROM po_line_locations_xml pllx WHERE pllx.po_line_id = plx.po_line_id and SHIPMENT_TYPE in (''BLANKET'',''STANDARD'',''PREPAYMENT'') AND NVL(pllx.payment_type,''NONE'') NOT IN (''ADVANCE'',''DELIVERY'') and not exists
5018: (select ''x'' from po_line_locations_archive_all pllaa where pllaa.line_location_id = pllx.line_location_id
5019: and pllaa.cancel_flag=''Y'' and pllaa.revision_num < PO_COMMUNICATION_PVT.getRevisionNum()) order by pllx.shipment_num ) AS line_locations' || l_complex_lloc_query || '
5020: FROM po_lines_xml plx
5021: WHERE plx.po_header_id = phx.po_header_id and not exists
5022: (select ''x'' from po_lines_archive_all plaa where
5023: plaa.po_line_id = plx.po_line_id and

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

5020: FROM po_lines_xml plx
5021: WHERE plx.po_header_id = phx.po_header_id and not exists
5022: (select ''x'' from po_lines_archive_all plaa where
5023: plaa.po_line_id = plx.po_line_id and
5024: plaa.cancel_flag= ''Y'' and plaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) order by plx.line_num) AS lines
5025: FROM PO_HEADERS_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5026: END IF;
5027:
5028: IF(p_document_subtype <> 'BLANKET') THEN -- blankets will not have distributions

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

5021: WHERE plx.po_header_id = phx.po_header_id and not exists
5022: (select ''x'' from po_lines_archive_all plaa where
5023: plaa.po_line_id = plx.po_line_id and
5024: plaa.cancel_flag= ''Y'' and plaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) order by plx.line_num) AS lines
5025: FROM PO_HEADERS_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5026: END IF;
5027:
5028: IF(p_document_subtype <> 'BLANKET') THEN -- blankets will not have distributions
5029: SELECT count(*) into l_count FROM po_distributions_all WHERE po_header_id = p_document_id;

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

5029: SELECT count(*) into l_count FROM po_distributions_all WHERE po_header_id = p_document_id;
5030:
5031: IF l_count >0 THEN
5032: --Bug 5506417 :Added order by pllx.shipment_num and order by plx.line_num clauses
5033: 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,
5034: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5035: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5036: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5037: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,

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

5030:
5031: IF l_count >0 THEN
5032: --Bug 5506417 :Added order by pllx.shipment_num and order by plx.line_num clauses
5033: 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,
5034: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5035: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5036: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5037: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5038: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , '||

Line 5035: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,

5031: IF l_count >0 THEN
5032: --Bug 5506417 :Added order by pllx.shipment_num and order by plx.line_num clauses
5033: 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,
5034: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5035: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5036: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5037: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5038: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , '||
5039: ' 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 5036: PO_COMMUNICATION_PVT.getDocumentName() document_name,

5032: --Bug 5506417 :Added order by pllx.shipment_num and order by plx.line_num clauses
5033: 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,
5034: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5035: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5036: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5037: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5038: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , '||
5039: ' 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||',
5040: CURSOR(SELECT plx.*, '||l_adv_amount_query||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER FROM po_price_differentials_v

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

5033: 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,
5034: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5035: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5036: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5037: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5038: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , '||
5039: ' 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||',
5040: CURSOR(SELECT plx.*, '||l_adv_amount_query||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER FROM po_price_differentials_v
5041: WHERE entity_type=''PO LINE'' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,

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

5034: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5035: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5036: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5037: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5038: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , '||
5039: ' 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||',
5040: CURSOR(SELECT plx.*, '||l_adv_amount_query||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER FROM po_price_differentials_v
5041: WHERE entity_type=''PO LINE'' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,
5042: '|| l_line_short_attachment_query ||','||l_line_url_attachment_query||','||l_line_file_attachment_query||',

Line 5039: ' 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||',

5035: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5036: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5037: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5038: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , '||
5039: ' 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||',
5040: CURSOR(SELECT plx.*, '||l_adv_amount_query||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER FROM po_price_differentials_v
5041: WHERE entity_type=''PO LINE'' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,
5042: '|| l_line_short_attachment_query ||','||l_line_url_attachment_query||','||l_line_file_attachment_query||',
5043: CURSOR(SELECT pllx.*, '|| l_shipment_short_attach_query ||','||l_shipment_url_attach_query||','||l_shipment_file_attach_query||',

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

5043: CURSOR(SELECT pllx.*, '|| l_shipment_short_attach_query ||','||l_shipment_url_attach_query||','||l_shipment_file_attach_query||',
5044: CURSOR(SELECT pdx.* FROM po_distribution_xml pdx WHERE pdx.po_header_id = phx.po_header_id and pdx.LINE_LOCATION_ID = pllx.LINE_LOCATION_ID) AS distributions
5045: FROM po_line_locations_xml pllx WHERE pllx.po_line_id = plx.po_line_id AND NVL(pllx.payment_type,''NONE'') NOT IN (''ADVANCE'',''DELIVERY'') and not exists
5046: (select ''x'' from po_line_locations_archive_all pllaa where pllaa.line_location_id = pllx.line_location_id
5047: and pllaa.cancel_flag=''Y'' and pllaa.revision_num < PO_COMMUNICATION_PVT.getRevisionNum()) order by pllx.shipment_num ) AS line_locations' || l_complex_dist_query || '
5048: FROM po_lines_xml plx WHERE plx.po_header_id = phx.po_header_id and not exists
5049: (select ''x'' from po_lines_archive_all plaa where
5050: plaa.po_line_id = plx.po_line_id and
5051: plaa.cancel_flag= ''Y'' and plaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) order by plx.line_num) AS lines

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

5047: and pllaa.cancel_flag=''Y'' and pllaa.revision_num < PO_COMMUNICATION_PVT.getRevisionNum()) order by pllx.shipment_num ) AS line_locations' || l_complex_dist_query || '
5048: FROM po_lines_xml plx WHERE plx.po_header_id = phx.po_header_id and not exists
5049: (select ''x'' from po_lines_archive_all plaa where
5050: plaa.po_line_id = plx.po_line_id and
5051: plaa.cancel_flag= ''Y'' and plaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) order by plx.line_num) AS lines
5052: FROM PO_HEADERS_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND
5053: phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5054:
5055: END IF;

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

5048: FROM po_lines_xml plx WHERE plx.po_header_id = phx.po_header_id and not exists
5049: (select ''x'' from po_lines_archive_all plaa where
5050: plaa.po_line_id = plx.po_line_id and
5051: plaa.cancel_flag= ''Y'' and plaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) order by plx.line_num) AS lines
5052: FROM PO_HEADERS_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND
5053: phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5054:
5055: END IF;
5056: END IF;

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

5049: (select ''x'' from po_lines_archive_all plaa where
5050: plaa.po_line_id = plx.po_line_id and
5051: plaa.cancel_flag= ''Y'' and plaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) order by plx.line_num) AS lines
5052: FROM PO_HEADERS_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND
5053: phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5054:
5055: END IF;
5056: END IF;
5057:

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

5066: /* Bug#3698674: SQL for generation of XML is framed by checking whether the values are exists at each
5067: level i.e line level, shipment level and distribution level. If the sql query is not framed with out
5068: checking the values exists in the corresponding levels in 8i "Exhausted Result" error is raised.
5069: */
5070: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type,
5071: PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,
5072: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag()
5073: test_flag,
5074: PO_COMMUNICATION_PVT.getDocumentName() document_name,

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

5067: level i.e line level, shipment level and distribution level. If the sql query is not framed with out
5068: checking the values exists in the corresponding levels in 8i "Exhausted Result" error is raised.
5069: */
5070: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type,
5071: PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,
5072: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag()
5073: test_flag,
5074: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5075: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,

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

5068: checking the values exists in the corresponding levels in 8i "Exhausted Result" error is raised.
5069: */
5070: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type,
5071: PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,
5072: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag()
5073: test_flag,
5074: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5075: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5076: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||

Line 5074: PO_COMMUNICATION_PVT.getDocumentName() document_name,

5070: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type,
5071: PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,
5072: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag()
5073: test_flag,
5074: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5075: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5076: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5077: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||'
5078: FROM PO_HEADERS_ARCHIVE_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';

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

5071: PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,
5072: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag()
5073: test_flag,
5074: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5075: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5076: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5077: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||'
5078: FROM PO_HEADERS_ARCHIVE_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5079:

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

5072: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag()
5073: test_flag,
5074: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5075: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5076: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5077: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||'
5078: FROM PO_HEADERS_ARCHIVE_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5079:
5080: IF(p_document_subtype <> 'CONTRACTS') THEN -- contracts will have only headers

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

5074: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5075: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5076: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5077: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||'
5078: FROM PO_HEADERS_ARCHIVE_XML phx WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5079:
5080: IF(p_document_subtype <> 'CONTRACTS') THEN -- contracts will have only headers
5081:
5082: SELECT count(*) into l_count FROM po_lines_archive_all WHERE po_header_id = p_document_id;

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

5086: /* for getting the price differentials FROM po_price_differentials_v
5087: the entity _name is 'PO LINE' except for blanket AND entity_name is 'BLANKET LINE'
5088: for blanket */
5089: --Bug 5506417: Added order by plx.line_num clause
5090: 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,
5091: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5092: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5093: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5094: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,

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

5087: the entity _name is 'PO LINE' except for blanket AND entity_name is 'BLANKET LINE'
5088: for blanket */
5089: --Bug 5506417: Added order by plx.line_num clause
5090: 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,
5091: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5092: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5093: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5094: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5095: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||

Line 5092: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,

5088: for blanket */
5089: --Bug 5506417: Added order by plx.line_num clause
5090: 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,
5091: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5092: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5093: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5094: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5095: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5096: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||',

Line 5093: PO_COMMUNICATION_PVT.getDocumentName() document_name,

5089: --Bug 5506417: Added order by plx.line_num clause
5090: 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,
5091: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5092: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5093: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5094: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5095: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5096: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||',
5097: 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 5094: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,

5090: 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,
5091: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5092: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5093: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5094: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5095: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5096: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||',
5097: CURSOR(SELECT plx.*, '||l_adv_amount_query||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER,MIN_MULTIPLIER, MAX_MULTIPLIER FROM po_price_differentials_v
5098: WHERE entity_type='''||l_eventType||''' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,

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

5091: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5092: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5093: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5094: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5095: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile,PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5096: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||',
5097: CURSOR(SELECT plx.*, '||l_adv_amount_query||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER,MIN_MULTIPLIER, MAX_MULTIPLIER FROM po_price_differentials_v
5098: WHERE entity_type='''||l_eventType||''' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,
5099: '|| l_line_short_attachment_query ||','||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

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

5097: CURSOR(SELECT plx.*, '||l_adv_amount_query||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER,MIN_MULTIPLIER, MAX_MULTIPLIER FROM po_price_differentials_v
5098: WHERE entity_type='''||l_eventType||''' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,
5099: '|| l_line_short_attachment_query ||','||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
5100: AND plx.REVISION_NUM = (select max(revision_num) from po_lines_archive_all pla where pla.po_line_id = plx.po_line_id
5101: 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
5102: FROM PO_HEADERS_ARCHIVE_XML phx, PO_COMMUNICATION_GT pcgt
5103: WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId()
5104: AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5105:

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

5099: '|| l_line_short_attachment_query ||','||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
5100: AND plx.REVISION_NUM = (select max(revision_num) from po_lines_archive_all pla where pla.po_line_id = plx.po_line_id
5101: 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
5102: FROM PO_HEADERS_ARCHIVE_XML phx, PO_COMMUNICATION_GT pcgt
5103: WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId()
5104: AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5105:
5106: END IF;
5107:

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

5100: AND plx.REVISION_NUM = (select max(revision_num) from po_lines_archive_all pla where pla.po_line_id = plx.po_line_id
5101: 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
5102: FROM PO_HEADERS_ARCHIVE_XML phx, PO_COMMUNICATION_GT pcgt
5103: WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId()
5104: AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5105:
5106: END IF;
5107:
5108: SELECT count(*) into l_count FROM po_line_locations_archive_all WHERE po_header_id = p_document_id;

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

5108: SELECT count(*) into l_count FROM po_line_locations_archive_all WHERE po_header_id = p_document_id;
5109:
5110: IF l_count >0 THEN
5111: --Bug 5506417: Added order by pllx.shipment_num and order by plx.line_num clauses
5112: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,
5113: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5114: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5115: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5116: PO_COMMUNICATION_PVT.IsDocumentSigned( PO_COMMUNICATION_PVT.getDocumentId()) Signed,

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

5109:
5110: IF l_count >0 THEN
5111: --Bug 5506417: Added order by pllx.shipment_num and order by plx.line_num clauses
5112: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,
5113: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5114: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5115: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5116: PO_COMMUNICATION_PVT.IsDocumentSigned( PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5117: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||

Line 5114: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,

5110: IF l_count >0 THEN
5111: --Bug 5506417: Added order by pllx.shipment_num and order by plx.line_num clauses
5112: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,
5113: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5114: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5115: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5116: PO_COMMUNICATION_PVT.IsDocumentSigned( PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5117: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5118: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||',

Line 5115: PO_COMMUNICATION_PVT.getDocumentName() document_name,

5111: --Bug 5506417: Added order by pllx.shipment_num and order by plx.line_num clauses
5112: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,
5113: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5114: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5115: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5116: PO_COMMUNICATION_PVT.IsDocumentSigned( PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5117: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5118: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||',
5119: 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 5116: PO_COMMUNICATION_PVT.IsDocumentSigned( PO_COMMUNICATION_PVT.getDocumentId()) Signed,

5112: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,
5113: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5114: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5115: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5116: PO_COMMUNICATION_PVT.IsDocumentSigned( PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5117: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5118: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||',
5119: CURSOR(SELECT plx.*, '||l_adv_amount_query||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER, MIN_MULTIPLIER,MAX_MULTIPLIER FROM po_price_differentials_v
5120: WHERE entity_type='''||l_eventType||''' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,

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

5113: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5114: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5115: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5116: PO_COMMUNICATION_PVT.IsDocumentSigned( PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5117: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5118: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||',
5119: CURSOR(SELECT plx.*, '||l_adv_amount_query||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER, MIN_MULTIPLIER,MAX_MULTIPLIER FROM po_price_differentials_v
5120: WHERE entity_type='''||l_eventType||''' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,
5121: '|| l_line_short_attachment_query ||','||l_line_url_attachment_query||','||l_line_file_attachment_query||',

Line 5132: and ''Y'' = decode(nvl(pllx.cancel_flag,''N''),''N'',''Y'',''Y'',decode(pllx.revision_num,PO_COMMUNICATION_PVT.getRevisionNum(),''Y'',''N'') ) order by pllx.shipment_num ) AS line_locations' || l_complex_lloc_query || '

5128: l_xml_query := l_xml_query || l_shipment_short_attach_query ||','||l_shipment_url_attach_query||','||l_shipment_file_attach_query||'
5129: FROM PO_LINE_LOCATIONS_ARCHIVE_XML pllx WHERE pllx.po_line_id = plx.po_line_id and SHIPMENT_TYPE in (''BLANKET'',''STANDARD'',''PREPAYMENT'') AND NVL(pllx.payment_type, ''NONE'') NOT IN (''ADVANCE'',''DELIVERY'')
5130: and pllx.revision_num = (SELECT MAX(plla.REVISION_NUM) FROM PO_LINE_LOCATIONS_ARCHIVE_ALL plla
5131: where plla.LINE_LOCATION_ID = pllx.LINE_LOCATION_ID and plla.revision_num <= pcgt.revision_number )
5132: and ''Y'' = decode(nvl(pllx.cancel_flag,''N''),''N'',''Y'',''Y'',decode(pllx.revision_num,PO_COMMUNICATION_PVT.getRevisionNum(),''Y'',''N'') ) order by pllx.shipment_num ) AS line_locations' || l_complex_lloc_query || '
5133: FROM PO_LINES_ARCHIVE_XML plx WHERE plx.po_header_id = phx.po_header_id
5134: AND plx.REVISION_NUM = (select max(revision_num) from po_lines_archive_all pla where pla.po_line_id = plx.po_line_id
5135: 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
5136: FROM PO_HEADERS_ARCHIVE_XML phx, PO_COMMUNICATION_GT pcgt WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';

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

5131: where plla.LINE_LOCATION_ID = pllx.LINE_LOCATION_ID and plla.revision_num <= pcgt.revision_number )
5132: and ''Y'' = decode(nvl(pllx.cancel_flag,''N''),''N'',''Y'',''Y'',decode(pllx.revision_num,PO_COMMUNICATION_PVT.getRevisionNum(),''Y'',''N'') ) order by pllx.shipment_num ) AS line_locations' || l_complex_lloc_query || '
5133: FROM PO_LINES_ARCHIVE_XML plx WHERE plx.po_header_id = phx.po_header_id
5134: AND plx.REVISION_NUM = (select max(revision_num) from po_lines_archive_all pla where pla.po_line_id = plx.po_line_id
5135: 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
5136: FROM PO_HEADERS_ARCHIVE_XML phx, PO_COMMUNICATION_GT pcgt WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5137: END IF;
5138:
5139: IF(p_document_subtype <> 'BLANKET') THEN -- blankets will not have distributions

Line 5136: FROM PO_HEADERS_ARCHIVE_XML phx, PO_COMMUNICATION_GT pcgt WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';

5132: and ''Y'' = decode(nvl(pllx.cancel_flag,''N''),''N'',''Y'',''Y'',decode(pllx.revision_num,PO_COMMUNICATION_PVT.getRevisionNum(),''Y'',''N'') ) order by pllx.shipment_num ) AS line_locations' || l_complex_lloc_query || '
5133: FROM PO_LINES_ARCHIVE_XML plx WHERE plx.po_header_id = phx.po_header_id
5134: AND plx.REVISION_NUM = (select max(revision_num) from po_lines_archive_all pla where pla.po_line_id = plx.po_line_id
5135: 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
5136: FROM PO_HEADERS_ARCHIVE_XML phx, PO_COMMUNICATION_GT pcgt WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5137: END IF;
5138:
5139: IF(p_document_subtype <> 'BLANKET') THEN -- blankets will not have distributions
5140: SELECT count(*) into l_count FROM po_distributions_archive_all WHERE po_header_id = p_document_id;

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

5140: SELECT count(*) into l_count FROM po_distributions_archive_all WHERE po_header_id = p_document_id;
5141:
5142: IF l_count >0 THEN
5143: --Bug 5506417: Added order by pllx.shipment_num and order by plx.line_num clauses
5144: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,
5145: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5146: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5147: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5148: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,

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

5141:
5142: IF l_count >0 THEN
5143: --Bug 5506417: Added order by pllx.shipment_num and order by plx.line_num clauses
5144: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,
5145: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5146: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5147: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5148: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5149: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||

Line 5146: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,

5142: IF l_count >0 THEN
5143: --Bug 5506417: Added order by pllx.shipment_num and order by plx.line_num clauses
5144: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,
5145: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5146: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5147: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5148: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5149: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5150: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||',

Line 5147: PO_COMMUNICATION_PVT.getDocumentName() document_name,

5143: --Bug 5506417: Added order by pllx.shipment_num and order by plx.line_num clauses
5144: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,
5145: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5146: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5147: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5148: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5149: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5150: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||',
5151: CURSOR(SELECT plx.*, '||l_adv_amount_query||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER FROM po_price_differentials_v

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

5144: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,
5145: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5146: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5147: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5148: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5149: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5150: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||',
5151: CURSOR(SELECT plx.*, '||l_adv_amount_query||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER FROM po_price_differentials_v
5152: WHERE entity_type=''PO LINE'' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,

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

5145: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5146: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5147: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5148: PO_COMMUNICATION_PVT.IsDocumentSigned(PO_COMMUNICATION_PVT.getDocumentId()) Signed,
5149: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5150: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||',
5151: CURSOR(SELECT plx.*, '||l_adv_amount_query||' CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER FROM po_price_differentials_v
5152: WHERE entity_type=''PO LINE'' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,
5153: '|| l_line_short_attachment_query ||','||l_line_url_attachment_query||','||l_line_file_attachment_query||',

Line 5161: and ''Y'' = decode(nvl(pllx.cancel_flag,''N''),''N'',''Y'',''Y'',decode(pllx.revision_num,PO_COMMUNICATION_PVT.getRevisionNum(),''Y'',''N'') ) order by pllx.shipment_num ) AS line_locations'|| l_complex_dist_query || '

5157: WHERE pda.PO_DISTRIBUTION_ID = pdx.PO_DISTRIBUTION_ID AND pda.REVISION_NUM <= pcgt.revision_number ) ) AS distributions
5158: FROM PO_LINE_LOCATIONS_ARCHIVE_XML pllx WHERE pllx.po_line_id = plx.po_line_id and SHIPMENT_TYPE in (''BLANKET'',''STANDARD'',''PREPAYMENT'') AND NVL(pllx.payment_type,''NONE'') NOT IN (''ADVANCE'',''DELIVERY'')
5159: and pllx.revision_num = (SELECT MAX(plla.REVISION_NUM) FROM PO_LINE_LOCATIONS_ARCHIVE_ALL plla
5160: where plla.LINE_LOCATION_ID = pllx.LINE_LOCATION_ID and plla.revision_num <= pcgt.revision_number )
5161: and ''Y'' = decode(nvl(pllx.cancel_flag,''N''),''N'',''Y'',''Y'',decode(pllx.revision_num,PO_COMMUNICATION_PVT.getRevisionNum(),''Y'',''N'') ) order by pllx.shipment_num ) AS line_locations'|| l_complex_dist_query || '
5162: FROM PO_LINES_ARCHIVE_XML plx WHERE plx.po_header_id = phx.po_header_id
5163: AND plx.REVISION_NUM = (select max(revision_num) from po_lines_archive_all pla where pla.po_line_id = plx.po_line_id
5164: 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
5165: FROM PO_HEADERS_ARCHIVE_XML phx, PO_COMMUNICATION_GT pcgt WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND

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

5160: where plla.LINE_LOCATION_ID = pllx.LINE_LOCATION_ID and plla.revision_num <= pcgt.revision_number )
5161: and ''Y'' = decode(nvl(pllx.cancel_flag,''N''),''N'',''Y'',''Y'',decode(pllx.revision_num,PO_COMMUNICATION_PVT.getRevisionNum(),''Y'',''N'') ) order by pllx.shipment_num ) AS line_locations'|| l_complex_dist_query || '
5162: FROM PO_LINES_ARCHIVE_XML plx WHERE plx.po_header_id = phx.po_header_id
5163: AND plx.REVISION_NUM = (select max(revision_num) from po_lines_archive_all pla where pla.po_line_id = plx.po_line_id
5164: 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
5165: FROM PO_HEADERS_ARCHIVE_XML phx, PO_COMMUNICATION_GT pcgt WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND
5166: phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5167:
5168: END IF; -- end of

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

5161: and ''Y'' = decode(nvl(pllx.cancel_flag,''N''),''N'',''Y'',''Y'',decode(pllx.revision_num,PO_COMMUNICATION_PVT.getRevisionNum(),''Y'',''N'') ) order by pllx.shipment_num ) AS line_locations'|| l_complex_dist_query || '
5162: FROM PO_LINES_ARCHIVE_XML plx WHERE plx.po_header_id = phx.po_header_id
5163: AND plx.REVISION_NUM = (select max(revision_num) from po_lines_archive_all pla where pla.po_line_id = plx.po_line_id
5164: 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
5165: FROM PO_HEADERS_ARCHIVE_XML phx, PO_COMMUNICATION_GT pcgt WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND
5166: phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5167:
5168: END IF; -- end of
5169: END IF; -- end of balnket if condition

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

5162: FROM PO_LINES_ARCHIVE_XML plx WHERE plx.po_header_id = phx.po_header_id
5163: AND plx.REVISION_NUM = (select max(revision_num) from po_lines_archive_all pla where pla.po_line_id = plx.po_line_id
5164: 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
5165: FROM PO_HEADERS_ARCHIVE_XML phx, PO_COMMUNICATION_GT pcgt WHERE phx.PO_HEADER_ID = PO_COMMUNICATION_PVT.getDocumentId() AND
5166: phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5167:
5168: END IF; -- end of
5169: END IF; -- end of balnket if condition
5170: END IF; -- end of Contracts if condition

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

5176: END IF; -- end of else if
5177:
5178: else
5179: /* Bug#3698674: In 8i db, the functions used to retrieve revision number and release id are not working
5180: properly. Created a global temporary table po_communication_pvt and retrieved the values from the
5181: global temporary table in both main and archive queries.*/
5182: IF p_which_tables = 'MAIN' THEN
5183: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_STATEMENT) THEN
5184: FND_LOG.string(FND_LOG.LEVEL_STATEMENT,g_log_head || l_api_name ||'Releases:','Entered into Release loop');

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

5183: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_STATEMENT) THEN
5184: FND_LOG.string(FND_LOG.LEVEL_STATEMENT,g_log_head || l_api_name ||'Releases:','Entered into Release loop');
5185: END IF;
5186:
5187: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,
5188: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5189: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5190: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5191: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||

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

5184: FND_LOG.string(FND_LOG.LEVEL_STATEMENT,g_log_head || l_api_name ||'Releases:','Entered into Release loop');
5185: END IF;
5186:
5187: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,
5188: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5189: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5190: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5191: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5192: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||'

Line 5189: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,

5185: END IF;
5186:
5187: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,
5188: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5189: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5190: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5191: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5192: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||'
5193: FROM PO_RELEASE_XML phx WHERE phx.PO_RELEASE_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';

Line 5190: PO_COMMUNICATION_PVT.getDocumentName() document_name,

5186:
5187: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,
5188: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5189: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5190: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5191: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5192: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||'
5193: FROM PO_RELEASE_XML phx WHERE phx.PO_RELEASE_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5194:

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

5187: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,
5188: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5189: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5190: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5191: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5192: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||'
5193: FROM PO_RELEASE_XML phx WHERE phx.PO_RELEASE_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5194:
5195:

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

5189: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5190: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5191: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5192: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||'
5193: FROM PO_RELEASE_XML phx WHERE phx.PO_RELEASE_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5194:
5195:
5196: SELECT count(*) into l_count FROM po_line_locations_all WHERE po_release_id = p_document_id ;
5197:

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

5200: FND_LOG.string(FND_LOG.LEVEL_STATEMENT,g_log_head || l_api_name ||'Releases:','Assigning Releases line/line locations query');
5201: END IF;
5202: -- Added release id in condition
5203: --Bug 5506417: Added order by pllx.shipment_num and order by plx.line_num clauses
5204: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,
5205: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5206: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5207: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5208: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||

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

5201: END IF;
5202: -- Added release id in condition
5203: --Bug 5506417: Added order by pllx.shipment_num and order by plx.line_num clauses
5204: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,
5205: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5206: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5207: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5208: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5209: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||',

Line 5206: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,

5202: -- Added release id in condition
5203: --Bug 5506417: Added order by pllx.shipment_num and order by plx.line_num clauses
5204: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,
5205: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5206: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5207: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5208: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5209: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||',
5210: CURSOR(SELECT plx.*,CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER FROM po_price_differentials_v

Line 5207: PO_COMMUNICATION_PVT.getDocumentName() document_name,

5203: --Bug 5506417: Added order by pllx.shipment_num and order by plx.line_num clauses
5204: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,
5205: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5206: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5207: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5208: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5209: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||',
5210: CURSOR(SELECT plx.*,CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER FROM po_price_differentials_v
5211: WHERE entity_type='''||l_eventType||''' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,

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

5204: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,
5205: PO_COMMUNICATION_PVT.getTimezone() timezone,PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5206: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5207: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5208: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5209: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||',
5210: CURSOR(SELECT plx.*,CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER FROM po_price_differentials_v
5211: WHERE entity_type='''||l_eventType||''' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,
5212: '|| l_line_short_attachment_query ||','||l_line_url_attachment_query||','||l_line_file_attachment_query||',

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

5215: FROM po_distribution_xml pd WHERE pd.po_release_id = pllx.po_release_id and pd.LINE_LOCATION_ID = pllx.LINE_LOCATION_ID) AS distributions
5216: FROM po_line_locations_xml pllx WHERE pllx.po_release_id in (select po_release_id from PO_COMMUNICATION_GT) and pllx.po_line_id = plx.po_line_id
5217: and not exists (select ''x'' from po_line_locations_archive_all pllaa where
5218: pllaa.line_location_id = pllx.line_location_id and
5219: pllaa.cancel_flag= ''Y'' and pllaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) order by pllx.shipment_num ) AS line_locations
5220: FROM po_lines_xml plx WHERE exists (SELECT ''x'' from po_line_locations_all
5221: WHERE po_line_locations_all.po_line_id = plx.po_line_id and po_release_id = phx.po_release_id and not exists (select ''x'' from po_line_locations_archive_all pllaa where
5222: pllaa.line_location_id = po_line_locations_all.line_location_id and
5223: pllaa.cancel_flag= ''Y'' and pllaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) ) and plx.po_header_id = phx.po_header_id order by plx.line_num) AS lines

Line 5223: pllaa.cancel_flag= ''Y'' and pllaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) ) and plx.po_header_id = phx.po_header_id order by plx.line_num) AS lines

5219: pllaa.cancel_flag= ''Y'' and pllaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) order by pllx.shipment_num ) AS line_locations
5220: FROM po_lines_xml plx WHERE exists (SELECT ''x'' from po_line_locations_all
5221: WHERE po_line_locations_all.po_line_id = plx.po_line_id and po_release_id = phx.po_release_id and not exists (select ''x'' from po_line_locations_archive_all pllaa where
5222: pllaa.line_location_id = po_line_locations_all.line_location_id and
5223: pllaa.cancel_flag= ''Y'' and pllaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) ) and plx.po_header_id = phx.po_header_id order by plx.line_num) AS lines
5224: FROM PO_RELEASE_XML phx WHERE phx.PO_RELEASE_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5225:
5226: END IF;
5227:

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

5220: FROM po_lines_xml plx WHERE exists (SELECT ''x'' from po_line_locations_all
5221: WHERE po_line_locations_all.po_line_id = plx.po_line_id and po_release_id = phx.po_release_id and not exists (select ''x'' from po_line_locations_archive_all pllaa where
5222: pllaa.line_location_id = po_line_locations_all.line_location_id and
5223: pllaa.cancel_flag= ''Y'' and pllaa.revision_num< PO_COMMUNICATION_PVT.getRevisionNum() ) ) and plx.po_header_id = phx.po_header_id order by plx.line_num) AS lines
5224: FROM PO_RELEASE_XML phx WHERE phx.PO_RELEASE_ID = PO_COMMUNICATION_PVT.getDocumentId() AND phx.revision_num = PO_COMMUNICATION_PVT.getRevisionNum()';
5225:
5226: END IF;
5227:
5228:

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

5236: and we move to the details (line, shipments, distributions) as we move inside each cursor. The
5237: lines have to be selected from the corresponding blanket since they are not present in the release */
5238: -- Bug 3727808. Use blanket revision number rather than release revision number. Added the max(pb.revision_num) query in lines SQL
5239: -- Bug 5506417: Added order by pllx.shipment_num and order by plx.line_num clauses
5240: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,
5241: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5242: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5243: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5244: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||

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

5237: lines have to be selected from the corresponding blanket since they are not present in the release */
5238: -- Bug 3727808. Use blanket revision number rather than release revision number. Added the max(pb.revision_num) query in lines SQL
5239: -- Bug 5506417: Added order by pllx.shipment_num and order by plx.line_num clauses
5240: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,
5241: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5242: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5243: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5244: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5245: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||',

Line 5242: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,

5238: -- Bug 3727808. Use blanket revision number rather than release revision number. Added the max(pb.revision_num) query in lines SQL
5239: -- Bug 5506417: Added order by pllx.shipment_num and order by plx.line_num clauses
5240: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,
5241: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5242: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5243: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5244: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5245: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||',
5246: CURSOR(SELECT plx.*,CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER FROM po_price_differentials_v

Line 5243: PO_COMMUNICATION_PVT.getDocumentName() document_name,

5239: -- Bug 5506417: Added order by pllx.shipment_num and order by plx.line_num clauses
5240: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,
5241: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5242: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5243: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5244: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5245: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||',
5246: CURSOR(SELECT plx.*,CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER FROM po_price_differentials_v
5247: WHERE entity_type='''||l_eventType||''' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,

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

5240: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getDocumentType() document_type, PO_COMMUNICATION_PVT.getCoverMessage() cover_message,PO_COMMUNICATION_PVT.getTimezone() timezone,
5241: PO_COMMUNICATION_PVT.getAmendmentMessage() ammendment_message,PO_COMMUNICATION_PVT.getTestFlag() test_flag,
5242: PO_COMMUNICATION_PVT.getDistinctShipmentCount() DIST_SHIPMENT_COUNT,
5243: PO_COMMUNICATION_PVT.getDocumentName() document_name,
5244: fnd_profile.value(''PO_GENERATE_AMENDMENT_DOCS'') amendment_profile, PO_COMMUNICATION_PVT.getWithTerms() With_Terms , PO_COMMUNICATION_PVT.getIsContractAttachedDoc() Is_Attached_Doc , '||
5245: l_xml_message_query || ','|| l_head_short_attachment_query ||','||l_head_url_attachment_query||','||l_head_file_attachment_query||',
5246: CURSOR(SELECT plx.*,CURSOR(SELECT PRICE_TYPE_DSP PRICE_TYPE, MULTIPLIER FROM po_price_differentials_v
5247: WHERE entity_type='''||l_eventType||''' AND entity_id = plx.po_line_id and enabled_flag=''Y'') AS price_diff,
5248: '|| l_line_short_attachment_query ||','||l_line_url_attachment_query||','||l_line_file_attachment_query||',

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

5249: CURSOR(SELECT pllx.*,'|| l_shipment_short_attach_query ||','||l_shipment_url_attach_query||','||l_shipment_file_attach_query||',
5250: CURSOR(SELECT pd.*
5251: FROM po_distribution_archive_xml pd WHERE pd.po_release_id = pllx.po_release_id and pd.line_location_id = pllx.line_location_id
5252: and pd.REVISION_NUM = (SELECT MAX(pda.REVISION_NUM) FROM PO_DISTRIBUTIONS_ARCHIVE_ALL pda
5253: WHERE pda.PO_DISTRIBUTION_ID = pd.PO_DISTRIBUTION_ID AND pda.REVISION_NUM <= PO_COMMUNICATION_PVT.getRevisionNum() ) ) AS distributions
5254: FROM PO_LINE_LOCATIONS_ARCHIVE_XML pllx WHERE pllx.po_release_id = pcgt.po_release_id and pllx.po_line_id = plx.po_line_id
5255: and pllx.revision_num = (SELECT MAX(plla.REVISION_NUM) FROM PO_LINE_LOCATIONS_ARCHIVE_ALL plla
5256: where plla.LINE_LOCATION_ID = pllx.LINE_LOCATION_ID and plla.revision_num <= pcgt.revision_number ) order by pllx.shipment_num ) AS line_locations
5257: FROM PO_LINES_ARCHIVE_XML plx

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

5258: WHERE exists (SELECT ''x'' from po_line_locations_archive_all pllaa
5259: WHERE pllaa.po_line_id = plx.po_line_id and po_release_id = phx.po_release_id
5260: and pllaa.REVISION_NUM = (select max(revision_num) from po_line_locations_archive_all pllaa1 where pllaa1.line_location_id = pllaa.line_location_id
5261: and pllaa1.revision_num <= pcgt.revision_number )
5262: and ''Y'' = decode(nvl(pllaa.cancel_flag,''N''),''N'',''Y'',''Y'',decode(pllaa.revision_num,PO_COMMUNICATION_PVT.getRevisionNum(),''Y'',''N'') ) )
5263: and plx.po_header_id = phx.po_header_id
5264: AND plx.REVISION_NUM = (select max(revision_num) from po_lines_archive_all pla where pla.po_line_id = plx.po_line_id
5265: and pla.revision_num <= (select max(pb.revision_num)
5266: from po_headers_archive_all pb, po_releases_archive_all pr

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

5268: and pr.po_release_id = pcgt.po_release_id
5269: and pr.revision_num= pcgt.revision_number
5270: and pb.approved_date <= pr.approved_date
5271: ) ) order by plx.line_num desc) AS lines
5272: 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()';
5273:
5274: END IF;
5275:
5276:

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

5286: --PO_HEADERS(BPA) attachments are printed followed by PO_RELEASES
5287: --attachments and then finally PO_VENDORS. This is necessary
5288: --only for the Releases because you can display the BPA header
5289: --attachments also with a release.
5290: --bug#3823799: Replaced the hard coded p_document id with PO_COMMUNICATION_PVT.getDocumentId() function
5291: if(p_document_type='RELEASE')then
5292: --Bug#4683170
5293: --Appended fad.datatype_id=2 condition for retrieving the
5294: --long_text attachment for the current document only.

Line 5300: l_headerAttachmentsQuery := 'select PO_COMMUNICATION_PVT.get_clob(fdl.rowid) long_text

5296: /*Bug5213932 : To convert nonxml characters into their escape equivalents
5297: long text should be converted to clob. Hence calling function get_clob.
5298: Replacing fdl.long_text with get_clob(fdl.rowid) */
5299:
5300: l_headerAttachmentsQuery := 'select PO_COMMUNICATION_PVT.get_clob(fdl.rowid) long_text
5301: FROM
5302: fnd_attached_docs_form_vl fad,
5303: fnd_documents_long_text fdl
5304: WHERE ( (entity_name=''PO_RELEASES'' AND

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

5301: FROM
5302: fnd_attached_docs_form_vl fad,
5303: fnd_documents_long_text fdl
5304: WHERE ( (entity_name=''PO_RELEASES'' AND
5305: pk1_value= to_char(PO_COMMUNICATION_PVT.getDocumentId()) ) OR
5306: (entity_name = ''PO_HEADERS'' AND
5307: pk1_value = to_char(PO_COMMUNICATION_PVT.getReleaseHeaderId())) OR --Bug6139548
5308: (entity_name = ''PO_VENDORS'' AND
5309: pk1_value = to_char(PO_COMMUNICATION_PVT.getVendorId()))) AND

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

5303: fnd_documents_long_text fdl
5304: WHERE ( (entity_name=''PO_RELEASES'' AND
5305: pk1_value= to_char(PO_COMMUNICATION_PVT.getDocumentId()) ) OR
5306: (entity_name = ''PO_HEADERS'' AND
5307: pk1_value = to_char(PO_COMMUNICATION_PVT.getReleaseHeaderId())) OR --Bug6139548
5308: (entity_name = ''PO_VENDORS'' AND
5309: pk1_value = to_char(PO_COMMUNICATION_PVT.getVendorId()))) AND
5310: function_name = ''PO_PRINTPO''
5311: and fad.media_id = fdl.media_id

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

5305: pk1_value= to_char(PO_COMMUNICATION_PVT.getDocumentId()) ) OR
5306: (entity_name = ''PO_HEADERS'' AND
5307: pk1_value = to_char(PO_COMMUNICATION_PVT.getReleaseHeaderId())) OR --Bug6139548
5308: (entity_name = ''PO_VENDORS'' AND
5309: pk1_value = to_char(PO_COMMUNICATION_PVT.getVendorId()))) AND
5310: function_name = ''PO_PRINTPO''
5311: and fad.media_id = fdl.media_id
5312: and fad.datatype_id=2
5313: order by entity_name,seq_num'; --bug6133951

Line 5324: l_headerAttachmentsQuery := 'select PO_COMMUNICATION_PVT.get_clob(fdl.rowid) long_text

5320: /*Bug5213932 : To convert nonxml characters into their escape equivalents
5321: long text should be converted to clob.Hence calling function get_clob.
5322: Replacing fdl.long_text with get_clob(fdl.rowid) */
5323:
5324: l_headerAttachmentsQuery := 'select PO_COMMUNICATION_PVT.get_clob(fdl.rowid) long_text
5325: FROM
5326: fnd_attached_docs_form_vl fad,
5327: fnd_documents_long_text fdl
5328: WHERE ((entity_name = ''PO_HEADERS'' AND

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

5325: FROM
5326: fnd_attached_docs_form_vl fad,
5327: fnd_documents_long_text fdl
5328: WHERE ((entity_name = ''PO_HEADERS'' AND
5329: pk1_value = to_char(PO_COMMUNICATION_PVT.getReleaseHeaderId())) OR --Bug6139548
5330: (entity_name = ''PO_VENDORS'' AND
5331: pk1_value = to_char(PO_COMMUNICATION_PVT.getVendorId()))) AND
5332: function_name = ''PO_PRINTPO''
5333: and fad.media_id = fdl.media_id

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

5327: fnd_documents_long_text fdl
5328: WHERE ((entity_name = ''PO_HEADERS'' AND
5329: pk1_value = to_char(PO_COMMUNICATION_PVT.getReleaseHeaderId())) OR --Bug6139548
5330: (entity_name = ''PO_VENDORS'' AND
5331: pk1_value = to_char(PO_COMMUNICATION_PVT.getVendorId()))) AND
5332: function_name = ''PO_PRINTPO''
5333: and fad.media_id = fdl.media_id
5334: AND fad.datatype_id=2
5335: order by seq_num'; --bug6133951

Line 5349: l_lineAttachQuery :='SELECT PO_COMMUNICATION_PVT.get_clob(fds.rowid) text, plx.po_line_id id

5345: /*Bug5213932 : To convert nonxml characters into their escape equivalents
5346: long text should be converted to clob. Hence calling function get_clob.
5347: Replacing fdl.long_text with get_clob(fds.rowid) */
5348:
5349: l_lineAttachQuery :='SELECT PO_COMMUNICATION_PVT.get_clob(fds.rowid) text, plx.po_line_id id
5350: FROM
5351: fnd_attached_docs_form_vl fad,
5352: fnd_documents_long_text fds,
5353: po_lines_all plx

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

5353: po_lines_all plx
5354: WHERE ((fad.entity_name=''PO_LINES'' AND fad.pk1_value=to_char(plx.po_line_id))
5355: OR
5356: (fad.entity_name=''MTL_SYSTEM_ITEMS'' AND
5357: fad.pk1_value=to_char(PO_COMMUNICATION_PVT.getInventoryOrgId()) AND --Bug6139548
5358: fad.pk2_value=to_char(plx.item_id) AND plx.item_id is not null)
5359: ) AND
5360: function_name = ''PO_PRINTPO''
5361: AND fad.media_id = fds.media_id

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

5359: ) AND
5360: function_name = ''PO_PRINTPO''
5361: AND fad.media_id = fds.media_id
5362: AND fad.datatype_id=2
5363: AND plx.po_header_id = PO_COMMUNICATION_PVT.getReleaseHeaderId()
5364: order by seq_num'; --bug6133951
5365: --bug#3760632 replaced the function PO_POXPOEPO
5366: --with PO_PRINTPO
5367: --Bug#4683170

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

5374: Replacing fdl.long_text with get_clob(fds.rowid) */
5375:
5376: /* Bug 4568471/6829381 Exclude the One Time Address attachments when printing shipment long text.
5377: as this text is already printed as shipto Location */
5378: l_shipmentAttachmentQuery:= 'SELECT PO_COMMUNICATION_PVT.get_clob(fds.rowid) long_text, pllx.LINE_LOCATION_ID
5379: FROM
5380: fnd_attached_docs_form_vl fad,
5381: fnd_documents_long_text fds,
5382: po_line_locations_all pllx

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

5385: function_name = ''PO_PRINTPO''
5386: AND fad.media_id = fds.media_id
5387: AND fad.document_description not like ''POR%''
5388: AND fad.datatype_id=2
5389: AND pllx.po_header_id = PO_COMMUNICATION_PVT.getReleaseHeaderId()
5390: order by seq_num'; --bug6133951
5391:
5392: select TO_CHAR(SYSDATE, 'DD-MON-YYYY HH24:MI:SS') into l_time from dual;
5393: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_STATEMENT) THEN

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

5404: l_headerAttach_query varchar2(1000);
5405: l_lineAttach_query varchar2(1200) ; --Bug5213932 increase length
5406: l_disAttach_query varchar2(1200) ; --Bug5213932 increase length
5407: l_time varchar2(50);
5408: g_log_head CONSTANT VARCHAR2(30) := ''po.plsql.PO_COMMUNICATION_PVT.'';
5409: l_api_name CONSTANT VARCHAR2(30):= ''POXMLGEN'';
5410: TYPE ref_cursorType IS REF CURSOR;
5411: refcur ref_cursorType;
5412: l_fileClob CLOB := NULL;

Line 5844: if PO_COMMUNICATION_PVT.g_location_id <> p_location_id or

5840:
5841: function getLocationInfo(p_location_id in number) return number is
5842: begin
5843:
5844: if PO_COMMUNICATION_PVT.g_location_id <> p_location_id or
5845: PO_COMMUNICATION_PVT.g_location_id is null then
5846:
5847: PO_COMMUNICATION_PVT.g_location_id := p_location_id;
5848:

Line 5845: PO_COMMUNICATION_PVT.g_location_id is null then

5841: function getLocationInfo(p_location_id in number) return number is
5842: begin
5843:
5844: if PO_COMMUNICATION_PVT.g_location_id <> p_location_id or
5845: PO_COMMUNICATION_PVT.g_location_id is null then
5846:
5847: PO_COMMUNICATION_PVT.g_location_id := p_location_id;
5848:
5849: PO_COMMUNICATION_PVT.g_address_line1 := null;

Line 5847: PO_COMMUNICATION_PVT.g_location_id := p_location_id;

5843:
5844: if PO_COMMUNICATION_PVT.g_location_id <> p_location_id or
5845: PO_COMMUNICATION_PVT.g_location_id is null then
5846:
5847: PO_COMMUNICATION_PVT.g_location_id := p_location_id;
5848:
5849: PO_COMMUNICATION_PVT.g_address_line1 := null;
5850: PO_COMMUNICATION_PVT.g_address_line2 := null;
5851: PO_COMMUNICATION_PVT.g_address_line3 := null;

Line 5849: PO_COMMUNICATION_PVT.g_address_line1 := null;

5845: PO_COMMUNICATION_PVT.g_location_id is null then
5846:
5847: PO_COMMUNICATION_PVT.g_location_id := p_location_id;
5848:
5849: PO_COMMUNICATION_PVT.g_address_line1 := null;
5850: PO_COMMUNICATION_PVT.g_address_line2 := null;
5851: PO_COMMUNICATION_PVT.g_address_line3 := null;
5852: PO_COMMUNICATION_PVT.g_Territory_short_name := null;
5853: PO_COMMUNICATION_PVT.g_address_info := null;

Line 5850: PO_COMMUNICATION_PVT.g_address_line2 := null;

5846:
5847: PO_COMMUNICATION_PVT.g_location_id := p_location_id;
5848:
5849: PO_COMMUNICATION_PVT.g_address_line1 := null;
5850: PO_COMMUNICATION_PVT.g_address_line2 := null;
5851: PO_COMMUNICATION_PVT.g_address_line3 := null;
5852: PO_COMMUNICATION_PVT.g_Territory_short_name := null;
5853: PO_COMMUNICATION_PVT.g_address_info := null;
5854: PO_COMMUNICATION_PVT.g_location_name := null;

Line 5851: PO_COMMUNICATION_PVT.g_address_line3 := null;

5847: PO_COMMUNICATION_PVT.g_location_id := p_location_id;
5848:
5849: PO_COMMUNICATION_PVT.g_address_line1 := null;
5850: PO_COMMUNICATION_PVT.g_address_line2 := null;
5851: PO_COMMUNICATION_PVT.g_address_line3 := null;
5852: PO_COMMUNICATION_PVT.g_Territory_short_name := null;
5853: PO_COMMUNICATION_PVT.g_address_info := null;
5854: PO_COMMUNICATION_PVT.g_location_name := null;
5855: PO_COMMUNICATION_PVT.g_phone := null;

Line 5852: PO_COMMUNICATION_PVT.g_Territory_short_name := null;

5848:
5849: PO_COMMUNICATION_PVT.g_address_line1 := null;
5850: PO_COMMUNICATION_PVT.g_address_line2 := null;
5851: PO_COMMUNICATION_PVT.g_address_line3 := null;
5852: PO_COMMUNICATION_PVT.g_Territory_short_name := null;
5853: PO_COMMUNICATION_PVT.g_address_info := null;
5854: PO_COMMUNICATION_PVT.g_location_name := null;
5855: PO_COMMUNICATION_PVT.g_phone := null;
5856: PO_COMMUNICATION_PVT.g_fax := null;

Line 5853: PO_COMMUNICATION_PVT.g_address_info := null;

5849: PO_COMMUNICATION_PVT.g_address_line1 := null;
5850: PO_COMMUNICATION_PVT.g_address_line2 := null;
5851: PO_COMMUNICATION_PVT.g_address_line3 := null;
5852: PO_COMMUNICATION_PVT.g_Territory_short_name := null;
5853: PO_COMMUNICATION_PVT.g_address_info := null;
5854: PO_COMMUNICATION_PVT.g_location_name := null;
5855: PO_COMMUNICATION_PVT.g_phone := null;
5856: PO_COMMUNICATION_PVT.g_fax := null;
5857: PO_COMMUNICATION_PVT.g_address_line4 := null;

Line 5854: PO_COMMUNICATION_PVT.g_location_name := null;

5850: PO_COMMUNICATION_PVT.g_address_line2 := null;
5851: PO_COMMUNICATION_PVT.g_address_line3 := null;
5852: PO_COMMUNICATION_PVT.g_Territory_short_name := null;
5853: PO_COMMUNICATION_PVT.g_address_info := null;
5854: PO_COMMUNICATION_PVT.g_location_name := null;
5855: PO_COMMUNICATION_PVT.g_phone := null;
5856: PO_COMMUNICATION_PVT.g_fax := null;
5857: PO_COMMUNICATION_PVT.g_address_line4 := null;
5858: --bug#3438608

Line 5855: PO_COMMUNICATION_PVT.g_phone := null;

5851: PO_COMMUNICATION_PVT.g_address_line3 := null;
5852: PO_COMMUNICATION_PVT.g_Territory_short_name := null;
5853: PO_COMMUNICATION_PVT.g_address_info := null;
5854: PO_COMMUNICATION_PVT.g_location_name := null;
5855: PO_COMMUNICATION_PVT.g_phone := null;
5856: PO_COMMUNICATION_PVT.g_fax := null;
5857: PO_COMMUNICATION_PVT.g_address_line4 := null;
5858: --bug#3438608
5859: PO_COMMUNICATION_PVT.g_town_or_city:=null;

Line 5856: PO_COMMUNICATION_PVT.g_fax := null;

5852: PO_COMMUNICATION_PVT.g_Territory_short_name := null;
5853: PO_COMMUNICATION_PVT.g_address_info := null;
5854: PO_COMMUNICATION_PVT.g_location_name := null;
5855: PO_COMMUNICATION_PVT.g_phone := null;
5856: PO_COMMUNICATION_PVT.g_fax := null;
5857: PO_COMMUNICATION_PVT.g_address_line4 := null;
5858: --bug#3438608
5859: PO_COMMUNICATION_PVT.g_town_or_city:=null;
5860: PO_COMMUNICATION_PVT.g_state_or_province :=null;

Line 5857: PO_COMMUNICATION_PVT.g_address_line4 := null;

5853: PO_COMMUNICATION_PVT.g_address_info := null;
5854: PO_COMMUNICATION_PVT.g_location_name := null;
5855: PO_COMMUNICATION_PVT.g_phone := null;
5856: PO_COMMUNICATION_PVT.g_fax := null;
5857: PO_COMMUNICATION_PVT.g_address_line4 := null;
5858: --bug#3438608
5859: PO_COMMUNICATION_PVT.g_town_or_city:=null;
5860: PO_COMMUNICATION_PVT.g_state_or_province :=null;
5861: PO_COMMUNICATION_PVT.g_postal_code :=null;

Line 5859: PO_COMMUNICATION_PVT.g_town_or_city:=null;

5855: PO_COMMUNICATION_PVT.g_phone := null;
5856: PO_COMMUNICATION_PVT.g_fax := null;
5857: PO_COMMUNICATION_PVT.g_address_line4 := null;
5858: --bug#3438608
5859: PO_COMMUNICATION_PVT.g_town_or_city:=null;
5860: PO_COMMUNICATION_PVT.g_state_or_province :=null;
5861: PO_COMMUNICATION_PVT.g_postal_code :=null;
5862: --bug#3438608
5863:

Line 5860: PO_COMMUNICATION_PVT.g_state_or_province :=null;

5856: PO_COMMUNICATION_PVT.g_fax := null;
5857: PO_COMMUNICATION_PVT.g_address_line4 := null;
5858: --bug#3438608
5859: PO_COMMUNICATION_PVT.g_town_or_city:=null;
5860: PO_COMMUNICATION_PVT.g_state_or_province :=null;
5861: PO_COMMUNICATION_PVT.g_postal_code :=null;
5862: --bug#3438608
5863:
5864: --bug#3438608 passed the out variables PO_COMMUNICATION_PVT.g_town_or_city

Line 5861: PO_COMMUNICATION_PVT.g_postal_code :=null;

5857: PO_COMMUNICATION_PVT.g_address_line4 := null;
5858: --bug#3438608
5859: PO_COMMUNICATION_PVT.g_town_or_city:=null;
5860: PO_COMMUNICATION_PVT.g_state_or_province :=null;
5861: PO_COMMUNICATION_PVT.g_postal_code :=null;
5862: --bug#3438608
5863:
5864: --bug#3438608 passed the out variables PO_COMMUNICATION_PVT.g_town_or_city
5865: --PO_COMMUNICATION_PVT.g_postal_code,PO_COMMUNICATION_PVT.g_state_or_province

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

5860: PO_COMMUNICATION_PVT.g_state_or_province :=null;
5861: PO_COMMUNICATION_PVT.g_postal_code :=null;
5862: --bug#3438608
5863:
5864: --bug#3438608 passed the out variables PO_COMMUNICATION_PVT.g_town_or_city
5865: --PO_COMMUNICATION_PVT.g_postal_code,PO_COMMUNICATION_PVT.g_state_or_province
5866: --to the procedure PO_HR_LOCATION.get_alladdress_lines
5867:
5868: -- bug#3580225: changed the procedure name to get_alladdress_lines from get_address--

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

5861: PO_COMMUNICATION_PVT.g_postal_code :=null;
5862: --bug#3438608
5863:
5864: --bug#3438608 passed the out variables PO_COMMUNICATION_PVT.g_town_or_city
5865: --PO_COMMUNICATION_PVT.g_postal_code,PO_COMMUNICATION_PVT.g_state_or_province
5866: --to the procedure PO_HR_LOCATION.get_alladdress_lines
5867:
5868: -- bug#3580225: changed the procedure name to get_alladdress_lines from get_address--
5869: po_hr_location.get_alladdress_lines(p_location_id,

Line 5870: PO_COMMUNICATION_PVT.g_address_line1,

5866: --to the procedure PO_HR_LOCATION.get_alladdress_lines
5867:
5868: -- bug#3580225: changed the procedure name to get_alladdress_lines from get_address--
5869: po_hr_location.get_alladdress_lines(p_location_id,
5870: PO_COMMUNICATION_PVT.g_address_line1,
5871: PO_COMMUNICATION_PVT.g_address_line2,
5872: PO_COMMUNICATION_PVT.g_address_line3,
5873: PO_COMMUNICATION_PVT.g_Territory_short_name,
5874: PO_COMMUNICATION_PVT.g_address_info,

Line 5871: PO_COMMUNICATION_PVT.g_address_line2,

5867:
5868: -- bug#3580225: changed the procedure name to get_alladdress_lines from get_address--
5869: po_hr_location.get_alladdress_lines(p_location_id,
5870: PO_COMMUNICATION_PVT.g_address_line1,
5871: PO_COMMUNICATION_PVT.g_address_line2,
5872: PO_COMMUNICATION_PVT.g_address_line3,
5873: PO_COMMUNICATION_PVT.g_Territory_short_name,
5874: PO_COMMUNICATION_PVT.g_address_info,
5875: PO_COMMUNICATION_PVT.g_location_name,

Line 5872: PO_COMMUNICATION_PVT.g_address_line3,

5868: -- bug#3580225: changed the procedure name to get_alladdress_lines from get_address--
5869: po_hr_location.get_alladdress_lines(p_location_id,
5870: PO_COMMUNICATION_PVT.g_address_line1,
5871: PO_COMMUNICATION_PVT.g_address_line2,
5872: PO_COMMUNICATION_PVT.g_address_line3,
5873: PO_COMMUNICATION_PVT.g_Territory_short_name,
5874: PO_COMMUNICATION_PVT.g_address_info,
5875: PO_COMMUNICATION_PVT.g_location_name,
5876: PO_COMMUNICATION_PVT.g_phone,

Line 5873: PO_COMMUNICATION_PVT.g_Territory_short_name,

5869: po_hr_location.get_alladdress_lines(p_location_id,
5870: PO_COMMUNICATION_PVT.g_address_line1,
5871: PO_COMMUNICATION_PVT.g_address_line2,
5872: PO_COMMUNICATION_PVT.g_address_line3,
5873: PO_COMMUNICATION_PVT.g_Territory_short_name,
5874: PO_COMMUNICATION_PVT.g_address_info,
5875: PO_COMMUNICATION_PVT.g_location_name,
5876: PO_COMMUNICATION_PVT.g_phone,
5877: PO_COMMUNICATION_PVT.g_fax,

Line 5874: PO_COMMUNICATION_PVT.g_address_info,

5870: PO_COMMUNICATION_PVT.g_address_line1,
5871: PO_COMMUNICATION_PVT.g_address_line2,
5872: PO_COMMUNICATION_PVT.g_address_line3,
5873: PO_COMMUNICATION_PVT.g_Territory_short_name,
5874: PO_COMMUNICATION_PVT.g_address_info,
5875: PO_COMMUNICATION_PVT.g_location_name,
5876: PO_COMMUNICATION_PVT.g_phone,
5877: PO_COMMUNICATION_PVT.g_fax,
5878: PO_COMMUNICATION_PVT.g_address_line4,

Line 5875: PO_COMMUNICATION_PVT.g_location_name,

5871: PO_COMMUNICATION_PVT.g_address_line2,
5872: PO_COMMUNICATION_PVT.g_address_line3,
5873: PO_COMMUNICATION_PVT.g_Territory_short_name,
5874: PO_COMMUNICATION_PVT.g_address_info,
5875: PO_COMMUNICATION_PVT.g_location_name,
5876: PO_COMMUNICATION_PVT.g_phone,
5877: PO_COMMUNICATION_PVT.g_fax,
5878: PO_COMMUNICATION_PVT.g_address_line4,
5879: PO_COMMUNICATION_PVT.g_town_or_city,

Line 5876: PO_COMMUNICATION_PVT.g_phone,

5872: PO_COMMUNICATION_PVT.g_address_line3,
5873: PO_COMMUNICATION_PVT.g_Territory_short_name,
5874: PO_COMMUNICATION_PVT.g_address_info,
5875: PO_COMMUNICATION_PVT.g_location_name,
5876: PO_COMMUNICATION_PVT.g_phone,
5877: PO_COMMUNICATION_PVT.g_fax,
5878: PO_COMMUNICATION_PVT.g_address_line4,
5879: PO_COMMUNICATION_PVT.g_town_or_city,
5880: PO_COMMUNICATION_PVT.g_postal_code,

Line 5877: PO_COMMUNICATION_PVT.g_fax,

5873: PO_COMMUNICATION_PVT.g_Territory_short_name,
5874: PO_COMMUNICATION_PVT.g_address_info,
5875: PO_COMMUNICATION_PVT.g_location_name,
5876: PO_COMMUNICATION_PVT.g_phone,
5877: PO_COMMUNICATION_PVT.g_fax,
5878: PO_COMMUNICATION_PVT.g_address_line4,
5879: PO_COMMUNICATION_PVT.g_town_or_city,
5880: PO_COMMUNICATION_PVT.g_postal_code,
5881: PO_COMMUNICATION_PVT.g_state_or_province);

Line 5878: PO_COMMUNICATION_PVT.g_address_line4,

5874: PO_COMMUNICATION_PVT.g_address_info,
5875: PO_COMMUNICATION_PVT.g_location_name,
5876: PO_COMMUNICATION_PVT.g_phone,
5877: PO_COMMUNICATION_PVT.g_fax,
5878: PO_COMMUNICATION_PVT.g_address_line4,
5879: PO_COMMUNICATION_PVT.g_town_or_city,
5880: PO_COMMUNICATION_PVT.g_postal_code,
5881: PO_COMMUNICATION_PVT.g_state_or_province);
5882:

Line 5879: PO_COMMUNICATION_PVT.g_town_or_city,

5875: PO_COMMUNICATION_PVT.g_location_name,
5876: PO_COMMUNICATION_PVT.g_phone,
5877: PO_COMMUNICATION_PVT.g_fax,
5878: PO_COMMUNICATION_PVT.g_address_line4,
5879: PO_COMMUNICATION_PVT.g_town_or_city,
5880: PO_COMMUNICATION_PVT.g_postal_code,
5881: PO_COMMUNICATION_PVT.g_state_or_province);
5882:
5883: end if;

Line 5880: PO_COMMUNICATION_PVT.g_postal_code,

5876: PO_COMMUNICATION_PVT.g_phone,
5877: PO_COMMUNICATION_PVT.g_fax,
5878: PO_COMMUNICATION_PVT.g_address_line4,
5879: PO_COMMUNICATION_PVT.g_town_or_city,
5880: PO_COMMUNICATION_PVT.g_postal_code,
5881: PO_COMMUNICATION_PVT.g_state_or_province);
5882:
5883: end if;
5884: return p_location_id;

Line 5881: PO_COMMUNICATION_PVT.g_state_or_province);

5877: PO_COMMUNICATION_PVT.g_fax,
5878: PO_COMMUNICATION_PVT.g_address_line4,
5879: PO_COMMUNICATION_PVT.g_town_or_city,
5880: PO_COMMUNICATION_PVT.g_postal_code,
5881: PO_COMMUNICATION_PVT.g_state_or_province);
5882:
5883: end if;
5884: return p_location_id;
5885:

Line 5891: return PO_COMMUNICATION_PVT.g_address_line1;

5887:
5888:
5889: function getAddressLine1 return varchar2 is
5890: begin
5891: return PO_COMMUNICATION_PVT.g_address_line1;
5892: end;
5893: function getAddressLine2 return varchar2 is
5894: begin
5895: return PO_COMMUNICATION_PVT.g_address_line2;

Line 5895: return PO_COMMUNICATION_PVT.g_address_line2;

5891: return PO_COMMUNICATION_PVT.g_address_line1;
5892: end;
5893: function getAddressLine2 return varchar2 is
5894: begin
5895: return PO_COMMUNICATION_PVT.g_address_line2;
5896: end;
5897: function getAddressLine3 return varchar2 is
5898: begin
5899: return PO_COMMUNICATION_PVT.g_address_line3;

Line 5899: return PO_COMMUNICATION_PVT.g_address_line3;

5895: return PO_COMMUNICATION_PVT.g_address_line2;
5896: end;
5897: function getAddressLine3 return varchar2 is
5898: begin
5899: return PO_COMMUNICATION_PVT.g_address_line3;
5900: end;
5901:
5902: function getTerritoryShortName return varchar2 is
5903: begin

Line 5904: return PO_COMMUNICATION_PVT.g_Territory_short_name;

5900: end;
5901:
5902: function getTerritoryShortName return varchar2 is
5903: begin
5904: return PO_COMMUNICATION_PVT.g_Territory_short_name;
5905: end;
5906:
5907: function getAddressInfo return varchar2 is
5908: begin

Line 5909: return PO_COMMUNICATION_PVT.g_address_info;

5905: end;
5906:
5907: function getAddressInfo return varchar2 is
5908: begin
5909: return PO_COMMUNICATION_PVT.g_address_info;
5910: end;
5911: --bug#3438608 added three function getTownOrCity
5912: --getPostalCode and getStateOrProvince
5913: --toreturn the values in global variables

Line 5914: --po_communication_pvt.g_town_or_city

5910: end;
5911: --bug#3438608 added three function getTownOrCity
5912: --getPostalCode and getStateOrProvince
5913: --toreturn the values in global variables
5914: --po_communication_pvt.g_town_or_city
5915: --po_communication_pvt.g_postal_code
5916: --and po_communication_pvt.g_state_or_province.
5917: --These functions are called by the PO_HEADERS_CHANGE_PRINT
5918: --report

Line 5915: --po_communication_pvt.g_postal_code

5911: --bug#3438608 added three function getTownOrCity
5912: --getPostalCode and getStateOrProvince
5913: --toreturn the values in global variables
5914: --po_communication_pvt.g_town_or_city
5915: --po_communication_pvt.g_postal_code
5916: --and po_communication_pvt.g_state_or_province.
5917: --These functions are called by the PO_HEADERS_CHANGE_PRINT
5918: --report
5919:

Line 5916: --and po_communication_pvt.g_state_or_province.

5912: --getPostalCode and getStateOrProvince
5913: --toreturn the values in global variables
5914: --po_communication_pvt.g_town_or_city
5915: --po_communication_pvt.g_postal_code
5916: --and po_communication_pvt.g_state_or_province.
5917: --These functions are called by the PO_HEADERS_CHANGE_PRINT
5918: --report
5919:
5920: function getTownOrCity return varchar2 is

Line 5922: return PO_COMMUNICATION_PVT.g_town_or_city;

5918: --report
5919:
5920: function getTownOrCity return varchar2 is
5921: begin
5922: return PO_COMMUNICATION_PVT.g_town_or_city;
5923: end;
5924:
5925: function getPostalCode return varchar2 is
5926: begin

Line 5927: return PO_COMMUNICATION_PVT.g_postal_code;

5923: end;
5924:
5925: function getPostalCode return varchar2 is
5926: begin
5927: return PO_COMMUNICATION_PVT.g_postal_code;
5928: end;
5929:
5930: function getStateOrProvince return varchar2 is
5931: begin

Line 5932: return PO_COMMUNICATION_PVT.g_state_or_province;

5928: end;
5929:
5930: function getStateOrProvince return varchar2 is
5931: begin
5932: return PO_COMMUNICATION_PVT.g_state_or_province;
5933: end;
5934: --bug#3438608
5935:
5936: /*Bug 4504228 START Retrieving the phone and email contact of buyer from

Line 5943: return PO_COMMUNICATION_PVT.g_phone;

5939: and getEmail()*/
5940:
5941: /*function getPhone return varchar2 is
5942: begin
5943: return PO_COMMUNICATION_PVT.g_phone;
5944: end; */
5945:
5946: function getPhone(p_agent_id in number) return varchar2 is
5947: begin

Line 5948: if PO_COMMUNICATION_PVT.g_person_id <> p_agent_id or

5944: end; */
5945:
5946: function getPhone(p_agent_id in number) return varchar2 is
5947: begin
5948: if PO_COMMUNICATION_PVT.g_person_id <> p_agent_id or
5949: PO_COMMUNICATION_PVT.g_person_id is null then
5950:
5951: PO_COMMUNICATION_PVT.g_person_id := p_agent_id;
5952: PO_COMMUNICATION_PVT.g_buyer_phone := null;

Line 5949: PO_COMMUNICATION_PVT.g_person_id is null then

5945:
5946: function getPhone(p_agent_id in number) return varchar2 is
5947: begin
5948: if PO_COMMUNICATION_PVT.g_person_id <> p_agent_id or
5949: PO_COMMUNICATION_PVT.g_person_id is null then
5950:
5951: PO_COMMUNICATION_PVT.g_person_id := p_agent_id;
5952: PO_COMMUNICATION_PVT.g_buyer_phone := null;
5953: PO_COMMUNICATION_PVT.g_buyer_email_address := null;

Line 5951: PO_COMMUNICATION_PVT.g_person_id := p_agent_id;

5947: begin
5948: if PO_COMMUNICATION_PVT.g_person_id <> p_agent_id or
5949: PO_COMMUNICATION_PVT.g_person_id is null then
5950:
5951: PO_COMMUNICATION_PVT.g_person_id := p_agent_id;
5952: PO_COMMUNICATION_PVT.g_buyer_phone := null;
5953: PO_COMMUNICATION_PVT.g_buyer_email_address := null;
5954: PO_COMMUNICATION_PVT.g_buyer_fax := null; --Bug5671523
5955:

Line 5952: PO_COMMUNICATION_PVT.g_buyer_phone := null;

5948: if PO_COMMUNICATION_PVT.g_person_id <> p_agent_id or
5949: PO_COMMUNICATION_PVT.g_person_id is null then
5950:
5951: PO_COMMUNICATION_PVT.g_person_id := p_agent_id;
5952: PO_COMMUNICATION_PVT.g_buyer_phone := null;
5953: PO_COMMUNICATION_PVT.g_buyer_email_address := null;
5954: PO_COMMUNICATION_PVT.g_buyer_fax := null; --Bug5671523
5955:
5956: /* Bug5191404 Buyer phone number was incorrectly taken from office details

Line 5953: PO_COMMUNICATION_PVT.g_buyer_email_address := null;

5949: PO_COMMUNICATION_PVT.g_person_id is null then
5950:
5951: PO_COMMUNICATION_PVT.g_person_id := p_agent_id;
5952: PO_COMMUNICATION_PVT.g_buyer_phone := null;
5953: PO_COMMUNICATION_PVT.g_buyer_email_address := null;
5954: PO_COMMUNICATION_PVT.g_buyer_fax := null; --Bug5671523
5955:
5956: /* Bug5191404 Buyer phone number was incorrectly taken from office details
5957: tab.Now with this fix the buyers phone willbe taken from per_phones work

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

5950:
5951: PO_COMMUNICATION_PVT.g_person_id := p_agent_id;
5952: PO_COMMUNICATION_PVT.g_buyer_phone := null;
5953: PO_COMMUNICATION_PVT.g_buyer_email_address := null;
5954: PO_COMMUNICATION_PVT.g_buyer_fax := null; --Bug5671523
5955:
5956: /* Bug5191404 Buyer phone number was incorrectly taken from office details
5957: tab.Now with this fix the buyers phone willbe taken from per_phones work
5958: phone type.Commenting out the below sql and adding a new sql*/

Line 5966: INTO PO_COMMUNICATION_PVT.g_buyer_email_address,

5962:
5963: SELECT
5964: pap.email_address,
5965: pph.phone_number
5966: INTO PO_COMMUNICATION_PVT.g_buyer_email_address,
5967: PO_COMMUNICATION_PVT.g_buyer_phone
5968: FROM per_phones pph,
5969: per_all_people_f pap
5970: WHERE pph.parent_id(+)=pap.person_id

Line 5967: PO_COMMUNICATION_PVT.g_buyer_phone

5963: SELECT
5964: pap.email_address,
5965: pph.phone_number
5966: INTO PO_COMMUNICATION_PVT.g_buyer_email_address,
5967: PO_COMMUNICATION_PVT.g_buyer_phone
5968: FROM per_phones pph,
5969: per_all_people_f pap
5970: WHERE pph.parent_id(+)=pap.person_id
5971: AND pph.parent_table(+)='PER_ALL_PEOPLE_F'

Line 5982: INTO PO_COMMUNICATION_PVT.g_buyer_fax

5978:
5979: --Bug5671523 start
5980: SELECT
5981: pph.phone_number
5982: INTO PO_COMMUNICATION_PVT.g_buyer_fax
5983: FROM per_phones pph,
5984: per_all_people_f pap
5985: WHERE pph.parent_id(+)=pap.person_id
5986: AND pph.parent_table(+)='PER_ALL_PEOPLE_F'

Line 5996: --Bug4686436 return PO_COMMUNICATION_PVT.g_phone;

5992: --Bug5671523 end
5993:
5994: end if;
5995:
5996: --Bug4686436 return PO_COMMUNICATION_PVT.g_phone;
5997: return PO_COMMUNICATION_PVT.g_buyer_phone;
5998: end;
5999:
6000: function getEmail return varchar2 is

Line 5997: return PO_COMMUNICATION_PVT.g_buyer_phone;

5993:
5994: end if;
5995:
5996: --Bug4686436 return PO_COMMUNICATION_PVT.g_phone;
5997: return PO_COMMUNICATION_PVT.g_buyer_phone;
5998: end;
5999:
6000: function getEmail return varchar2 is
6001: begin

Line 6002: return PO_COMMUNICATION_PVT.g_buyer_email_address;

5998: end;
5999:
6000: function getEmail return varchar2 is
6001: begin
6002: return PO_COMMUNICATION_PVT.g_buyer_email_address;
6003: end;
6004:
6005: /*Bug 4504228 END */
6006:

Line 6009: --Bug5671523 return PO_COMMUNICATION_PVT.g_fax;

6005: /*Bug 4504228 END */
6006:
6007: function getFax return varchar2 is
6008: begin
6009: --Bug5671523 return PO_COMMUNICATION_PVT.g_fax;
6010: return PO_COMMUNICATION_PVT.g_buyer_fax;
6011: end;
6012: function getLocationName return varchar2 is
6013: begin

Line 6010: return PO_COMMUNICATION_PVT.g_buyer_fax;

6006:
6007: function getFax return varchar2 is
6008: begin
6009: --Bug5671523 return PO_COMMUNICATION_PVT.g_fax;
6010: return PO_COMMUNICATION_PVT.g_buyer_fax;
6011: end;
6012: function getLocationName return varchar2 is
6013: begin
6014: return PO_COMMUNICATION_PVT.g_location_name;

Line 6014: return PO_COMMUNICATION_PVT.g_location_name;

6010: return PO_COMMUNICATION_PVT.g_buyer_fax;
6011: end;
6012: function getLocationName return varchar2 is
6013: begin
6014: return PO_COMMUNICATION_PVT.g_location_name;
6015: end;
6016:
6017: /* Bug#3580225: Changed the function to call po_hr_location.get_alladdress_lines PROCEDURE*/
6018: function getOperationInfo(p_org_id in NUMBER) return varchar2 is

Line 6027: if PO_COMMUNICATION_PVT.g_org_id <> p_org_id or

6023: l_address_info varchar2(500) := null;
6024: l_location_id PO_HR_LOCATIONS.LOCATION_ID%type := null;
6025:
6026: begin
6027: if PO_COMMUNICATION_PVT.g_org_id <> p_org_id or
6028: PO_COMMUNICATION_PVT.g_org_id is null then
6029:
6030: PO_COMMUNICATION_PVT.g_org_id := p_org_id;
6031:

Line 6028: PO_COMMUNICATION_PVT.g_org_id is null then

6024: l_location_id PO_HR_LOCATIONS.LOCATION_ID%type := null;
6025:
6026: begin
6027: if PO_COMMUNICATION_PVT.g_org_id <> p_org_id or
6028: PO_COMMUNICATION_PVT.g_org_id is null then
6029:
6030: PO_COMMUNICATION_PVT.g_org_id := p_org_id;
6031:
6032: PO_COMMUNICATION_PVT.g_ou_name := null;

Line 6030: PO_COMMUNICATION_PVT.g_org_id := p_org_id;

6026: begin
6027: if PO_COMMUNICATION_PVT.g_org_id <> p_org_id or
6028: PO_COMMUNICATION_PVT.g_org_id is null then
6029:
6030: PO_COMMUNICATION_PVT.g_org_id := p_org_id;
6031:
6032: PO_COMMUNICATION_PVT.g_ou_name := null;
6033: PO_COMMUNICATION_PVT.g_ou_address_line_1 := null;
6034: PO_COMMUNICATION_PVT.g_ou_address_line_2 := null;

Line 6032: PO_COMMUNICATION_PVT.g_ou_name := null;

6028: PO_COMMUNICATION_PVT.g_org_id is null then
6029:
6030: PO_COMMUNICATION_PVT.g_org_id := p_org_id;
6031:
6032: PO_COMMUNICATION_PVT.g_ou_name := null;
6033: PO_COMMUNICATION_PVT.g_ou_address_line_1 := null;
6034: PO_COMMUNICATION_PVT.g_ou_address_line_2 := null;
6035: PO_COMMUNICATION_PVT.g_ou_address_line_3 := null;
6036: PO_COMMUNICATION_PVT.g_ou_town_or_city := null;

Line 6033: PO_COMMUNICATION_PVT.g_ou_address_line_1 := null;

6029:
6030: PO_COMMUNICATION_PVT.g_org_id := p_org_id;
6031:
6032: PO_COMMUNICATION_PVT.g_ou_name := null;
6033: PO_COMMUNICATION_PVT.g_ou_address_line_1 := null;
6034: PO_COMMUNICATION_PVT.g_ou_address_line_2 := null;
6035: PO_COMMUNICATION_PVT.g_ou_address_line_3 := null;
6036: PO_COMMUNICATION_PVT.g_ou_town_or_city := null;
6037: PO_COMMUNICATION_PVT.g_ou_region2 := null;

Line 6034: PO_COMMUNICATION_PVT.g_ou_address_line_2 := null;

6030: PO_COMMUNICATION_PVT.g_org_id := p_org_id;
6031:
6032: PO_COMMUNICATION_PVT.g_ou_name := null;
6033: PO_COMMUNICATION_PVT.g_ou_address_line_1 := null;
6034: PO_COMMUNICATION_PVT.g_ou_address_line_2 := null;
6035: PO_COMMUNICATION_PVT.g_ou_address_line_3 := null;
6036: PO_COMMUNICATION_PVT.g_ou_town_or_city := null;
6037: PO_COMMUNICATION_PVT.g_ou_region2 := null;
6038: PO_COMMUNICATION_PVT.g_ou_postal_code := null;

Line 6035: PO_COMMUNICATION_PVT.g_ou_address_line_3 := null;

6031:
6032: PO_COMMUNICATION_PVT.g_ou_name := null;
6033: PO_COMMUNICATION_PVT.g_ou_address_line_1 := null;
6034: PO_COMMUNICATION_PVT.g_ou_address_line_2 := null;
6035: PO_COMMUNICATION_PVT.g_ou_address_line_3 := null;
6036: PO_COMMUNICATION_PVT.g_ou_town_or_city := null;
6037: PO_COMMUNICATION_PVT.g_ou_region2 := null;
6038: PO_COMMUNICATION_PVT.g_ou_postal_code := null;
6039: PO_COMMUNICATION_PVT.g_ou_country := null;

Line 6036: PO_COMMUNICATION_PVT.g_ou_town_or_city := null;

6032: PO_COMMUNICATION_PVT.g_ou_name := null;
6033: PO_COMMUNICATION_PVT.g_ou_address_line_1 := null;
6034: PO_COMMUNICATION_PVT.g_ou_address_line_2 := null;
6035: PO_COMMUNICATION_PVT.g_ou_address_line_3 := null;
6036: PO_COMMUNICATION_PVT.g_ou_town_or_city := null;
6037: PO_COMMUNICATION_PVT.g_ou_region2 := null;
6038: PO_COMMUNICATION_PVT.g_ou_postal_code := null;
6039: PO_COMMUNICATION_PVT.g_ou_country := null;
6040:

Line 6037: PO_COMMUNICATION_PVT.g_ou_region2 := null;

6033: PO_COMMUNICATION_PVT.g_ou_address_line_1 := null;
6034: PO_COMMUNICATION_PVT.g_ou_address_line_2 := null;
6035: PO_COMMUNICATION_PVT.g_ou_address_line_3 := null;
6036: PO_COMMUNICATION_PVT.g_ou_town_or_city := null;
6037: PO_COMMUNICATION_PVT.g_ou_region2 := null;
6038: PO_COMMUNICATION_PVT.g_ou_postal_code := null;
6039: PO_COMMUNICATION_PVT.g_ou_country := null;
6040:
6041: /*select name and location id from hr_all_organization_units*/

Line 6038: PO_COMMUNICATION_PVT.g_ou_postal_code := null;

6034: PO_COMMUNICATION_PVT.g_ou_address_line_2 := null;
6035: PO_COMMUNICATION_PVT.g_ou_address_line_3 := null;
6036: PO_COMMUNICATION_PVT.g_ou_town_or_city := null;
6037: PO_COMMUNICATION_PVT.g_ou_region2 := null;
6038: PO_COMMUNICATION_PVT.g_ou_postal_code := null;
6039: PO_COMMUNICATION_PVT.g_ou_country := null;
6040:
6041: /*select name and location id from hr_all_organization_units*/
6042:

Line 6039: PO_COMMUNICATION_PVT.g_ou_country := null;

6035: PO_COMMUNICATION_PVT.g_ou_address_line_3 := null;
6036: PO_COMMUNICATION_PVT.g_ou_town_or_city := null;
6037: PO_COMMUNICATION_PVT.g_ou_region2 := null;
6038: PO_COMMUNICATION_PVT.g_ou_postal_code := null;
6039: PO_COMMUNICATION_PVT.g_ou_country := null;
6040:
6041: /*select name and location id from hr_all_organization_units*/
6042:
6043: SELECT name, location_id into PO_COMMUNICATION_PVT.g_ou_name, l_location_id

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

6039: PO_COMMUNICATION_PVT.g_ou_country := null;
6040:
6041: /*select name and location id from hr_all_organization_units*/
6042:
6043: SELECT name, location_id into PO_COMMUNICATION_PVT.g_ou_name, l_location_id
6044: FROM hr_all_organization_units
6045: WHERE organization_id = p_org_id;
6046:
6047: /* Call get_alladdress_lines procedure to retrieve address details*/

Line 6050: PO_COMMUNICATION_PVT.g_ou_address_line_1,

6046:
6047: /* Call get_alladdress_lines procedure to retrieve address details*/
6048:
6049: po_hr_location.get_alladdress_lines(l_location_id,
6050: PO_COMMUNICATION_PVT.g_ou_address_line_1,
6051: PO_COMMUNICATION_PVT.g_ou_address_line_2,
6052: PO_COMMUNICATION_PVT.g_ou_address_line_3,
6053: PO_COMMUNICATION_PVT.g_ou_country,
6054: l_address_info,

Line 6051: PO_COMMUNICATION_PVT.g_ou_address_line_2,

6047: /* Call get_alladdress_lines procedure to retrieve address details*/
6048:
6049: po_hr_location.get_alladdress_lines(l_location_id,
6050: PO_COMMUNICATION_PVT.g_ou_address_line_1,
6051: PO_COMMUNICATION_PVT.g_ou_address_line_2,
6052: PO_COMMUNICATION_PVT.g_ou_address_line_3,
6053: PO_COMMUNICATION_PVT.g_ou_country,
6054: l_address_info,
6055: l_ou_location_code,

Line 6052: PO_COMMUNICATION_PVT.g_ou_address_line_3,

6048:
6049: po_hr_location.get_alladdress_lines(l_location_id,
6050: PO_COMMUNICATION_PVT.g_ou_address_line_1,
6051: PO_COMMUNICATION_PVT.g_ou_address_line_2,
6052: PO_COMMUNICATION_PVT.g_ou_address_line_3,
6053: PO_COMMUNICATION_PVT.g_ou_country,
6054: l_address_info,
6055: l_ou_location_code,
6056: l_ou_phone,

Line 6053: PO_COMMUNICATION_PVT.g_ou_country,

6049: po_hr_location.get_alladdress_lines(l_location_id,
6050: PO_COMMUNICATION_PVT.g_ou_address_line_1,
6051: PO_COMMUNICATION_PVT.g_ou_address_line_2,
6052: PO_COMMUNICATION_PVT.g_ou_address_line_3,
6053: PO_COMMUNICATION_PVT.g_ou_country,
6054: l_address_info,
6055: l_ou_location_code,
6056: l_ou_phone,
6057: l_ou_fax,

Line 6059: PO_COMMUNICATION_PVT.g_ou_town_or_city,

6055: l_ou_location_code,
6056: l_ou_phone,
6057: l_ou_fax,
6058: l_address_line4,
6059: PO_COMMUNICATION_PVT.g_ou_town_or_city,
6060: PO_COMMUNICATION_PVT.g_ou_postal_code,
6061: PO_COMMUNICATION_PVT.g_ou_region2);
6062:
6063:

Line 6060: PO_COMMUNICATION_PVT.g_ou_postal_code,

6056: l_ou_phone,
6057: l_ou_fax,
6058: l_address_line4,
6059: PO_COMMUNICATION_PVT.g_ou_town_or_city,
6060: PO_COMMUNICATION_PVT.g_ou_postal_code,
6061: PO_COMMUNICATION_PVT.g_ou_region2);
6062:
6063:
6064: end if;

Line 6061: PO_COMMUNICATION_PVT.g_ou_region2);

6057: l_ou_fax,
6058: l_address_line4,
6059: PO_COMMUNICATION_PVT.g_ou_town_or_city,
6060: PO_COMMUNICATION_PVT.g_ou_postal_code,
6061: PO_COMMUNICATION_PVT.g_ou_region2);
6062:
6063:
6064: end if;
6065: return PO_COMMUNICATION_PVT.g_ou_name;

Line 6065: return PO_COMMUNICATION_PVT.g_ou_name;

6061: PO_COMMUNICATION_PVT.g_ou_region2);
6062:
6063:
6064: end if;
6065: return PO_COMMUNICATION_PVT.g_ou_name;
6066: end;
6067:
6068:
6069: function getOUAddressLine1 return varchar2 is

Line 6071: return PO_COMMUNICATION_PVT.g_ou_address_line_1;

6067:
6068:
6069: function getOUAddressLine1 return varchar2 is
6070: begin
6071: return PO_COMMUNICATION_PVT.g_ou_address_line_1;
6072: end;
6073: function getOUAddressLine2 return varchar2 is
6074: begin
6075: return PO_COMMUNICATION_PVT.g_ou_address_line_2;

Line 6075: return PO_COMMUNICATION_PVT.g_ou_address_line_2;

6071: return PO_COMMUNICATION_PVT.g_ou_address_line_1;
6072: end;
6073: function getOUAddressLine2 return varchar2 is
6074: begin
6075: return PO_COMMUNICATION_PVT.g_ou_address_line_2;
6076: end;
6077: function getOUAddressLine3 return varchar2 is
6078: begin
6079: return PO_COMMUNICATION_PVT.g_ou_address_line_3;

Line 6079: return PO_COMMUNICATION_PVT.g_ou_address_line_3;

6075: return PO_COMMUNICATION_PVT.g_ou_address_line_2;
6076: end;
6077: function getOUAddressLine3 return varchar2 is
6078: begin
6079: return PO_COMMUNICATION_PVT.g_ou_address_line_3;
6080: end;
6081: function getOUTownCity return varchar2 is
6082: begin
6083: return PO_COMMUNICATION_PVT.g_ou_town_or_city;

Line 6083: return PO_COMMUNICATION_PVT.g_ou_town_or_city;

6079: return PO_COMMUNICATION_PVT.g_ou_address_line_3;
6080: end;
6081: function getOUTownCity return varchar2 is
6082: begin
6083: return PO_COMMUNICATION_PVT.g_ou_town_or_city;
6084: end;
6085: function getOURegion2 return varchar2 is
6086: begin
6087: return PO_COMMUNICATION_PVT.g_ou_region2;

Line 6087: return PO_COMMUNICATION_PVT.g_ou_region2;

6083: return PO_COMMUNICATION_PVT.g_ou_town_or_city;
6084: end;
6085: function getOURegion2 return varchar2 is
6086: begin
6087: return PO_COMMUNICATION_PVT.g_ou_region2;
6088: end;
6089: function getOUPostalCode return varchar2 is
6090: begin
6091: return PO_COMMUNICATION_PVT.g_ou_postal_code;

Line 6091: return PO_COMMUNICATION_PVT.g_ou_postal_code;

6087: return PO_COMMUNICATION_PVT.g_ou_region2;
6088: end;
6089: function getOUPostalCode return varchar2 is
6090: begin
6091: return PO_COMMUNICATION_PVT.g_ou_postal_code;
6092: end;
6093:
6094: /* Function retuns the Operation Unit country value that
6095: retreived in getOperationInfo function.

Line 6100: return PO_COMMUNICATION_PVT.g_ou_country;

6096: */
6097:
6098: function getOUCountry return varchar2 is
6099: begin
6100: return PO_COMMUNICATION_PVT.g_ou_country;
6101: end;
6102:
6103:
6104:

Line 6112: PO_COMMUNICATION_PVT.g_header_id := NULL;

6108: -- bug5386806
6109: -- If p_header_id is null, set all dependent fields to NULL
6110: IF (p_header_id IS NULL) THEN
6111:
6112: PO_COMMUNICATION_PVT.g_header_id := NULL;
6113: PO_COMMUNICATION_PVT.g_quote_number := NULL;
6114: PO_COMMUNICATION_PVT.g_agreement_number := NULL;
6115: PO_COMMUNICATION_PVT.g_agreement_flag := NULL;
6116:

Line 6113: PO_COMMUNICATION_PVT.g_quote_number := NULL;

6109: -- If p_header_id is null, set all dependent fields to NULL
6110: IF (p_header_id IS NULL) THEN
6111:
6112: PO_COMMUNICATION_PVT.g_header_id := NULL;
6113: PO_COMMUNICATION_PVT.g_quote_number := NULL;
6114: PO_COMMUNICATION_PVT.g_agreement_number := NULL;
6115: PO_COMMUNICATION_PVT.g_agreement_flag := NULL;
6116:
6117: ELSIF PO_COMMUNICATION_PVT.g_header_id <> p_header_id or

Line 6114: PO_COMMUNICATION_PVT.g_agreement_number := NULL;

6110: IF (p_header_id IS NULL) THEN
6111:
6112: PO_COMMUNICATION_PVT.g_header_id := NULL;
6113: PO_COMMUNICATION_PVT.g_quote_number := NULL;
6114: PO_COMMUNICATION_PVT.g_agreement_number := NULL;
6115: PO_COMMUNICATION_PVT.g_agreement_flag := NULL;
6116:
6117: ELSIF PO_COMMUNICATION_PVT.g_header_id <> p_header_id or
6118: PO_COMMUNICATION_PVT.g_header_id is null then

Line 6115: PO_COMMUNICATION_PVT.g_agreement_flag := NULL;

6111:
6112: PO_COMMUNICATION_PVT.g_header_id := NULL;
6113: PO_COMMUNICATION_PVT.g_quote_number := NULL;
6114: PO_COMMUNICATION_PVT.g_agreement_number := NULL;
6115: PO_COMMUNICATION_PVT.g_agreement_flag := NULL;
6116:
6117: ELSIF PO_COMMUNICATION_PVT.g_header_id <> p_header_id or
6118: PO_COMMUNICATION_PVT.g_header_id is null then
6119:

Line 6117: ELSIF PO_COMMUNICATION_PVT.g_header_id <> p_header_id or

6113: PO_COMMUNICATION_PVT.g_quote_number := NULL;
6114: PO_COMMUNICATION_PVT.g_agreement_number := NULL;
6115: PO_COMMUNICATION_PVT.g_agreement_flag := NULL;
6116:
6117: ELSIF PO_COMMUNICATION_PVT.g_header_id <> p_header_id or
6118: PO_COMMUNICATION_PVT.g_header_id is null then
6119:
6120: PO_COMMUNICATION_PVT.g_header_id := p_header_id;
6121:

Line 6118: PO_COMMUNICATION_PVT.g_header_id is null then

6114: PO_COMMUNICATION_PVT.g_agreement_number := NULL;
6115: PO_COMMUNICATION_PVT.g_agreement_flag := NULL;
6116:
6117: ELSIF PO_COMMUNICATION_PVT.g_header_id <> p_header_id or
6118: PO_COMMUNICATION_PVT.g_header_id is null then
6119:
6120: PO_COMMUNICATION_PVT.g_header_id := p_header_id;
6121:
6122: Select ph.QUOTE_VENDOR_QUOTE_NUMBER, ph.SEGMENT1, ph.GLOBAL_AGREEMENT_FLAG into

Line 6120: PO_COMMUNICATION_PVT.g_header_id := p_header_id;

6116:
6117: ELSIF PO_COMMUNICATION_PVT.g_header_id <> p_header_id or
6118: PO_COMMUNICATION_PVT.g_header_id is null then
6119:
6120: PO_COMMUNICATION_PVT.g_header_id := p_header_id;
6121:
6122: Select ph.QUOTE_VENDOR_QUOTE_NUMBER, ph.SEGMENT1, ph.GLOBAL_AGREEMENT_FLAG into
6123: PO_COMMUNICATION_PVT.g_quote_number, PO_COMMUNICATION_PVT.g_agreement_number,
6124: PO_COMMUNICATION_PVT.g_agreement_flag

Line 6123: PO_COMMUNICATION_PVT.g_quote_number, PO_COMMUNICATION_PVT.g_agreement_number,

6119:
6120: PO_COMMUNICATION_PVT.g_header_id := p_header_id;
6121:
6122: Select ph.QUOTE_VENDOR_QUOTE_NUMBER, ph.SEGMENT1, ph.GLOBAL_AGREEMENT_FLAG into
6123: PO_COMMUNICATION_PVT.g_quote_number, PO_COMMUNICATION_PVT.g_agreement_number,
6124: PO_COMMUNICATION_PVT.g_agreement_flag
6125: FROM
6126: po_headers_all ph
6127: WHERE

Line 6124: PO_COMMUNICATION_PVT.g_agreement_flag

6120: PO_COMMUNICATION_PVT.g_header_id := p_header_id;
6121:
6122: Select ph.QUOTE_VENDOR_QUOTE_NUMBER, ph.SEGMENT1, ph.GLOBAL_AGREEMENT_FLAG into
6123: PO_COMMUNICATION_PVT.g_quote_number, PO_COMMUNICATION_PVT.g_agreement_number,
6124: PO_COMMUNICATION_PVT.g_agreement_flag
6125: FROM
6126: po_headers_all ph
6127: WHERE
6128: ph.PO_HEADER_ID = p_header_id;

Line 6133: RETURN PO_COMMUNICATION_PVT.g_agreement_number;

6129:
6130:
6131: end if;
6132:
6133: RETURN PO_COMMUNICATION_PVT.g_agreement_number;
6134:
6135: end;
6136:
6137: function getAgreementLineNumber return VARCHAR2 is

Line 6139: return PO_COMMUNICATION_PVT.g_agreementLine_number;

6135: end;
6136:
6137: function getAgreementLineNumber return VARCHAR2 is
6138: begin
6139: return PO_COMMUNICATION_PVT.g_agreementLine_number;
6140: end;
6141: function getQuoteNumber return VARCHAR2 is
6142: begin
6143: return PO_COMMUNICATION_PVT.g_quote_number;

Line 6143: return PO_COMMUNICATION_PVT.g_quote_number;

6139: return PO_COMMUNICATION_PVT.g_agreementLine_number;
6140: end;
6141: function getQuoteNumber return VARCHAR2 is
6142: begin
6143: return PO_COMMUNICATION_PVT.g_quote_number;
6144: end;
6145:
6146: function getAgreementFlag return VARCHAR2 is
6147: begin

Line 6148: return PO_COMMUNICATION_PVT.g_agreement_flag;

6144: end;
6145:
6146: function getAgreementFlag return VARCHAR2 is
6147: begin
6148: return PO_COMMUNICATION_PVT.g_agreement_flag;
6149: end;
6150:
6151: function getAgreementLineNumber(p_line_id in NUMBER) return NUMBER is
6152: begin

Line 6153: if PO_COMMUNICATION_PVT.g_line_id <> p_line_id or

6149: end;
6150:
6151: function getAgreementLineNumber(p_line_id in NUMBER) return NUMBER is
6152: begin
6153: if PO_COMMUNICATION_PVT.g_line_id <> p_line_id or
6154: PO_COMMUNICATION_PVT.g_line_id is null then
6155:
6156: PO_COMMUNICATION_PVT.g_line_id := p_line_id;
6157:

Line 6154: PO_COMMUNICATION_PVT.g_line_id is null then

6150:
6151: function getAgreementLineNumber(p_line_id in NUMBER) return NUMBER is
6152: begin
6153: if PO_COMMUNICATION_PVT.g_line_id <> p_line_id or
6154: PO_COMMUNICATION_PVT.g_line_id is null then
6155:
6156: PO_COMMUNICATION_PVT.g_line_id := p_line_id;
6157:
6158: Select LINE_NUM into PO_COMMUNICATION_PVT.g_agreementLine_number

Line 6156: PO_COMMUNICATION_PVT.g_line_id := p_line_id;

6152: begin
6153: if PO_COMMUNICATION_PVT.g_line_id <> p_line_id or
6154: PO_COMMUNICATION_PVT.g_line_id is null then
6155:
6156: PO_COMMUNICATION_PVT.g_line_id := p_line_id;
6157:
6158: Select LINE_NUM into PO_COMMUNICATION_PVT.g_agreementLine_number
6159: FROM PO_LINES_ALL
6160: WHERE PO_LINE_ID = p_line_id;

Line 6158: Select LINE_NUM into PO_COMMUNICATION_PVT.g_agreementLine_number

6154: PO_COMMUNICATION_PVT.g_line_id is null then
6155:
6156: PO_COMMUNICATION_PVT.g_line_id := p_line_id;
6157:
6158: Select LINE_NUM into PO_COMMUNICATION_PVT.g_agreementLine_number
6159: FROM PO_LINES_ALL
6160: WHERE PO_LINE_ID = p_line_id;
6161: end if;
6162: return PO_COMMUNICATION_PVT.g_agreementLine_number;

Line 6162: return PO_COMMUNICATION_PVT.g_agreementLine_number;

6158: Select LINE_NUM into PO_COMMUNICATION_PVT.g_agreementLine_number
6159: FROM PO_LINES_ALL
6160: WHERE PO_LINE_ID = p_line_id;
6161: end if;
6162: return PO_COMMUNICATION_PVT.g_agreementLine_number;
6163:
6164: end;
6165:
6166: function getArcBuyerAgentID(p_header_id in NUMBER) return NUMBER is

Line 6168: if PO_COMMUNICATION_PVT.g_header_id1 <> p_header_id or

6164: end;
6165:
6166: function getArcBuyerAgentID(p_header_id in NUMBER) return NUMBER is
6167: begin
6168: if PO_COMMUNICATION_PVT.g_header_id1 <> p_header_id or
6169: PO_COMMUNICATION_PVT.g_header_id1 is null then
6170:
6171: PO_COMMUNICATION_PVT.g_header_id1 := p_header_id;
6172:

Line 6169: PO_COMMUNICATION_PVT.g_header_id1 is null then

6165:
6166: function getArcBuyerAgentID(p_header_id in NUMBER) return NUMBER is
6167: begin
6168: if PO_COMMUNICATION_PVT.g_header_id1 <> p_header_id or
6169: PO_COMMUNICATION_PVT.g_header_id1 is null then
6170:
6171: PO_COMMUNICATION_PVT.g_header_id1 := p_header_id;
6172:
6173: PO_COMMUNICATION_PVT.g_arcBuyer_fname := null;

Line 6171: PO_COMMUNICATION_PVT.g_header_id1 := p_header_id;

6167: begin
6168: if PO_COMMUNICATION_PVT.g_header_id1 <> p_header_id or
6169: PO_COMMUNICATION_PVT.g_header_id1 is null then
6170:
6171: PO_COMMUNICATION_PVT.g_header_id1 := p_header_id;
6172:
6173: PO_COMMUNICATION_PVT.g_arcBuyer_fname := null;
6174: PO_COMMUNICATION_PVT.g_arcBuyer_lname := null;
6175: PO_COMMUNICATION_PVT.g_arcAgent_id := null;

Line 6173: PO_COMMUNICATION_PVT.g_arcBuyer_fname := null;

6169: PO_COMMUNICATION_PVT.g_header_id1 is null then
6170:
6171: PO_COMMUNICATION_PVT.g_header_id1 := p_header_id;
6172:
6173: PO_COMMUNICATION_PVT.g_arcBuyer_fname := null;
6174: PO_COMMUNICATION_PVT.g_arcBuyer_lname := null;
6175: PO_COMMUNICATION_PVT.g_arcAgent_id := null;
6176:
6177: SELECT HRE.FIRST_NAME,

Line 6174: PO_COMMUNICATION_PVT.g_arcBuyer_lname := null;

6170:
6171: PO_COMMUNICATION_PVT.g_header_id1 := p_header_id;
6172:
6173: PO_COMMUNICATION_PVT.g_arcBuyer_fname := null;
6174: PO_COMMUNICATION_PVT.g_arcBuyer_lname := null;
6175: PO_COMMUNICATION_PVT.g_arcAgent_id := null;
6176:
6177: SELECT HRE.FIRST_NAME,
6178: HRE.LAST_NAME,

Line 6175: PO_COMMUNICATION_PVT.g_arcAgent_id := null;

6171: PO_COMMUNICATION_PVT.g_header_id1 := p_header_id;
6172:
6173: PO_COMMUNICATION_PVT.g_arcBuyer_fname := null;
6174: PO_COMMUNICATION_PVT.g_arcBuyer_lname := null;
6175: PO_COMMUNICATION_PVT.g_arcAgent_id := null;
6176:
6177: SELECT HRE.FIRST_NAME,
6178: HRE.LAST_NAME,
6179: HRE.TITLE,

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

6177: SELECT HRE.FIRST_NAME,
6178: HRE.LAST_NAME,
6179: HRE.TITLE,
6180: PHA.AGENT_ID
6181: INTO PO_COMMUNICATION_PVT.g_arcBuyer_fname, PO_COMMUNICATION_PVT.g_arcBuyer_lname,
6182: PO_COMMUNICATION_PVT.g_arcBuyer_title, PO_COMMUNICATION_PVT.g_arcAgent_id
6183:
6184: FROM
6185: PER_ALL_PEOPLE_F HRE,

Line 6182: PO_COMMUNICATION_PVT.g_arcBuyer_title, PO_COMMUNICATION_PVT.g_arcAgent_id

6178: HRE.LAST_NAME,
6179: HRE.TITLE,
6180: PHA.AGENT_ID
6181: INTO PO_COMMUNICATION_PVT.g_arcBuyer_fname, PO_COMMUNICATION_PVT.g_arcBuyer_lname,
6182: PO_COMMUNICATION_PVT.g_arcBuyer_title, PO_COMMUNICATION_PVT.g_arcAgent_id
6183:
6184: FROM
6185: PER_ALL_PEOPLE_F HRE,
6186: PO_HEADERS_ARCHIVE_ALL PHA

Line 6201: return PO_COMMUNICATION_PVT.g_arcBuyer_fname;

6197: end;
6198:
6199: function getArcBuyerFName return VARCHAR2 is
6200: begin
6201: return PO_COMMUNICATION_PVT.g_arcBuyer_fname;
6202: end;
6203:
6204: function getArcBuyerLName return VARCHAR2 is
6205: begin

Line 6206: return PO_COMMUNICATION_PVT.g_arcBuyer_lname;

6202: end;
6203:
6204: function getArcBuyerLName return VARCHAR2 is
6205: begin
6206: return PO_COMMUNICATION_PVT.g_arcBuyer_lname;
6207: end;
6208:
6209: function getArcBuyerTitle return VARCHAR2 is
6210: begin

Line 6211: return PO_COMMUNICATION_PVT.g_arcBuyer_title;

6207: end;
6208:
6209: function getArcBuyerTitle return VARCHAR2 is
6210: begin
6211: return PO_COMMUNICATION_PVT.g_arcBuyer_title;
6212: end;
6213:
6214:
6215: function getRelArcBuyerAgentID(p_release_id in NUMBER) return NUMBER is

Line 6217: if PO_COMMUNICATION_PVT.g_release_id <> p_release_id or

6213:
6214:
6215: function getRelArcBuyerAgentID(p_release_id in NUMBER) return NUMBER is
6216: begin
6217: if PO_COMMUNICATION_PVT.g_release_id <> p_release_id or
6218: PO_COMMUNICATION_PVT.g_release_id is null then
6219:
6220: PO_COMMUNICATION_PVT.g_release_id := p_release_id;
6221:

Line 6218: PO_COMMUNICATION_PVT.g_release_id is null then

6214:
6215: function getRelArcBuyerAgentID(p_release_id in NUMBER) return NUMBER is
6216: begin
6217: if PO_COMMUNICATION_PVT.g_release_id <> p_release_id or
6218: PO_COMMUNICATION_PVT.g_release_id is null then
6219:
6220: PO_COMMUNICATION_PVT.g_release_id := p_release_id;
6221:
6222: PO_COMMUNICATION_PVT.g_arcBuyer_fname := null;

Line 6220: PO_COMMUNICATION_PVT.g_release_id := p_release_id;

6216: begin
6217: if PO_COMMUNICATION_PVT.g_release_id <> p_release_id or
6218: PO_COMMUNICATION_PVT.g_release_id is null then
6219:
6220: PO_COMMUNICATION_PVT.g_release_id := p_release_id;
6221:
6222: PO_COMMUNICATION_PVT.g_arcBuyer_fname := null;
6223: PO_COMMUNICATION_PVT.g_arcBuyer_lname := null;
6224: PO_COMMUNICATION_PVT.g_arcAgent_id := null;

Line 6222: PO_COMMUNICATION_PVT.g_arcBuyer_fname := null;

6218: PO_COMMUNICATION_PVT.g_release_id is null then
6219:
6220: PO_COMMUNICATION_PVT.g_release_id := p_release_id;
6221:
6222: PO_COMMUNICATION_PVT.g_arcBuyer_fname := null;
6223: PO_COMMUNICATION_PVT.g_arcBuyer_lname := null;
6224: PO_COMMUNICATION_PVT.g_arcAgent_id := null;
6225:
6226: SELECT HRE.FIRST_NAME,

Line 6223: PO_COMMUNICATION_PVT.g_arcBuyer_lname := null;

6219:
6220: PO_COMMUNICATION_PVT.g_release_id := p_release_id;
6221:
6222: PO_COMMUNICATION_PVT.g_arcBuyer_fname := null;
6223: PO_COMMUNICATION_PVT.g_arcBuyer_lname := null;
6224: PO_COMMUNICATION_PVT.g_arcAgent_id := null;
6225:
6226: SELECT HRE.FIRST_NAME,
6227: HRE.LAST_NAME,

Line 6224: PO_COMMUNICATION_PVT.g_arcAgent_id := null;

6220: PO_COMMUNICATION_PVT.g_release_id := p_release_id;
6221:
6222: PO_COMMUNICATION_PVT.g_arcBuyer_fname := null;
6223: PO_COMMUNICATION_PVT.g_arcBuyer_lname := null;
6224: PO_COMMUNICATION_PVT.g_arcAgent_id := null;
6225:
6226: SELECT HRE.FIRST_NAME,
6227: HRE.LAST_NAME,
6228: PHA.AGENT_ID

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

6225:
6226: SELECT HRE.FIRST_NAME,
6227: HRE.LAST_NAME,
6228: PHA.AGENT_ID
6229: INTO PO_COMMUNICATION_PVT.g_arcBuyer_fname, PO_COMMUNICATION_PVT.g_arcBuyer_lname, PO_COMMUNICATION_PVT.g_arcAgent_id
6230:
6231: FROM
6232: PER_ALL_PEOPLE_F HRE,
6233: PO_RELEASES_ARCHIVE_ALL PHA

Line 6255: if PO_COMMUNICATION_PVT.g_vendor_site_id <> p_vendor_site_id or

6251: l_address_line_1 PO_VENDOR_SITES.ADDRESS_LINE1%type := null;
6252:
6253: begin
6254:
6255: if PO_COMMUNICATION_PVT.g_vendor_site_id <> p_vendor_site_id or
6256: PO_COMMUNICATION_PVT.g_vendor_site_id is null then
6257:
6258: PO_COMMUNICATION_PVT.g_vendor_address_line_2 :=null;
6259: PO_COMMUNICATION_PVT.g_vendor_address_line_3 :=null;

Line 6256: PO_COMMUNICATION_PVT.g_vendor_site_id is null then

6252:
6253: begin
6254:
6255: if PO_COMMUNICATION_PVT.g_vendor_site_id <> p_vendor_site_id or
6256: PO_COMMUNICATION_PVT.g_vendor_site_id is null then
6257:
6258: PO_COMMUNICATION_PVT.g_vendor_address_line_2 :=null;
6259: PO_COMMUNICATION_PVT.g_vendor_address_line_3 :=null;
6260: PO_COMMUNICATION_PVT.g_vendor_country :=null;

Line 6258: PO_COMMUNICATION_PVT.g_vendor_address_line_2 :=null;

6254:
6255: if PO_COMMUNICATION_PVT.g_vendor_site_id <> p_vendor_site_id or
6256: PO_COMMUNICATION_PVT.g_vendor_site_id is null then
6257:
6258: PO_COMMUNICATION_PVT.g_vendor_address_line_2 :=null;
6259: PO_COMMUNICATION_PVT.g_vendor_address_line_3 :=null;
6260: PO_COMMUNICATION_PVT.g_vendor_country :=null;
6261: PO_COMMUNICATION_PVT.g_vendor_city_state_zipInfo :=null;
6262: PO_COMMUNICATION_PVT.g_vendor_address_line_4 :=null; --bug: 3463617

Line 6259: PO_COMMUNICATION_PVT.g_vendor_address_line_3 :=null;

6255: if PO_COMMUNICATION_PVT.g_vendor_site_id <> p_vendor_site_id or
6256: PO_COMMUNICATION_PVT.g_vendor_site_id is null then
6257:
6258: PO_COMMUNICATION_PVT.g_vendor_address_line_2 :=null;
6259: PO_COMMUNICATION_PVT.g_vendor_address_line_3 :=null;
6260: PO_COMMUNICATION_PVT.g_vendor_country :=null;
6261: PO_COMMUNICATION_PVT.g_vendor_city_state_zipInfo :=null;
6262: PO_COMMUNICATION_PVT.g_vendor_address_line_4 :=null; --bug: 3463617
6263:

Line 6260: PO_COMMUNICATION_PVT.g_vendor_country :=null;

6256: PO_COMMUNICATION_PVT.g_vendor_site_id is null then
6257:
6258: PO_COMMUNICATION_PVT.g_vendor_address_line_2 :=null;
6259: PO_COMMUNICATION_PVT.g_vendor_address_line_3 :=null;
6260: PO_COMMUNICATION_PVT.g_vendor_country :=null;
6261: PO_COMMUNICATION_PVT.g_vendor_city_state_zipInfo :=null;
6262: PO_COMMUNICATION_PVT.g_vendor_address_line_4 :=null; --bug: 3463617
6263:
6264: --bug: 3463617 : Retreived address_line4 from po_vendor_sites_all.

Line 6261: PO_COMMUNICATION_PVT.g_vendor_city_state_zipInfo :=null;

6257:
6258: PO_COMMUNICATION_PVT.g_vendor_address_line_2 :=null;
6259: PO_COMMUNICATION_PVT.g_vendor_address_line_3 :=null;
6260: PO_COMMUNICATION_PVT.g_vendor_country :=null;
6261: PO_COMMUNICATION_PVT.g_vendor_city_state_zipInfo :=null;
6262: PO_COMMUNICATION_PVT.g_vendor_address_line_4 :=null; --bug: 3463617
6263:
6264: --bug: 3463617 : Retreived address_line4 from po_vendor_sites_all.
6265: SELECT PVS.ADDRESS_LINE1 ,

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

6258: PO_COMMUNICATION_PVT.g_vendor_address_line_2 :=null;
6259: PO_COMMUNICATION_PVT.g_vendor_address_line_3 :=null;
6260: PO_COMMUNICATION_PVT.g_vendor_country :=null;
6261: PO_COMMUNICATION_PVT.g_vendor_city_state_zipInfo :=null;
6262: PO_COMMUNICATION_PVT.g_vendor_address_line_4 :=null; --bug: 3463617
6263:
6264: --bug: 3463617 : Retreived address_line4 from po_vendor_sites_all.
6265: SELECT PVS.ADDRESS_LINE1 ,
6266: PVS.ADDRESS_LINE2 ,

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

6270: PVS.ZIP ,
6271: FTE.TERRITORY_SHORT_NAME,
6272: PVS.ADDRESS_LINE4 --bug: 3463617
6273: INTO
6274: l_address_line_1, PO_COMMUNICATION_PVT.g_vendor_address_line_2, PO_COMMUNICATION_PVT.g_vendor_address_line_3,
6275: l_city, l_state, l_zip, PO_COMMUNICATION_PVT.g_vendor_country, PO_COMMUNICATION_PVT.g_vendor_address_line_4
6276: FROM
6277: PO_VENDOR_SITES_ALL PVS,
6278: FND_TERRITORIES_TL FTE

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

6271: FTE.TERRITORY_SHORT_NAME,
6272: PVS.ADDRESS_LINE4 --bug: 3463617
6273: INTO
6274: l_address_line_1, PO_COMMUNICATION_PVT.g_vendor_address_line_2, PO_COMMUNICATION_PVT.g_vendor_address_line_3,
6275: l_city, l_state, l_zip, PO_COMMUNICATION_PVT.g_vendor_country, PO_COMMUNICATION_PVT.g_vendor_address_line_4
6276: FROM
6277: PO_VENDOR_SITES_ALL PVS,
6278: FND_TERRITORIES_TL FTE
6279: WHERE

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

6282: PVS.VENDOR_SITE_ID = p_vendor_site_id ;
6283:
6284:
6285: If (l_city is null) then
6286: PO_COMMUNICATION_PVT.g_vendor_city_state_zipInfo := l_state||' '|| l_zip;
6287: else
6288: PO_COMMUNICATION_PVT.g_vendor_city_state_zipInfo := l_city||','||l_state||' '|| l_zip;
6289: end if;
6290: end if;

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

6284:
6285: If (l_city is null) then
6286: PO_COMMUNICATION_PVT.g_vendor_city_state_zipInfo := l_state||' '|| l_zip;
6287: else
6288: PO_COMMUNICATION_PVT.g_vendor_city_state_zipInfo := l_city||','||l_state||' '|| l_zip;
6289: end if;
6290: end if;
6291:
6292: return l_address_line_1;

Line 6298: return PO_COMMUNICATION_PVT.g_vendor_address_line_2;

6294: end;
6295:
6296: function getVendorAddressLine2 return VARCHAR2 is
6297: begin
6298: return PO_COMMUNICATION_PVT.g_vendor_address_line_2;
6299: end;
6300: function getVendorAddressLine3 return VARCHAR2 is
6301: begin
6302: return PO_COMMUNICATION_PVT.g_vendor_address_line_3;

Line 6302: return PO_COMMUNICATION_PVT.g_vendor_address_line_3;

6298: return PO_COMMUNICATION_PVT.g_vendor_address_line_2;
6299: end;
6300: function getVendorAddressLine3 return VARCHAR2 is
6301: begin
6302: return PO_COMMUNICATION_PVT.g_vendor_address_line_3;
6303: end;
6304: function getVendorCityStateZipInfo return VARCHAR2 is
6305: begin
6306: return PO_COMMUNICATION_PVT.g_vendor_city_state_zipInfo;

Line 6306: return PO_COMMUNICATION_PVT.g_vendor_city_state_zipInfo;

6302: return PO_COMMUNICATION_PVT.g_vendor_address_line_3;
6303: end;
6304: function getVendorCityStateZipInfo return VARCHAR2 is
6305: begin
6306: return PO_COMMUNICATION_PVT.g_vendor_city_state_zipInfo;
6307: end;
6308: function getVendorCountry return VARCHAR2 is
6309: begin
6310: return PO_COMMUNICATION_PVT.g_vendor_country ;

Line 6310: return PO_COMMUNICATION_PVT.g_vendor_country ;

6306: return PO_COMMUNICATION_PVT.g_vendor_city_state_zipInfo;
6307: end;
6308: function getVendorCountry return VARCHAR2 is
6309: begin
6310: return PO_COMMUNICATION_PVT.g_vendor_country ;
6311: end;
6312:
6313:
6314: function getJob(p_job_id in NUMBER) return VARCHAR2 is

Line 6316: if PO_COMMUNICATION_PVT.g_job_id <> p_job_id or

6312:
6313:
6314: function getJob(p_job_id in NUMBER) return VARCHAR2 is
6315: begin
6316: if PO_COMMUNICATION_PVT.g_job_id <> p_job_id or
6317: PO_COMMUNICATION_PVT.g_job_id is null then
6318:
6319: PO_COMMUNICATION_PVT.g_job_name := null;
6320:

Line 6317: PO_COMMUNICATION_PVT.g_job_id is null then

6313:
6314: function getJob(p_job_id in NUMBER) return VARCHAR2 is
6315: begin
6316: if PO_COMMUNICATION_PVT.g_job_id <> p_job_id or
6317: PO_COMMUNICATION_PVT.g_job_id is null then
6318:
6319: PO_COMMUNICATION_PVT.g_job_name := null;
6320:
6321: SELECT

Line 6319: PO_COMMUNICATION_PVT.g_job_name := null;

6315: begin
6316: if PO_COMMUNICATION_PVT.g_job_id <> p_job_id or
6317: PO_COMMUNICATION_PVT.g_job_id is null then
6318:
6319: PO_COMMUNICATION_PVT.g_job_name := null;
6320:
6321: SELECT
6322: name
6323: INTO

Line 6324: PO_COMMUNICATION_PVT.g_job_name

6320:
6321: SELECT
6322: name
6323: INTO
6324: PO_COMMUNICATION_PVT.g_job_name
6325: FROM
6326: PER_JOBS_VL
6327: WHERE
6328: job_id = p_job_id;

Line 6331: return PO_COMMUNICATION_PVT.g_job_name;

6327: WHERE
6328: job_id = p_job_id;
6329: end if;
6330:
6331: return PO_COMMUNICATION_PVT.g_job_name;
6332: end;
6333:
6334: function getDocumentType return VARCHAR2 is
6335: begin

Line 6336: return PO_COMMUNICATION_PVT.g_documentType;

6332: end;
6333:
6334: function getDocumentType return VARCHAR2 is
6335: begin
6336: return PO_COMMUNICATION_PVT.g_documentType;
6337: end;
6338:
6339: function getFormatMask return VARCHAR2 is
6340: begin

Line 6341: if PO_COMMUNICATION_PVT.g_currency_code <> g_current_currency_code or

6337: end;
6338:
6339: function getFormatMask return VARCHAR2 is
6340: begin
6341: if PO_COMMUNICATION_PVT.g_currency_code <> g_current_currency_code or
6342: PO_COMMUNICATION_PVT.g_currency_code is null then
6343:
6344: PO_COMMUNICATION_PVT.g_currency_code := PO_COMMUNICATION_PVT.g_current_currency_code;
6345: PO_COMMUNICATION_PVT.g_format_mask :=null;

Line 6342: PO_COMMUNICATION_PVT.g_currency_code is null then

6338:
6339: function getFormatMask return VARCHAR2 is
6340: begin
6341: if PO_COMMUNICATION_PVT.g_currency_code <> g_current_currency_code or
6342: PO_COMMUNICATION_PVT.g_currency_code is null then
6343:
6344: PO_COMMUNICATION_PVT.g_currency_code := PO_COMMUNICATION_PVT.g_current_currency_code;
6345: PO_COMMUNICATION_PVT.g_format_mask :=null;
6346:

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

6340: begin
6341: if PO_COMMUNICATION_PVT.g_currency_code <> g_current_currency_code or
6342: PO_COMMUNICATION_PVT.g_currency_code is null then
6343:
6344: PO_COMMUNICATION_PVT.g_currency_code := PO_COMMUNICATION_PVT.g_current_currency_code;
6345: PO_COMMUNICATION_PVT.g_format_mask :=null;
6346:
6347: g_format_mask := FND_CURRENCY.GET_FORMAT_MASK(g_current_currency_code,60);
6348: end if;

Line 6345: PO_COMMUNICATION_PVT.g_format_mask :=null;

6341: if PO_COMMUNICATION_PVT.g_currency_code <> g_current_currency_code or
6342: PO_COMMUNICATION_PVT.g_currency_code is null then
6343:
6344: PO_COMMUNICATION_PVT.g_currency_code := PO_COMMUNICATION_PVT.g_current_currency_code;
6345: PO_COMMUNICATION_PVT.g_format_mask :=null;
6346:
6347: g_format_mask := FND_CURRENCY.GET_FORMAT_MASK(g_current_currency_code,60);
6348: end if;
6349:

Line 6350: return PO_COMMUNICATION_PVT.g_format_mask;

6346:
6347: g_format_mask := FND_CURRENCY.GET_FORMAT_MASK(g_current_currency_code,60);
6348: end if;
6349:
6350: return PO_COMMUNICATION_PVT.g_format_mask;
6351:
6352: end;
6353:
6354: function getLegalEntityName return VARCHAR2 is

Line 6356: return PO_COMMUNICATION_PVT.g_buyer_org;

6352: end;
6353:
6354: function getLegalEntityName return VARCHAR2 is
6355: begin
6356: return PO_COMMUNICATION_PVT.g_buyer_org;
6357: end;
6358:
6359: function IsDocumentSigned(p_header_id in Number) return VARCHAR2 is
6360: l_signed boolean;

Line 6378: AND OBJECT_REVISION_NUM < PO_COMMUNICATION_PVT.g_revision_num);

6374: FROM PO_ACTION_HISTORY
6375: WHERE object_id = p_header_id
6376: AND object_type_code IN ('PO','PA')
6377: AND action_code = 'SIGNED'
6378: AND OBJECT_REVISION_NUM < PO_COMMUNICATION_PVT.g_revision_num);
6379:
6380: IF l_signatures = 'Y' THEN
6381: l_signed := TRUE;
6382: ELSE

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

6593: FUNCTION getZIPFileName(p_org_id in number) RETURN VARCHAR2 IS
6594: l_email_attachment_filename po_system_parameters_all.email_attachment_filename%type;
6595: l_progress varchar2(200);
6596: d_progress NUMBER;
6597: d_module VARCHAR2(70) := 'PO_COMMUNICATION_PVT.getZIPFileName';
6598: BEGIN
6599: d_progress := 0;
6600: IF (PO_LOG.d_proc) THEN
6601: PO_LOG.proc_begin(d_module);

Line 6625: return PO_COMMUNICATION_PVT.g_address_line4;

6621:
6622: --bug:346361
6623: function getAddressLine4 return varchar2 is
6624: begin
6625: return PO_COMMUNICATION_PVT.g_address_line4;
6626: end;
6627:
6628: --bug:346361
6629: function getVendorAddressLine4 return VARCHAR2 is

Line 6631: return PO_COMMUNICATION_PVT.g_vendor_address_line_4;

6627:
6628: --bug:346361
6629: function getVendorAddressLine4 return VARCHAR2 is
6630: begin
6631: return PO_COMMUNICATION_PVT.g_vendor_address_line_4;
6632: end;
6633:
6634:
6635: /* function to retrieve legal entity details for given Inventory Organization */

Line 6657: if PO_COMMUNICATION_PVT.g_legal_entity_org_id <> p_org_id or

6653:
6654:
6655: begin
6656:
6657: if PO_COMMUNICATION_PVT.g_legal_entity_org_id <> p_org_id or
6658: PO_COMMUNICATION_PVT.g_legal_entity_org_id is null then
6659:
6660: PO_COMMUNICATION_PVT.g_legal_entity_org_id := p_org_id;
6661:

Line 6658: PO_COMMUNICATION_PVT.g_legal_entity_org_id is null then

6654:
6655: begin
6656:
6657: if PO_COMMUNICATION_PVT.g_legal_entity_org_id <> p_org_id or
6658: PO_COMMUNICATION_PVT.g_legal_entity_org_id is null then
6659:
6660: PO_COMMUNICATION_PVT.g_legal_entity_org_id := p_org_id;
6661:
6662: PO_COMMUNICATION_PVT.g_legal_entity_name := null;

Line 6660: PO_COMMUNICATION_PVT.g_legal_entity_org_id := p_org_id;

6656:
6657: if PO_COMMUNICATION_PVT.g_legal_entity_org_id <> p_org_id or
6658: PO_COMMUNICATION_PVT.g_legal_entity_org_id is null then
6659:
6660: PO_COMMUNICATION_PVT.g_legal_entity_org_id := p_org_id;
6661:
6662: PO_COMMUNICATION_PVT.g_legal_entity_name := null;
6663: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1 := null;
6664: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;

Line 6662: PO_COMMUNICATION_PVT.g_legal_entity_name := null;

6658: PO_COMMUNICATION_PVT.g_legal_entity_org_id is null then
6659:
6660: PO_COMMUNICATION_PVT.g_legal_entity_org_id := p_org_id;
6661:
6662: PO_COMMUNICATION_PVT.g_legal_entity_name := null;
6663: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1 := null;
6664: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;
6665: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;
6666: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;

Line 6663: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1 := null;

6659:
6660: PO_COMMUNICATION_PVT.g_legal_entity_org_id := p_org_id;
6661:
6662: PO_COMMUNICATION_PVT.g_legal_entity_name := null;
6663: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1 := null;
6664: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;
6665: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;
6666: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;
6667: PO_COMMUNICATION_PVT.g_legal_entity_state := null;

Line 6664: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;

6660: PO_COMMUNICATION_PVT.g_legal_entity_org_id := p_org_id;
6661:
6662: PO_COMMUNICATION_PVT.g_legal_entity_name := null;
6663: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1 := null;
6664: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;
6665: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;
6666: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;
6667: PO_COMMUNICATION_PVT.g_legal_entity_state := null;
6668: PO_COMMUNICATION_PVT.g_legal_entity_postal_code := null;

Line 6665: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;

6661:
6662: PO_COMMUNICATION_PVT.g_legal_entity_name := null;
6663: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1 := null;
6664: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;
6665: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;
6666: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;
6667: PO_COMMUNICATION_PVT.g_legal_entity_state := null;
6668: PO_COMMUNICATION_PVT.g_legal_entity_postal_code := null;
6669:

Line 6666: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;

6662: PO_COMMUNICATION_PVT.g_legal_entity_name := null;
6663: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1 := null;
6664: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;
6665: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;
6666: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;
6667: PO_COMMUNICATION_PVT.g_legal_entity_state := null;
6668: PO_COMMUNICATION_PVT.g_legal_entity_postal_code := null;
6669:
6670: /*Bug5983107 Commenting out the sql below and replacing the API's provided by XLE*/

Line 6667: PO_COMMUNICATION_PVT.g_legal_entity_state := null;

6663: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1 := null;
6664: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;
6665: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;
6666: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;
6667: PO_COMMUNICATION_PVT.g_legal_entity_state := null;
6668: PO_COMMUNICATION_PVT.g_legal_entity_postal_code := null;
6669:
6670: /*Bug5983107 Commenting out the sql below and replacing the API's provided by XLE*/
6671:

Line 6668: PO_COMMUNICATION_PVT.g_legal_entity_postal_code := null;

6664: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;
6665: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;
6666: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;
6667: PO_COMMUNICATION_PVT.g_legal_entity_state := null;
6668: PO_COMMUNICATION_PVT.g_legal_entity_postal_code := null;
6669:
6670: /*Bug5983107 Commenting out the sql below and replacing the API's provided by XLE*/
6671:
6672: /* SELECT name, LOCATION_ID

Line 6673: INTO PO_COMMUNICATION_PVT.g_legal_entity_name, l_location_id

6669:
6670: /*Bug5983107 Commenting out the sql below and replacing the API's provided by XLE*/
6671:
6672: /* SELECT name, LOCATION_ID
6673: INTO PO_COMMUNICATION_PVT.g_legal_entity_name, l_location_id
6674: FROM hr_all_organization_units
6675: WHERE to_char(organization_id) = ( SELECT org_information2 FROM hr_organization_information WHERE org_information_context = 'Accounting Information'
6676: and organization_id = p_org_id ) ; */
6677:

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

6684: null,
6685: l_legal_entity_id,
6686: x_legalentity_info);
6687:
6688: PO_COMMUNICATION_PVT.g_legal_entity_name := x_legalentity_info.name;
6689: l_location_id := x_legalentity_info.location_id;
6690:
6691: /*End bug5983107 */
6692:

Line 6698: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1,

6694: /* call procedure get_address in po_hr_location package to retrieve
6695: address information for given location id*/
6696:
6697: po_hr_location.get_alladdress_lines(l_location_id,
6698: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1,
6699: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2,
6700: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3,
6701: PO_COMMUNICATION_PVT.g_legal_entity_country,
6702: l_address_info,

Line 6699: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2,

6695: address information for given location id*/
6696:
6697: po_hr_location.get_alladdress_lines(l_location_id,
6698: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1,
6699: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2,
6700: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3,
6701: PO_COMMUNICATION_PVT.g_legal_entity_country,
6702: l_address_info,
6703: l_legal_entity_location_code,

Line 6700: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3,

6696:
6697: po_hr_location.get_alladdress_lines(l_location_id,
6698: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1,
6699: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2,
6700: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3,
6701: PO_COMMUNICATION_PVT.g_legal_entity_country,
6702: l_address_info,
6703: l_legal_entity_location_code,
6704: l_legal_entity_phone,

Line 6701: PO_COMMUNICATION_PVT.g_legal_entity_country,

6697: po_hr_location.get_alladdress_lines(l_location_id,
6698: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1,
6699: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2,
6700: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3,
6701: PO_COMMUNICATION_PVT.g_legal_entity_country,
6702: l_address_info,
6703: l_legal_entity_location_code,
6704: l_legal_entity_phone,
6705: l_legal_entity_fax,

Line 6707: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city,

6703: l_legal_entity_location_code,
6704: l_legal_entity_phone,
6705: l_legal_entity_fax,
6706: l_address_line4,
6707: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city,
6708: PO_COMMUNICATION_PVT.g_legal_entity_postal_code,
6709: PO_COMMUNICATION_PVT.g_legal_entity_state);
6710:
6711: end if;

Line 6708: PO_COMMUNICATION_PVT.g_legal_entity_postal_code,

6704: l_legal_entity_phone,
6705: l_legal_entity_fax,
6706: l_address_line4,
6707: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city,
6708: PO_COMMUNICATION_PVT.g_legal_entity_postal_code,
6709: PO_COMMUNICATION_PVT.g_legal_entity_state);
6710:
6711: end if;
6712: return PO_COMMUNICATION_PVT.g_legal_entity_name ;

Line 6709: PO_COMMUNICATION_PVT.g_legal_entity_state);

6705: l_legal_entity_fax,
6706: l_address_line4,
6707: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city,
6708: PO_COMMUNICATION_PVT.g_legal_entity_postal_code,
6709: PO_COMMUNICATION_PVT.g_legal_entity_state);
6710:
6711: end if;
6712: return PO_COMMUNICATION_PVT.g_legal_entity_name ;
6713:

Line 6712: return PO_COMMUNICATION_PVT.g_legal_entity_name ;

6708: PO_COMMUNICATION_PVT.g_legal_entity_postal_code,
6709: PO_COMMUNICATION_PVT.g_legal_entity_state);
6710:
6711: end if;
6712: return PO_COMMUNICATION_PVT.g_legal_entity_name ;
6713:
6714: EXCEPTION
6715: WHEN OTHERS THEN
6716: PO_COMMUNICATION_PVT.g_legal_entity_name := null;

Line 6716: PO_COMMUNICATION_PVT.g_legal_entity_name := null;

6712: return PO_COMMUNICATION_PVT.g_legal_entity_name ;
6713:
6714: EXCEPTION
6715: WHEN OTHERS THEN
6716: PO_COMMUNICATION_PVT.g_legal_entity_name := null;
6717: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1 := null;
6718: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;
6719: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;
6720: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;

Line 6717: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1 := null;

6713:
6714: EXCEPTION
6715: WHEN OTHERS THEN
6716: PO_COMMUNICATION_PVT.g_legal_entity_name := null;
6717: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1 := null;
6718: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;
6719: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;
6720: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;
6721: PO_COMMUNICATION_PVT.g_legal_entity_state := null;

Line 6718: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;

6714: EXCEPTION
6715: WHEN OTHERS THEN
6716: PO_COMMUNICATION_PVT.g_legal_entity_name := null;
6717: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1 := null;
6718: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;
6719: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;
6720: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;
6721: PO_COMMUNICATION_PVT.g_legal_entity_state := null;
6722: PO_COMMUNICATION_PVT.g_legal_entity_postal_code := null;

Line 6719: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;

6715: WHEN OTHERS THEN
6716: PO_COMMUNICATION_PVT.g_legal_entity_name := null;
6717: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1 := null;
6718: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;
6719: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;
6720: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;
6721: PO_COMMUNICATION_PVT.g_legal_entity_state := null;
6722: PO_COMMUNICATION_PVT.g_legal_entity_postal_code := null;
6723: return PO_COMMUNICATION_PVT.g_legal_entity_name ;

Line 6720: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;

6716: PO_COMMUNICATION_PVT.g_legal_entity_name := null;
6717: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1 := null;
6718: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;
6719: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;
6720: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;
6721: PO_COMMUNICATION_PVT.g_legal_entity_state := null;
6722: PO_COMMUNICATION_PVT.g_legal_entity_postal_code := null;
6723: return PO_COMMUNICATION_PVT.g_legal_entity_name ;
6724:

Line 6721: PO_COMMUNICATION_PVT.g_legal_entity_state := null;

6717: PO_COMMUNICATION_PVT.g_legal_entity_address_line_1 := null;
6718: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;
6719: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;
6720: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;
6721: PO_COMMUNICATION_PVT.g_legal_entity_state := null;
6722: PO_COMMUNICATION_PVT.g_legal_entity_postal_code := null;
6723: return PO_COMMUNICATION_PVT.g_legal_entity_name ;
6724:
6725:

Line 6722: PO_COMMUNICATION_PVT.g_legal_entity_postal_code := null;

6718: PO_COMMUNICATION_PVT.g_legal_entity_address_line_2 := null;
6719: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;
6720: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;
6721: PO_COMMUNICATION_PVT.g_legal_entity_state := null;
6722: PO_COMMUNICATION_PVT.g_legal_entity_postal_code := null;
6723: return PO_COMMUNICATION_PVT.g_legal_entity_name ;
6724:
6725:
6726: end getLegalEntityDetails;

Line 6723: return PO_COMMUNICATION_PVT.g_legal_entity_name ;

6719: PO_COMMUNICATION_PVT.g_legal_entity_address_line_3 := null;
6720: PO_COMMUNICATION_PVT.g_legal_entity_town_or_city := null;
6721: PO_COMMUNICATION_PVT.g_legal_entity_state := null;
6722: PO_COMMUNICATION_PVT.g_legal_entity_postal_code := null;
6723: return PO_COMMUNICATION_PVT.g_legal_entity_name ;
6724:
6725:
6726: end getLegalEntityDetails;
6727:

Line 6732: return PO_COMMUNICATION_PVT.g_legal_entity_address_line_1;

6728: /* start of functions to return legal entity address details */
6729:
6730: function getLEAddressLine1 return varchar2 is
6731: begin
6732: return PO_COMMUNICATION_PVT.g_legal_entity_address_line_1;
6733: end;
6734:
6735: function getLEAddressLine2 return varchar2 is
6736: begin

Line 6737: return PO_COMMUNICATION_PVT.g_legal_entity_address_line_2;

6733: end;
6734:
6735: function getLEAddressLine2 return varchar2 is
6736: begin
6737: return PO_COMMUNICATION_PVT.g_legal_entity_address_line_2;
6738: end;
6739:
6740: function getLEAddressLine3 return varchar2 is
6741: begin

Line 6742: return PO_COMMUNICATION_PVT.g_legal_entity_address_line_3;

6738: end;
6739:
6740: function getLEAddressLine3 return varchar2 is
6741: begin
6742: return PO_COMMUNICATION_PVT.g_legal_entity_address_line_3;
6743: end;
6744:
6745: function getLECountry return varchar2 is
6746: begin

Line 6747: return PO_COMMUNICATION_PVT.g_legal_entity_country;

6743: end;
6744:
6745: function getLECountry return varchar2 is
6746: begin
6747: return PO_COMMUNICATION_PVT.g_legal_entity_country;
6748: end;
6749:
6750: function getLETownOrCity return varchar2 is
6751: begin

Line 6752: return PO_COMMUNICATION_PVT.g_legal_entity_town_or_city;

6748: end;
6749:
6750: function getLETownOrCity return varchar2 is
6751: begin
6752: return PO_COMMUNICATION_PVT.g_legal_entity_town_or_city;
6753: end;
6754:
6755: function getLEPostalCode return varchar2 is
6756: begin

Line 6757: return PO_COMMUNICATION_PVT.g_legal_entity_postal_code;

6753: end;
6754:
6755: function getLEPostalCode return varchar2 is
6756: begin
6757: return PO_COMMUNICATION_PVT.g_legal_entity_postal_code;
6758: end;
6759:
6760: function getLEStateOrProvince return varchar2 is
6761: begin

Line 6762: return PO_COMMUNICATION_PVT.g_legal_entity_state;

6758: end;
6759:
6760: function getLEStateOrProvince return varchar2 is
6761: begin
6762: return PO_COMMUNICATION_PVT.g_legal_entity_state;
6763: end;
6764:
6765: -- end of functions to return legal entity address details --
6766:

Line 6773: return PO_COMMUNICATION_PVT.g_dist_shipto_count;

6769: used in XSL to identify what to display in ship to address at header and shipment level
6770: */
6771: function getDistinctShipmentCount return number is
6772: begin
6773: return PO_COMMUNICATION_PVT.g_dist_shipto_count;
6774: end;
6775:
6776: /*
6777: Function to retrieve cancel date for Standard, Blanket and Contract PO's

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

6831: pll.CANCEL_FLAG = 'Y'
6832: AND pll.shipment_type <> 'PREPAYMENT' --
6833: group by pl.amount;
6834:
6835: PO_COMMUNICATION_PVT.g_line_org_amount := l_canceled_amount + l_amount ;
6836:
6837: return l_canceled_amount;
6838:
6839: EXCEPTION

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

6850: plla.CANCEL_FLAG = 'Y'
6851: AND plla.shipment_type <> 'PREPAYMENT' --
6852: group by pl.amount;
6853:
6854: PO_COMMUNICATION_PVT.g_line_org_amount := l_canceled_amount + l_amount ;
6855:
6856: EXCEPTION
6857: WHEN OTHERS THEN
6858: l_canceled_amount :=null;

Line 6860: PO_COMMUNICATION_PVT.g_line_org_amount :=null;

6856: EXCEPTION
6857: WHEN OTHERS THEN
6858: l_canceled_amount :=null;
6859: l_amount := null;
6860: PO_COMMUNICATION_PVT.g_line_org_amount :=null;
6861: return l_canceled_amount;
6862: end;
6863:
6864: end getCanceledAmount;

Line 6869: return PO_COMMUNICATION_PVT.g_line_org_amount;

6865:
6866:
6867: function getLineOriginalAmount return number is
6868: begin
6869: return PO_COMMUNICATION_PVT.g_line_org_amount;
6870: end;
6871:
6872: /*Bug#3583910 return the global variable g_with_terms */
6873: function getWithTerms return varchar2 is

Line 6875: return PO_COMMUNICATION_PVT.g_with_terms;

6871:
6872: /*Bug#3583910 return the global variable g_with_terms */
6873: function getWithTerms return varchar2 is
6874: begin
6875: return PO_COMMUNICATION_PVT.g_with_terms;
6876: end;
6877:
6878:
6879: /*******************************************************************************

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

6896:
6897: BEGIN
6898:
6899: -- Bug 4044904: Get organization name from database
6900: -- as PO_COMMUNICATION_PVT.g_ou_name was never being populated anywhere
6901: -- Moved query up from below
6902:
6903: SELECT NVL(poh.pending_signature_flag, 'N')
6904: , hou.name

Line 6906: , PO_COMMUNICATION_PVT.g_ou_name

6902:
6903: SELECT NVL(poh.pending_signature_flag, 'N')
6904: , hou.name
6905: INTO x_pendingSignatureFlag
6906: , PO_COMMUNICATION_PVT.g_ou_name
6907: FROM po_headers_all poh
6908: , hr_all_organization_units hou
6909: WHERE poh.po_header_id = p_documentID
6910: AND hou.organization_id = poh.org_id;

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

6908: , hr_all_organization_units hou
6909: WHERE poh.po_header_id = p_documentID
6910: AND hou.organization_id = poh.org_id;
6911:
6912: x_organizationName := PO_COMMUNICATION_PVT.g_ou_name; -- operating unit name
6913: x_documentName := PO_COMMUNICATION_PVT.g_documentName; -- document name
6914:
6915: -- Bug 4044904 : Moved query above
6916:

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

6909: WHERE poh.po_header_id = p_documentID
6910: AND hou.organization_id = poh.org_id;
6911:
6912: x_organizationName := PO_COMMUNICATION_PVT.g_ou_name; -- operating unit name
6913: x_documentName := PO_COMMUNICATION_PVT.g_documentName; -- document name
6914:
6915: -- Bug 4044904 : Moved query above
6916:
6917: --retrieve draf from fnd_new_messages.

Line 6933: return PO_COMMUNICATION_PVT.g_documentName;

6929: END;
6930:
6931: function getDocumentName return VARCHAR2 is
6932: BEGIN
6933: return PO_COMMUNICATION_PVT.g_documentName;
6934: END;
6935:
6936: --Start Bug#3771735
6937: --The function returns DocumentTypeCode

Line 6940: return PO_COMMUNICATION_PVT.g_documentTypeCode;

6936: --Start Bug#3771735
6937: --The function returns DocumentTypeCode
6938: function getDocumentTypeCode return VARCHAR2 is
6939: BEGIN
6940: return PO_COMMUNICATION_PVT.g_documentTypeCode;
6941: END;
6942: --End Bug#3771735
6943:
6944: -- Start Bug 4026592

Line 6948: return PO_COMMUNICATION_PVT.g_is_contract_attached_doc;

6944: -- Start Bug 4026592
6945: FUNCTION getIsContractAttachedDoc return VARCHAR2
6946: IS
6947: BEGIN
6948: return PO_COMMUNICATION_PVT.g_is_contract_attached_doc;
6949: END getIsContractAttachedDoc;
6950: -- End Bug 4026592
6951:
6952: --

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

6960: )
6961: IS
6962:
6963: d_progress NUMBER;
6964: d_module VARCHAR2(70) := 'po.plsql.PO_COMMUNICATION_PVT.setIsComplexWorkPO';
6965: l_is_complex BOOLEAN;
6966: l_style_id PO_HEADERS_ALL.style_id%TYPE;
6967:
6968:

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

7058: FROM FINANCIALS_SYSTEM_PARAMETERS;
7059: EXCEPTION
7060: WHEN OTHERS THEN
7061: IF (PO_LOG.d_exc) THEN
7062: PO_LOG.exc('PO_COMMUNICATION_PVT.getInventoryOrgId', 0, SQLCODE || SQLERRM);
7063: END IF;
7064: l_inventory_org_id := null;
7065: END;
7066: return l_inventory_org_id;

Line 7272: end PO_COMMUNICATION_PVT;

7268: return l_one_time_address_clob;
7269: end get_oneTime_address;
7270: /*Bug4568471/6829381 end*/
7271:
7272: end PO_COMMUNICATION_PVT;