43:
44: --
45: -- Initialize message list if p_init_msg_list is set to true
46: IF FND_API.to_Boolean(p_init_msg_list) THEN
47: FND_MSG_PUB.initialize;
48: END IF;
49:
50: -- Initialize API return status to success
51: x_return_status := FND_API.G_RET_STS_SUCCESS;
53: -- API body
54: --
55:
56: FND_MESSAGE.SET_NAME('INV', p_message_name);
57: FND_MSG_PUB.Add;
58:
59: IF MTL_CCEOI_VAR_PVT.G_REC_IN_SYSTEM = FALSE THEN
60:
61: MTL_CCEOI_PROCESS_PVT.Insert_CCIEntry(
101: IF FND_API.to_Boolean(p_commit) THEN
102: COMMIT;
103: END IF;
104:
105: FND_MSG_PUB.Count_And_Get
106: (p_count => x_msg_count
107: , p_data => x_msg_data);
108:
109: EXCEPTION
112: ROLLBACK TO Process_Error;
113: --
114: x_return_status := FND_API.G_RET_STS_ERROR;
115: --
116: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
117: , p_data => x_msg_data);
118: --
119: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
120: --
121: ROLLBACK TO Process_Error;
122: --
123: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
124: --
125: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
126: , p_data => x_msg_data);
127: --
128: WHEN OTHERS THEN
129: --
130: ROLLBACK TO Process_Error;
131: --
132: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
133: --
134: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
135: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
136: END IF;
137: --
138: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
131: --
132: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
133: --
134: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
135: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
136: END IF;
137: --
138: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
139: , p_data => x_msg_data);
134: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
135: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
136: END IF;
137: --
138: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
139: , p_data => x_msg_data);
140:
141: END Process_Error;
142:
212: END IF;
213: --
214: -- Initialize message list if p_init_msg_list is set to true
215: IF FND_API.to_Boolean(p_init_msg_list) THEN
216: FND_MSG_PUB.initialize;
217: END IF;
218: --
219: -- Initialisize API return status to access
220: x_return_status := FND_API.G_RET_STS_SUCCESS;
249: IF FND_API.to_Boolean(p_commit) THEN
250: COMMIT;
251: END IF;
252: -- Standard call to get message count and if count is 1, get message info
253: FND_MSG_PUB.Count_And_Get
254: (p_count => x_msg_count
255: , p_data => x_msg_data);
256: EXCEPTION
257: WHEN FND_API.G_EXC_ERROR THEN
259: ROLLBACK TO Export_CountRequest_PVT;
260: --
261: x_return_status := FND_API.G_RET_STS_ERROR;
262: --
263: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
264: , p_data => x_msg_data);
265: --
266: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
267: --
268: ROLLBACK TO Export_CountRequest_PVT;
269: --
270: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
271: --
272: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
273: , p_data => x_msg_data);
274: --
275: WHEN OTHERS THEN
276: --
277: ROLLBACK TO Export_CountRequest_PVT;
278: --
279: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
280: --
281: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
282: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
283: END IF;
284: --
285: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
278: --
279: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
280: --
281: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
282: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
283: END IF;
284: --
285: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
286: , p_data => x_msg_data);
281: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
282: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
283: END IF;
284: --
285: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
286: , p_data => x_msg_data);
287: END;
288: END;
289:
373: END IF;
374: --
375: -- Initialize message list if p_init_msg_list is set to true
376: IF FND_API.to_Boolean(p_init_msg_list) THEN
377: FND_MSG_PUB.initialize;
378: END IF;
379: --
380: -- Initialisize API return status to access
381: x_return_status := FND_API.G_RET_STS_SUCCESS;
541: IF FND_API.to_Boolean(p_commit) THEN
542: COMMIT;
543: END IF;
544: -- Standard call to get message count and if count is 1, get message info
545: FND_MSG_PUB.Count_And_Get
546: (p_count => x_msg_count
547: , p_data => x_msg_data);
548:
549: EXCEPTION
552: ROLLBACK TO Create_CountRequest;
553: --
554: x_return_status := FND_API.G_RET_STS_ERROR;
555: --
556: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
557: , p_data => x_msg_data);
558: --
559: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
560: --
561: ROLLBACK TO Create_CountRequest;
562: --
563: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
564: --
565: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
566: , p_data => x_msg_data);
567: --
568: WHEN OTHERS THEN
569: --
570: ROLLBACK TO Create_CountRequest;
571: --
572: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
573: --
574: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
575: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
576: END IF;
577: --
578: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
571: --
572: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
573: --
574: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
575: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
576: END IF;
577: --
578: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
579: , p_data => x_msg_data);
574: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
575: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
576: END IF;
577: --
578: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
579: , p_data => x_msg_data);
580:
581: END Create_CountRequest;
582:
662: END IF;
663: --
664: -- Initialize message list if p_init_msg_list is set to true
665: IF FND_API.to_Boolean(p_init_msg_list) THEN
666: FND_MSG_PUB.initialize;
667: END IF;
668: --
669: -- Initialisize API return status to access
670: x_return_status := FND_API.G_RET_STS_SUCCESS;
885: IF FND_API.to_Boolean(p_commit) THEN
886: COMMIT;
887: END IF;
888: -- Standard call to get message count and if count is 1, get message info
889: FND_MSG_PUB.Count_And_Get
890: (p_count => x_msg_count
891: , p_data => x_msg_data);
892:
893: EXCEPTION
894: WHEN FND_API.G_EXC_ERROR THEN
895: --
896: x_return_status := FND_API.G_RET_STS_ERROR;
897: --
898: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
899: , p_data => x_msg_data);
900: --
901: IF (l_debug = 1) THEN
902: MDEBUG('Process : Exc Err' || sqlerrm);
906: --
907: --
908: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
909: --
910: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
911: , p_data => x_msg_data);
912: --
913: IF (l_debug = 1) THEN
914: MDEBUG('Process : Exc Unexp Err ' || sqlerrm);
917: WHEN OTHERS THEN
918: --
919: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
920: --
921: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
922: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
923: END IF;
924: --
925: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
918: --
919: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
920: --
921: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
922: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
923: END IF;
924: --
925: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
926: , p_data => x_msg_data);
921: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
922: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
923: END IF;
924: --
925: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
926: , p_data => x_msg_data);
927: IF (l_debug = 1) THEN
928: MDEBUG('Process_CountRequest : Exc_Others ' || sqlerrm);
929: END IF;
1038: END IF;
1039: --
1040: -- Initialize message list if p_init_msg_list is set to true
1041: IF FND_API.to_Boolean(p_init_msg_list) THEN
1042: FND_MSG_PUB.initialize;
1043: END IF;
1044: --
1045: -- Initialisize API return status to access
1046: L_return_status := FND_API.G_RET_STS_SUCCESS;
1066: --
1067: IF p_interface_rec.cc_entry_interface_id IS NULL THEN
1068: L_errorcode := 21;
1069: FND_MESSAGE.SET_NAME('INV', 'INV_CCEOI_NO_IFACE_ID');
1070: FND_MSG_PUB.Add;
1071: RAISE FND_API.G_EXC_ERROR;
1072: END IF;
1073:
1074: -- Current processed interface RECORD
1455: END IF;
1456: IF L_COUNT = 0 THEN
1457:
1458: FND_MESSAGE.SET_NAME('INV', 'INV_INT_REACODE');
1459: FND_MSG_PUB.Add;
1460:
1461: l_return_status := FND_API.G_RET_STS_ERROR;
1462:
1463: MTL_CCEOI_PROCESS_PVT.Insert_CCEOIError(
1574: IF FND_API.to_Boolean(p_commit) THEN
1575: COMMIT;
1576: END IF;
1577: -- Standard call to get message count and if count is 1, get message info
1578: FND_MSG_PUB.Count_And_Get
1579: (p_count => x_msg_count
1580: , p_data => x_msg_data);
1581: EXCEPTION
1582: WHEN FND_API.G_EXC_ERROR THEN
1587: mdebug('Validate_CountRequest: Error' || sqlerrm);
1588: END IF;
1589: x_return_status := FND_API.G_RET_STS_ERROR;
1590: --
1591: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
1592: , p_data => x_msg_data);
1593: --
1594: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1595: --
1599: mdebug('Validate_CountRequest: Error' || sqlerrm);
1600: END IF;
1601: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1602: --
1603: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
1604: , p_data => x_msg_data);
1605: --
1606: WHEN OTHERS THEN
1607: --
1608: --ROLLBACK TO Validate_CountRequest;
1609: --
1610: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1611: --
1612: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
1613: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
1614: END IF;
1615: --
1616: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
1609: --
1610: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1611: --
1612: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
1613: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
1614: END IF;
1615: --
1616: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
1617: , p_data => x_msg_data);
1612: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
1613: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
1614: END IF;
1615: --
1616: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
1617: , p_data => x_msg_data);
1618: END;
1619: END;
1620: --
1685: END IF;
1686: --
1687: -- Initialize message list if p_init_msg_list is set to true
1688: IF FND_API.to_Boolean(p_init_msg_list) THEN
1689: FND_MSG_PUB.initialize;
1690: END IF;
1691: --
1692: -- Initialisize API return status to access
1693: L_return_status := FND_API.G_RET_STS_SUCCESS;
1748: IF FND_API.to_Boolean(p_commit) THEN
1749: COMMIT;
1750: END IF;
1751: -- Standard call to get message count and if count is 1, get message info
1752: FND_MSG_PUB.Count_And_Get
1753: (p_count => x_msg_count
1754: , p_data => x_msg_data);
1755: EXCEPTION
1756: WHEN FND_API.G_EXC_ERROR THEN
1758: ROLLBACK TO ValSim_CountRequest;
1759: --
1760: x_return_status := FND_API.G_RET_STS_ERROR;
1761: --
1762: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
1763: , p_data => x_msg_data);
1764: --
1765: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1766: --
1767: ROLLBACK TO ValSim_CountRequest;
1768: --
1769: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1770: --
1771: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
1772: , p_data => x_msg_data);
1773: --
1774: WHEN OTHERS THEN
1775: --
1776: ROLLBACK TO ValSim_CountRequest;
1777: --
1778: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1779: --
1780: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
1781: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
1782: END IF;
1783: --
1784: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
1777: --
1778: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1779: --
1780: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
1781: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
1782: END IF;
1783: --
1784: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
1785: , p_data => x_msg_data);
1780: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
1781: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
1782: END IF;
1783: --
1784: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
1785: , p_data => x_msg_data);
1786: END;
1787: END;
1788: --
1862: END IF;
1863: --
1864: -- Initialize message list if p_init_msg_list is set to true
1865: IF FND_API.to_Boolean(p_init_msg_list) THEN
1866: FND_MSG_PUB.initialize;
1867: END IF;
1868: --
1869: -- Initialisize API return status to access
1870: L_return_status := FND_API.G_RET_STS_SUCCESS;
1896: , x_return_status => L_return_status);
1897: --
1898: IF L_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1899: FND_MESSAGE.SET_NAME('INV', 'INV_CCEOI_UPDATE_FAILED');
1900: FND_MSG_PUB.Add;
1901: RAISE FND_API.G_EXC_ERROR;
1902: END IF;
1903: --
1904: EXCEPTION
1915: Mdebug('After Insert_CCIEntry');
1916: END IF;
1917: IF L_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1918: FND_MESSAGE.SET_NAME('INV', 'INV_CCEOI_INSERT_FAILED');
1919: FND_MSG_PUB.Add;
1920: RAISE FND_API.G_EXC_ERROR;
1921: END IF;
1922: END;
1923: --
1928: IF FND_API.to_Boolean(p_commit) THEN
1929: COMMIT;
1930: END IF;
1931: -- Standard call to get message count and if count is 1, get message info
1932: FND_MSG_PUB.Count_And_Get
1933: (p_count => x_msg_count
1934: , p_data => x_msg_data);
1935: EXCEPTION WHEN FND_API.G_EXC_ERROR THEN
1936: --
1935: EXCEPTION WHEN FND_API.G_EXC_ERROR THEN
1936: --
1937: x_return_status := FND_API.G_RET_STS_ERROR;
1938: --
1939: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
1940: , p_data => x_msg_data);
1941: --
1942: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1943: --
1942: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1943: --
1944: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1945: --
1946: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
1947: , p_data => x_msg_data);
1948: --
1949: WHEN OTHERS THEN
1950: --
1949: WHEN OTHERS THEN
1950: --
1951: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1952: --
1953: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
1954: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
1955: END IF;
1956: --
1957: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
1950: --
1951: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1952: --
1953: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
1954: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
1955: END IF;
1956: --
1957: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
1958: , p_data => x_msg_data); END;
1953: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
1954: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
1955: END IF;
1956: --
1957: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
1958: , p_data => x_msg_data); END;
1959: END;
1960: END MTL_CCEOI_ACTION_PVT;