7: -- NOTE :
8: -- End of Comments
9:
10: G_PKG_NAME CONSTANT VARCHAR2(30) := 'DPP_BUSINESSEVENTS_PVT';
11: G_DEBUG BOOLEAN := FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_debug_high);
12: G_FILE_NAME CONSTANT VARCHAR2(12) := 'dppvbevb.pls';
13: ---------------------------------------------------------------------
14: -- PROCEDURE
15: -- Raise_Workflow_Event
99: END IF;
100: -- Initialize message list if p_init_msg_list is set to TRUE.
101: IF FND_API.to_Boolean( p_init_msg_list )
102: THEN
103: FND_MSG_PUB.initialize;
104: END IF;
105:
106: -- Debug Message
107: IF g_debug THEN
122: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
123: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
124: fnd_message.set_token('ERRNO', sqlcode);
125: fnd_message.set_token('REASON', 'EXECUTION DETAIL ID NOT FOUND');
126: FND_MSG_PUB.add;
127: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
128: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
129: END IF;
130: RAISE FND_API.g_exc_error;
123: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
124: fnd_message.set_token('ERRNO', sqlcode);
125: fnd_message.set_token('REASON', 'EXECUTION DETAIL ID NOT FOUND');
126: FND_MSG_PUB.add;
127: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
128: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
129: END IF;
130: RAISE FND_API.g_exc_error;
131: WHEN OTHERS THEN
124: fnd_message.set_token('ERRNO', sqlcode);
125: fnd_message.set_token('REASON', 'EXECUTION DETAIL ID NOT FOUND');
126: FND_MSG_PUB.add;
127: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
128: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
129: END IF;
130: RAISE FND_API.g_exc_error;
131: WHEN OTHERS THEN
132: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
132: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
133: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
134: fnd_message.set_token('ERRNO', sqlcode);
135: fnd_message.set_token('REASON', sqlerrm);
136: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
137: FND_MESSAGE.set_name('DPP', 'DPP_BUSEVT_INVALID_EXE_DET_ID');
138: fnd_message.set_token('SEQ_NAME', 'DPP_EXECUTION_DETAIL_ID_SEQ');
139: FND_MSG_PUB.add;
140: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
135: fnd_message.set_token('REASON', sqlerrm);
136: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
137: FND_MESSAGE.set_name('DPP', 'DPP_BUSEVT_INVALID_EXE_DET_ID');
138: fnd_message.set_token('SEQ_NAME', 'DPP_EXECUTION_DETAIL_ID_SEQ');
139: FND_MSG_PUB.add;
140: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
141: END IF;
142: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
143: END;
136: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
137: FND_MESSAGE.set_name('DPP', 'DPP_BUSEVT_INVALID_EXE_DET_ID');
138: fnd_message.set_token('SEQ_NAME', 'DPP_EXECUTION_DETAIL_ID_SEQ');
139: FND_MSG_PUB.add;
140: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
141: END IF;
142: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
143: END;
144: IF g_debug THEN
158: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
159: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
160: fnd_message.set_token('ERRNO', sqlcode);
161: fnd_message.set_token('REASON', 'INVALID USER');
162: FND_MSG_PUB.add;
163: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
164: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
165: END IF;
166: RAISE FND_API.g_exc_error;
159: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
160: fnd_message.set_token('ERRNO', sqlcode);
161: fnd_message.set_token('REASON', 'INVALID USER');
162: FND_MSG_PUB.add;
163: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
164: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
165: END IF;
166: RAISE FND_API.g_exc_error;
167: WHEN OTHERS THEN
160: fnd_message.set_token('ERRNO', sqlcode);
161: fnd_message.set_token('REASON', 'INVALID USER');
162: FND_MSG_PUB.add;
163: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
164: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
165: END IF;
166: RAISE FND_API.g_exc_error;
167: WHEN OTHERS THEN
168: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
180:
181: IF p_txn_hdr_rec.claim_type_flag IS NULL THEN
182: --No claim type flag has been sent
183: FND_MESSAGE.set_name('DPP', 'DPP_BUSEVT_INVALID_CLAIM_TYPE');
184: FND_MSG_PUB.add;
185: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
186: RAISE FND_API.g_exc_error;
187: ELSE
188: --Concatinate the claim flag with necessary quotes to generate xml data
181: IF p_txn_hdr_rec.claim_type_flag IS NULL THEN
182: --No claim type flag has been sent
183: FND_MESSAGE.set_name('DPP', 'DPP_BUSEVT_INVALID_CLAIM_TYPE');
184: FND_MSG_PUB.add;
185: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
186: RAISE FND_API.g_exc_error;
187: ELSE
188: --Concatinate the claim flag with necessary quotes to generate xml data
189: l_claim_type_flag := ''''||p_txn_hdr_rec.claim_type_flag||'''';
211: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
212: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
213: fnd_message.set_token('ERRNO', sqlcode);
214: fnd_message.set_token('REASON', sqlerrm);
215: FND_MSG_PUB.add;
216: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
217: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
218: END IF;
219: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
212: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
213: fnd_message.set_token('ERRNO', sqlcode);
214: fnd_message.set_token('REASON', sqlerrm);
215: FND_MSG_PUB.add;
216: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
217: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
218: END IF;
219: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
220: END;
213: fnd_message.set_token('ERRNO', sqlcode);
214: fnd_message.set_token('REASON', sqlerrm);
215: FND_MSG_PUB.add;
216: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
217: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
218: END IF;
219: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
220: END;
221: END LOOP;
223: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
224: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
225: fnd_message.set_token('ERRNO', sqlcode);
226: fnd_message.set_token('REASON', 'Transaction Line Id is required for the API');
227: FND_MSG_PUB.add;
228: RAISE FND_API.G_EXC_ERROR;
229: END IF; --l_table_count
230: ELSE
231: IF p_txn_hdr_rec.claim_type_flag = 'SUPP_DSTR_CL' THEN
241: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
242: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
243: fnd_message.set_token('ERRNO', sqlcode);
244: fnd_message.set_token('REASON', sqlerrm);
245: FND_MSG_PUB.add;
246: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
247: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
248: END IF;
249: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
242: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
243: fnd_message.set_token('ERRNO', sqlcode);
244: fnd_message.set_token('REASON', sqlerrm);
245: FND_MSG_PUB.add;
246: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
247: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
248: END IF;
249: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
250: END;
243: fnd_message.set_token('ERRNO', sqlcode);
244: fnd_message.set_token('REASON', sqlerrm);
245: FND_MSG_PUB.add;
246: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
247: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
248: END IF;
249: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
250: END;
251: ELSE
261: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
262: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
263: fnd_message.set_token('ERRNO', sqlcode);
264: fnd_message.set_token('REASON', sqlerrm);
265: FND_MSG_PUB.add;
266: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
267: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
268: END IF;
269: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
262: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
263: fnd_message.set_token('ERRNO', sqlcode);
264: fnd_message.set_token('REASON', sqlerrm);
265: FND_MSG_PUB.add;
266: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
267: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
268: END IF;
269: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
270: END;
263: fnd_message.set_token('ERRNO', sqlcode);
264: fnd_message.set_token('REASON', sqlerrm);
265: FND_MSG_PUB.add;
266: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
267: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
268: END IF;
269: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
270: END;
271: END IF;
393: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
394: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
395: fnd_message.set_token('ERRNO', sqlcode);
396: fnd_message.set_token('REASON', 'INVALID CLAIM HEADER AMOUNT');
397: FND_MSG_PUB.add;
398: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
399: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
400: END IF;
401: RAISE FND_API.G_EXC_ERROR;
394: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
395: fnd_message.set_token('ERRNO', sqlcode);
396: fnd_message.set_token('REASON', 'INVALID CLAIM HEADER AMOUNT');
397: FND_MSG_PUB.add;
398: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
399: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
400: END IF;
401: RAISE FND_API.G_EXC_ERROR;
402: WHEN OTHERS THEN
395: fnd_message.set_token('ERRNO', sqlcode);
396: fnd_message.set_token('REASON', 'INVALID CLAIM HEADER AMOUNT');
397: FND_MSG_PUB.add;
398: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
399: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
400: END IF;
401: RAISE FND_API.G_EXC_ERROR;
402: WHEN OTHERS THEN
403: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
403: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
404: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
405: fnd_message.set_token('ERRNO', sqlcode);
406: fnd_message.set_token('REASON', sqlerrm);
407: FND_MSG_PUB.add;
408: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
409: FND_MESSAGE.set_name('DPP', 'DPP_BUSEVT_INVALID_CLAIM_AMT');
410: FND_MSG_PUB.add;
411: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
404: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
405: fnd_message.set_token('ERRNO', sqlcode);
406: fnd_message.set_token('REASON', sqlerrm);
407: FND_MSG_PUB.add;
408: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
409: FND_MESSAGE.set_name('DPP', 'DPP_BUSEVT_INVALID_CLAIM_AMT');
410: FND_MSG_PUB.add;
411: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
412: END IF;
406: fnd_message.set_token('REASON', sqlerrm);
407: FND_MSG_PUB.add;
408: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
409: FND_MESSAGE.set_name('DPP', 'DPP_BUSEVT_INVALID_CLAIM_AMT');
410: FND_MSG_PUB.add;
411: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
412: END IF;
413: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
414: END;
407: FND_MSG_PUB.add;
408: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
409: FND_MESSAGE.set_name('DPP', 'DPP_BUSEVT_INVALID_CLAIM_AMT');
410: FND_MSG_PUB.add;
411: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
412: END IF;
413: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
414: END;
415: --Generate the Input Xml required for the Business Event --Update Claim
574: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
575: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
576: fnd_message.set_token('ERRNO', sqlcode);
577: fnd_message.set_token('REASON', sqlerrm);
578: FND_MSG_PUB.add;
579: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
580: FND_MESSAGE.set_name('DPP', 'DPP_BUSEVT_INVALID_COSTADJACC');
581: FND_MSG_PUB.add;
582: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
575: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
576: fnd_message.set_token('ERRNO', sqlcode);
577: fnd_message.set_token('REASON', sqlerrm);
578: FND_MSG_PUB.add;
579: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
580: FND_MESSAGE.set_name('DPP', 'DPP_BUSEVT_INVALID_COSTADJACC');
581: FND_MSG_PUB.add;
582: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
583: END IF;
577: fnd_message.set_token('REASON', sqlerrm);
578: FND_MSG_PUB.add;
579: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
580: FND_MESSAGE.set_name('DPP', 'DPP_BUSEVT_INVALID_COSTADJACC');
581: FND_MSG_PUB.add;
582: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
583: END IF;
584: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
585: END;
578: FND_MSG_PUB.add;
579: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
580: FND_MESSAGE.set_name('DPP', 'DPP_BUSEVT_INVALID_COSTADJACC');
581: FND_MSG_PUB.add;
582: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
583: END IF;
584: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
585: END;
586: IF l_cost_adj_acct IS NULL THEN
596: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
597: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
598: fnd_message.set_token('ERRNO', sqlcode);
599: fnd_message.set_token('REASON', 'COST ADJUSTMENT ACCOUNT NOT FOUND');
600: FND_MSG_PUB.add;
601: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
602: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
603: END IF;
604: RAISE FND_API.G_EXC_ERROR;
597: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
598: fnd_message.set_token('ERRNO', sqlcode);
599: fnd_message.set_token('REASON', 'COST ADJUSTMENT ACCOUNT NOT FOUND');
600: FND_MSG_PUB.add;
601: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
602: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
603: END IF;
604: RAISE FND_API.G_EXC_ERROR;
605: WHEN OTHERS THEN
598: fnd_message.set_token('ERRNO', sqlcode);
599: fnd_message.set_token('REASON', 'COST ADJUSTMENT ACCOUNT NOT FOUND');
600: FND_MSG_PUB.add;
601: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
602: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
603: END IF;
604: RAISE FND_API.G_EXC_ERROR;
605: WHEN OTHERS THEN
606: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
606: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
607: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
608: fnd_message.set_token('ERRNO', sqlcode);
609: fnd_message.set_token('REASON', sqlerrm);
610: FND_MSG_PUB.add;
611: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
612: FND_MESSAGE.set_name('DPP', 'DPP_BUSEVT_INVALID_COSTADJACC');
613: FND_MSG_PUB.add;
614: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
607: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
608: fnd_message.set_token('ERRNO', sqlcode);
609: fnd_message.set_token('REASON', sqlerrm);
610: FND_MSG_PUB.add;
611: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
612: FND_MESSAGE.set_name('DPP', 'DPP_BUSEVT_INVALID_COSTADJACC');
613: FND_MSG_PUB.add;
614: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
615: END IF;
609: fnd_message.set_token('REASON', sqlerrm);
610: FND_MSG_PUB.add;
611: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
612: FND_MESSAGE.set_name('DPP', 'DPP_BUSEVT_INVALID_COSTADJACC');
613: FND_MSG_PUB.add;
614: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
615: END IF;
616: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
617: END;
610: FND_MSG_PUB.add;
611: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
612: FND_MESSAGE.set_name('DPP', 'DPP_BUSEVT_INVALID_COSTADJACC');
613: FND_MSG_PUB.add;
614: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
615: END IF;
616: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
617: END;
618: END IF;
677: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
678: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
679: fnd_message.set_token('ERRNO', sqlcode);
680: fnd_message.set_token('REASON', 'COST ADJUSTMENT ACCOUNT IS NULL');
681: FND_MSG_PUB.add;
682: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
683: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
684: END IF;
685: RAISE FND_API.G_EXC_ERROR;
678: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
679: fnd_message.set_token('ERRNO', sqlcode);
680: fnd_message.set_token('REASON', 'COST ADJUSTMENT ACCOUNT IS NULL');
681: FND_MSG_PUB.add;
682: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
683: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
684: END IF;
685: RAISE FND_API.G_EXC_ERROR;
686: END IF;
679: fnd_message.set_token('ERRNO', sqlcode);
680: fnd_message.set_token('REASON', 'COST ADJUSTMENT ACCOUNT IS NULL');
681: FND_MSG_PUB.add;
682: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
683: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
684: END IF;
685: RAISE FND_API.G_EXC_ERROR;
686: END IF;
687:
807: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
808: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
809: fnd_message.set_token('ERRNO', sqlcode);
810: fnd_message.set_token('REASON', 'SUPPLIER TRADE PROFILE IS NOT FOUND'); --To be modified
811: FND_MSG_PUB.add;
812: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
813: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
814: END IF;
815: RAISE FND_API.g_exc_error;
808: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
809: fnd_message.set_token('ERRNO', sqlcode);
810: fnd_message.set_token('REASON', 'SUPPLIER TRADE PROFILE IS NOT FOUND'); --To be modified
811: FND_MSG_PUB.add;
812: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
813: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
814: END IF;
815: RAISE FND_API.g_exc_error;
816: WHEN OTHERS THEN
809: fnd_message.set_token('ERRNO', sqlcode);
810: fnd_message.set_token('REASON', 'SUPPLIER TRADE PROFILE IS NOT FOUND'); --To be modified
811: FND_MSG_PUB.add;
812: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
813: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
814: END IF;
815: RAISE FND_API.g_exc_error;
816: WHEN OTHERS THEN
817: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
817: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
818: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
819: fnd_message.set_token('ERRNO', sqlcode);
820: fnd_message.set_token('REASON', sqlerrm);
821: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
822: FND_MESSAGE.set_name('DPP', 'DPP_BUSEVT_INVALID_EXE_DET_ID'); --To be modified
823: fnd_message.set_token('SEQ_NAME', 'DPP_EXECUTION_DETAIL_ID_SEQ'); --To be modified
824: FND_MSG_PUB.add;
825: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
820: fnd_message.set_token('REASON', sqlerrm);
821: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
822: FND_MESSAGE.set_name('DPP', 'DPP_BUSEVT_INVALID_EXE_DET_ID'); --To be modified
823: fnd_message.set_token('SEQ_NAME', 'DPP_EXECUTION_DETAIL_ID_SEQ'); --To be modified
824: FND_MSG_PUB.add;
825: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
826: END IF;
827: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
828: END;
821: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
822: FND_MESSAGE.set_name('DPP', 'DPP_BUSEVT_INVALID_EXE_DET_ID'); --To be modified
823: fnd_message.set_token('SEQ_NAME', 'DPP_EXECUTION_DETAIL_ID_SEQ'); --To be modified
824: FND_MSG_PUB.add;
825: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
826: END IF;
827: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
828: END;
829:
1138: dbms_xmlquery.closeContext(l_queryCtx);
1139: ELSE
1140: FND_MESSAGE.set_name('DPP', 'DPP_BUSEVT_INVALID_PRO_CODE');
1141: fnd_message.set_token('PROCESS_CODE', p_txn_hdr_rec.process_code);
1142: FND_MSG_PUB.add;
1143: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
1144: RAISE FND_API.g_exc_error;
1145: END IF;
1146:
1139: ELSE
1140: FND_MESSAGE.set_name('DPP', 'DPP_BUSEVT_INVALID_PRO_CODE');
1141: fnd_message.set_token('PROCESS_CODE', p_txn_hdr_rec.process_code);
1142: FND_MSG_PUB.add;
1143: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
1144: RAISE FND_API.g_exc_error;
1145: END IF;
1146:
1147: --Raise the Workflow Event Procedure for the given process
1171: IF FND_API.to_Boolean( p_commit )
1172: THEN
1173: COMMIT;
1174: END IF;
1175: FND_MSG_PUB.count_and_get(
1176: p_encoded => FND_API.g_false,
1177: p_count => x_msg_count,
1178: p_data => x_msg_data
1179: );
1182: EXCEPTION
1183: WHEN FND_API.g_exc_error THEN
1184: ROLLBACK TO Raise_Business_Event;
1185: x_return_status := FND_API.g_ret_sts_error;
1186: FND_MSG_PUB.count_and_get (
1187: p_encoded => FND_API.g_false,
1188: p_count => x_msg_count,
1189: p_data => x_msg_data
1190: );
1190: );
1191:
1192: IF x_msg_count > 1 THEN
1193: FOR I IN 1..x_msg_count LOOP
1194: x_msg_data := SUBSTR((x_msg_data||' '|| FND_MSG_PUB.GET(P_MSG_INDEX => I, P_ENCODED => 'F')), 1, 4000);
1195: END LOOP;
1196: END IF;
1197:
1198: WHEN FND_API.g_exc_unexpected_error THEN
1197:
1198: WHEN FND_API.g_exc_unexpected_error THEN
1199: ROLLBACK TO Raise_Business_Event;
1200: x_return_status := FND_API.g_ret_sts_unexp_error ;
1201: FND_MSG_PUB.count_and_get (
1202: p_encoded => FND_API.g_false,
1203: p_count => x_msg_count,
1204: p_data => x_msg_data
1205: );
1205: );
1206:
1207: IF x_msg_count > 1 THEN
1208: FOR I IN 1..x_msg_count LOOP
1209: x_msg_data := SUBSTR((x_msg_data||' '|| substr(FND_MSG_PUB.GET(P_MSG_INDEX => I, P_ENCODED => 'F'),1,254)), 1, 4000);
1210: END LOOP;
1211: END IF;
1212:
1213: WHEN OTHERS THEN
1216: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
1217: fnd_message.set_token('ERRNO', sqlcode);
1218: fnd_message.set_token('REASON', sqlerrm);
1219: x_return_status := FND_API.g_ret_sts_unexp_error ;
1220: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
1221: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
1222: END IF;
1223: FND_MSG_PUB.count_and_get (
1224: p_encoded => FND_API.g_false,
1217: fnd_message.set_token('ERRNO', sqlcode);
1218: fnd_message.set_token('REASON', sqlerrm);
1219: x_return_status := FND_API.g_ret_sts_unexp_error ;
1220: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
1221: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
1222: END IF;
1223: FND_MSG_PUB.count_and_get (
1224: p_encoded => FND_API.g_false,
1225: p_count => x_msg_count,
1219: x_return_status := FND_API.g_ret_sts_unexp_error ;
1220: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
1221: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
1222: END IF;
1223: FND_MSG_PUB.count_and_get (
1224: p_encoded => FND_API.g_false,
1225: p_count => x_msg_count,
1226: p_data => x_msg_data
1227: );
1227: );
1228:
1229: IF x_msg_count > 1 THEN
1230: FOR I IN 1..x_msg_count LOOP
1231: x_msg_data := SUBSTR((x_msg_data||' '|| FND_MSG_PUB.GET(P_MSG_INDEX => I, P_ENCODED => 'F')), 1, 4000);
1232: END LOOP;
1233: END IF;
1234:
1235: END Raise_Business_Event;
1319: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
1320: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
1321: fnd_message.set_token('ERRNO', sqlcode);
1322: fnd_message.set_token('REASON', sqlerrm);
1323: FND_MSG_PUB.add;
1324: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
1325: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
1326: END IF;
1327: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1320: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
1321: fnd_message.set_token('ERRNO', sqlcode);
1322: fnd_message.set_token('REASON', sqlerrm);
1323: FND_MSG_PUB.add;
1324: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
1325: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
1326: END IF;
1327: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1328: END;
1321: fnd_message.set_token('ERRNO', sqlcode);
1322: fnd_message.set_token('REASON', sqlerrm);
1323: FND_MSG_PUB.add;
1324: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
1325: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
1326: END IF;
1327: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1328: END;
1329: --Define in WF Attributes l_parameter_list := WF_PARAMETER_LIST_T();
1352: IF g_debug THEN
1353: DPP_UTILITY_PVT.debug_message('Work Flow Event is not Raised');
1354: END IF;
1355: FND_MESSAGE.set_name('DPP', 'DPP_CC_NO_ELIGIBLE_LINES_MSG');
1356: FND_MSG_PUB.add;
1357: RAISE FND_API.g_exc_error;
1358: END IF; --p_row_count > 0
1359: END IF;
1360:
1361: EXCEPTION
1362: WHEN FND_API.g_exc_error THEN
1363: ROLLBACK TO Raise_Workflow_Event;
1364: x_return_status := FND_API.g_ret_sts_error;
1365: FND_MSG_PUB.count_and_get (
1366: p_encoded => FND_API.g_false,
1367: p_count => x_msg_count,
1368: p_data => x_msg_data
1369: );
1368: p_data => x_msg_data
1369: );
1370: IF x_msg_count > 1 THEN
1371: FOR I IN 1..x_msg_count LOOP
1372: x_msg_data := SUBSTR((x_msg_data||' '|| FND_MSG_PUB.GET(P_MSG_INDEX => I, P_ENCODED => 'F')), 1, 4000);
1373: END LOOP;
1374: END IF;
1375:
1376: WHEN FND_API.g_exc_unexpected_error THEN
1375:
1376: WHEN FND_API.g_exc_unexpected_error THEN
1377: ROLLBACK TO Raise_Workflow_Event;
1378: x_return_status := FND_API.g_ret_sts_unexp_error ;
1379: FND_MSG_PUB.count_and_get (
1380: p_encoded => FND_API.g_false,
1381: p_count => x_msg_count,
1382: p_data => x_msg_data
1383: );
1382: p_data => x_msg_data
1383: );
1384: IF x_msg_count > 1 THEN
1385: FOR I IN 1..x_msg_count LOOP
1386: x_msg_data := SUBSTR((x_msg_data||' '|| FND_MSG_PUB.GET(P_MSG_INDEX => I, P_ENCODED => 'F')), 1, 4000);
1387: END LOOP;
1388: END IF;
1389:
1390: WHEN OTHERS THEN
1392: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
1393: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
1394: fnd_message.set_token('ERRNO', sqlcode);
1395: fnd_message.set_token('REASON', sqlerrm);
1396: FND_MSG_PUB.add;
1397: x_return_status := FND_API.g_ret_sts_unexp_error ;
1398: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
1399: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
1400: END IF;
1394: fnd_message.set_token('ERRNO', sqlcode);
1395: fnd_message.set_token('REASON', sqlerrm);
1396: FND_MSG_PUB.add;
1397: x_return_status := FND_API.g_ret_sts_unexp_error ;
1398: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
1399: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
1400: END IF;
1401: FND_MSG_PUB.count_and_get (
1402: p_encoded => FND_API.g_false,
1395: fnd_message.set_token('REASON', sqlerrm);
1396: FND_MSG_PUB.add;
1397: x_return_status := FND_API.g_ret_sts_unexp_error ;
1398: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
1399: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
1400: END IF;
1401: FND_MSG_PUB.count_and_get (
1402: p_encoded => FND_API.g_false,
1403: p_count => x_msg_count,
1397: x_return_status := FND_API.g_ret_sts_unexp_error ;
1398: IF FND_MSG_PUB.check_msg_level (FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
1399: FND_MSG_PUB.add_exc_msg (g_pkg_name, l_api_name);
1400: END IF;
1401: FND_MSG_PUB.count_and_get (
1402: p_encoded => FND_API.g_false,
1403: p_count => x_msg_count,
1404: p_data => x_msg_data
1405: );
1404: p_data => x_msg_data
1405: );
1406: IF x_msg_count > 1 THEN
1407: FOR I IN 1..x_msg_count LOOP
1408: x_msg_data := SUBSTR((x_msg_data||' '|| FND_MSG_PUB.GET(P_MSG_INDEX => I, P_ENCODED => 'F')), 1, 4000);
1409: END LOOP;
1410: END IF;
1411:
1412: END Raise_Workflow_Event;