[Home] [Help]
155: -- return the correct message in user's language
156:
157: PON_PROFILE_UTIL_PKG.GET_WF_LANGUAGE(p_user_name, x_language_code);
158:
159: PON_AUCTION_PKG.SET_SESSION_LANGUAGE(null, x_language_code);
160:
161: if(l_debug_enabled = 'Y') then
162: x_progress := ++l_progress || l_api_name || ' : after retrieving language code, etc';
163: log_message(x_progress);
250: -- setting failure reason and item line and req line on which
251: -- split failure occurred
252: -- assigning error to x_allocation_error variable to be accessed
253: -- after rollback to savepoint PON_BEFORE_AUTO_ALLOC
254: x_allocation_error := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SPLIT_ERROR') || ' - ' || x_split_failure_reason;
255:
256: if(l_debug_enabled = 'Y') then
257: x_progress := ++l_progress || l_api_name || ' : alloc_error reported is '
258: || x_allocation_error;
291:
292: x_return_code := 'SUCCESS';
293: --Donot release the requisition lines for the remaining unawarded lines in case of Staggered Awarding
294: IF(l_allow_stag_awards <> 'Y' or l_has_unawarded_lines = 'N') THEN
295: PON_AUCTION_PKG.cancel_negotiation_ref(p_auction_header_id, x_return_code);
296: END IF;
297:
298: IF (x_return_code = 'SUCCESS') THEN
299:
310: end if;
311:
312: x_failure_status := 'FAILURE';
313: -- assigning error to x_allocation_error variable to be accessed
314: x_allocation_error := PON_AUCTION_PKG.getMessage('PON_AUC_WF_ALLOC_ERROR');
315:
316: END IF;
317: END IF;
318: END IF;
343: end if;
344:
345: END IF;
346:
347: PON_AUCTION_PKG.UNSET_SESSION_LANGUAGE;
348:
349: if(l_debug_enabled = 'Y') then
350: x_progress := ++l_progress || l_api_name || ' : END' ;
351: log_message(x_progress);
365: x_progress := ++l_progress || l_api_name || ' : set output to failure for auction ' || p_auction_header_id;
366: log_error(x_progress);
367: end if;
368:
369: x_allocation_error := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SYS_ERROR') || ' - ' || substrb(SQLERRM, 1, 500);
370:
371: if(l_exception_enabled = 'Y') then
372: x_progress := ++l_progress || l_api_name || ' : for auction ' || p_auction_header_id || ' error:: ' || x_allocation_error;
373: log_error(x_progress);
524: end if;
525:
526:
527: IF p_item_line_number IS NULL THEN -- -- it means the exception was thrown before line information is selected
528: p_failure_reason := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SYS_ERROR') || ' - ' || SUBSTRB(SQLERRM, 1, 500) || PON_AUCTION_PKG.getMessage('PON_LINE_INFO_NOT_AVAIL');
529: ELSE
530: p_failure_reason := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SYS_ERROR') || ' - ' || SUBSTRB(SQLERRM, 1, 500);
531: END IF;
532:
526:
527: IF p_item_line_number IS NULL THEN -- -- it means the exception was thrown before line information is selected
528: p_failure_reason := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SYS_ERROR') || ' - ' || SUBSTRB(SQLERRM, 1, 500) || PON_AUCTION_PKG.getMessage('PON_LINE_INFO_NOT_AVAIL');
529: ELSE
530: p_failure_reason := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SYS_ERROR') || ' - ' || SUBSTRB(SQLERRM, 1, 500);
531: END IF;
532:
533: if(l_exception_enabled = 'Y') then
534: x_progress := ++l_progress || l_api_name || ' :EXCEPTION :' || p_failure_reason;
677: EXIT;
678: EXCEPTION
679: WHEN lock_not_acquired THEN
680: IF l_index >= 20 THEN
681: p_split_failure_reason := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SPLIT_ERROR') || ' - ' || PON_AUCTION_PKG.getMessage('PON_AUC_CANNOT_GET_LOCK') || PON_AUCTION_PKG.getMessage('PON_LINE_INFO_NOT_AVAIL');
682: p_split_result := 'FAILURE';
683:
684: RETURN;
685: END IF;
696: EXIT WHEN reqRescheduledMultSupplier%NOTFOUND;
697:
698: p_split_result := 'FAILURE';
699: --p_split_failed_req := l_orig_req_line;
700: p_split_failure_reason := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SPLIT_ERROR') || ' - ' || PON_AUCTION_PKG.getMessage('PON_AUC_WF_REQ_RESCHEDULED');
701:
702: -- Fetch the line_number, item_number, item_revision, item_description,
703: -- requisition_number and job_name values for a given line_number.
704: OPEN wf_item_cur (p_auction_header_id, l_orig_req_line);
866:
867: -- if unexpected error, append the text 'Unexpected System Error' to
868: -- error message
869: IF (p_split_result = FND_API.G_RET_STS_UNEXP_ERROR) THEN
870: p_split_failure_reason := PON_AUCTION_PKG.getMessage('PON_UNEXPECTED_ERROR') || ': ' || p_split_failure_reason;
871: END IF;
872:
873: p_split_result := 'FAILURE';
874:
902: end if;
903:
904:
905: IF p_item_line_number IS NULL THEN -- -- it means the exception was thrown before line information is selected
906: p_split_failure_reason := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SYS_ERROR') || ' - ' || SUBSTRB(SQLERRM, 1, 500) || PON_AUCTION_PKG.getMessage('PON_LINE_INFO_NOT_AVAIL');
907: ELSE
908: p_split_failure_reason := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SYS_ERROR') || ' - ' || SUBSTRB(SQLERRM, 1, 500);
909: END IF;
910:
904:
905: IF p_item_line_number IS NULL THEN -- -- it means the exception was thrown before line information is selected
906: p_split_failure_reason := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SYS_ERROR') || ' - ' || SUBSTRB(SQLERRM, 1, 500) || PON_AUCTION_PKG.getMessage('PON_LINE_INFO_NOT_AVAIL');
907: ELSE
908: p_split_failure_reason := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SYS_ERROR') || ' - ' || SUBSTRB(SQLERRM, 1, 500);
909: END IF;
910:
911: if(l_exception_enabled = 'Y') then
912: x_progress := ++l_progress || l_api_name || ' : EXCEPTION with reason :' || p_split_failure_reason;
1184:
1185: EXCEPTION
1186: WHEN OTHERS THEN
1187: p_result := 'FAILURE';
1188: p_error_message := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SYS_ERROR') || ' - ' || SUBSTRB(SQLERRM, 1, 500);
1189: log_message(x_progress);
1190: END Auto_Req_Allocation;
1191:
1192:
1294: x_progress := '20: START_PO_WORKFLOW: Just after CreateProcess';
1295:
1296: log_message(x_itemtype || ' ' || x_progress);
1297:
1298: PON_AUCTION_PKG.SET_SESSION_LANGUAGE(null, x_language_code);
1299:
1300:
1301:
1302: wf_engine.SetItemAttrDate (itemtype => x_itemtype,
1324: --
1325: -- Get the exchange's time zone
1326: --
1327:
1328: x_oex_timezone := pon_auction_pkg.Get_Oex_Time_Zone;
1329:
1330: --
1331: -- Get the user's time zone
1332: --
1329:
1330: --
1331: -- Get the user's time zone
1332: --
1333: x_timezone := pon_auction_pkg.Get_Time_Zone(p_trading_partner_contact_id);
1334:
1335: --
1336: -- Make sure that it is a valid time zone
1337: --
1347: x_newstarttime := PON_OEX_TIMEZONE_PKG.CONVERT_TIME(p_open_bidding_date,x_oex_timezone,x_timezone);
1348: x_newendtime := PON_OEX_TIMEZONE_PKG.CONVERT_TIME(p_close_bidding_date,x_oex_timezone,x_timezone);
1349: x_newpreviewtime := PON_OEX_TIMEZONE_PKG.CONVERT_TIME(p_preview_date,x_oex_timezone,x_timezone);
1350:
1351: x_timezone_disp:= pon_auction_pkg.Get_TimeZone_Description(x_timezone, x_language_code);
1352:
1353: wf_engine.SetItemAttrText (itemtype => x_itemtype,
1354: itemkey => x_itemkey,
1355: aname => 'TP_TIME_ZONE',
1384:
1385: wf_engine.SetItemAttrText (itemtype => x_itemtype,
1386: itemkey => x_itemkey,
1387: aname => 'PREVIEW_DATE_NOTSPECIFIED',
1388: avalue => PON_AUCTION_PKG.getMessage('PON_AUC_PREVIEW_DATE_NOTSPEC',x_msg_suffix));
1389: ELSE
1390: wf_engine.SetItemAttrDate (itemtype => x_itemtype,
1391: itemkey => x_itemkey,
1392: aname => 'PREVIEW_DATE_TZ',
1428:
1429: wf_engine.SetItemAttrText (itemtype => x_itemtype,
1430: itemkey => x_itemkey,
1431: aname => 'AUCTION_TITLE',
1432: avalue => PON_AUCTION_PKG.replaceHtmlChars(p_auction_title));
1433:
1434: wf_engine.SetItemAttrText (itemtype => x_itemtype,
1435: itemkey => x_itemkey,
1436: aname => 'HAS_ITEMS_FLAG',
1525: FROM pon_auction_headers_all auh, pon_auc_doctypes dt
1526: WHERE auh.auction_header_id = p_auction_header_id and
1527: auh.doctype_id = dt.doctype_id;
1528:
1529: x_msg_suffix := PON_AUCTION_PKG.GET_MESSAGE_SUFFIX (x_doctype_group_name);
1530:
1531: IF (x_contract_type = 'STANDARD') THEN
1532: -- x_purchase_order := 'Standard Purchase Order';
1533: -- x_purchase_orders := 'Standard Purchase Orders';
1530:
1531: IF (x_contract_type = 'STANDARD') THEN
1532: -- x_purchase_order := 'Standard Purchase Order';
1533: -- x_purchase_orders := 'Standard Purchase Orders';
1534: x_purchase_order := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_SPOT');
1535: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_SPOS');
1536: wf_engine.SetItemAttrText (itemtype => x_itemtype,
1537: itemkey => x_itemkey,
1538: aname => 'PON_AUC_WF_PO_CREATE_SUBJ',
1531: IF (x_contract_type = 'STANDARD') THEN
1532: -- x_purchase_order := 'Standard Purchase Order';
1533: -- x_purchase_orders := 'Standard Purchase Orders';
1534: x_purchase_order := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_SPOT');
1535: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_SPOS');
1536: wf_engine.SetItemAttrText (itemtype => x_itemtype,
1537: itemkey => x_itemkey,
1538: aname => 'PON_AUC_WF_PO_CREATE_SUBJ',
1539: avalue => PON_AUCTION_PKG.getMessage('PON_AUC_WF_PO_CREATE_SUBJ', x_msg_suffix, 'DOC_NUMBER', x_doc_number_dsp));
1535: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_SPOS');
1536: wf_engine.SetItemAttrText (itemtype => x_itemtype,
1537: itemkey => x_itemkey,
1538: aname => 'PON_AUC_WF_PO_CREATE_SUBJ',
1539: avalue => PON_AUCTION_PKG.getMessage('PON_AUC_WF_PO_CREATE_SUBJ', x_msg_suffix, 'DOC_NUMBER', x_doc_number_dsp));
1540: ELSIF (x_contract_type = 'BLANKET') THEN
1541: -- x_purchase_order := 'Blanket Purchase Agreement';
1542: -- x_purchase_orders := 'Blanket Purchase Agreements';
1543: x_purchase_order := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_LONG');
1539: avalue => PON_AUCTION_PKG.getMessage('PON_AUC_WF_PO_CREATE_SUBJ', x_msg_suffix, 'DOC_NUMBER', x_doc_number_dsp));
1540: ELSIF (x_contract_type = 'BLANKET') THEN
1541: -- x_purchase_order := 'Blanket Purchase Agreement';
1542: -- x_purchase_orders := 'Blanket Purchase Agreements';
1543: x_purchase_order := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_LONG');
1544: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_BLKTS');
1545: wf_engine.SetItemAttrText (itemtype => x_itemtype,
1546: itemkey => x_itemkey,
1547: aname => 'PON_AUC_WF_PO_CREATE_SUBJ',
1540: ELSIF (x_contract_type = 'BLANKET') THEN
1541: -- x_purchase_order := 'Blanket Purchase Agreement';
1542: -- x_purchase_orders := 'Blanket Purchase Agreements';
1543: x_purchase_order := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_LONG');
1544: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_BLKTS');
1545: wf_engine.SetItemAttrText (itemtype => x_itemtype,
1546: itemkey => x_itemkey,
1547: aname => 'PON_AUC_WF_PO_CREATE_SUBJ',
1548: avalue => PON_AUCTION_PKG.getMessage('PON_AUC_WF_BL_CREATE_SUBJ', x_msg_suffix, 'DOC_NUMBER', x_doc_number_dsp));
1544: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_BLKTS');
1545: wf_engine.SetItemAttrText (itemtype => x_itemtype,
1546: itemkey => x_itemkey,
1547: aname => 'PON_AUC_WF_PO_CREATE_SUBJ',
1548: avalue => PON_AUCTION_PKG.getMessage('PON_AUC_WF_BL_CREATE_SUBJ', x_msg_suffix, 'DOC_NUMBER', x_doc_number_dsp));
1549: ELSIF (x_contract_type = 'CONTRACT') THEN
1550: -- x_purchase_order := 'Contract Purchase Agreement';
1551: -- x_purchase_orders := 'Contract Purchase Agreements';
1552: x_purchase_order := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_CNTR');
1548: avalue => PON_AUCTION_PKG.getMessage('PON_AUC_WF_BL_CREATE_SUBJ', x_msg_suffix, 'DOC_NUMBER', x_doc_number_dsp));
1549: ELSIF (x_contract_type = 'CONTRACT') THEN
1550: -- x_purchase_order := 'Contract Purchase Agreement';
1551: -- x_purchase_orders := 'Contract Purchase Agreements';
1552: x_purchase_order := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_CNTR');
1553: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_CNTRS');
1554: wf_engine.SetItemAttrText (itemtype => x_itemtype,
1555: itemkey => x_itemkey,
1556: aname => 'PON_AUC_WF_PO_CREATE_SUBJ',
1549: ELSIF (x_contract_type = 'CONTRACT') THEN
1550: -- x_purchase_order := 'Contract Purchase Agreement';
1551: -- x_purchase_orders := 'Contract Purchase Agreements';
1552: x_purchase_order := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_CNTR');
1553: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_CNTRS');
1554: wf_engine.SetItemAttrText (itemtype => x_itemtype,
1555: itemkey => x_itemkey,
1556: aname => 'PON_AUC_WF_PO_CREATE_SUBJ',
1557: avalue => PON_AUCTION_PKG.getMessage('PON_AUC_WF_CPA_CREATE_SUBJ', x_msg_suffix, 'DOC_NUMBER', x_doc_number_dsp));
1553: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_CNTRS');
1554: wf_engine.SetItemAttrText (itemtype => x_itemtype,
1555: itemkey => x_itemkey,
1556: aname => 'PON_AUC_WF_PO_CREATE_SUBJ',
1557: avalue => PON_AUCTION_PKG.getMessage('PON_AUC_WF_CPA_CREATE_SUBJ', x_msg_suffix, 'DOC_NUMBER', x_doc_number_dsp));
1558:
1559: END IF;
1560:
1561: wf_engine.SetItemAttrText (itemtype => x_itemtype,
1593:
1594: wf_engine.SetItemAttrText (itemtype => x_itemtype,
1595: itemkey => x_itemkey,
1596: aname => 'PON_AUC_WF_ORG',
1597: avalue => PON_AUCTION_PKG.getMessage('PON_AUC_WF_ORG'));
1598:
1599: wf_engine.SetItemAttrText (itemtype => x_itemtype,
1600: itemkey => x_itemkey,
1601: aname => 'PON_AUC_WF_SUCC_MESSAGE',
1598:
1599: wf_engine.SetItemAttrText (itemtype => x_itemtype,
1600: itemkey => x_itemkey,
1601: aname => 'PON_AUC_WF_SUCC_MESSAGE',
1602: avalue => PON_AUCTION_PKG.getMessage('PON_AUC_WF_SUCC_MESSAGE'));
1603:
1604: wf_engine.SetItemAttrText (itemtype => x_itemtype,
1605: itemkey => x_itemkey,
1606: aname => 'PON_AUC_WF_RESTART_WF_MSG',
1603:
1604: wf_engine.SetItemAttrText (itemtype => x_itemtype,
1605: itemkey => x_itemkey,
1606: aname => 'PON_AUC_WF_RESTART_WF_MSG',
1607: avalue => PON_AUCTION_PKG.getMessage('PON_AUC_WF_RESTART_WF_MSG', x_msg_suffix));
1608:
1609: wf_engine.SetItemAttrText (itemtype => x_itemtype,
1610: itemkey => x_itemkey,
1611: aname => 'PON_AUC_WF_RESTART_MSG',
1608:
1609: wf_engine.SetItemAttrText (itemtype => x_itemtype,
1610: itemkey => x_itemkey,
1611: aname => 'PON_AUC_WF_RESTART_MSG',
1612: avalue => PON_AUCTION_PKG.getMessage('PON_AUC_WF_RESTART_MSG', x_msg_suffix));
1613:
1614: wf_engine.SetItemAttrText (itemtype => x_itemtype,
1615: itemkey => x_itemkey,
1616: aname => 'PON_AUC_WF_ALLOC_SUBJ',
1613:
1614: wf_engine.SetItemAttrText (itemtype => x_itemtype,
1615: itemkey => x_itemkey,
1616: aname => 'PON_AUC_WF_ALLOC_SUBJ',
1617: avalue => PON_AUCTION_PKG.getMessage('PON_AUC_WF_ALLOC_SUBJ', x_msg_suffix,
1618: 'PURCHASE_ORDERS', x_purchase_order,
1619: 'DOC_NUMBER', x_doc_number_dsp));
1620:
1621: --check if the negotiation has requistion based line
1652:
1653: wf_engine.SetItemAttrText (itemtype => x_itemtype,
1654: itemkey => x_itemkey,
1655: aname => 'ALLOC_ERROR',
1656: avalue => PON_AUCTION_PKG.getMessage('PON_AUC_WF_SYS_ERROR') || ' - ' || substrb(SQLERRM, 1, 500));
1657:
1658: IF x_line_number IS NULL THEN
1659:
1660: -- it means the exception was thrown before line information is selected
1662:
1663: wf_engine.SetItemAttrText (itemtype => x_itemtype,
1664: itemkey => x_itemkey,
1665: aname => 'LINE_NUMBER',
1666: avalue => PON_AUCTION_PKG.getMessage('PON_LINE_INFO_NOT_AVAIL'));
1667: ELSE
1668: wf_engine.SetItemAttrText (itemtype => x_itemtype,
1669: itemkey => x_itemkey,
1670: aname => 'LINE_NUMBER',
1715: wf_engine.StartProcess(itemtype => x_itemtype,
1716: itemkey => x_itemkey );
1717:
1718:
1719: PON_AUCTION_PKG.UNSET_SESSION_LANGUAGE;
1720:
1721: END START_PO_WORKFLOW;
1722:
1723: /*
4445:
4446:
4447: PON_PROFILE_UTIL_PKG.GET_WF_LANGUAGE(p_user_name, x_language_code);
4448:
4449: PON_AUCTION_PKG.SET_SESSION_LANGUAGE(null, x_language_code);
4450: OPEN awardedBids;
4451: x_progress := '40: GENERATE_POS: Going through the awarded bids';
4452:
4453: log_message(x_progress);
4813: END LOOP;
4814:
4815: CLOSE awardedBids;
4816:
4817: PON_AUCTION_PKG.UNSET_SESSION_LANGUAGE;
4818:
4819: EXCEPTION
4820:
4821: when others then
5187: FROM pon_auction_headers_all
5188: WHERE auction_header_id = x_auction_header_id;
5189:
5190: PON_PROFILE_UTIL_PKG.GET_WF_LANGUAGE(x_user_name, x_language_code);
5191: PON_AUCTION_PKG.SET_SESSION_LANGUAGE(null, x_language_code);
5192: IF (x_contract_type = 'STANDARD') THEN
5193: -- x_purchase_orders := 'Standard Purchase Order';
5194: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_SPOT');
5195: msgNumCreated := PON_AUCTION_PKG.getMessage('PON_AUC_WF_NUM_OF_SUCC_PO');
5190: PON_PROFILE_UTIL_PKG.GET_WF_LANGUAGE(x_user_name, x_language_code);
5191: PON_AUCTION_PKG.SET_SESSION_LANGUAGE(null, x_language_code);
5192: IF (x_contract_type = 'STANDARD') THEN
5193: -- x_purchase_orders := 'Standard Purchase Order';
5194: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_SPOT');
5195: msgNumCreated := PON_AUCTION_PKG.getMessage('PON_AUC_WF_NUM_OF_SUCC_PO');
5196: msgPOdetails := PON_AUCTION_PKG.getMessage('PON_AUC_WF_PO_DETAILS');
5197: ELSIF (x_contract_type = 'BLANKET') THEN
5198: -- x_purchase_orders := 'Blanket Purchase Agreement';
5191: PON_AUCTION_PKG.SET_SESSION_LANGUAGE(null, x_language_code);
5192: IF (x_contract_type = 'STANDARD') THEN
5193: -- x_purchase_orders := 'Standard Purchase Order';
5194: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_SPOT');
5195: msgNumCreated := PON_AUCTION_PKG.getMessage('PON_AUC_WF_NUM_OF_SUCC_PO');
5196: msgPOdetails := PON_AUCTION_PKG.getMessage('PON_AUC_WF_PO_DETAILS');
5197: ELSIF (x_contract_type = 'BLANKET') THEN
5198: -- x_purchase_orders := 'Blanket Purchase Agreement';
5199: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_LONG');
5192: IF (x_contract_type = 'STANDARD') THEN
5193: -- x_purchase_orders := 'Standard Purchase Order';
5194: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_SPOT');
5195: msgNumCreated := PON_AUCTION_PKG.getMessage('PON_AUC_WF_NUM_OF_SUCC_PO');
5196: msgPOdetails := PON_AUCTION_PKG.getMessage('PON_AUC_WF_PO_DETAILS');
5197: ELSIF (x_contract_type = 'BLANKET') THEN
5198: -- x_purchase_orders := 'Blanket Purchase Agreement';
5199: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_LONG');
5200: msgNumCreated := PON_AUCTION_PKG.getMessage('PON_AUC_WF_NUM_OF_SUCC_BL');
5195: msgNumCreated := PON_AUCTION_PKG.getMessage('PON_AUC_WF_NUM_OF_SUCC_PO');
5196: msgPOdetails := PON_AUCTION_PKG.getMessage('PON_AUC_WF_PO_DETAILS');
5197: ELSIF (x_contract_type = 'BLANKET') THEN
5198: -- x_purchase_orders := 'Blanket Purchase Agreement';
5199: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_LONG');
5200: msgNumCreated := PON_AUCTION_PKG.getMessage('PON_AUC_WF_NUM_OF_SUCC_BL');
5201: msgPOdetails := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BL_DETAILS');
5202: ELSIF (x_contract_type = 'CONTRACT') THEN
5203: -- x_purchase_orders := 'Contract Purchase Agreement';
5196: msgPOdetails := PON_AUCTION_PKG.getMessage('PON_AUC_WF_PO_DETAILS');
5197: ELSIF (x_contract_type = 'BLANKET') THEN
5198: -- x_purchase_orders := 'Blanket Purchase Agreement';
5199: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_LONG');
5200: msgNumCreated := PON_AUCTION_PKG.getMessage('PON_AUC_WF_NUM_OF_SUCC_BL');
5201: msgPOdetails := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BL_DETAILS');
5202: ELSIF (x_contract_type = 'CONTRACT') THEN
5203: -- x_purchase_orders := 'Contract Purchase Agreement';
5204: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_CNTR');
5197: ELSIF (x_contract_type = 'BLANKET') THEN
5198: -- x_purchase_orders := 'Blanket Purchase Agreement';
5199: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_LONG');
5200: msgNumCreated := PON_AUCTION_PKG.getMessage('PON_AUC_WF_NUM_OF_SUCC_BL');
5201: msgPOdetails := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BL_DETAILS');
5202: ELSIF (x_contract_type = 'CONTRACT') THEN
5203: -- x_purchase_orders := 'Contract Purchase Agreement';
5204: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_CNTR');
5205: msgNumCreated := PON_AUCTION_PKG.getMessage('PON_AUC_WF_NUM_OF_SUCC_CPA');
5200: msgNumCreated := PON_AUCTION_PKG.getMessage('PON_AUC_WF_NUM_OF_SUCC_BL');
5201: msgPOdetails := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BL_DETAILS');
5202: ELSIF (x_contract_type = 'CONTRACT') THEN
5203: -- x_purchase_orders := 'Contract Purchase Agreement';
5204: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_CNTR');
5205: msgNumCreated := PON_AUCTION_PKG.getMessage('PON_AUC_WF_NUM_OF_SUCC_CPA');
5206: msgPOdetails := PON_AUCTION_PKG.getMessage('PON_AUC_WF_CPA_DETAILS');
5207: END IF;
5208: msgBid := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BID', x_msg_suffix);
5201: msgPOdetails := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BL_DETAILS');
5202: ELSIF (x_contract_type = 'CONTRACT') THEN
5203: -- x_purchase_orders := 'Contract Purchase Agreement';
5204: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_CNTR');
5205: msgNumCreated := PON_AUCTION_PKG.getMessage('PON_AUC_WF_NUM_OF_SUCC_CPA');
5206: msgPOdetails := PON_AUCTION_PKG.getMessage('PON_AUC_WF_CPA_DETAILS');
5207: END IF;
5208: msgBid := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BID', x_msg_suffix);
5209: msgSupplier := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SUPPLIER');
5202: ELSIF (x_contract_type = 'CONTRACT') THEN
5203: -- x_purchase_orders := 'Contract Purchase Agreement';
5204: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_CNTR');
5205: msgNumCreated := PON_AUCTION_PKG.getMessage('PON_AUC_WF_NUM_OF_SUCC_CPA');
5206: msgPOdetails := PON_AUCTION_PKG.getMessage('PON_AUC_WF_CPA_DETAILS');
5207: END IF;
5208: msgBid := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BID', x_msg_suffix);
5209: msgSupplier := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SUPPLIER');
5210: msgSupplierSite := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SUPPLIER_SITE');
5204: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_CNTR');
5205: msgNumCreated := PON_AUCTION_PKG.getMessage('PON_AUC_WF_NUM_OF_SUCC_CPA');
5206: msgPOdetails := PON_AUCTION_PKG.getMessage('PON_AUC_WF_CPA_DETAILS');
5207: END IF;
5208: msgBid := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BID', x_msg_suffix);
5209: msgSupplier := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SUPPLIER');
5210: msgSupplierSite := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SUPPLIER_SITE');
5211: msgBuyer := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BUYER');
5212: msgPO := PON_AUCTION_PKG.getMessage('PON_AUC_WF_PO', 'null', 'PURCHASE_ORDERS', x_purchase_orders);
5205: msgNumCreated := PON_AUCTION_PKG.getMessage('PON_AUC_WF_NUM_OF_SUCC_CPA');
5206: msgPOdetails := PON_AUCTION_PKG.getMessage('PON_AUC_WF_CPA_DETAILS');
5207: END IF;
5208: msgBid := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BID', x_msg_suffix);
5209: msgSupplier := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SUPPLIER');
5210: msgSupplierSite := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SUPPLIER_SITE');
5211: msgBuyer := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BUYER');
5212: msgPO := PON_AUCTION_PKG.getMessage('PON_AUC_WF_PO', 'null', 'PURCHASE_ORDERS', x_purchase_orders);
5213: IF (display_type = 'text/plain') THEN
5206: msgPOdetails := PON_AUCTION_PKG.getMessage('PON_AUC_WF_CPA_DETAILS');
5207: END IF;
5208: msgBid := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BID', x_msg_suffix);
5209: msgSupplier := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SUPPLIER');
5210: msgSupplierSite := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SUPPLIER_SITE');
5211: msgBuyer := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BUYER');
5212: msgPO := PON_AUCTION_PKG.getMessage('PON_AUC_WF_PO', 'null', 'PURCHASE_ORDERS', x_purchase_orders);
5213: IF (display_type = 'text/plain') THEN
5214: document_type := 'text/plain';
5207: END IF;
5208: msgBid := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BID', x_msg_suffix);
5209: msgSupplier := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SUPPLIER');
5210: msgSupplierSite := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SUPPLIER_SITE');
5211: msgBuyer := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BUYER');
5212: msgPO := PON_AUCTION_PKG.getMessage('PON_AUC_WF_PO', 'null', 'PURCHASE_ORDERS', x_purchase_orders);
5213: IF (display_type = 'text/plain') THEN
5214: document_type := 'text/plain';
5215: newline := fnd_global.newline;
5208: msgBid := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BID', x_msg_suffix);
5209: msgSupplier := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SUPPLIER');
5210: msgSupplierSite := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SUPPLIER_SITE');
5211: msgBuyer := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BUYER');
5212: msgPO := PON_AUCTION_PKG.getMessage('PON_AUC_WF_PO', 'null', 'PURCHASE_ORDERS', x_purchase_orders);
5213: IF (display_type = 'text/plain') THEN
5214: document_type := 'text/plain';
5215: newline := fnd_global.newline;
5216: beginBold := '';
5247: document := msgNumCreated || ' ' || beginBold || x_count || endBold || newline || newline|| document;
5248: x_progress := '40: GENERAGE_PO_SUCCESS_EMAIL final e-mail message: ' || document;
5249: log_message('PONCOMPL' || ' ' || itemkey || ' ' ||x_progress);
5250:
5251: PON_AUCTION_PKG.UNSET_SESSION_LANGUAGE;
5252: EXCEPTION
5253:
5254: when others then
5255: wf_core.context('PON_AUCTION_CREATE_PO_PKG','generatePOSuccessEmail', x_progress, SQLERRM);
5357: x_progress := '20: GENERATE_PO_FAILURE_EMAIL auction id: ' || x_auction_header_id || ', ' || 'message suffix: ' || x_msg_suffix || ', ' || 'user name: ' || x_user_name;
5358:
5359: log_message('PONCOMPL' || ' ' || itemkey || ' ' || x_progress);
5360: PON_PROFILE_UTIL_PKG.GET_WF_LANGUAGE(x_user_name, x_language_code);
5361: PON_AUCTION_PKG.SET_SESSION_LANGUAGE(null, x_language_code);
5362:
5363:
5364: IF (x_contract_type = 'STANDARD') THEN
5365: -- x_purchase_orders := 'Standard Purchase Order';
5362:
5363:
5364: IF (x_contract_type = 'STANDARD') THEN
5365: -- x_purchase_orders := 'Standard Purchase Order';
5366: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_SPOT');
5367: msgNumNotCreated := PON_AUCTION_PKG.getMessage('PON_AUC_WF_NUM_OF_FAIL_PO');
5368: ELSIF (x_contract_type = 'BLANKET') THEN
5369: -- x_purchase_orders := 'Blanket Purchase Agreement';
5370: msgNumNotCreated := PON_AUCTION_PKG.getMessage('PON_AUC_WF_NUM_OF_FAIL_BL');
5363:
5364: IF (x_contract_type = 'STANDARD') THEN
5365: -- x_purchase_orders := 'Standard Purchase Order';
5366: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_SPOT');
5367: msgNumNotCreated := PON_AUCTION_PKG.getMessage('PON_AUC_WF_NUM_OF_FAIL_PO');
5368: ELSIF (x_contract_type = 'BLANKET') THEN
5369: -- x_purchase_orders := 'Blanket Purchase Agreement';
5370: msgNumNotCreated := PON_AUCTION_PKG.getMessage('PON_AUC_WF_NUM_OF_FAIL_BL');
5371: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_LONG');
5366: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_SPOT');
5367: msgNumNotCreated := PON_AUCTION_PKG.getMessage('PON_AUC_WF_NUM_OF_FAIL_PO');
5368: ELSIF (x_contract_type = 'BLANKET') THEN
5369: -- x_purchase_orders := 'Blanket Purchase Agreement';
5370: msgNumNotCreated := PON_AUCTION_PKG.getMessage('PON_AUC_WF_NUM_OF_FAIL_BL');
5371: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_LONG');
5372: ELSIF (x_contract_type = 'CONTRACT') THEN
5373: -- x_purchase_orders := 'Contract Purchase Agreement';
5374: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_CNTR');
5367: msgNumNotCreated := PON_AUCTION_PKG.getMessage('PON_AUC_WF_NUM_OF_FAIL_PO');
5368: ELSIF (x_contract_type = 'BLANKET') THEN
5369: -- x_purchase_orders := 'Blanket Purchase Agreement';
5370: msgNumNotCreated := PON_AUCTION_PKG.getMessage('PON_AUC_WF_NUM_OF_FAIL_BL');
5371: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_LONG');
5372: ELSIF (x_contract_type = 'CONTRACT') THEN
5373: -- x_purchase_orders := 'Contract Purchase Agreement';
5374: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_CNTR');
5375: msgNumNotCreated := PON_AUCTION_PKG.getMessage('PON_AUC_WF_NUM_OF_FAIL_CPA');
5370: msgNumNotCreated := PON_AUCTION_PKG.getMessage('PON_AUC_WF_NUM_OF_FAIL_BL');
5371: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_LONG');
5372: ELSIF (x_contract_type = 'CONTRACT') THEN
5373: -- x_purchase_orders := 'Contract Purchase Agreement';
5374: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_CNTR');
5375: msgNumNotCreated := PON_AUCTION_PKG.getMessage('PON_AUC_WF_NUM_OF_FAIL_CPA');
5376: END IF;
5377:
5378: msgBid := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BID', x_msg_suffix);
5371: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_LONG');
5372: ELSIF (x_contract_type = 'CONTRACT') THEN
5373: -- x_purchase_orders := 'Contract Purchase Agreement';
5374: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_CNTR');
5375: msgNumNotCreated := PON_AUCTION_PKG.getMessage('PON_AUC_WF_NUM_OF_FAIL_CPA');
5376: END IF;
5377:
5378: msgBid := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BID', x_msg_suffix);
5379: msgSupplier := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SUPPLIER');
5374: x_purchase_orders := PON_AUCTION_PKG.getMessage('PON_MI_AUCOUTCM_CNTR');
5375: msgNumNotCreated := PON_AUCTION_PKG.getMessage('PON_AUC_WF_NUM_OF_FAIL_CPA');
5376: END IF;
5377:
5378: msgBid := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BID', x_msg_suffix);
5379: msgSupplier := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SUPPLIER');
5380: msgSupplierSite := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SUPPLIER_SITE');
5381: msgBuyer := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BUYER');
5382: msgPurchaseOrder := PON_AUCTION_PKG.getMessage('PON_AUCTS_PAY_PO');
5375: msgNumNotCreated := PON_AUCTION_PKG.getMessage('PON_AUC_WF_NUM_OF_FAIL_CPA');
5376: END IF;
5377:
5378: msgBid := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BID', x_msg_suffix);
5379: msgSupplier := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SUPPLIER');
5380: msgSupplierSite := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SUPPLIER_SITE');
5381: msgBuyer := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BUYER');
5382: msgPurchaseOrder := PON_AUCTION_PKG.getMessage('PON_AUCTS_PAY_PO');
5383: msgDuplicatePONumber := PON_AUCTION_PKG.getMessage('PON_AUC_WF_DUP_PO_NUM');
5376: END IF;
5377:
5378: msgBid := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BID', x_msg_suffix);
5379: msgSupplier := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SUPPLIER');
5380: msgSupplierSite := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SUPPLIER_SITE');
5381: msgBuyer := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BUYER');
5382: msgPurchaseOrder := PON_AUCTION_PKG.getMessage('PON_AUCTS_PAY_PO');
5383: msgDuplicatePONumber := PON_AUCTION_PKG.getMessage('PON_AUC_WF_DUP_PO_NUM');
5384: msgSystemError := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SYS_ERROR');
5377:
5378: msgBid := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BID', x_msg_suffix);
5379: msgSupplier := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SUPPLIER');
5380: msgSupplierSite := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SUPPLIER_SITE');
5381: msgBuyer := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BUYER');
5382: msgPurchaseOrder := PON_AUCTION_PKG.getMessage('PON_AUCTS_PAY_PO');
5383: msgDuplicatePONumber := PON_AUCTION_PKG.getMessage('PON_AUC_WF_DUP_PO_NUM');
5384: msgSystemError := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SYS_ERROR');
5385: msgPO := PON_AUCTION_PKG.getMessage('PON_AUC_WF_PO', 'null', 'PURCHASE_ORDERS', x_purchase_orders);
5378: msgBid := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BID', x_msg_suffix);
5379: msgSupplier := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SUPPLIER');
5380: msgSupplierSite := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SUPPLIER_SITE');
5381: msgBuyer := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BUYER');
5382: msgPurchaseOrder := PON_AUCTION_PKG.getMessage('PON_AUCTS_PAY_PO');
5383: msgDuplicatePONumber := PON_AUCTION_PKG.getMessage('PON_AUC_WF_DUP_PO_NUM');
5384: msgSystemError := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SYS_ERROR');
5385: msgPO := PON_AUCTION_PKG.getMessage('PON_AUC_WF_PO', 'null', 'PURCHASE_ORDERS', x_purchase_orders);
5386:
5379: msgSupplier := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SUPPLIER');
5380: msgSupplierSite := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SUPPLIER_SITE');
5381: msgBuyer := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BUYER');
5382: msgPurchaseOrder := PON_AUCTION_PKG.getMessage('PON_AUCTS_PAY_PO');
5383: msgDuplicatePONumber := PON_AUCTION_PKG.getMessage('PON_AUC_WF_DUP_PO_NUM');
5384: msgSystemError := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SYS_ERROR');
5385: msgPO := PON_AUCTION_PKG.getMessage('PON_AUC_WF_PO', 'null', 'PURCHASE_ORDERS', x_purchase_orders);
5386:
5387: IF (display_type = 'text/plain') THEN
5380: msgSupplierSite := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SUPPLIER_SITE');
5381: msgBuyer := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BUYER');
5382: msgPurchaseOrder := PON_AUCTION_PKG.getMessage('PON_AUCTS_PAY_PO');
5383: msgDuplicatePONumber := PON_AUCTION_PKG.getMessage('PON_AUC_WF_DUP_PO_NUM');
5384: msgSystemError := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SYS_ERROR');
5385: msgPO := PON_AUCTION_PKG.getMessage('PON_AUC_WF_PO', 'null', 'PURCHASE_ORDERS', x_purchase_orders);
5386:
5387: IF (display_type = 'text/plain') THEN
5388: document_type := 'text/plain';
5381: msgBuyer := PON_AUCTION_PKG.getMessage('PON_AUC_WF_BUYER');
5382: msgPurchaseOrder := PON_AUCTION_PKG.getMessage('PON_AUCTS_PAY_PO');
5383: msgDuplicatePONumber := PON_AUCTION_PKG.getMessage('PON_AUC_WF_DUP_PO_NUM');
5384: msgSystemError := PON_AUCTION_PKG.getMessage('PON_AUC_WF_SYS_ERROR');
5385: msgPO := PON_AUCTION_PKG.getMessage('PON_AUC_WF_PO', 'null', 'PURCHASE_ORDERS', x_purchase_orders);
5386:
5387: IF (display_type = 'text/plain') THEN
5388: document_type := 'text/plain';
5389: newline := fnd_global.newline;
5431: document := msgNumNotCreated || ' ' || beginBold || x_count || endBold || newline || newline|| document;
5432: x_progress := '40: GENERATE_PO_FAILURE_EMAIL final e-mail message: ' || document;
5433:
5434: log_message('PONCOMPL' || ' ' || itemkey || ' ' || x_progress);
5435: PON_AUCTION_PKG.UNSET_SESSION_LANGUAGE;
5436:
5437: EXCEPTION
5438:
5439: when others then