95: x_return_status := G_RET_STS_SUCCESS;
96:
97: EXCEPTION
98:
99: WHEN OKL_API.G_EXCEPTION_ERROR THEN
100: x_return_status := G_RET_STS_ERROR;
101:
102: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
103: x_return_status := G_RET_STS_UNEXP_ERROR;
98:
99: WHEN OKL_API.G_EXCEPTION_ERROR THEN
100: x_return_status := G_RET_STS_ERROR;
101:
102: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
103: x_return_status := G_RET_STS_UNEXP_ERROR;
104:
105: WHEN OTHERS THEN
106: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
102: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
103: x_return_status := G_RET_STS_UNEXP_ERROR;
104:
105: WHEN OTHERS THEN
106: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
107: p_msg_name => G_DB_ERROR,
108: p_token1 => G_PROG_NAME_TOKEN,
109: p_token1_value => l_program_name,
110: p_token2 => G_SQLCODE_TOKEN,
139:
140: IF p_fee_rec.fee_type IN ('MISCELLANEOUS', 'INCOME', 'SEC_DEPOSIT') AND
141: p_payment_levels_tbl.COUNT = 0 THEN
142:
143: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
144: p_msg_name => 'OKL_FEETYPE_PAYMENT_REQD');
145:
146: RAISE OKL_API.G_EXCEPTION_ERROR;
147:
142:
143: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
144: p_msg_name => 'OKL_FEETYPE_PAYMENT_REQD');
145:
146: RAISE OKL_API.G_EXCEPTION_ERROR;
147:
148: END IF;
149:
150: IF p_fee_rec.fee_type = 'SEC_DEPOSIT' THEN
150: IF p_fee_rec.fee_type = 'SEC_DEPOSIT' THEN
151:
152: IF (p_payment_levels_tbl.COUNT > 1) OR (p_payment_levels_tbl(p_payment_levels_tbl.FIRST).periods > 1) THEN
153:
154: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
155: p_msg_name => 'OKL_SD_PAYMENT_MULTIPLE');
156:
157: RAISE OKL_API.G_EXCEPTION_ERROR;
158:
153:
154: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
155: p_msg_name => 'OKL_SD_PAYMENT_MULTIPLE');
156:
157: RAISE OKL_API.G_EXCEPTION_ERROR;
158:
159: END IF;
160:
161: IF p_payment_levels_tbl(p_payment_levels_tbl.FIRST).stub_days IS NOT NULL OR
160:
161: IF p_payment_levels_tbl(p_payment_levels_tbl.FIRST).stub_days IS NOT NULL OR
162: p_payment_levels_tbl(p_payment_levels_tbl.FIRST).stub_amount IS NOT NULL THEN
163:
164: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
165: p_msg_name => 'OKL_SD_PAYMENT_STUB');
166:
167: RAISE OKL_API.G_EXCEPTION_ERROR;
168:
163:
164: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
165: p_msg_name => 'OKL_SD_PAYMENT_STUB');
166:
167: RAISE OKL_API.G_EXCEPTION_ERROR;
168:
169: END IF;
170:
171: END IF;
195: l_last_rec_exp_date := ADD_MONTHS(p_fee_rec.effective_from, l_mpp*(p_expense_levels_tbl(1).periods-1));
196:
197: IF l_last_rec_exp_date > l_quote_end_date THEN
198:
199: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
200: p_msg_name => 'OKL_RECEXP_PAST_K_END');
201:
202: RAISE OKL_API.G_EXCEPTION_ERROR;
203:
198:
199: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
200: p_msg_name => 'OKL_RECEXP_PAST_K_END');
201:
202: RAISE OKL_API.G_EXCEPTION_ERROR;
203:
204: END IF;
205:
206: END IF;
208: IF p_fee_rec.fee_type IN ('CAPITALIZED', 'FINANCED') THEN
209:
210: IF p_link_asset_tbl.COUNT > 0 AND TRUNC(l_quote_start_date) <> TRUNC(p_fee_rec.effective_from) THEN
211:
212: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
213: p_msg_name => 'OKL_QTE_ASST_FEE_DATE_MISMATCH');
214:
215: RAISE OKL_API.G_EXCEPTION_ERROR;
216:
211:
212: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
213: p_msg_name => 'OKL_QTE_ASST_FEE_DATE_MISMATCH');
214:
215: RAISE OKL_API.G_EXCEPTION_ERROR;
216:
217: END IF;
218:
219: END IF;
225: p_qte_id => p_quote_fee_rec.qte_id,
226: x_return_status => lx_return_status);
227:
228: IF lx_return_status = G_RET_STS_UNEXP_ERROR THEN
229: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
230: ELSIF lx_return_status = G_RET_STS_ERROR THEN
231: RAISE OKL_API.G_EXCEPTION_ERROR;
232: END IF;
233:
227:
228: IF lx_return_status = G_RET_STS_UNEXP_ERROR THEN
229: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
230: ELSIF lx_return_status = G_RET_STS_ERROR THEN
231: RAISE OKL_API.G_EXCEPTION_ERROR;
232: END IF;
233:
234: END IF;*/
235:
236: IF p_fee_rec.effective_from NOT BETWEEN l_quote_start_date AND l_quote_end_date THEN
237:
238: IF p_fee_rec.fee_type IN ('FINANCED', 'CAPITALIZED') THEN
239:
240: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
241: p_msg_name => 'OKL_QTE_FUNDING_DATE_NA');
242:
243: RAISE OKL_API.G_EXCEPTION_ERROR;
244:
239:
240: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
241: p_msg_name => 'OKL_QTE_FUNDING_DATE_NA');
242:
243: RAISE OKL_API.G_EXCEPTION_ERROR;
244:
245: ELSIF p_fee_rec.fee_type IN ('EXPENSE', 'MISCELLANEOUS') THEN
246:
247: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
243: RAISE OKL_API.G_EXCEPTION_ERROR;
244:
245: ELSIF p_fee_rec.fee_type IN ('EXPENSE', 'MISCELLANEOUS') THEN
246:
247: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
248: p_msg_name => 'OKL_QTE_EXPENSE_DATE_NA');
249:
250: RAISE OKL_API.G_EXCEPTION_ERROR;
251:
246:
247: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
248: p_msg_name => 'OKL_QTE_EXPENSE_DATE_NA');
249:
250: RAISE OKL_API.G_EXCEPTION_ERROR;
251:
252: ELSIF p_fee_rec.fee_type = 'SEC_DEPOSIT' THEN
253:
254: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
250: RAISE OKL_API.G_EXCEPTION_ERROR;
251:
252: ELSIF p_fee_rec.fee_type = 'SEC_DEPOSIT' THEN
253:
254: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
255: p_msg_name => 'OKL_QTE_DEPOSIT_DATE_NA');
256:
257: RAISE OKL_API.G_EXCEPTION_ERROR;
258:
253:
254: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
255: p_msg_name => 'OKL_QTE_DEPOSIT_DATE_NA');
256:
257: RAISE OKL_API.G_EXCEPTION_ERROR;
258:
259: END IF;
260:
261: END IF;
263: x_return_status := G_RET_STS_SUCCESS;
264:
265: EXCEPTION
266:
267: WHEN OKL_API.G_EXCEPTION_ERROR THEN
268:
269: x_return_status := G_RET_STS_ERROR;
270:
271: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
267: WHEN OKL_API.G_EXCEPTION_ERROR THEN
268:
269: x_return_status := G_RET_STS_ERROR;
270:
271: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
272:
273: x_return_status := G_RET_STS_UNEXP_ERROR;
274:
275: WHEN OTHERS THEN
273: x_return_status := G_RET_STS_UNEXP_ERROR;
274:
275: WHEN OTHERS THEN
276:
277: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
278: p_msg_name => G_DB_ERROR,
279: p_token1 => G_PROG_NAME_TOKEN,
280: p_token1_value => l_program_name,
281: p_token2 => G_SQLCODE_TOKEN,
330:
331: x_return_status := G_RET_STS_SUCCESS;
332: EXCEPTION
333:
334: WHEN OKL_API.G_EXCEPTION_ERROR THEN
335: x_return_status := G_RET_STS_ERROR;
336:
337: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
338: x_return_status := G_RET_STS_UNEXP_ERROR;
333:
334: WHEN OKL_API.G_EXCEPTION_ERROR THEN
335: x_return_status := G_RET_STS_ERROR;
336:
337: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
338: x_return_status := G_RET_STS_UNEXP_ERROR;
339:
340: WHEN OTHERS THEN
341: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
337: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
338: x_return_status := G_RET_STS_UNEXP_ERROR;
339:
340: WHEN OTHERS THEN
341: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
342: p_msg_name => G_DB_ERROR,
343: p_token1 => G_PROG_NAME_TOKEN,
344: p_token1_value => l_program_name,
345: p_token2 => G_SQLCODE_TOKEN,
451: x_return_status := G_RET_STS_SUCCESS;
452:
453: EXCEPTION
454:
455: WHEN OKL_API.G_EXCEPTION_ERROR THEN
456: x_return_status := G_RET_STS_ERROR;
457:
458: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
459: x_return_status := G_RET_STS_UNEXP_ERROR;
454:
455: WHEN OKL_API.G_EXCEPTION_ERROR THEN
456: x_return_status := G_RET_STS_ERROR;
457:
458: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
459: x_return_status := G_RET_STS_UNEXP_ERROR;
460:
461: WHEN OTHERS THEN
462: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
458: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
459: x_return_status := G_RET_STS_UNEXP_ERROR;
460:
461: WHEN OTHERS THEN
462: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
463: p_msg_name => G_DB_ERROR,
464: p_token1 => G_PROG_NAME_TOKEN,
465: p_token1_value => l_program_name,
466: p_token2 => G_SQLCODE_TOKEN,
499: l_amt_flag := 'Y';
500: l_assoc_total := l_assoc_total + p_assoc_assets_tbl(i).amount;
501: END IF;
502: IF (p_assoc_assets_tbl(i).amount IS NULL) AND l_amt_flag = 'Y' THEN
503: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME, p_msg_name => 'OKL_LINKASSET_NULL_FOUND');
504: RAISE OKL_API.G_EXCEPTION_ERROR;
505: END IF;
506: END IF;
507: END LOOP;
500: l_assoc_total := l_assoc_total + p_assoc_assets_tbl(i).amount;
501: END IF;
502: IF (p_assoc_assets_tbl(i).amount IS NULL) AND l_amt_flag = 'Y' THEN
503: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME, p_msg_name => 'OKL_LINKASSET_NULL_FOUND');
504: RAISE OKL_API.G_EXCEPTION_ERROR;
505: END IF;
506: END IF;
507: END LOOP;
508:
506: END IF;
507: END LOOP;
508:
509: IF l_amt_flag = 'Y' AND l_assoc_total <> p_fee_amount THEN
510: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
511: p_msg_name => 'OKL_LINKASSET_AMT_MISMATCH',
512: p_token1 => 'LINE_COST',
513: p_token1_value => p_fee_amount,
514: p_token2 => 'ASSOC_TOTAL',
512: p_token1 => 'LINE_COST',
513: p_token1_value => p_fee_amount,
514: p_token2 => 'ASSOC_TOTAL',
515: p_token2_value => l_assoc_total);
516: RAISE OKL_API.G_EXCEPTION_ERROR;
517: END IF;
518:
519: IF l_amt_flag = 'Y' THEN
520: x_derive_assoc_amt := 'N';
525: x_return_status := G_RET_STS_SUCCESS;
526:
527: EXCEPTION
528:
529: WHEN OKL_API.G_EXCEPTION_ERROR THEN
530: x_return_status := G_RET_STS_ERROR;
531:
532: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
533: x_return_status := G_RET_STS_UNEXP_ERROR;
528:
529: WHEN OKL_API.G_EXCEPTION_ERROR THEN
530: x_return_status := G_RET_STS_ERROR;
531:
532: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
533: x_return_status := G_RET_STS_UNEXP_ERROR;
534:
535: WHEN OTHERS THEN
536: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
532: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
533: x_return_status := G_RET_STS_UNEXP_ERROR;
534:
535: WHEN OTHERS THEN
536: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
537: p_msg_name => G_DB_ERROR,
538: p_token1 => G_PROG_NAME_TOKEN,
539: p_token1_value => l_program_name,
540: p_token2 => G_SQLCODE_TOKEN,
741: x_return_status := G_RET_STS_SUCCESS;
742:
743: EXCEPTION
744:
745: WHEN OKL_API.G_EXCEPTION_ERROR THEN
746: x_return_status := G_RET_STS_ERROR;
747:
748: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
749: x_return_status := G_RET_STS_UNEXP_ERROR;
744:
745: WHEN OKL_API.G_EXCEPTION_ERROR THEN
746: x_return_status := G_RET_STS_ERROR;
747:
748: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
749: x_return_status := G_RET_STS_UNEXP_ERROR;
750:
751: WHEN OTHERS THEN
752: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
748: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
749: x_return_status := G_RET_STS_UNEXP_ERROR;
750:
751: WHEN OTHERS THEN
752: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
753: p_msg_name => G_DB_ERROR,
754: p_token1 => G_PROG_NAME_TOKEN,
755: p_token1_value => l_program_name,
756: p_token2 => G_SQLCODE_TOKEN,
813: x_return_status := G_RET_STS_SUCCESS;
814:
815: EXCEPTION
816:
817: WHEN OKL_API.G_EXCEPTION_ERROR THEN
818: x_return_status := G_RET_STS_ERROR;
819:
820: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
821: x_return_status := G_RET_STS_UNEXP_ERROR;
816:
817: WHEN OKL_API.G_EXCEPTION_ERROR THEN
818: x_return_status := G_RET_STS_ERROR;
819:
820: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
821: x_return_status := G_RET_STS_UNEXP_ERROR;
822:
823: WHEN OTHERS THEN
824: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
820: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
821: x_return_status := G_RET_STS_UNEXP_ERROR;
822:
823: WHEN OTHERS THEN
824: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
825: p_msg_name => G_DB_ERROR,
826: p_token1 => G_PROG_NAME_TOKEN,
827: p_token1_value => l_program_name,
828: p_token2 => G_SQLCODE_TOKEN,
880: ,x_lrev_tbl => lx_assoc_assets_tbl
881: );
882:
883: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
884: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
885: ELSIF x_return_status = G_RET_STS_ERROR THEN
886: RAISE OKL_API.G_EXCEPTION_ERROR;
887: END IF;
888:
882:
883: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
884: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
885: ELSIF x_return_status = G_RET_STS_ERROR THEN
886: RAISE OKL_API.G_EXCEPTION_ERROR;
887: END IF;
888:
889: EXCEPTION
890:
887: END IF;
888:
889: EXCEPTION
890:
891: WHEN OKL_API.G_EXCEPTION_ERROR THEN
892: x_return_status := G_RET_STS_ERROR;
893:
894: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
895: x_return_status := G_RET_STS_UNEXP_ERROR;
890:
891: WHEN OKL_API.G_EXCEPTION_ERROR THEN
892: x_return_status := G_RET_STS_ERROR;
893:
894: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
895: x_return_status := G_RET_STS_UNEXP_ERROR;
896:
897: WHEN OTHERS THEN
898: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
894: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
895: x_return_status := G_RET_STS_UNEXP_ERROR;
896:
897: WHEN OTHERS THEN
898: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
899: p_msg_name => G_DB_ERROR,
900: p_token1 => G_PROG_NAME_TOKEN,
901: p_token1_value => l_program_name,
902: p_token2 => G_SQLCODE_TOKEN,
942: ,x_return_status => x_return_status
943: );
944:
945: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
946: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
947: ELSIF x_return_status = G_RET_STS_ERROR THEN
948: RAISE OKL_API.G_EXCEPTION_ERROR;
949: END IF;
950:
944:
945: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
946: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
947: ELSIF x_return_status = G_RET_STS_ERROR THEN
948: RAISE OKL_API.G_EXCEPTION_ERROR;
949: END IF;
950:
951: IF l_deleted_assoc_assets_tbl.COUNT > 0 THEN
952: okl_lre_pvt.delete_row (
956: ,x_msg_count => x_msg_count
957: ,x_msg_data => x_msg_data
958: ,p_lrev_tbl => l_deleted_assoc_assets_tbl );
959: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
960: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
961: ELSIF x_return_status = G_RET_STS_ERROR THEN
962: RAISE OKL_API.G_EXCEPTION_ERROR;
963: END IF;
964: END IF;
958: ,p_lrev_tbl => l_deleted_assoc_assets_tbl );
959: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
960: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
961: ELSIF x_return_status = G_RET_STS_ERROR THEN
962: RAISE OKL_API.G_EXCEPTION_ERROR;
963: END IF;
964: END IF;
965:
966: IF l_line_relation_tbl.COUNT > 0 THEN
1007: ,x_lrev_tbl => lx_assoc_assets_tbl
1008: );
1009:
1010: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1011: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1012: ELSIF x_return_status = G_RET_STS_ERROR THEN
1013: RAISE OKL_API.G_EXCEPTION_ERROR;
1014: END IF;
1015:
1009:
1010: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1011: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1012: ELSIF x_return_status = G_RET_STS_ERROR THEN
1013: RAISE OKL_API.G_EXCEPTION_ERROR;
1014: END IF;
1015:
1016: END IF;
1017:
1027: ,x_lrev_tbl => lx_assoc_assets_tbl
1028: );
1029:
1030: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1031: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1032: ELSIF x_return_status = G_RET_STS_ERROR THEN
1033: RAISE OKL_API.G_EXCEPTION_ERROR;
1034: END IF;
1035:
1029:
1030: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1031: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1032: ELSIF x_return_status = G_RET_STS_ERROR THEN
1033: RAISE OKL_API.G_EXCEPTION_ERROR;
1034: END IF;
1035:
1036: END IF;
1037:
1038: x_return_status := G_RET_STS_SUCCESS;
1039:
1040: EXCEPTION
1041:
1042: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1043: x_return_status := G_RET_STS_ERROR;
1044:
1045: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1046: x_return_status := G_RET_STS_UNEXP_ERROR;
1041:
1042: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1043: x_return_status := G_RET_STS_ERROR;
1044:
1045: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1046: x_return_status := G_RET_STS_UNEXP_ERROR;
1047:
1048: WHEN OTHERS THEN
1049: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1045: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1046: x_return_status := G_RET_STS_UNEXP_ERROR;
1047:
1048: WHEN OTHERS THEN
1049: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1050: p_msg_name => G_DB_ERROR,
1051: p_token1 => G_PROG_NAME_TOKEN,
1052: p_token1_value => l_program_name,
1053: p_token2 => G_SQLCODE_TOKEN,
1088: ,x_feev_rec => l_fee_rec
1089: );
1090:
1091: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1092: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1093: ELSIF x_return_status = G_RET_STS_ERROR THEN
1094: RAISE OKL_API.G_EXCEPTION_ERROR;
1095: END IF;
1096:
1090:
1091: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1092: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1093: ELSIF x_return_status = G_RET_STS_ERROR THEN
1094: RAISE OKL_API.G_EXCEPTION_ERROR;
1095: END IF;
1096:
1097: x_fee_id := l_fee_rec.id;
1098:
1097: x_fee_id := l_fee_rec.id;
1098:
1099: EXCEPTION
1100:
1101: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1102: x_return_status := G_RET_STS_ERROR;
1103:
1104: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1105: x_return_status := G_RET_STS_UNEXP_ERROR;
1100:
1101: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1102: x_return_status := G_RET_STS_ERROR;
1103:
1104: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1105: x_return_status := G_RET_STS_UNEXP_ERROR;
1106:
1107: WHEN OTHERS THEN
1108: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1104: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1105: x_return_status := G_RET_STS_UNEXP_ERROR;
1106:
1107: WHEN OTHERS THEN
1108: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1109: p_msg_name => G_DB_ERROR,
1110: p_token1 => G_PROG_NAME_TOKEN,
1111: p_token1_value => l_program_name,
1112: p_token2 => G_SQLCODE_TOKEN,
1146: ,x_feev_rec => l_fee_rec
1147: );
1148:
1149: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1150: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1151: ELSIF x_return_status = G_RET_STS_ERROR THEN
1152: RAISE OKL_API.G_EXCEPTION_ERROR;
1153: END IF;
1154:
1148:
1149: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1150: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1151: ELSIF x_return_status = G_RET_STS_ERROR THEN
1152: RAISE OKL_API.G_EXCEPTION_ERROR;
1153: END IF;
1154:
1155: EXCEPTION
1156:
1153: END IF;
1154:
1155: EXCEPTION
1156:
1157: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1158: x_return_status := G_RET_STS_ERROR;
1159:
1160: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1161: x_return_status := G_RET_STS_UNEXP_ERROR;
1156:
1157: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1158: x_return_status := G_RET_STS_ERROR;
1159:
1160: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1161: x_return_status := G_RET_STS_UNEXP_ERROR;
1162:
1163: WHEN OTHERS THEN
1164: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1160: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1161: x_return_status := G_RET_STS_UNEXP_ERROR;
1162:
1163: WHEN OTHERS THEN
1164: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1165: p_msg_name => G_DB_ERROR,
1166: p_token1 => G_PROG_NAME_TOKEN,
1167: p_token1_value => l_program_name,
1168: p_token2 => G_SQLCODE_TOKEN,
1210: ,x_msg_data => x_msg_data
1211: );
1212:
1213: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1214: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1215: ELSIF x_return_status = G_RET_STS_ERROR THEN
1216: RAISE OKL_API.G_EXCEPTION_ERROR;
1217: END IF;
1218:
1212:
1213: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1214: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1215: ELSIF x_return_status = G_RET_STS_ERROR THEN
1216: RAISE OKL_API.G_EXCEPTION_ERROR;
1217: END IF;
1218:
1219: EXCEPTION
1220:
1217: END IF;
1218:
1219: EXCEPTION
1220:
1221: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1222: x_return_status := G_RET_STS_ERROR;
1223:
1224: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1225: x_return_status := G_RET_STS_UNEXP_ERROR;
1220:
1221: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1222: x_return_status := G_RET_STS_ERROR;
1223:
1224: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1225: x_return_status := G_RET_STS_UNEXP_ERROR;
1226:
1227: WHEN OTHERS THEN
1228: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1224: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1225: x_return_status := G_RET_STS_UNEXP_ERROR;
1226:
1227: WHEN OTHERS THEN
1228: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1229: p_msg_name => G_DB_ERROR,
1230: p_token1 => G_PROG_NAME_TOKEN,
1231: p_token1_value => l_program_name,
1232: p_token2 => G_SQLCODE_TOKEN,
1273: ,x_msg_data => x_msg_data
1274: );
1275:
1276: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1277: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1278: ELSIF x_return_status = G_RET_STS_ERROR THEN
1279: RAISE OKL_API.G_EXCEPTION_ERROR;
1280: END IF;
1281:
1275:
1276: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1277: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1278: ELSIF x_return_status = G_RET_STS_ERROR THEN
1279: RAISE OKL_API.G_EXCEPTION_ERROR;
1280: END IF;
1281:
1282: EXCEPTION
1283:
1280: END IF;
1281:
1282: EXCEPTION
1283:
1284: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1285: x_return_status := G_RET_STS_ERROR;
1286:
1287: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1288: x_return_status := G_RET_STS_UNEXP_ERROR;
1283:
1284: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1285: x_return_status := G_RET_STS_ERROR;
1286:
1287: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1288: x_return_status := G_RET_STS_UNEXP_ERROR;
1289:
1290: WHEN OTHERS THEN
1291: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1287: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1288: x_return_status := G_RET_STS_UNEXP_ERROR;
1289:
1290: WHEN OTHERS THEN
1291: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1292: p_msg_name => G_DB_ERROR,
1293: p_token1 => G_PROG_NAME_TOKEN,
1294: p_token1_value => l_program_name,
1295: p_token2 => G_SQLCODE_TOKEN,
1337: ,x_msg_data => x_msg_data
1338: );
1339:
1340: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1341: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1342: ELSIF x_return_status = G_RET_STS_ERROR THEN
1343: RAISE OKL_API.G_EXCEPTION_ERROR;
1344: END IF;
1345:
1339:
1340: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1341: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1342: ELSIF x_return_status = G_RET_STS_ERROR THEN
1343: RAISE OKL_API.G_EXCEPTION_ERROR;
1344: END IF;
1345:
1346: EXCEPTION
1347:
1344: END IF;
1345:
1346: EXCEPTION
1347:
1348: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1349: x_return_status := G_RET_STS_ERROR;
1350:
1351: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1352: x_return_status := G_RET_STS_UNEXP_ERROR;
1347:
1348: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1349: x_return_status := G_RET_STS_ERROR;
1350:
1351: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1352: x_return_status := G_RET_STS_UNEXP_ERROR;
1353:
1354: WHEN OTHERS THEN
1355: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1351: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1352: x_return_status := G_RET_STS_UNEXP_ERROR;
1353:
1354: WHEN OTHERS THEN
1355: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1356: p_msg_name => G_DB_ERROR,
1357: p_token1 => G_PROG_NAME_TOKEN,
1358: p_token1_value => l_program_name,
1359: p_token2 => G_SQLCODE_TOKEN,
1400: ,x_msg_data => x_msg_data
1401: );
1402:
1403: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1404: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1405: ELSIF x_return_status = G_RET_STS_ERROR THEN
1406: RAISE OKL_API.G_EXCEPTION_ERROR;
1407: END IF;
1408:
1402:
1403: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1404: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1405: ELSIF x_return_status = G_RET_STS_ERROR THEN
1406: RAISE OKL_API.G_EXCEPTION_ERROR;
1407: END IF;
1408:
1409: EXCEPTION
1410:
1407: END IF;
1408:
1409: EXCEPTION
1410:
1411: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1412: x_return_status := G_RET_STS_ERROR;
1413:
1414: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1415: x_return_status := G_RET_STS_UNEXP_ERROR;
1410:
1411: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1412: x_return_status := G_RET_STS_ERROR;
1413:
1414: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1415: x_return_status := G_RET_STS_UNEXP_ERROR;
1416:
1417: WHEN OTHERS THEN
1418: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1414: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1415: x_return_status := G_RET_STS_UNEXP_ERROR;
1416:
1417: WHEN OTHERS THEN
1418: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1419: p_msg_name => G_DB_ERROR,
1420: p_token1 => G_PROG_NAME_TOKEN,
1421: p_token1_value => l_program_name,
1422: p_token2 => G_SQLCODE_TOKEN,
1478: p_expense_level_tbl => l_expense_level_tbl,
1479: p_payment_level_tbl => p_payment_level_tbl,
1480: x_return_status => l_return_status);
1481: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1482: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1483: ELSIF l_return_status = G_RET_STS_ERROR THEN
1484: RAISE OKL_API.G_EXCEPTION_ERROR;
1485: END IF;
1486:
1480: x_return_status => l_return_status);
1481: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1482: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1483: ELSIF l_return_status = G_RET_STS_ERROR THEN
1484: RAISE OKL_API.G_EXCEPTION_ERROR;
1485: END IF;
1486:
1487: validate_quote_fee (p_fee_rec => l_fee_rec,
1488: p_link_asset_tbl => p_assoc_asset_tbl,
1492: x_return_status => l_return_status,
1493: x_msg_count => x_msg_count,
1494: x_msg_data => x_msg_data);
1495: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1496: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1497: ELSIF l_return_status = G_RET_STS_ERROR THEN
1498: RAISE OKL_API.G_EXCEPTION_ERROR;
1499: END IF;
1500:
1494: x_msg_data => x_msg_data);
1495: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1496: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1497: ELSIF l_return_status = G_RET_STS_ERROR THEN
1498: RAISE OKL_API.G_EXCEPTION_ERROR;
1499: END IF;
1500:
1501: IF p_assoc_asset_tbl.COUNT > 0 THEN
1502:
1509: ,x_return_status => l_return_status
1510: );
1511:
1512: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1513: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1514: ELSIF l_return_status = G_RET_STS_ERROR THEN
1515: RAISE OKL_API.G_EXCEPTION_ERROR;
1516: END IF;
1517:
1511:
1512: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1513: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1514: ELSIF l_return_status = G_RET_STS_ERROR THEN
1515: RAISE OKL_API.G_EXCEPTION_ERROR;
1516: END IF;
1517:
1518: IF (l_derive_assoc_amt = 'Y') THEN
1519:
1527: ,x_msg_data => x_msg_data
1528: );
1529:
1530: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1531: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1532: ELSIF l_return_status = G_RET_STS_ERROR THEN
1533: RAISE OKL_API.G_EXCEPTION_ERROR;
1534: END IF;
1535:
1529:
1530: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1531: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1532: ELSIF l_return_status = G_RET_STS_ERROR THEN
1533: RAISE OKL_API.G_EXCEPTION_ERROR;
1534: END IF;
1535:
1536: END IF;
1537:
1544: ,x_msg_data => x_msg_data
1545: );
1546:
1547: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1548: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1549: ELSIF l_return_status = G_RET_STS_ERROR THEN
1550: RAISE OKL_API.G_EXCEPTION_ERROR;
1551: END IF;
1552:
1546:
1547: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1548: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1549: ELSIF l_return_status = G_RET_STS_ERROR THEN
1550: RAISE OKL_API.G_EXCEPTION_ERROR;
1551: END IF;
1552:
1553: IF l_line_relation_tbl.COUNT > 0 THEN
1554:
1560: ,x_msg_data => x_msg_data
1561: );
1562:
1563: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1564: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1565: ELSIF l_return_status = G_RET_STS_ERROR THEN
1566: RAISE OKL_API.G_EXCEPTION_ERROR;
1567: END IF;
1568:
1562:
1563: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1564: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1565: ELSIF l_return_status = G_RET_STS_ERROR THEN
1566: RAISE OKL_API.G_EXCEPTION_ERROR;
1567: END IF;
1568:
1569: END IF;
1570:
1568:
1569: END IF;
1570:
1571: IF (p_payment_level_tbl.COUNT > 0 AND p_payment_header_rec.stream_type_id IS NULL) THEN
1572: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1573: p_msg_name => 'OKL_SALES_NO_PAYMENTHEAD');
1574: RAISE OKL_API.G_EXCEPTION_ERROR;
1575: ELSIF (p_payment_header_rec.stream_type_id IS NOT NULL AND p_payment_level_tbl.COUNT = 0 ) THEN
1576: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1570:
1571: IF (p_payment_level_tbl.COUNT > 0 AND p_payment_header_rec.stream_type_id IS NULL) THEN
1572: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1573: p_msg_name => 'OKL_SALES_NO_PAYMENTHEAD');
1574: RAISE OKL_API.G_EXCEPTION_ERROR;
1575: ELSIF (p_payment_header_rec.stream_type_id IS NOT NULL AND p_payment_level_tbl.COUNT = 0 ) THEN
1576: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1577: p_msg_name => 'OKL_SALES_NO_PAYMENTLINES');
1578: RAISE OKL_API.G_EXCEPTION_ERROR;
1572: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1573: p_msg_name => 'OKL_SALES_NO_PAYMENTHEAD');
1574: RAISE OKL_API.G_EXCEPTION_ERROR;
1575: ELSIF (p_payment_header_rec.stream_type_id IS NOT NULL AND p_payment_level_tbl.COUNT = 0 ) THEN
1576: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1577: p_msg_name => 'OKL_SALES_NO_PAYMENTLINES');
1578: RAISE OKL_API.G_EXCEPTION_ERROR;
1579: END IF;
1580:
1574: RAISE OKL_API.G_EXCEPTION_ERROR;
1575: ELSIF (p_payment_header_rec.stream_type_id IS NOT NULL AND p_payment_level_tbl.COUNT = 0 ) THEN
1576: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1577: p_msg_name => 'OKL_SALES_NO_PAYMENTLINES');
1578: RAISE OKL_API.G_EXCEPTION_ERROR;
1579: END IF;
1580:
1581: IF l_fee_rec.fee_type IN ('INCOME', 'MISCELLANEOUS', 'SEC_DEPOSIT') THEN
1582:
1589: ,x_msg_data => x_msg_data
1590: );
1591:
1592: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1593: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1594: ELSIF l_return_status = G_RET_STS_ERROR THEN
1595: RAISE OKL_API.G_EXCEPTION_ERROR;
1596: END IF;
1597:
1591:
1592: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1593: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1594: ELSIF l_return_status = G_RET_STS_ERROR THEN
1595: RAISE OKL_API.G_EXCEPTION_ERROR;
1596: END IF;
1597:
1598: END IF;
1599:
1608: ,x_msg_data => x_msg_data
1609: );
1610:
1611: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1612: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1613: ELSIF l_return_status = G_RET_STS_ERROR THEN
1614: RAISE OKL_API.G_EXCEPTION_ERROR;
1615: END IF;
1616:
1610:
1611: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1612: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1613: ELSIF l_return_status = G_RET_STS_ERROR THEN
1614: RAISE OKL_API.G_EXCEPTION_ERROR;
1615: END IF;
1616:
1617: END IF;
1618:
1630: ,p_parent_object_id => l_p_id
1631: );
1632:
1633: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1634: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1635: ELSIF x_return_status = G_RET_STS_ERROR THEN
1636: RAISE OKL_API.G_EXCEPTION_ERROR;
1637: END IF;*/
1638: x_return_status := G_RET_STS_SUCCESS;
1632:
1633: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1634: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1635: ELSIF x_return_status = G_RET_STS_ERROR THEN
1636: RAISE OKL_API.G_EXCEPTION_ERROR;
1637: END IF;*/
1638: x_return_status := G_RET_STS_SUCCESS;
1639:
1640: EXCEPTION
1638: x_return_status := G_RET_STS_SUCCESS;
1639:
1640: EXCEPTION
1641:
1642: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1643:
1644: IF p_transaction_control = G_TRUE THEN
1645: ROLLBACK TO l_program_name;
1646: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1647: END IF;
1648:
1649: x_return_status := G_RET_STS_ERROR;
1650:
1651: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1652:
1653: IF p_transaction_control = G_TRUE THEN
1654: ROLLBACK TO l_program_name;
1655: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1658: x_return_status := G_RET_STS_UNEXP_ERROR;
1659:
1660: WHEN OTHERS THEN
1661:
1662: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1663: p_msg_name => G_DB_ERROR,
1664: p_token1 => G_PROG_NAME_TOKEN,
1665: p_token1_value => l_api_name,
1666: p_token2 => G_SQLCODE_TOKEN,
1713: x_return_status := G_RET_STS_SUCCESS;
1714:
1715: EXCEPTION
1716:
1717: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1718: x_return_status := G_RET_STS_ERROR;
1719:
1720: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1721: x_return_status := G_RET_STS_UNEXP_ERROR;
1716:
1717: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1718: x_return_status := G_RET_STS_ERROR;
1719:
1720: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1721: x_return_status := G_RET_STS_UNEXP_ERROR;
1722:
1723: WHEN OTHERS THEN
1724: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1720: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1721: x_return_status := G_RET_STS_UNEXP_ERROR;
1722:
1723: WHEN OTHERS THEN
1724: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1725: p_msg_name => G_DB_ERROR,
1726: p_token1 => G_PROG_NAME_TOKEN,
1727: p_token1_value => l_program_name,
1728: p_token2 => G_SQLCODE_TOKEN,
1772: get_fee_rec (p_fee_id => p_fee_rec.id
1773: ,x_fee_rec => l_fee_rec
1774: ,x_return_status => x_return_status);
1775: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1776: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1777: ELSIF x_return_status = G_RET_STS_ERROR THEN
1778: RAISE OKL_API.G_EXCEPTION_ERROR;
1779: END IF;
1780:
1774: ,x_return_status => x_return_status);
1775: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1776: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1777: ELSIF x_return_status = G_RET_STS_ERROR THEN
1778: RAISE OKL_API.G_EXCEPTION_ERROR;
1779: END IF;
1780:
1781: IF (p_sync_fee_header = 'Y') THEN
1782: -- Sync Fee Info
1784: p_input_rec => p_fee_rec,
1785: x_return_status => x_return_status);
1786:
1787: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1788: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1789: ELSIF x_return_status = G_RET_STS_ERROR THEN
1790: RAISE OKL_API.G_EXCEPTION_ERROR;
1791: END IF;
1792:
1786:
1787: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1788: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1789: ELSIF x_return_status = G_RET_STS_ERROR THEN
1790: RAISE OKL_API.G_EXCEPTION_ERROR;
1791: END IF;
1792:
1793: -- Update Fee Header
1794: update_header (
1797: ,x_msg_count => x_msg_count
1798: ,x_msg_data => x_msg_data );
1799:
1800: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1801: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1802: ELSIF x_return_status = G_RET_STS_ERROR THEN
1803: RAISE OKL_API.G_EXCEPTION_ERROR;
1804: END IF;
1805: END IF;
1799:
1800: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1801: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1802: ELSIF x_return_status = G_RET_STS_ERROR THEN
1803: RAISE OKL_API.G_EXCEPTION_ERROR;
1804: END IF;
1805: END IF;
1806:
1807: -- Fetch Line Relationships info
1809: get_line_relations_tbl (p_fee_id => l_fee_rec.id
1810: ,x_line_relation_tbl => l_copy_relation_tbl
1811: ,x_return_status => x_return_status);
1812: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1813: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1814: ELSIF x_return_status = G_RET_STS_ERROR THEN
1815: RAISE OKL_API.G_EXCEPTION_ERROR;
1816: END IF;
1817:
1811: ,x_return_status => x_return_status);
1812: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1813: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1814: ELSIF x_return_status = G_RET_STS_ERROR THEN
1815: RAISE OKL_API.G_EXCEPTION_ERROR;
1816: END IF;
1817:
1818: IF (l_copy_relation_tbl.COUNT > 0) THEN
1819: process_link_asset_amounts (
1826: ,x_msg_count => x_msg_count
1827: ,x_msg_data => x_msg_data );
1828:
1829: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1830: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1831: ELSIF x_return_status = G_RET_STS_ERROR THEN
1832: RAISE OKL_API.G_EXCEPTION_ERROR;
1833: END IF;
1834:
1828:
1829: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1830: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1831: ELSIF x_return_status = G_RET_STS_ERROR THEN
1832: RAISE OKL_API.G_EXCEPTION_ERROR;
1833: END IF;
1834:
1835: FOR i IN l_copy_relation_tbl.FIRST .. l_copy_relation_tbl.LAST LOOP
1836: IF l_copy_relation_tbl.EXISTS(i) THEN
1854: ,p_lrev_tbl => l_line_relation_tbl
1855: ,x_lrev_tbl => lx_line_relation_tbl);
1856:
1857: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1858: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1859: ELSIF x_return_status = G_RET_STS_ERROR THEN
1860: RAISE OKL_API.G_EXCEPTION_ERROR;
1861: END IF;
1862: END IF;
1856:
1857: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1858: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1859: ELSIF x_return_status = G_RET_STS_ERROR THEN
1860: RAISE OKL_API.G_EXCEPTION_ERROR;
1861: END IF;
1862: END IF;
1863: END IF;
1864: END IF;
1877: ,p_parent_object_id => l_p_id
1878: );
1879:
1880: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1881: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1882: ELSIF x_return_status = G_RET_STS_ERROR THEN
1883: RAISE OKL_API.G_EXCEPTION_ERROR;
1884: END IF;*/
1885:
1879:
1880: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1881: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1882: ELSIF x_return_status = G_RET_STS_ERROR THEN
1883: RAISE OKL_API.G_EXCEPTION_ERROR;
1884: END IF;*/
1885:
1886: x_return_status := G_RET_STS_SUCCESS;
1887:
1886: x_return_status := G_RET_STS_SUCCESS;
1887:
1888: EXCEPTION
1889:
1890: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1891:
1892: IF p_transaction_control = G_TRUE THEN
1893: ROLLBACK TO l_program_name;
1894: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1895: END IF;
1896:
1897: x_return_status := G_RET_STS_ERROR;
1898:
1899: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1900:
1901: IF p_transaction_control = G_TRUE THEN
1902: ROLLBACK TO l_program_name;
1903: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1906: x_return_status := G_RET_STS_UNEXP_ERROR;
1907:
1908: WHEN OTHERS THEN
1909:
1910: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1911: p_msg_name => G_DB_ERROR,
1912: p_token1 => G_PROG_NAME_TOKEN,
1913: p_token1_value => l_api_name,
1914: p_token2 => G_SQLCODE_TOKEN,
1975: p_expense_level_tbl => l_expense_level_tbl,
1976: p_payment_level_tbl => p_payment_level_tbl,
1977: x_return_status => l_return_status);
1978: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1979: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1980: ELSIF l_return_status = G_RET_STS_ERROR THEN
1981: RAISE OKL_API.G_EXCEPTION_ERROR;
1982: END IF;
1983:
1977: x_return_status => l_return_status);
1978: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1979: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1980: ELSIF l_return_status = G_RET_STS_ERROR THEN
1981: RAISE OKL_API.G_EXCEPTION_ERROR;
1982: END IF;
1983:
1984: validate_quote_fee (p_fee_rec => l_fee_rec,
1985: p_link_asset_tbl => p_assoc_asset_tbl,
1989: x_return_status => l_return_status,
1990: x_msg_count => x_msg_count,
1991: x_msg_data => x_msg_data);
1992: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1993: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1994: ELSIF l_return_status = G_RET_STS_ERROR THEN
1995: RAISE OKL_API.G_EXCEPTION_ERROR;
1996: END IF;
1997:
1991: x_msg_data => x_msg_data);
1992: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1993: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1994: ELSIF l_return_status = G_RET_STS_ERROR THEN
1995: RAISE OKL_API.G_EXCEPTION_ERROR;
1996: END IF;
1997:
1998: IF p_assoc_asset_tbl.COUNT > 0 THEN
1999:
2006: ,x_return_status => l_return_status
2007: );
2008:
2009: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
2010: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2011: ELSIF l_return_status = G_RET_STS_ERROR THEN
2012: RAISE OKL_API.G_EXCEPTION_ERROR;
2013: END IF;
2014:
2008:
2009: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
2010: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2011: ELSIF l_return_status = G_RET_STS_ERROR THEN
2012: RAISE OKL_API.G_EXCEPTION_ERROR;
2013: END IF;
2014:
2015: IF (l_derive_assoc_amt = 'Y') THEN
2016:
2023: ,x_msg_count => x_msg_count
2024: ,x_msg_data => x_msg_data );
2025:
2026: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
2027: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2028: ELSIF l_return_status = G_RET_STS_ERROR THEN
2029: RAISE OKL_API.G_EXCEPTION_ERROR;
2030: END IF;
2031:
2025:
2026: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
2027: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2028: ELSIF l_return_status = G_RET_STS_ERROR THEN
2029: RAISE OKL_API.G_EXCEPTION_ERROR;
2030: END IF;
2031:
2032: END IF;
2033:
2039: ,x_msg_count => x_msg_count
2040: ,x_msg_data => x_msg_data );
2041:
2042: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
2043: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2044: ELSIF l_return_status = G_RET_STS_ERROR THEN
2045: RAISE OKL_API.G_EXCEPTION_ERROR;
2046: END IF;
2047:
2041:
2042: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
2043: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2044: ELSIF l_return_status = G_RET_STS_ERROR THEN
2045: RAISE OKL_API.G_EXCEPTION_ERROR;
2046: END IF;
2047:
2048: l_fee_id := l_fee_rec.id;
2049: l_fee_type := l_fee_rec.fee_type;
2057: ,x_msg_data => x_msg_data
2058: );
2059:
2060: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
2061: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2062: ELSIF l_return_status = G_RET_STS_ERROR THEN
2063: RAISE OKL_API.G_EXCEPTION_ERROR;
2064: END IF;
2065:
2059:
2060: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
2061: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2062: ELSIF l_return_status = G_RET_STS_ERROR THEN
2063: RAISE OKL_API.G_EXCEPTION_ERROR;
2064: END IF;
2065:
2066: IF (p_payment_level_tbl.COUNT > 0 AND p_payment_header_rec.stream_type_id IS NULL) THEN
2067: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2063: RAISE OKL_API.G_EXCEPTION_ERROR;
2064: END IF;
2065:
2066: IF (p_payment_level_tbl.COUNT > 0 AND p_payment_header_rec.stream_type_id IS NULL) THEN
2067: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2068: p_msg_name => 'OKL_SALES_NO_PAYMENTHEAD');
2069: RAISE OKL_API.G_EXCEPTION_ERROR;
2070: ELSIF (p_payment_header_rec.stream_type_id IS NOT NULL AND p_payment_level_tbl.COUNT = 0 ) THEN
2071: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2065:
2066: IF (p_payment_level_tbl.COUNT > 0 AND p_payment_header_rec.stream_type_id IS NULL) THEN
2067: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2068: p_msg_name => 'OKL_SALES_NO_PAYMENTHEAD');
2069: RAISE OKL_API.G_EXCEPTION_ERROR;
2070: ELSIF (p_payment_header_rec.stream_type_id IS NOT NULL AND p_payment_level_tbl.COUNT = 0 ) THEN
2071: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2072: p_msg_name => 'OKL_SALES_NO_PAYMENTLINES');
2073: RAISE OKL_API.G_EXCEPTION_ERROR;
2067: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2068: p_msg_name => 'OKL_SALES_NO_PAYMENTHEAD');
2069: RAISE OKL_API.G_EXCEPTION_ERROR;
2070: ELSIF (p_payment_header_rec.stream_type_id IS NOT NULL AND p_payment_level_tbl.COUNT = 0 ) THEN
2071: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2072: p_msg_name => 'OKL_SALES_NO_PAYMENTLINES');
2073: RAISE OKL_API.G_EXCEPTION_ERROR;
2074: END IF;
2075:
2069: RAISE OKL_API.G_EXCEPTION_ERROR;
2070: ELSIF (p_payment_header_rec.stream_type_id IS NOT NULL AND p_payment_level_tbl.COUNT = 0 ) THEN
2071: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2072: p_msg_name => 'OKL_SALES_NO_PAYMENTLINES');
2073: RAISE OKL_API.G_EXCEPTION_ERROR;
2074: END IF;
2075:
2076: IF l_fee_rec.fee_type IN ('INCOME', 'MISCELLANEOUS', 'SEC_DEPOSIT') THEN
2077:
2084: ,x_msg_data => x_msg_data
2085: );
2086:
2087: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
2088: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2089: ELSIF l_return_status = G_RET_STS_ERROR THEN
2090: RAISE OKL_API.G_EXCEPTION_ERROR;
2091: END IF;
2092:
2086:
2087: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
2088: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2089: ELSIF l_return_status = G_RET_STS_ERROR THEN
2090: RAISE OKL_API.G_EXCEPTION_ERROR;
2091: END IF;
2092:
2093: END IF;
2094:
2103: ,x_msg_data => x_msg_data
2104: );
2105:
2106: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
2107: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2108: ELSIF l_return_status = G_RET_STS_ERROR THEN
2109: RAISE OKL_API.G_EXCEPTION_ERROR;
2110: END IF;
2111:
2105:
2106: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
2107: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2108: ELSIF l_return_status = G_RET_STS_ERROR THEN
2109: RAISE OKL_API.G_EXCEPTION_ERROR;
2110: END IF;
2111:
2112: END IF;
2113:
2125: ,p_parent_object_id => l_p_id
2126: );
2127:
2128: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2129: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2130: ELSIF x_return_status = G_RET_STS_ERROR THEN
2131: RAISE OKL_API.G_EXCEPTION_ERROR;
2132: END IF;*/
2133:
2127:
2128: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2129: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2130: ELSIF x_return_status = G_RET_STS_ERROR THEN
2131: RAISE OKL_API.G_EXCEPTION_ERROR;
2132: END IF;*/
2133:
2134: x_return_status := G_RET_STS_SUCCESS;
2135:
2134: x_return_status := G_RET_STS_SUCCESS;
2135:
2136: EXCEPTION
2137:
2138: WHEN OKL_API.G_EXCEPTION_ERROR THEN
2139:
2140: IF p_transaction_control = G_TRUE THEN
2141: ROLLBACK TO l_program_name;
2142: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2143: END IF;
2144:
2145: x_return_status := G_RET_STS_ERROR;
2146:
2147: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2148:
2149: IF p_transaction_control = G_TRUE THEN
2150: ROLLBACK TO l_program_name;
2151: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2154: x_return_status := G_RET_STS_UNEXP_ERROR;
2155:
2156: WHEN OTHERS THEN
2157:
2158: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2159: p_msg_name => G_DB_ERROR,
2160: p_token1 => G_PROG_NAME_TOKEN,
2161: p_token1_value => l_api_name,
2162: p_token2 => G_SQLCODE_TOKEN,
2246:
2247: x_return_status := G_RET_STS_SUCCESS;
2248: EXCEPTION
2249:
2250: WHEN OKL_API.G_EXCEPTION_ERROR THEN
2251: x_return_status := G_RET_STS_ERROR;
2252:
2253: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2254: x_return_status := G_RET_STS_UNEXP_ERROR;
2249:
2250: WHEN OKL_API.G_EXCEPTION_ERROR THEN
2251: x_return_status := G_RET_STS_ERROR;
2252:
2253: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2254: x_return_status := G_RET_STS_UNEXP_ERROR;
2255:
2256: WHEN OTHERS THEN
2257: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2253: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2254: x_return_status := G_RET_STS_UNEXP_ERROR;
2255:
2256: WHEN OTHERS THEN
2257: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2258: p_msg_name => G_DB_ERROR,
2259: p_token1 => G_PROG_NAME_TOKEN,
2260: p_token1_value => l_program_name,
2261: p_token2 => G_SQLCODE_TOKEN,
2297: p_target_fee_id => p_target_fee_id,
2298: x_lrship_tbl => l_lrship_tbl,
2299: x_return_status => x_return_status);
2300: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2301: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2302: ELSIF x_return_status = G_RET_STS_ERROR THEN
2303: RAISE OKL_API.G_EXCEPTION_ERROR;
2304: END IF;
2305:
2299: x_return_status => x_return_status);
2300: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2301: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2302: ELSIF x_return_status = G_RET_STS_ERROR THEN
2303: RAISE OKL_API.G_EXCEPTION_ERROR;
2304: END IF;
2305:
2306: SELECT PARENT_OBJECT_ID
2307: INTO ln_target_quote_id
2328: ,p_lrev_tbl => l_lrship_tbl
2329: ,x_lrev_tbl => lx_lrship_tbl );
2330:
2331: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2332: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2333: ELSIF x_return_status = G_RET_STS_ERROR THEN
2334: RAISE OKL_API.G_EXCEPTION_ERROR;
2335: END IF;
2336: END IF;
2330:
2331: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2332: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2333: ELSIF x_return_status = G_RET_STS_ERROR THEN
2334: RAISE OKL_API.G_EXCEPTION_ERROR;
2335: END IF;
2336: END IF;
2337:
2338: x_return_status := G_RET_STS_SUCCESS;
2338: x_return_status := G_RET_STS_SUCCESS;
2339:
2340: EXCEPTION
2341:
2342: WHEN OKL_API.G_EXCEPTION_ERROR THEN
2343:
2344: x_return_status := G_RET_STS_ERROR;
2345:
2346: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2342: WHEN OKL_API.G_EXCEPTION_ERROR THEN
2343:
2344: x_return_status := G_RET_STS_ERROR;
2345:
2346: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2347:
2348: x_return_status := G_RET_STS_UNEXP_ERROR;
2349:
2350: WHEN OTHERS THEN
2348: x_return_status := G_RET_STS_UNEXP_ERROR;
2349:
2350: WHEN OTHERS THEN
2351:
2352: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2353: p_msg_name => G_DB_ERROR,
2354: p_token1 => G_PROG_NAME_TOKEN,
2355: p_token1_value => l_api_name,
2356: p_token2 => G_SQLCODE_TOKEN,
2414: ,x_msg_count => x_msg_count
2415: ,x_msg_data => x_msg_data);
2416:
2417: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2418: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2419: ELSIF x_return_status = G_RET_STS_ERROR THEN
2420: RAISE OKL_API.G_EXCEPTION_ERROR;
2421: END IF;
2422:
2416:
2417: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2418: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2419: ELSIF x_return_status = G_RET_STS_ERROR THEN
2420: RAISE OKL_API.G_EXCEPTION_ERROR;
2421: END IF;
2422:
2423: x_return_status := G_RET_STS_SUCCESS;
2424:
2423: x_return_status := G_RET_STS_SUCCESS;
2424:
2425: EXCEPTION
2426:
2427: WHEN OKL_API.G_EXCEPTION_ERROR THEN
2428:
2429: IF p_transaction_control = G_TRUE THEN
2430: ROLLBACK TO l_program_name;
2431: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2432: END IF;
2433:
2434: x_return_status := G_RET_STS_ERROR;
2435:
2436: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2437:
2438: IF p_transaction_control = G_TRUE THEN
2439: ROLLBACK TO l_program_name;
2440: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2443: x_return_status := G_RET_STS_UNEXP_ERROR;
2444:
2445: WHEN OTHERS THEN
2446:
2447: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2448: p_msg_name => G_DB_ERROR,
2449: p_token1 => G_PROG_NAME_TOKEN,
2450: p_token1_value => l_api_name,
2451: p_token2 => G_SQLCODE_TOKEN,
2511: ,x_fee_rec => l_fee_rec
2512: ,x_return_status => x_return_status);
2513:
2514: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2515: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2516: ELSIF x_return_status = G_RET_STS_ERROR THEN
2517: RAISE OKL_API.G_EXCEPTION_ERROR;
2518: END IF;
2519:
2513:
2514: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2515: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2516: ELSIF x_return_status = G_RET_STS_ERROR THEN
2517: RAISE OKL_API.G_EXCEPTION_ERROR;
2518: END IF;
2519:
2520: -- Check if the Source and Target Quote's Pricing type are equal and if it
2521: -- is a Configuration fee, cash flows are not copied.
2567: ,x_msg_count => x_msg_count
2568: ,x_msg_data => x_msg_data );
2569:
2570: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2571: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2572: ELSIF x_return_status = G_RET_STS_ERROR THEN
2573: RAISE OKL_API.G_EXCEPTION_ERROR;
2574: END IF;
2575:
2569:
2570: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2571: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2572: ELSIF x_return_status = G_RET_STS_ERROR THEN
2573: RAISE OKL_API.G_EXCEPTION_ERROR;
2574: END IF;
2575:
2576: -- Validation to check if the product and expected start date for source
2577: -- and target contracts are equal, if not cash flows are not copied.
2607: x_return_status => x_return_status,
2608: x_msg_count => x_msg_count,
2609: x_msg_data => x_msg_data );
2610: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2611: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2612: ELSIF x_return_status = G_RET_STS_ERROR THEN
2613: RAISE OKL_API.G_EXCEPTION_ERROR;
2614: END IF;
2615: END IF;
2609: x_msg_data => x_msg_data );
2610: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2611: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2612: ELSIF x_return_status = G_RET_STS_ERROR THEN
2613: RAISE OKL_API.G_EXCEPTION_ERROR;
2614: END IF;
2615: END IF;
2616:
2617: IF (lb_copy_cashflow) THEN
2628: ,x_msg_data => x_msg_data
2629: );
2630:
2631: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2632: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2633: ELSIF x_return_status = G_RET_STS_ERROR THEN
2634: RAISE OKL_API.G_EXCEPTION_ERROR;
2635: END IF;
2636: END IF;
2630:
2631: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2632: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2633: ELSIF x_return_status = G_RET_STS_ERROR THEN
2634: RAISE OKL_API.G_EXCEPTION_ERROR;
2635: END IF;
2636: END IF;
2637:
2638: EXCEPTION
2636: END IF;
2637:
2638: EXCEPTION
2639:
2640: WHEN OKL_API.G_EXCEPTION_ERROR THEN
2641:
2642: IF p_transaction_control = G_TRUE THEN
2643: ROLLBACK TO l_program_name;
2644: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2645: END IF;
2646:
2647: x_return_status := G_RET_STS_ERROR;
2648:
2649: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2650:
2651: IF p_transaction_control = G_TRUE THEN
2652: ROLLBACK TO l_program_name;
2653: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2656: x_return_status := G_RET_STS_UNEXP_ERROR;
2657:
2658: WHEN OTHERS THEN
2659:
2660: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2661: p_msg_name => G_DB_ERROR,
2662: p_token1 => G_PROG_NAME_TOKEN,
2663: p_token1_value => l_api_name,
2664: p_token2 => G_SQLCODE_TOKEN,
2734: ,p_lrev_tbl => l_assoc_asset_tbl
2735: );
2736:
2737: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2738: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2739: ELSIF x_return_status = G_RET_STS_ERROR THEN
2740: RAISE OKL_API.G_EXCEPTION_ERROR;
2741: END IF;
2742:
2736:
2737: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2738: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2739: ELSIF x_return_status = G_RET_STS_ERROR THEN
2740: RAISE OKL_API.G_EXCEPTION_ERROR;
2741: END IF;
2742:
2743: END IF;
2744:
2753: ,x_msg_data => x_msg_data
2754: );
2755:
2756: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2757: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2758: ELSIF x_return_status = G_RET_STS_ERROR THEN
2759: RAISE OKL_API.G_EXCEPTION_ERROR;
2760: END IF;
2761:
2755:
2756: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2757: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2758: ELSIF x_return_status = G_RET_STS_ERROR THEN
2759: RAISE OKL_API.G_EXCEPTION_ERROR;
2760: END IF;
2761:
2762: l_fee_rec.id := p_fee_id;
2763:
2770: ,p_feev_rec => l_fee_rec
2771: );
2772:
2773: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2774: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2775: ELSIF x_return_status = G_RET_STS_ERROR THEN
2776: RAISE OKL_API.G_EXCEPTION_ERROR;
2777: END IF;
2778:
2772:
2773: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2774: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2775: ELSIF x_return_status = G_RET_STS_ERROR THEN
2776: RAISE OKL_API.G_EXCEPTION_ERROR;
2777: END IF;
2778:
2779: /*
2780: SELECT qte.parent_object_id,qte.parent_object_code
2794: ,p_parent_object_id => l_p_id
2795: );
2796:
2797: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2798: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2799: ELSIF x_return_status = G_RET_STS_ERROR THEN
2800: RAISE OKL_API.G_EXCEPTION_ERROR;
2801: END IF;*/
2802:
2796:
2797: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2798: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2799: ELSIF x_return_status = G_RET_STS_ERROR THEN
2800: RAISE OKL_API.G_EXCEPTION_ERROR;
2801: END IF;*/
2802:
2803: x_return_status := G_RET_STS_SUCCESS;
2804:
2803: x_return_status := G_RET_STS_SUCCESS;
2804:
2805: EXCEPTION
2806:
2807: WHEN OKL_API.G_EXCEPTION_ERROR THEN
2808:
2809: IF p_transaction_control = G_TRUE THEN
2810: ROLLBACK TO l_program_name;
2811: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2812: END IF;
2813:
2814: x_return_status := G_RET_STS_ERROR;
2815:
2816: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2817:
2818: IF p_transaction_control = G_TRUE THEN
2819: ROLLBACK TO l_program_name;
2820: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2823: x_return_status := G_RET_STS_UNEXP_ERROR;
2824:
2825: WHEN OTHERS THEN
2826:
2827: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2828: p_msg_name => G_DB_ERROR,
2829: p_token1 => G_PROG_NAME_TOKEN,
2830: p_token1_value => l_api_name,
2831: p_token2 => G_SQLCODE_TOKEN,