118: FROM dual;
119:
120: EXCEPTION
121: WHEN NO_DATA_FOUND 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;
119:
120: EXCEPTION
121: WHEN NO_DATA_FOUND 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
120: EXCEPTION
121: WHEN NO_DATA_FOUND 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);
121: WHEN NO_DATA_FOUND 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;
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');
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
129: END IF;
130: RAISE FND_API.g_exc_error;
131: WHEN OTHERS THEN
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');
130: RAISE FND_API.g_exc_error;
131: WHEN OTHERS THEN
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');
131: WHEN OTHERS THEN
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;
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);
141: END IF;
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);
141: END IF;
142: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
154: WHERE user_id = l_user_id ;
155:
156: EXCEPTION
157: WHEN NO_DATA_FOUND 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;
155:
156: EXCEPTION
157: WHEN NO_DATA_FOUND 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
156: EXCEPTION
157: WHEN NO_DATA_FOUND 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);
157: WHEN NO_DATA_FOUND 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;
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');
169: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
170: fnd_message.set_token('ERRNO', sqlcode);
171: fnd_message.set_token('REASON', sqlerrm);
172: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
165: END IF;
166: RAISE FND_API.g_exc_error;
167: WHEN OTHERS THEN
168: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
169: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
170: fnd_message.set_token('ERRNO', sqlcode);
171: fnd_message.set_token('REASON', sqlerrm);
172: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
173: END;
166: RAISE FND_API.g_exc_error;
167: WHEN OTHERS THEN
168: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
169: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
170: fnd_message.set_token('ERRNO', sqlcode);
171: fnd_message.set_token('REASON', sqlerrm);
172: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
173: END;
174:
167: WHEN OTHERS THEN
168: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
169: fnd_message.set_token('ROUTINE', 'DPP_BUSINESSEVENTS_PVT');
170: fnd_message.set_token('ERRNO', sqlcode);
171: fnd_message.set_token('REASON', sqlerrm);
172: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
173: END;
174:
175: l_user_name := ''''||l_user_name||'''';
179: OR p_txn_hdr_rec.process_code = 'CUSTCL' THEN
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
207: p_txn_line_id(i)
208: );
209: EXCEPTION
210: WHEN OTHERS THEN
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;
208: );
209: EXCEPTION
210: WHEN OTHERS THEN
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
209: EXCEPTION
210: WHEN OTHERS THEN
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);
210: WHEN OTHERS THEN
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;
220: END;
221: END LOOP;
222: ELSE
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;
220: END;
221: END LOOP;
222: ELSE
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;
221: END LOOP;
222: ELSE
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
222: ELSE
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
237: FROM dpp_transaction_lines_all
238: WHERE transaction_header_id = p_txn_hdr_rec.Transaction_Header_ID;
239: EXCEPTION
240: WHEN OTHERS 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;
238: WHERE transaction_header_id = p_txn_hdr_rec.Transaction_Header_ID;
239: EXCEPTION
240: WHEN OTHERS 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
239: EXCEPTION
240: WHEN OTHERS 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);
240: WHEN OTHERS 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;
257: FROM dpp_customer_claims_all
258: WHERE transaction_header_id = p_txn_hdr_rec.Transaction_Header_ID;
259: EXCEPTION
260: WHEN OTHERS THEN
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;
258: WHERE transaction_header_id = p_txn_hdr_rec.Transaction_Header_ID;
259: EXCEPTION
260: WHEN OTHERS THEN
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
259: EXCEPTION
260: WHEN OTHERS THEN
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);
260: WHEN OTHERS THEN
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;
389: WHERE transaction_header_id = p_txn_hdr_rec.Transaction_Header_ID
390: AND to_number(supp_dist_claim_id) = p_txn_hdr_rec.claim_id;
391: EXCEPTION
392: WHEN NO_DATA_FOUND THEN
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;
390: AND to_number(supp_dist_claim_id) = p_txn_hdr_rec.claim_id;
391: EXCEPTION
392: WHEN NO_DATA_FOUND THEN
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
391: EXCEPTION
392: WHEN NO_DATA_FOUND THEN
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);
392: WHEN NO_DATA_FOUND THEN
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;
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');
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;
400: END IF;
401: RAISE FND_API.G_EXC_ERROR;
402: WHEN OTHERS THEN
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
401: RAISE FND_API.G_EXC_ERROR;
402: WHEN OTHERS THEN
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');
402: WHEN OTHERS THEN
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;
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;
413: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
570: EXCEPTION
571: WHEN NO_DATA_FOUND THEN
572: l_cost_adj_acct := null;
573: WHEN OTHERS THEN
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;
571: WHEN NO_DATA_FOUND THEN
572: l_cost_adj_acct := null;
573: WHEN OTHERS THEN
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
572: l_cost_adj_acct := null;
573: WHEN OTHERS THEN
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');
573: WHEN OTHERS THEN
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;
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;
584: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
592: WHERE osp.org_id = to_number(dtha.org_id)
593: AND dtha.transaction_header_id = p_txn_hdr_rec.Transaction_Header_ID;
594: EXCEPTION
595: WHEN NO_DATA_FOUND 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;
593: AND dtha.transaction_header_id = p_txn_hdr_rec.Transaction_Header_ID;
594: EXCEPTION
595: WHEN NO_DATA_FOUND 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
594: EXCEPTION
595: WHEN NO_DATA_FOUND 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);
595: WHEN NO_DATA_FOUND 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;
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');
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;
603: END IF;
604: RAISE FND_API.G_EXC_ERROR;
605: WHEN OTHERS THEN
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
604: RAISE FND_API.G_EXC_ERROR;
605: WHEN OTHERS THEN
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');
605: WHEN OTHERS THEN
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;
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;
616: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
673: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
674: END IF;
675: END IF;
676: ELSE
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;
674: END IF;
675: END IF;
676: ELSE
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
675: END IF;
676: ELSE
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);
676: ELSE
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;
803: AND ostp.org_id = to_number(dtha.org_id)
804: AND dtha.transaction_header_id = p_txn_hdr_rec.Transaction_Header_ID;
805: EXCEPTION
806: WHEN NO_DATA_FOUND THEN
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;
804: AND dtha.transaction_header_id = p_txn_hdr_rec.Transaction_Header_ID;
805: EXCEPTION
806: WHEN NO_DATA_FOUND THEN
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
805: EXCEPTION
806: WHEN NO_DATA_FOUND THEN
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);
806: WHEN NO_DATA_FOUND THEN
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;
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');
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
814: END IF;
815: RAISE FND_API.g_exc_error;
816: WHEN OTHERS THEN
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
815: RAISE FND_API.g_exc_error;
816: WHEN OTHERS THEN
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
816: WHEN OTHERS THEN
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;
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);
826: END IF;
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);
826: END IF;
827: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1136: --Check if the query returns any rows
1137: l_row_count := dbms_xmlquery.getNumRowsProcessed(l_queryCtx);
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;
1137: l_row_count := dbms_xmlquery.getNumRowsProcessed(l_queryCtx);
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;
1211: END IF;
1212:
1213: WHEN OTHERS THEN
1214: ROLLBACK TO Raise_Business_Event;
1215: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
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 ;
1212:
1213: WHEN OTHERS THEN
1214: ROLLBACK TO Raise_Business_Event;
1215: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
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
1213: WHEN OTHERS THEN
1214: ROLLBACK TO Raise_Business_Event;
1215: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
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);
1214: ROLLBACK TO Raise_Business_Event;
1215: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
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;
1315: l_user_id);
1316:
1317: EXCEPTION
1318: WHEN OTHERS THEN
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;
1316:
1317: EXCEPTION
1318: WHEN OTHERS THEN
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
1317: EXCEPTION
1318: WHEN OTHERS THEN
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);
1318: WHEN OTHERS THEN
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;
1351: ELSE
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;
1388: END IF;
1389:
1390: WHEN OTHERS THEN
1391: ROLLBACK TO Raise_Workflow_Event;
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;
1389:
1390: WHEN OTHERS THEN
1391: ROLLBACK TO Raise_Workflow_Event;
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 ;
1390: WHEN OTHERS THEN
1391: ROLLBACK TO Raise_Workflow_Event;
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
1391: ROLLBACK TO Raise_Workflow_Event;
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);