1: package body PO_CONTERMS_WF_PVT AS
2: /* $Header: POXVWCTB.pls 120.4 2006/08/25 22:38:26 bao noship $ */
3:
4: --< CONTERMS FPJ Start>
5: -- Get profile option that enables/disables the debug log for workflow
522: itemkey => itemkey,
523: p_api_name => l_api_name,
524: p_return_status => l_return_status);
525: END IF;
526: wf_core.context('PO_CONTERMS_WF_PVT', 'CONTRACT_TERMS_CHANGED', 'l_contracts_call_Exception');
527: RAISE;
528: WHEN OTHERS THEN
529: IF (g_po_wf_debug = 'Y') THEN
530: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,
529: IF (g_po_wf_debug = 'Y') THEN
530: PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,
531: '300: End IN Exception: contract_terms_Changed ');
532: END IF;
533: wf_core.context('PO_CONTERMS_WF_PVT', 'CONTRACT_TERMS_CHANGED', 'Exception');
534: RAISE;
535:
536: END CONTRACT_TERMS_CHANGED;
537:
706: x_msg_data := FND_MSG_PUB.Get(p_msg_index=>1,p_encoded =>'F' );
707: ELSE
708: Fnd_message.set_name('PO','PO_API_ERROR');
709: Fnd_message.set_token( token => 'PROC_CALLER'
710: , VALUE => 'PO_CONTERMS_WF_PVT.UPDATE_CONTERMS_DATES');
711: Fnd_message.set_token( token => 'PROC_CALLED'
712: , VALUE => l_k_api_name);
713: FND_MSG_PUB.Add;
714: x_msg_data := FND_MSG_PUB.Get(p_msg_index=>1,p_encoded =>'F' );
737: IF FND_MSG_PUB.Check_Msg_Level
738: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
739: THEN
740: FND_MSG_PUB.Add_Exc_Msg
741: (p_pkg_name => 'PO_CONTERMS_WF_PVT',
742: p_procedure_name =>'UPDATE_CONTERMS_DATES');
743:
744: END IF; --msg level
745: FND_MSG_PUB.Count_And_Get
1130: x_msg_data := FND_MSG_PUB.Get(p_msg_index=>1,p_encoded =>'F' );
1131: ELSE
1132: Fnd_message.set_name('PO','PO_API_ERROR');
1133: Fnd_message.set_token( token => 'PROC_CALLER'
1134: , VALUE => 'PO_CONTERMS_WF_PVT.UPDATE_CONTRACT_TERMS');
1135: Fnd_message.set_token( token => 'PROC_CALLED'
1136: , VALUE => l_k_api_name);
1137: FND_MSG_PUB.Add;
1138: x_msg_data := FND_MSG_PUB.Get(p_msg_index=>1,p_encoded =>'F' );
1153: IF FND_MSG_PUB.Check_Msg_Level
1154: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1155: THEN
1156: FND_MSG_PUB.Add_Exc_Msg
1157: (p_pkg_name => 'PO_CONTERMS_WF_PVT',
1158: p_procedure_name =>'UPDATE_CONTRACT_TERMS');
1159:
1160: END IF; --msg level
1161: FND_MSG_PUB.Count_And_Get
1323: p_return_status => l_return_status);
1324: END IF;
1325: l_doc_string := PO_REQAPPROVAL_INIT1.get_error_doc(itemType, itemkey);
1326: l_preparer_user_name := PO_REQAPPROVAL_INIT1.get_preparer_user_name(itemType, itemkey);
1327: wf_core.context('PO_CONTERMS_WF_PVT', 'IS_STANDARD_CONTRACT', 'l_contracts_call_Exception');
1328:
1329: PO_REQAPPROVAL_INIT1.send_error_notif(itemType, itemkey, l_preparer_user_name,
1330: l_doc_string, FND_MSG_PUB.Get(p_msg_index=>1,p_encoded =>'F' ),
1331: 'PO_CONTERMS_WF_PVT.IS_STANDARD_CONTRACT');
1327: wf_core.context('PO_CONTERMS_WF_PVT', 'IS_STANDARD_CONTRACT', 'l_contracts_call_Exception');
1328:
1329: PO_REQAPPROVAL_INIT1.send_error_notif(itemType, itemkey, l_preparer_user_name,
1330: l_doc_string, FND_MSG_PUB.Get(p_msg_index=>1,p_encoded =>'F' ),
1331: 'PO_CONTERMS_WF_PVT.IS_STANDARD_CONTRACT');
1332: RAISE;
1333:
1334: WHEN OTHERS THEN
1335: IF (g_po_wf_debug = 'Y') THEN
1337: '300: End IN Exception: IS_STANDARD_CONTRACT ');
1338: END IF;
1339: l_doc_string := PO_REQAPPROVAL_INIT1.get_error_doc(itemType, itemkey);
1340: l_preparer_user_name := PO_REQAPPROVAL_INIT1.get_preparer_user_name(itemType, itemkey);
1341: wf_core.context('PO_CONTERMS_WF_PVT', 'IS_STANDARD_CONTRACT', 'l_contracts_call_Exception');
1342:
1343: PO_REQAPPROVAL_INIT1.send_error_notif(itemType, itemkey, l_preparer_user_name,
1344: l_doc_string, sqlerrm,
1345: 'PO_CONTERMS_WF_PVT.IS_STANDARD_CONTRACT');
1341: wf_core.context('PO_CONTERMS_WF_PVT', 'IS_STANDARD_CONTRACT', 'l_contracts_call_Exception');
1342:
1343: PO_REQAPPROVAL_INIT1.send_error_notif(itemType, itemkey, l_preparer_user_name,
1344: l_doc_string, sqlerrm,
1345: 'PO_CONTERMS_WF_PVT.IS_STANDARD_CONTRACT');
1346: RAISE;
1347:
1348: END IS_STANDARD_CONTRACT;
1349: -------------------------------------------------------------------------------
1472: p_return_status => l_return_status);
1473: END IF;
1474: l_doc_string := PO_REQAPPROVAL_INIT1.get_error_doc(itemType, itemkey);
1475: l_preparer_user_name := PO_REQAPPROVAL_INIT1.get_preparer_user_name(itemType, itemkey);
1476: wf_core.context('PO_CONTERMS_WF_PVT', 'IS_CONTRACT_TEMPLATE_EXPIRED', 'l_contracts_call_Exception');
1477:
1478: PO_REQAPPROVAL_INIT1.send_error_notif(itemType, itemkey, l_preparer_user_name,
1479: l_doc_string, FND_MSG_PUB.Get(p_msg_index=>1,p_encoded =>'F' ),
1480: 'PO_CONTERMS_WF_PVT.IS_CONTRACT_TEMPLATE_EXPIRED');
1476: wf_core.context('PO_CONTERMS_WF_PVT', 'IS_CONTRACT_TEMPLATE_EXPIRED', 'l_contracts_call_Exception');
1477:
1478: PO_REQAPPROVAL_INIT1.send_error_notif(itemType, itemkey, l_preparer_user_name,
1479: l_doc_string, FND_MSG_PUB.Get(p_msg_index=>1,p_encoded =>'F' ),
1480: 'PO_CONTERMS_WF_PVT.IS_CONTRACT_TEMPLATE_EXPIRED');
1481: RAISE;
1482:
1483: WHEN OTHERS THEN
1484: IF (g_po_wf_debug = 'Y') THEN
1486: '300: End IN Exception: IS_CONTRACT_TEMPLATE_EXPIRED ');
1487: END IF;
1488: l_doc_string := PO_REQAPPROVAL_INIT1.get_error_doc(itemType, itemkey);
1489: l_preparer_user_name := PO_REQAPPROVAL_INIT1.get_preparer_user_name(itemType, itemkey);
1490: wf_core.context('PO_CONTERMS_WF_PVT', 'IS_CONTRACT_TEMPLATE_EXPIRED', 'l_contracts_call_Exception');
1491:
1492: PO_REQAPPROVAL_INIT1.send_error_notif(itemType, itemkey, l_preparer_user_name,
1493: l_doc_string, sqlerrm,
1494: 'PO_CONTERMS_WF_PVT.IS_CONTRACT_TEMPLATE_EXPIRED');
1490: wf_core.context('PO_CONTERMS_WF_PVT', 'IS_CONTRACT_TEMPLATE_EXPIRED', 'l_contracts_call_Exception');
1491:
1492: PO_REQAPPROVAL_INIT1.send_error_notif(itemType, itemkey, l_preparer_user_name,
1493: l_doc_string, sqlerrm,
1494: 'PO_CONTERMS_WF_PVT.IS_CONTRACT_TEMPLATE_EXPIRED');
1495: RAISE;
1496:
1497: END IS_CONTRACT_TEMPLATE_EXPIRED;
1498:
1623: p_return_status => l_return_status);
1624: END IF;
1625: l_doc_string := PO_REQAPPROVAL_INIT1.get_error_doc(itemType, itemkey);
1626: l_preparer_user_name := PO_REQAPPROVAL_INIT1.get_preparer_user_name(itemType, itemkey);
1627: wf_core.context('PO_CONTERMS_WF_PVT', 'IS_CONTRACT_ARTICLES_EXIST', 'l_contracts_call_Exception');
1628:
1629: PO_REQAPPROVAL_INIT1.send_error_notif(itemType, itemkey, l_preparer_user_name,
1630: l_doc_string, FND_MSG_PUB.Get(p_msg_index=>1,p_encoded =>'F' ),
1631: 'PO_CONTERMS_WF_PVT.IS_CONTRACT_ARTICLES_EXIST');
1627: wf_core.context('PO_CONTERMS_WF_PVT', 'IS_CONTRACT_ARTICLES_EXIST', 'l_contracts_call_Exception');
1628:
1629: PO_REQAPPROVAL_INIT1.send_error_notif(itemType, itemkey, l_preparer_user_name,
1630: l_doc_string, FND_MSG_PUB.Get(p_msg_index=>1,p_encoded =>'F' ),
1631: 'PO_CONTERMS_WF_PVT.IS_CONTRACT_ARTICLES_EXIST');
1632: RAISE;
1633:
1634: WHEN OTHERS THEN
1635: IF (g_po_wf_debug = 'Y') THEN
1637: '300: End IN Exception: IS_CONTRACT_ARTICLES_EXIST ');
1638: END IF;
1639: l_doc_string := PO_REQAPPROVAL_INIT1.get_error_doc(itemType, itemkey);
1640: l_preparer_user_name := PO_REQAPPROVAL_INIT1.get_preparer_user_name(itemType, itemkey);
1641: wf_core.context('PO_CONTERMS_WF_PVT', 'IS_CONTRACT_ARTICLES_EXIST', 'l_contracts_call_Exception');
1642:
1643: PO_REQAPPROVAL_INIT1.send_error_notif(itemType, itemkey, l_preparer_user_name,
1644: l_doc_string, sqlerrm,
1645: 'PO_CONTERMS_WF_PVT.IS_CONTRACT_ARTICLES_EXIST');
1641: wf_core.context('PO_CONTERMS_WF_PVT', 'IS_CONTRACT_ARTICLES_EXIST', 'l_contracts_call_Exception');
1642:
1643: PO_REQAPPROVAL_INIT1.send_error_notif(itemType, itemkey, l_preparer_user_name,
1644: l_doc_string, sqlerrm,
1645: 'PO_CONTERMS_WF_PVT.IS_CONTRACT_ARTICLES_EXIST');
1646: RAISE;
1647:
1648:
1649: END IS_CONTRACT_ARTICLES_EXIST;
1775: p_return_status => l_return_status);
1776: END IF;
1777: l_doc_string := PO_REQAPPROVAL_INIT1.get_error_doc(itemType, itemkey);
1778: l_preparer_user_name := PO_REQAPPROVAL_INIT1.get_preparer_user_name(itemType, itemkey);
1779: wf_core.context('PO_CONTERMS_WF_PVT', 'IS_CONTRACT_ARTICLES_AMENDED', 'l_contracts_call_Exception');
1780:
1781: PO_REQAPPROVAL_INIT1.send_error_notif(itemType, itemkey, l_preparer_user_name,
1782: l_doc_string, FND_MSG_PUB.Get(p_msg_index=>1,p_encoded =>'F' ),
1783: 'PO_CONTERMS_WF_PVT.IS_CONTRACT_ARTICLES_AMENDED');
1779: wf_core.context('PO_CONTERMS_WF_PVT', 'IS_CONTRACT_ARTICLES_AMENDED', 'l_contracts_call_Exception');
1780:
1781: PO_REQAPPROVAL_INIT1.send_error_notif(itemType, itemkey, l_preparer_user_name,
1782: l_doc_string, FND_MSG_PUB.Get(p_msg_index=>1,p_encoded =>'F' ),
1783: 'PO_CONTERMS_WF_PVT.IS_CONTRACT_ARTICLES_AMENDED');
1784: RAISE;
1785:
1786: WHEN OTHERS THEN
1787: IF (g_po_wf_debug = 'Y') THEN
1789: '300: End IN Exception: IS_CONTRACT_ARTICLES_AMENDED ');
1790: END IF;
1791: l_doc_string := PO_REQAPPROVAL_INIT1.get_error_doc(itemType, itemkey);
1792: l_preparer_user_name := PO_REQAPPROVAL_INIT1.get_preparer_user_name(itemType, itemkey);
1793: wf_core.context('PO_CONTERMS_WF_PVT', 'IS_CONTRACT_ARTICLES_AMENDED', 'l_contracts_call_Exception');
1794:
1795: PO_REQAPPROVAL_INIT1.send_error_notif(itemType, itemkey, l_preparer_user_name,
1796: l_doc_string, sqlerrm,
1797: 'PO_CONTERMS_WF_PVT.IS_CONTRACT_ARTICLES_AMENDED');
1793: wf_core.context('PO_CONTERMS_WF_PVT', 'IS_CONTRACT_ARTICLES_AMENDED', 'l_contracts_call_Exception');
1794:
1795: PO_REQAPPROVAL_INIT1.send_error_notif(itemType, itemkey, l_preparer_user_name,
1796: l_doc_string, sqlerrm,
1797: 'PO_CONTERMS_WF_PVT.IS_CONTRACT_ARTICLES_AMENDED');
1798: RAISE;
1799:
1800:
1801: END IS_CONTRACT_ARTICLES_AMENDED;
1932: p_return_status => l_return_status);
1933: END IF;
1934: l_doc_string := PO_REQAPPROVAL_INIT1.get_error_doc(itemType, itemkey);
1935: l_preparer_user_name := PO_REQAPPROVAL_INIT1.get_preparer_user_name(itemType, itemkey);
1936: wf_core.context('PO_CONTERMS_WF_PVT', 'IS_CONTRACT_DELIVRABLS_EXIST', 'l_contracts_call_Exception');
1937:
1938: PO_REQAPPROVAL_INIT1.send_error_notif(itemType, itemkey, l_preparer_user_name,
1939: l_doc_string, FND_MSG_PUB.Get(p_msg_index=>1,p_encoded =>'F' ),
1940: 'PO_CONTERMS_WF_PVT.IS_CONTRACT_DELIVRABLS_EXIST');
1936: wf_core.context('PO_CONTERMS_WF_PVT', 'IS_CONTRACT_DELIVRABLS_EXIST', 'l_contracts_call_Exception');
1937:
1938: PO_REQAPPROVAL_INIT1.send_error_notif(itemType, itemkey, l_preparer_user_name,
1939: l_doc_string, FND_MSG_PUB.Get(p_msg_index=>1,p_encoded =>'F' ),
1940: 'PO_CONTERMS_WF_PVT.IS_CONTRACT_DELIVRABLS_EXIST');
1941: RAISE;
1942:
1943: WHEN OTHERS THEN
1944: IF (g_po_wf_debug = 'Y') THEN
1946: '300: End IN Exception: IS_CONTRACT_DELIVRABLS_EXIST ');
1947: END IF;
1948: l_doc_string := PO_REQAPPROVAL_INIT1.get_error_doc(itemType, itemkey);
1949: l_preparer_user_name := PO_REQAPPROVAL_INIT1.get_preparer_user_name(itemType, itemkey);
1950: wf_core.context('PO_CONTERMS_WF_PVT', 'IS_CONTRACT_DELIVRABLS_EXIST', 'l_contracts_call_Exception');
1951:
1952: PO_REQAPPROVAL_INIT1.send_error_notif(itemType, itemkey, l_preparer_user_name,
1953: l_doc_string, sqlerrm,
1954: 'PO_CONTERMS_WF_PVT.IS_CONTRACT_DELIVRABLS_EXIST');
1950: wf_core.context('PO_CONTERMS_WF_PVT', 'IS_CONTRACT_DELIVRABLS_EXIST', 'l_contracts_call_Exception');
1951:
1952: PO_REQAPPROVAL_INIT1.send_error_notif(itemType, itemkey, l_preparer_user_name,
1953: l_doc_string, sqlerrm,
1954: 'PO_CONTERMS_WF_PVT.IS_CONTRACT_DELIVRABLS_EXIST');
1955: RAISE;
1956:
1957:
1958: END IS_CONTRACT_DELIVRABLS_EXIST;
2088: p_return_status => l_return_status);
2089: END IF;
2090: l_doc_string := PO_REQAPPROVAL_INIT1.get_error_doc(itemType, itemkey);
2091: l_preparer_user_name := PO_REQAPPROVAL_INIT1.get_preparer_user_name(itemType, itemkey);
2092: wf_core.context('PO_CONTERMS_WF_PVT', 'IS_CONTRACT_DELIVRABLS_AMENDED', 'l_contracts_call_Exception');
2093:
2094: PO_REQAPPROVAL_INIT1.send_error_notif(itemType, itemkey, l_preparer_user_name,
2095: l_doc_string, FND_MSG_PUB.Get(p_msg_index=>1,p_encoded =>'F' ),
2096: 'PO_CONTERMS_WF_PVT.IS_CONTRACT_DELIVRABLS_AMENDED');
2092: wf_core.context('PO_CONTERMS_WF_PVT', 'IS_CONTRACT_DELIVRABLS_AMENDED', 'l_contracts_call_Exception');
2093:
2094: PO_REQAPPROVAL_INIT1.send_error_notif(itemType, itemkey, l_preparer_user_name,
2095: l_doc_string, FND_MSG_PUB.Get(p_msg_index=>1,p_encoded =>'F' ),
2096: 'PO_CONTERMS_WF_PVT.IS_CONTRACT_DELIVRABLS_AMENDED');
2097: RAISE;
2098:
2099: WHEN OTHERS THEN
2100: IF (g_po_wf_debug = 'Y') THEN
2102: '300: End IN Exception: IS_CONTRACT_DELIVRABLS_AMENDED ');
2103: END IF;
2104: l_doc_string := PO_REQAPPROVAL_INIT1.get_error_doc(itemType, itemkey);
2105: l_preparer_user_name := PO_REQAPPROVAL_INIT1.get_preparer_user_name(itemType, itemkey);
2106: wf_core.context('PO_CONTERMS_WF_PVT', 'IS_CONTRACT_DELIVRABLS_AMENDED', 'l_contracts_call_Exception');
2107:
2108: PO_REQAPPROVAL_INIT1.send_error_notif(itemType, itemkey, l_preparer_user_name,
2109: l_doc_string, sqlerrm,
2110: 'PO_CONTERMS_WF_PVT.IS_CONTRACT_DELIVRABLS_AMENDED');
2106: wf_core.context('PO_CONTERMS_WF_PVT', 'IS_CONTRACT_DELIVRABLS_AMENDED', 'l_contracts_call_Exception');
2107:
2108: PO_REQAPPROVAL_INIT1.send_error_notif(itemType, itemkey, l_preparer_user_name,
2109: l_doc_string, sqlerrm,
2110: 'PO_CONTERMS_WF_PVT.IS_CONTRACT_DELIVRABLS_AMENDED');
2111: RAISE;
2112:
2113:
2114: END IS_CONTRACT_DELIVRABLS_AMENDED;
2261: END cancel_deliverables;
2262:
2263: /* CONTERMS FPJ END */
2264: --
2265: End PO_CONTERMS_WF_PVT;