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,
453: x_return_status := G_RET_STS_SUCCESS;
454:
455: EXCEPTION
456:
457: WHEN OKL_API.G_EXCEPTION_ERROR THEN
458: x_return_status := G_RET_STS_ERROR;
459:
460: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
461: x_return_status := G_RET_STS_UNEXP_ERROR;
456:
457: WHEN OKL_API.G_EXCEPTION_ERROR THEN
458: x_return_status := G_RET_STS_ERROR;
459:
460: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
461: x_return_status := G_RET_STS_UNEXP_ERROR;
462:
463: WHEN OTHERS THEN
464: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
460: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
461: x_return_status := G_RET_STS_UNEXP_ERROR;
462:
463: WHEN OTHERS THEN
464: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
465: p_msg_name => G_DB_ERROR,
466: p_token1 => G_PROG_NAME_TOKEN,
467: p_token1_value => l_program_name,
468: p_token2 => G_SQLCODE_TOKEN,
501: l_amt_flag := 'Y';
502: l_assoc_total := l_assoc_total + p_assoc_assets_tbl(i).amount;
503: END IF;
504: IF (p_assoc_assets_tbl(i).amount IS NULL) AND l_amt_flag = 'Y' THEN
505: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME, p_msg_name => 'OKL_LINKASSET_NULL_FOUND');
506: RAISE OKL_API.G_EXCEPTION_ERROR;
507: END IF;
508: END IF;
509: END LOOP;
502: l_assoc_total := l_assoc_total + p_assoc_assets_tbl(i).amount;
503: END IF;
504: IF (p_assoc_assets_tbl(i).amount IS NULL) AND l_amt_flag = 'Y' THEN
505: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME, p_msg_name => 'OKL_LINKASSET_NULL_FOUND');
506: RAISE OKL_API.G_EXCEPTION_ERROR;
507: END IF;
508: END IF;
509: END LOOP;
510:
508: END IF;
509: END LOOP;
510:
511: IF l_amt_flag = 'Y' AND l_assoc_total <> p_fee_amount THEN
512: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
513: p_msg_name => 'OKL_LINKASSET_AMT_MISMATCH',
514: p_token1 => 'LINE_COST',
515: p_token1_value => p_fee_amount,
516: p_token2 => 'ASSOC_TOTAL',
514: p_token1 => 'LINE_COST',
515: p_token1_value => p_fee_amount,
516: p_token2 => 'ASSOC_TOTAL',
517: p_token2_value => l_assoc_total);
518: RAISE OKL_API.G_EXCEPTION_ERROR;
519: END IF;
520:
521: IF l_amt_flag = 'Y' THEN
522: x_derive_assoc_amt := 'N';
527: x_return_status := G_RET_STS_SUCCESS;
528:
529: EXCEPTION
530:
531: WHEN OKL_API.G_EXCEPTION_ERROR THEN
532: x_return_status := G_RET_STS_ERROR;
533:
534: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
535: x_return_status := G_RET_STS_UNEXP_ERROR;
530:
531: WHEN OKL_API.G_EXCEPTION_ERROR THEN
532: x_return_status := G_RET_STS_ERROR;
533:
534: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
535: x_return_status := G_RET_STS_UNEXP_ERROR;
536:
537: WHEN OTHERS THEN
538: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
534: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
535: x_return_status := G_RET_STS_UNEXP_ERROR;
536:
537: WHEN OTHERS THEN
538: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
539: p_msg_name => G_DB_ERROR,
540: p_token1 => G_PROG_NAME_TOKEN,
541: p_token1_value => l_program_name,
542: p_token2 => G_SQLCODE_TOKEN,
743: x_return_status := G_RET_STS_SUCCESS;
744:
745: EXCEPTION
746:
747: WHEN OKL_API.G_EXCEPTION_ERROR THEN
748: x_return_status := G_RET_STS_ERROR;
749:
750: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
751: x_return_status := G_RET_STS_UNEXP_ERROR;
746:
747: WHEN OKL_API.G_EXCEPTION_ERROR THEN
748: x_return_status := G_RET_STS_ERROR;
749:
750: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
751: x_return_status := G_RET_STS_UNEXP_ERROR;
752:
753: WHEN OTHERS THEN
754: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
750: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
751: x_return_status := G_RET_STS_UNEXP_ERROR;
752:
753: WHEN OTHERS THEN
754: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
755: p_msg_name => G_DB_ERROR,
756: p_token1 => G_PROG_NAME_TOKEN,
757: p_token1_value => l_program_name,
758: p_token2 => G_SQLCODE_TOKEN,
815: x_return_status := G_RET_STS_SUCCESS;
816:
817: EXCEPTION
818:
819: WHEN OKL_API.G_EXCEPTION_ERROR THEN
820: x_return_status := G_RET_STS_ERROR;
821:
822: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
823: x_return_status := G_RET_STS_UNEXP_ERROR;
818:
819: WHEN OKL_API.G_EXCEPTION_ERROR THEN
820: x_return_status := G_RET_STS_ERROR;
821:
822: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
823: x_return_status := G_RET_STS_UNEXP_ERROR;
824:
825: WHEN OTHERS THEN
826: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
822: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
823: x_return_status := G_RET_STS_UNEXP_ERROR;
824:
825: WHEN OTHERS THEN
826: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
827: p_msg_name => G_DB_ERROR,
828: p_token1 => G_PROG_NAME_TOKEN,
829: p_token1_value => l_program_name,
830: p_token2 => G_SQLCODE_TOKEN,
886: ,x_lrev_tbl => lx_assoc_assets_tbl
887: );
888:
889: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
890: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
891: ELSIF x_return_status = G_RET_STS_ERROR THEN
892: RAISE OKL_API.G_EXCEPTION_ERROR;
893: END IF;
894:
888:
889: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
890: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
891: ELSIF x_return_status = G_RET_STS_ERROR THEN
892: RAISE OKL_API.G_EXCEPTION_ERROR;
893: END IF;
894:
895: EXCEPTION
896:
893: END IF;
894:
895: EXCEPTION
896:
897: WHEN OKL_API.G_EXCEPTION_ERROR THEN
898: x_return_status := G_RET_STS_ERROR;
899:
900: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
901: x_return_status := G_RET_STS_UNEXP_ERROR;
896:
897: WHEN OKL_API.G_EXCEPTION_ERROR THEN
898: x_return_status := G_RET_STS_ERROR;
899:
900: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
901: x_return_status := G_RET_STS_UNEXP_ERROR;
902:
903: WHEN OTHERS THEN
904: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
900: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
901: x_return_status := G_RET_STS_UNEXP_ERROR;
902:
903: WHEN OTHERS THEN
904: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
905: p_msg_name => G_DB_ERROR,
906: p_token1 => G_PROG_NAME_TOKEN,
907: p_token1_value => l_program_name,
908: p_token2 => G_SQLCODE_TOKEN,
948: ,x_return_status => x_return_status
949: );
950:
951: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
952: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
953: ELSIF x_return_status = G_RET_STS_ERROR THEN
954: RAISE OKL_API.G_EXCEPTION_ERROR;
955: END IF;
956:
950:
951: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
952: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
953: ELSIF x_return_status = G_RET_STS_ERROR THEN
954: RAISE OKL_API.G_EXCEPTION_ERROR;
955: END IF;
956:
957: IF l_deleted_assoc_assets_tbl.COUNT > 0 THEN
958: okl_lre_pvt.delete_row (
962: ,x_msg_count => x_msg_count
963: ,x_msg_data => x_msg_data
964: ,p_lrev_tbl => l_deleted_assoc_assets_tbl );
965: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
966: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
967: ELSIF x_return_status = G_RET_STS_ERROR THEN
968: RAISE OKL_API.G_EXCEPTION_ERROR;
969: END IF;
970: END IF;
964: ,p_lrev_tbl => l_deleted_assoc_assets_tbl );
965: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
966: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
967: ELSIF x_return_status = G_RET_STS_ERROR THEN
968: RAISE OKL_API.G_EXCEPTION_ERROR;
969: END IF;
970: END IF;
971:
972: IF l_line_relation_tbl.COUNT > 0 THEN
1019: ,x_lrev_tbl => lx_assoc_assets_tbl
1020: );
1021:
1022: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1023: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1024: ELSIF x_return_status = G_RET_STS_ERROR THEN
1025: RAISE OKL_API.G_EXCEPTION_ERROR;
1026: END IF;
1027:
1021:
1022: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1023: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1024: ELSIF x_return_status = G_RET_STS_ERROR THEN
1025: RAISE OKL_API.G_EXCEPTION_ERROR;
1026: END IF;
1027:
1028: END IF;
1029:
1039: ,x_lrev_tbl => lx_assoc_assets_tbl
1040: );
1041:
1042: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1043: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1044: ELSIF x_return_status = G_RET_STS_ERROR THEN
1045: RAISE OKL_API.G_EXCEPTION_ERROR;
1046: END IF;
1047:
1041:
1042: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1043: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1044: ELSIF x_return_status = G_RET_STS_ERROR THEN
1045: RAISE OKL_API.G_EXCEPTION_ERROR;
1046: END IF;
1047:
1048: END IF;
1049:
1050: x_return_status := G_RET_STS_SUCCESS;
1051:
1052: EXCEPTION
1053:
1054: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1055: x_return_status := G_RET_STS_ERROR;
1056:
1057: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1058: x_return_status := G_RET_STS_UNEXP_ERROR;
1053:
1054: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1055: x_return_status := G_RET_STS_ERROR;
1056:
1057: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1058: x_return_status := G_RET_STS_UNEXP_ERROR;
1059:
1060: WHEN OTHERS THEN
1061: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1057: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1058: x_return_status := G_RET_STS_UNEXP_ERROR;
1059:
1060: WHEN OTHERS THEN
1061: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1062: p_msg_name => G_DB_ERROR,
1063: p_token1 => G_PROG_NAME_TOKEN,
1064: p_token1_value => l_program_name,
1065: p_token2 => G_SQLCODE_TOKEN,
1100: ,x_feev_rec => l_fee_rec
1101: );
1102:
1103: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1104: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1105: ELSIF x_return_status = G_RET_STS_ERROR THEN
1106: RAISE OKL_API.G_EXCEPTION_ERROR;
1107: END IF;
1108:
1102:
1103: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1104: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1105: ELSIF x_return_status = G_RET_STS_ERROR THEN
1106: RAISE OKL_API.G_EXCEPTION_ERROR;
1107: END IF;
1108:
1109: x_fee_id := l_fee_rec.id;
1110:
1109: x_fee_id := l_fee_rec.id;
1110:
1111: EXCEPTION
1112:
1113: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1114: x_return_status := G_RET_STS_ERROR;
1115:
1116: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1117: x_return_status := G_RET_STS_UNEXP_ERROR;
1112:
1113: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1114: x_return_status := G_RET_STS_ERROR;
1115:
1116: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1117: x_return_status := G_RET_STS_UNEXP_ERROR;
1118:
1119: WHEN OTHERS THEN
1120: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1116: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1117: x_return_status := G_RET_STS_UNEXP_ERROR;
1118:
1119: WHEN OTHERS THEN
1120: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1121: p_msg_name => G_DB_ERROR,
1122: p_token1 => G_PROG_NAME_TOKEN,
1123: p_token1_value => l_program_name,
1124: p_token2 => G_SQLCODE_TOKEN,
1158: ,x_feev_rec => l_fee_rec
1159: );
1160:
1161: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1162: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1163: ELSIF x_return_status = G_RET_STS_ERROR THEN
1164: RAISE OKL_API.G_EXCEPTION_ERROR;
1165: END IF;
1166:
1160:
1161: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1162: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1163: ELSIF x_return_status = G_RET_STS_ERROR THEN
1164: RAISE OKL_API.G_EXCEPTION_ERROR;
1165: END IF;
1166:
1167: EXCEPTION
1168:
1165: END IF;
1166:
1167: EXCEPTION
1168:
1169: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1170: x_return_status := G_RET_STS_ERROR;
1171:
1172: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1173: x_return_status := G_RET_STS_UNEXP_ERROR;
1168:
1169: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1170: x_return_status := G_RET_STS_ERROR;
1171:
1172: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1173: x_return_status := G_RET_STS_UNEXP_ERROR;
1174:
1175: WHEN OTHERS THEN
1176: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1172: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1173: x_return_status := G_RET_STS_UNEXP_ERROR;
1174:
1175: WHEN OTHERS THEN
1176: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1177: p_msg_name => G_DB_ERROR,
1178: p_token1 => G_PROG_NAME_TOKEN,
1179: p_token1_value => l_program_name,
1180: p_token2 => G_SQLCODE_TOKEN,
1222: ,x_msg_data => x_msg_data
1223: );
1224:
1225: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1226: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1227: ELSIF x_return_status = G_RET_STS_ERROR THEN
1228: RAISE OKL_API.G_EXCEPTION_ERROR;
1229: END IF;
1230:
1224:
1225: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1226: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1227: ELSIF x_return_status = G_RET_STS_ERROR THEN
1228: RAISE OKL_API.G_EXCEPTION_ERROR;
1229: END IF;
1230:
1231: EXCEPTION
1232:
1229: END IF;
1230:
1231: EXCEPTION
1232:
1233: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1234: x_return_status := G_RET_STS_ERROR;
1235:
1236: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1237: x_return_status := G_RET_STS_UNEXP_ERROR;
1232:
1233: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1234: x_return_status := G_RET_STS_ERROR;
1235:
1236: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1237: x_return_status := G_RET_STS_UNEXP_ERROR;
1238:
1239: WHEN OTHERS THEN
1240: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1236: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1237: x_return_status := G_RET_STS_UNEXP_ERROR;
1238:
1239: WHEN OTHERS THEN
1240: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1241: p_msg_name => G_DB_ERROR,
1242: p_token1 => G_PROG_NAME_TOKEN,
1243: p_token1_value => l_program_name,
1244: p_token2 => G_SQLCODE_TOKEN,
1285: ,x_msg_data => x_msg_data
1286: );
1287:
1288: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1289: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1290: ELSIF x_return_status = G_RET_STS_ERROR THEN
1291: RAISE OKL_API.G_EXCEPTION_ERROR;
1292: END IF;
1293:
1287:
1288: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1289: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1290: ELSIF x_return_status = G_RET_STS_ERROR THEN
1291: RAISE OKL_API.G_EXCEPTION_ERROR;
1292: END IF;
1293:
1294: EXCEPTION
1295:
1292: END IF;
1293:
1294: EXCEPTION
1295:
1296: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1297: x_return_status := G_RET_STS_ERROR;
1298:
1299: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1300: x_return_status := G_RET_STS_UNEXP_ERROR;
1295:
1296: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1297: x_return_status := G_RET_STS_ERROR;
1298:
1299: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1300: x_return_status := G_RET_STS_UNEXP_ERROR;
1301:
1302: WHEN OTHERS THEN
1303: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1299: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1300: x_return_status := G_RET_STS_UNEXP_ERROR;
1301:
1302: WHEN OTHERS THEN
1303: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1304: p_msg_name => G_DB_ERROR,
1305: p_token1 => G_PROG_NAME_TOKEN,
1306: p_token1_value => l_program_name,
1307: p_token2 => G_SQLCODE_TOKEN,
1349: ,x_msg_data => x_msg_data
1350: );
1351:
1352: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1353: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1354: ELSIF x_return_status = G_RET_STS_ERROR THEN
1355: RAISE OKL_API.G_EXCEPTION_ERROR;
1356: END IF;
1357:
1351:
1352: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1353: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1354: ELSIF x_return_status = G_RET_STS_ERROR THEN
1355: RAISE OKL_API.G_EXCEPTION_ERROR;
1356: END IF;
1357:
1358: EXCEPTION
1359:
1356: END IF;
1357:
1358: EXCEPTION
1359:
1360: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1361: x_return_status := G_RET_STS_ERROR;
1362:
1363: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1364: x_return_status := G_RET_STS_UNEXP_ERROR;
1359:
1360: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1361: x_return_status := G_RET_STS_ERROR;
1362:
1363: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1364: x_return_status := G_RET_STS_UNEXP_ERROR;
1365:
1366: WHEN OTHERS THEN
1367: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1363: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1364: x_return_status := G_RET_STS_UNEXP_ERROR;
1365:
1366: WHEN OTHERS THEN
1367: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1368: p_msg_name => G_DB_ERROR,
1369: p_token1 => G_PROG_NAME_TOKEN,
1370: p_token1_value => l_program_name,
1371: p_token2 => G_SQLCODE_TOKEN,
1412: ,x_msg_data => x_msg_data
1413: );
1414:
1415: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1416: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1417: ELSIF x_return_status = G_RET_STS_ERROR THEN
1418: RAISE OKL_API.G_EXCEPTION_ERROR;
1419: END IF;
1420:
1414:
1415: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1416: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1417: ELSIF x_return_status = G_RET_STS_ERROR THEN
1418: RAISE OKL_API.G_EXCEPTION_ERROR;
1419: END IF;
1420:
1421: EXCEPTION
1422:
1419: END IF;
1420:
1421: EXCEPTION
1422:
1423: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1424: x_return_status := G_RET_STS_ERROR;
1425:
1426: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1427: x_return_status := G_RET_STS_UNEXP_ERROR;
1422:
1423: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1424: x_return_status := G_RET_STS_ERROR;
1425:
1426: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1427: x_return_status := G_RET_STS_UNEXP_ERROR;
1428:
1429: WHEN OTHERS THEN
1430: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1426: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1427: x_return_status := G_RET_STS_UNEXP_ERROR;
1428:
1429: WHEN OTHERS THEN
1430: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1431: p_msg_name => G_DB_ERROR,
1432: p_token1 => G_PROG_NAME_TOKEN,
1433: p_token1_value => l_program_name,
1434: p_token2 => G_SQLCODE_TOKEN,
1490: p_expense_level_tbl => l_expense_level_tbl,
1491: p_payment_level_tbl => p_payment_level_tbl,
1492: x_return_status => l_return_status);
1493: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1494: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1495: ELSIF l_return_status = G_RET_STS_ERROR THEN
1496: RAISE OKL_API.G_EXCEPTION_ERROR;
1497: END IF;
1498:
1492: x_return_status => l_return_status);
1493: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1494: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1495: ELSIF l_return_status = G_RET_STS_ERROR THEN
1496: RAISE OKL_API.G_EXCEPTION_ERROR;
1497: END IF;
1498:
1499: validate_quote_fee (p_fee_rec => l_fee_rec,
1500: p_link_asset_tbl => p_assoc_asset_tbl,
1504: x_return_status => l_return_status,
1505: x_msg_count => x_msg_count,
1506: x_msg_data => x_msg_data);
1507: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1508: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1509: ELSIF l_return_status = G_RET_STS_ERROR THEN
1510: RAISE OKL_API.G_EXCEPTION_ERROR;
1511: END IF;
1512:
1506: x_msg_data => x_msg_data);
1507: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1508: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1509: ELSIF l_return_status = G_RET_STS_ERROR THEN
1510: RAISE OKL_API.G_EXCEPTION_ERROR;
1511: END IF;
1512:
1513: IF p_assoc_asset_tbl.COUNT > 0 THEN
1514:
1521: ,x_return_status => l_return_status
1522: );
1523:
1524: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1525: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1526: ELSIF l_return_status = G_RET_STS_ERROR THEN
1527: RAISE OKL_API.G_EXCEPTION_ERROR;
1528: END IF;
1529:
1523:
1524: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1525: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1526: ELSIF l_return_status = G_RET_STS_ERROR THEN
1527: RAISE OKL_API.G_EXCEPTION_ERROR;
1528: END IF;
1529:
1530: IF (l_derive_assoc_amt = 'Y') THEN
1531:
1539: ,x_msg_data => x_msg_data
1540: );
1541:
1542: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1543: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1544: ELSIF l_return_status = G_RET_STS_ERROR THEN
1545: RAISE OKL_API.G_EXCEPTION_ERROR;
1546: END IF;
1547:
1541:
1542: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1543: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1544: ELSIF l_return_status = G_RET_STS_ERROR THEN
1545: RAISE OKL_API.G_EXCEPTION_ERROR;
1546: END IF;
1547:
1548: END IF;
1549:
1556: ,x_msg_data => x_msg_data
1557: );
1558:
1559: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1560: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1561: ELSIF l_return_status = G_RET_STS_ERROR THEN
1562: RAISE OKL_API.G_EXCEPTION_ERROR;
1563: END IF;
1564:
1558:
1559: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1560: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1561: ELSIF l_return_status = G_RET_STS_ERROR THEN
1562: RAISE OKL_API.G_EXCEPTION_ERROR;
1563: END IF;
1564:
1565: IF l_line_relation_tbl.COUNT > 0 THEN
1566:
1572: ,x_msg_data => x_msg_data
1573: );
1574:
1575: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1576: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1577: ELSIF l_return_status = G_RET_STS_ERROR THEN
1578: RAISE OKL_API.G_EXCEPTION_ERROR;
1579: END IF;
1580:
1574:
1575: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1576: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1577: ELSIF l_return_status = G_RET_STS_ERROR THEN
1578: RAISE OKL_API.G_EXCEPTION_ERROR;
1579: END IF;
1580:
1581: END IF;
1582:
1580:
1581: END IF;
1582:
1583: IF (p_payment_level_tbl.COUNT > 0 AND p_payment_header_rec.stream_type_id IS NULL) THEN
1584: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1585: p_msg_name => 'OKL_SALES_NO_PAYMENTHEAD');
1586: RAISE OKL_API.G_EXCEPTION_ERROR;
1587: ELSIF (p_payment_header_rec.stream_type_id IS NOT NULL AND p_payment_level_tbl.COUNT = 0 ) THEN
1588: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1582:
1583: IF (p_payment_level_tbl.COUNT > 0 AND p_payment_header_rec.stream_type_id IS NULL) THEN
1584: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1585: p_msg_name => 'OKL_SALES_NO_PAYMENTHEAD');
1586: RAISE OKL_API.G_EXCEPTION_ERROR;
1587: ELSIF (p_payment_header_rec.stream_type_id IS NOT NULL AND p_payment_level_tbl.COUNT = 0 ) THEN
1588: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1589: p_msg_name => 'OKL_SALES_NO_PAYMENTLINES');
1590: RAISE OKL_API.G_EXCEPTION_ERROR;
1584: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1585: p_msg_name => 'OKL_SALES_NO_PAYMENTHEAD');
1586: RAISE OKL_API.G_EXCEPTION_ERROR;
1587: ELSIF (p_payment_header_rec.stream_type_id IS NOT NULL AND p_payment_level_tbl.COUNT = 0 ) THEN
1588: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1589: p_msg_name => 'OKL_SALES_NO_PAYMENTLINES');
1590: RAISE OKL_API.G_EXCEPTION_ERROR;
1591: END IF;
1592:
1586: RAISE OKL_API.G_EXCEPTION_ERROR;
1587: ELSIF (p_payment_header_rec.stream_type_id IS NOT NULL AND p_payment_level_tbl.COUNT = 0 ) THEN
1588: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1589: p_msg_name => 'OKL_SALES_NO_PAYMENTLINES');
1590: RAISE OKL_API.G_EXCEPTION_ERROR;
1591: END IF;
1592:
1593: IF l_fee_rec.fee_type IN ('INCOME', 'MISCELLANEOUS', 'SEC_DEPOSIT') THEN
1594:
1601: ,x_msg_data => x_msg_data
1602: );
1603:
1604: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1605: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1606: ELSIF l_return_status = G_RET_STS_ERROR THEN
1607: RAISE OKL_API.G_EXCEPTION_ERROR;
1608: END IF;
1609:
1603:
1604: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1605: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1606: ELSIF l_return_status = G_RET_STS_ERROR THEN
1607: RAISE OKL_API.G_EXCEPTION_ERROR;
1608: END IF;
1609:
1610: END IF;
1611:
1620: ,x_msg_data => x_msg_data
1621: );
1622:
1623: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1624: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1625: ELSIF l_return_status = G_RET_STS_ERROR THEN
1626: RAISE OKL_API.G_EXCEPTION_ERROR;
1627: END IF;
1628:
1622:
1623: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
1624: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1625: ELSIF l_return_status = G_RET_STS_ERROR THEN
1626: RAISE OKL_API.G_EXCEPTION_ERROR;
1627: END IF;
1628:
1629: END IF;
1630:
1642: ,p_parent_object_id => l_p_id
1643: );
1644:
1645: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1646: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1647: ELSIF x_return_status = G_RET_STS_ERROR THEN
1648: RAISE OKL_API.G_EXCEPTION_ERROR;
1649: END IF;*/
1650: x_return_status := G_RET_STS_SUCCESS;
1644:
1645: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1646: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1647: ELSIF x_return_status = G_RET_STS_ERROR THEN
1648: RAISE OKL_API.G_EXCEPTION_ERROR;
1649: END IF;*/
1650: x_return_status := G_RET_STS_SUCCESS;
1651:
1652: EXCEPTION
1650: x_return_status := G_RET_STS_SUCCESS;
1651:
1652: EXCEPTION
1653:
1654: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1655:
1656: IF p_transaction_control = G_TRUE THEN
1657: ROLLBACK TO l_program_name;
1658: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1659: END IF;
1660:
1661: x_return_status := G_RET_STS_ERROR;
1662:
1663: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1664:
1665: IF p_transaction_control = G_TRUE THEN
1666: ROLLBACK TO l_program_name;
1667: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1670: x_return_status := G_RET_STS_UNEXP_ERROR;
1671:
1672: WHEN OTHERS THEN
1673:
1674: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1675: p_msg_name => G_DB_ERROR,
1676: p_token1 => G_PROG_NAME_TOKEN,
1677: p_token1_value => l_api_name,
1678: p_token2 => G_SQLCODE_TOKEN,
1725: x_return_status := G_RET_STS_SUCCESS;
1726:
1727: EXCEPTION
1728:
1729: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1730: x_return_status := G_RET_STS_ERROR;
1731:
1732: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1733: x_return_status := G_RET_STS_UNEXP_ERROR;
1728:
1729: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1730: x_return_status := G_RET_STS_ERROR;
1731:
1732: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1733: x_return_status := G_RET_STS_UNEXP_ERROR;
1734:
1735: WHEN OTHERS THEN
1736: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1732: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1733: x_return_status := G_RET_STS_UNEXP_ERROR;
1734:
1735: WHEN OTHERS THEN
1736: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1737: p_msg_name => G_DB_ERROR,
1738: p_token1 => G_PROG_NAME_TOKEN,
1739: p_token1_value => l_program_name,
1740: p_token2 => G_SQLCODE_TOKEN,
1784: get_fee_rec (p_fee_id => p_fee_rec.id
1785: ,x_fee_rec => l_fee_rec
1786: ,x_return_status => x_return_status);
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: ,x_return_status => x_return_status);
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: IF (p_sync_fee_header = 'Y') THEN
1794: -- Sync Fee Info
1796: p_input_rec => p_fee_rec,
1797: x_return_status => x_return_status);
1798:
1799: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1800: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1801: ELSIF x_return_status = G_RET_STS_ERROR THEN
1802: RAISE OKL_API.G_EXCEPTION_ERROR;
1803: END IF;
1804:
1798:
1799: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1800: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1801: ELSIF x_return_status = G_RET_STS_ERROR THEN
1802: RAISE OKL_API.G_EXCEPTION_ERROR;
1803: END IF;
1804:
1805: -- Update Fee Header
1806: update_header (
1809: ,x_msg_count => x_msg_count
1810: ,x_msg_data => x_msg_data );
1811:
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: END IF;
1811:
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: END IF;
1818:
1819: -- Fetch Line Relationships info
1821: get_line_relations_tbl (p_fee_id => l_fee_rec.id
1822: ,x_line_relation_tbl => l_copy_relation_tbl
1823: ,x_return_status => x_return_status);
1824: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1825: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1826: ELSIF x_return_status = G_RET_STS_ERROR THEN
1827: RAISE OKL_API.G_EXCEPTION_ERROR;
1828: END IF;
1829:
1823: ,x_return_status => x_return_status);
1824: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1825: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1826: ELSIF x_return_status = G_RET_STS_ERROR THEN
1827: RAISE OKL_API.G_EXCEPTION_ERROR;
1828: END IF;
1829:
1830: IF (l_copy_relation_tbl.COUNT > 0) THEN
1831: process_link_asset_amounts (
1838: ,x_msg_count => x_msg_count
1839: ,x_msg_data => x_msg_data );
1840:
1841: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1842: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1843: ELSIF x_return_status = G_RET_STS_ERROR THEN
1844: RAISE OKL_API.G_EXCEPTION_ERROR;
1845: END IF;
1846:
1840:
1841: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1842: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1843: ELSIF x_return_status = G_RET_STS_ERROR THEN
1844: RAISE OKL_API.G_EXCEPTION_ERROR;
1845: END IF;
1846:
1847: FOR i IN l_copy_relation_tbl.FIRST .. l_copy_relation_tbl.LAST LOOP
1848: IF l_copy_relation_tbl.EXISTS(i) THEN
1866: ,p_lrev_tbl => l_line_relation_tbl
1867: ,x_lrev_tbl => lx_line_relation_tbl);
1868:
1869: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1870: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1871: ELSIF x_return_status = G_RET_STS_ERROR THEN
1872: RAISE OKL_API.G_EXCEPTION_ERROR;
1873: END IF;
1874: END IF;
1868:
1869: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1870: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1871: ELSIF x_return_status = G_RET_STS_ERROR THEN
1872: RAISE OKL_API.G_EXCEPTION_ERROR;
1873: END IF;
1874: END IF;
1875: END IF;
1876: END IF;
1889: ,p_parent_object_id => l_p_id
1890: );
1891:
1892: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1893: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1894: ELSIF x_return_status = G_RET_STS_ERROR THEN
1895: RAISE OKL_API.G_EXCEPTION_ERROR;
1896: END IF;*/
1897:
1891:
1892: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
1893: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1894: ELSIF x_return_status = G_RET_STS_ERROR THEN
1895: RAISE OKL_API.G_EXCEPTION_ERROR;
1896: END IF;*/
1897:
1898: x_return_status := G_RET_STS_SUCCESS;
1899:
1898: x_return_status := G_RET_STS_SUCCESS;
1899:
1900: EXCEPTION
1901:
1902: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1903:
1904: IF p_transaction_control = G_TRUE THEN
1905: ROLLBACK TO l_program_name;
1906: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1907: END IF;
1908:
1909: x_return_status := G_RET_STS_ERROR;
1910:
1911: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1912:
1913: IF p_transaction_control = G_TRUE THEN
1914: ROLLBACK TO l_program_name;
1915: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1918: x_return_status := G_RET_STS_UNEXP_ERROR;
1919:
1920: WHEN OTHERS THEN
1921:
1922: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1923: p_msg_name => G_DB_ERROR,
1924: p_token1 => G_PROG_NAME_TOKEN,
1925: p_token1_value => l_api_name,
1926: p_token2 => G_SQLCODE_TOKEN,
2007: p_expense_level_tbl => l_expense_level_tbl,
2008: p_payment_level_tbl => p_payment_level_tbl,
2009: x_return_status => l_return_status);
2010: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
2011: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2012: ELSIF l_return_status = G_RET_STS_ERROR THEN
2013: RAISE OKL_API.G_EXCEPTION_ERROR;
2014: END IF;
2015:
2009: x_return_status => l_return_status);
2010: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
2011: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2012: ELSIF l_return_status = G_RET_STS_ERROR THEN
2013: RAISE OKL_API.G_EXCEPTION_ERROR;
2014: END IF;
2015:
2016: validate_quote_fee (p_fee_rec => l_fee_rec,
2017: p_link_asset_tbl => p_assoc_asset_tbl,
2021: x_return_status => l_return_status,
2022: x_msg_count => x_msg_count,
2023: x_msg_data => x_msg_data);
2024: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
2025: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2026: ELSIF l_return_status = G_RET_STS_ERROR THEN
2027: RAISE OKL_API.G_EXCEPTION_ERROR;
2028: END IF;
2029:
2023: x_msg_data => x_msg_data);
2024: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
2025: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2026: ELSIF l_return_status = G_RET_STS_ERROR THEN
2027: RAISE OKL_API.G_EXCEPTION_ERROR;
2028: END IF;
2029:
2030: IF p_assoc_asset_tbl.COUNT > 0 THEN
2031:
2038: ,x_return_status => l_return_status
2039: );
2040:
2041: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
2042: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2043: ELSIF l_return_status = G_RET_STS_ERROR THEN
2044: RAISE OKL_API.G_EXCEPTION_ERROR;
2045: END IF;
2046:
2040:
2041: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
2042: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2043: ELSIF l_return_status = G_RET_STS_ERROR THEN
2044: RAISE OKL_API.G_EXCEPTION_ERROR;
2045: END IF;
2046:
2047: IF (l_derive_assoc_amt = 'Y') THEN
2048:
2055: ,x_msg_count => x_msg_count
2056: ,x_msg_data => x_msg_data );
2057:
2058: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
2059: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2060: ELSIF l_return_status = G_RET_STS_ERROR THEN
2061: RAISE OKL_API.G_EXCEPTION_ERROR;
2062: END IF;
2063:
2057:
2058: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
2059: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2060: ELSIF l_return_status = G_RET_STS_ERROR THEN
2061: RAISE OKL_API.G_EXCEPTION_ERROR;
2062: END IF;
2063:
2064: END IF;
2065:
2071: ,x_msg_count => x_msg_count
2072: ,x_msg_data => x_msg_data );
2073:
2074: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
2075: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2076: ELSIF l_return_status = G_RET_STS_ERROR THEN
2077: RAISE OKL_API.G_EXCEPTION_ERROR;
2078: END IF;
2079:
2073:
2074: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
2075: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2076: ELSIF l_return_status = G_RET_STS_ERROR THEN
2077: RAISE OKL_API.G_EXCEPTION_ERROR;
2078: END IF;
2079:
2080: l_fee_id := l_fee_rec.id;
2081: l_fee_type := l_fee_rec.fee_type;
2089: ,x_msg_data => x_msg_data
2090: );
2091:
2092: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
2093: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2094: ELSIF l_return_status = G_RET_STS_ERROR THEN
2095: RAISE OKL_API.G_EXCEPTION_ERROR;
2096: END IF;
2097:
2091:
2092: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
2093: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2094: ELSIF l_return_status = G_RET_STS_ERROR THEN
2095: RAISE OKL_API.G_EXCEPTION_ERROR;
2096: END IF;
2097:
2098: IF (p_payment_level_tbl.COUNT > 0 AND p_payment_header_rec.stream_type_id IS NULL) THEN
2099: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2095: RAISE OKL_API.G_EXCEPTION_ERROR;
2096: END IF;
2097:
2098: IF (p_payment_level_tbl.COUNT > 0 AND p_payment_header_rec.stream_type_id IS NULL) THEN
2099: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2100: p_msg_name => 'OKL_SALES_NO_PAYMENTHEAD');
2101: RAISE OKL_API.G_EXCEPTION_ERROR;
2102: ELSIF (p_payment_header_rec.stream_type_id IS NOT NULL AND p_payment_level_tbl.COUNT = 0 ) THEN
2103: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2097:
2098: IF (p_payment_level_tbl.COUNT > 0 AND p_payment_header_rec.stream_type_id IS NULL) THEN
2099: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2100: p_msg_name => 'OKL_SALES_NO_PAYMENTHEAD');
2101: RAISE OKL_API.G_EXCEPTION_ERROR;
2102: ELSIF (p_payment_header_rec.stream_type_id IS NOT NULL AND p_payment_level_tbl.COUNT = 0 ) THEN
2103: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2104: p_msg_name => 'OKL_SALES_NO_PAYMENTLINES');
2105: RAISE OKL_API.G_EXCEPTION_ERROR;
2099: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2100: p_msg_name => 'OKL_SALES_NO_PAYMENTHEAD');
2101: RAISE OKL_API.G_EXCEPTION_ERROR;
2102: ELSIF (p_payment_header_rec.stream_type_id IS NOT NULL AND p_payment_level_tbl.COUNT = 0 ) THEN
2103: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2104: p_msg_name => 'OKL_SALES_NO_PAYMENTLINES');
2105: RAISE OKL_API.G_EXCEPTION_ERROR;
2106: END IF;
2107:
2101: RAISE OKL_API.G_EXCEPTION_ERROR;
2102: ELSIF (p_payment_header_rec.stream_type_id IS NOT NULL AND p_payment_level_tbl.COUNT = 0 ) THEN
2103: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2104: p_msg_name => 'OKL_SALES_NO_PAYMENTLINES');
2105: RAISE OKL_API.G_EXCEPTION_ERROR;
2106: END IF;
2107:
2108: IF l_fee_rec.fee_type IN ('INCOME', 'MISCELLANEOUS', 'SEC_DEPOSIT') THEN
2109:
2116: ,x_msg_data => x_msg_data
2117: );
2118:
2119: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
2120: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2121: ELSIF l_return_status = G_RET_STS_ERROR THEN
2122: RAISE OKL_API.G_EXCEPTION_ERROR;
2123: END IF;
2124:
2118:
2119: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
2120: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2121: ELSIF l_return_status = G_RET_STS_ERROR THEN
2122: RAISE OKL_API.G_EXCEPTION_ERROR;
2123: END IF;
2124:
2125: END IF;
2126:
2135: ,x_msg_data => x_msg_data
2136: );
2137:
2138: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
2139: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2140: ELSIF l_return_status = G_RET_STS_ERROR THEN
2141: RAISE OKL_API.G_EXCEPTION_ERROR;
2142: END IF;
2143:
2137:
2138: IF l_return_status = G_RET_STS_UNEXP_ERROR THEN
2139: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2140: ELSIF l_return_status = G_RET_STS_ERROR THEN
2141: RAISE OKL_API.G_EXCEPTION_ERROR;
2142: END IF;
2143:
2144: END IF;
2145:
2157: ,p_parent_object_id => l_p_id
2158: );
2159:
2160: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2161: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2162: ELSIF x_return_status = G_RET_STS_ERROR THEN
2163: RAISE OKL_API.G_EXCEPTION_ERROR;
2164: END IF;*/
2165:
2159:
2160: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2161: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2162: ELSIF x_return_status = G_RET_STS_ERROR THEN
2163: RAISE OKL_API.G_EXCEPTION_ERROR;
2164: END IF;*/
2165:
2166: x_return_status := G_RET_STS_SUCCESS;
2167:
2166: x_return_status := G_RET_STS_SUCCESS;
2167:
2168: EXCEPTION
2169:
2170: WHEN OKL_API.G_EXCEPTION_ERROR THEN
2171:
2172: IF p_transaction_control = G_TRUE THEN
2173: ROLLBACK TO l_program_name;
2174: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2175: END IF;
2176:
2177: x_return_status := G_RET_STS_ERROR;
2178:
2179: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2180:
2181: IF p_transaction_control = G_TRUE THEN
2182: ROLLBACK TO l_program_name;
2183: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2186: x_return_status := G_RET_STS_UNEXP_ERROR;
2187:
2188: WHEN OTHERS THEN
2189:
2190: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2191: p_msg_name => G_DB_ERROR,
2192: p_token1 => G_PROG_NAME_TOKEN,
2193: p_token1_value => l_api_name,
2194: p_token2 => G_SQLCODE_TOKEN,
2283:
2284: x_return_status := G_RET_STS_SUCCESS;
2285: EXCEPTION
2286:
2287: WHEN OKL_API.G_EXCEPTION_ERROR THEN
2288: x_return_status := G_RET_STS_ERROR;
2289:
2290: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2291: x_return_status := G_RET_STS_UNEXP_ERROR;
2286:
2287: WHEN OKL_API.G_EXCEPTION_ERROR THEN
2288: x_return_status := G_RET_STS_ERROR;
2289:
2290: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2291: x_return_status := G_RET_STS_UNEXP_ERROR;
2292:
2293: WHEN OTHERS THEN
2294: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2290: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2291: x_return_status := G_RET_STS_UNEXP_ERROR;
2292:
2293: WHEN OTHERS THEN
2294: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2295: p_msg_name => G_DB_ERROR,
2296: p_token1 => G_PROG_NAME_TOKEN,
2297: p_token1_value => l_program_name,
2298: p_token2 => G_SQLCODE_TOKEN,
2334: p_target_fee_id => p_target_fee_id,
2335: x_lrship_tbl => l_lrship_tbl,
2336: x_return_status => x_return_status);
2337: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2338: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2339: ELSIF x_return_status = G_RET_STS_ERROR THEN
2340: RAISE OKL_API.G_EXCEPTION_ERROR;
2341: END IF;
2342:
2336: x_return_status => x_return_status);
2337: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2338: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2339: ELSIF x_return_status = G_RET_STS_ERROR THEN
2340: RAISE OKL_API.G_EXCEPTION_ERROR;
2341: END IF;
2342:
2343: SELECT PARENT_OBJECT_ID
2344: INTO ln_target_quote_id
2365: ,p_lrev_tbl => l_lrship_tbl
2366: ,x_lrev_tbl => lx_lrship_tbl );
2367:
2368: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2369: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2370: ELSIF x_return_status = G_RET_STS_ERROR THEN
2371: RAISE OKL_API.G_EXCEPTION_ERROR;
2372: END IF;
2373: END IF;
2367:
2368: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2369: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2370: ELSIF x_return_status = G_RET_STS_ERROR THEN
2371: RAISE OKL_API.G_EXCEPTION_ERROR;
2372: END IF;
2373: END IF;
2374:
2375: x_return_status := G_RET_STS_SUCCESS;
2375: x_return_status := G_RET_STS_SUCCESS;
2376:
2377: EXCEPTION
2378:
2379: WHEN OKL_API.G_EXCEPTION_ERROR THEN
2380:
2381: x_return_status := G_RET_STS_ERROR;
2382:
2383: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2379: WHEN OKL_API.G_EXCEPTION_ERROR THEN
2380:
2381: x_return_status := G_RET_STS_ERROR;
2382:
2383: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2384:
2385: x_return_status := G_RET_STS_UNEXP_ERROR;
2386:
2387: WHEN OTHERS THEN
2385: x_return_status := G_RET_STS_UNEXP_ERROR;
2386:
2387: WHEN OTHERS THEN
2388:
2389: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2390: p_msg_name => G_DB_ERROR,
2391: p_token1 => G_PROG_NAME_TOKEN,
2392: p_token1_value => l_api_name,
2393: p_token2 => G_SQLCODE_TOKEN,
2451: ,x_msg_count => x_msg_count
2452: ,x_msg_data => x_msg_data);
2453:
2454: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2455: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2456: ELSIF x_return_status = G_RET_STS_ERROR THEN
2457: RAISE OKL_API.G_EXCEPTION_ERROR;
2458: END IF;
2459:
2453:
2454: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2455: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2456: ELSIF x_return_status = G_RET_STS_ERROR THEN
2457: RAISE OKL_API.G_EXCEPTION_ERROR;
2458: END IF;
2459:
2460: x_return_status := G_RET_STS_SUCCESS;
2461:
2460: x_return_status := G_RET_STS_SUCCESS;
2461:
2462: EXCEPTION
2463:
2464: WHEN OKL_API.G_EXCEPTION_ERROR THEN
2465:
2466: IF p_transaction_control = G_TRUE THEN
2467: ROLLBACK TO l_program_name;
2468: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2469: END IF;
2470:
2471: x_return_status := G_RET_STS_ERROR;
2472:
2473: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2474:
2475: IF p_transaction_control = G_TRUE THEN
2476: ROLLBACK TO l_program_name;
2477: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2480: x_return_status := G_RET_STS_UNEXP_ERROR;
2481:
2482: WHEN OTHERS THEN
2483:
2484: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2485: p_msg_name => G_DB_ERROR,
2486: p_token1 => G_PROG_NAME_TOKEN,
2487: p_token1_value => l_api_name,
2488: p_token2 => G_SQLCODE_TOKEN,
2548: ,x_fee_rec => l_fee_rec
2549: ,x_return_status => x_return_status);
2550:
2551: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2552: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2553: ELSIF x_return_status = G_RET_STS_ERROR THEN
2554: RAISE OKL_API.G_EXCEPTION_ERROR;
2555: END IF;
2556:
2550:
2551: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2552: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2553: ELSIF x_return_status = G_RET_STS_ERROR THEN
2554: RAISE OKL_API.G_EXCEPTION_ERROR;
2555: END IF;
2556:
2557: -- Check if the Source and Target Quote's Pricing type are equal and if it
2558: -- is a Configuration fee, cash flows are not copied.
2604: ,x_msg_count => x_msg_count
2605: ,x_msg_data => x_msg_data );
2606:
2607: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2608: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2609: ELSIF x_return_status = G_RET_STS_ERROR THEN
2610: RAISE OKL_API.G_EXCEPTION_ERROR;
2611: END IF;
2612:
2606:
2607: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2608: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2609: ELSIF x_return_status = G_RET_STS_ERROR THEN
2610: RAISE OKL_API.G_EXCEPTION_ERROR;
2611: END IF;
2612:
2613: -- Validation to check if the product and expected start date for source
2614: -- and target contracts are equal, if not cash flows are not copied.
2644: x_return_status => x_return_status,
2645: x_msg_count => x_msg_count,
2646: x_msg_data => x_msg_data );
2647: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2648: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2649: ELSIF x_return_status = G_RET_STS_ERROR THEN
2650: RAISE OKL_API.G_EXCEPTION_ERROR;
2651: END IF;
2652: END IF;
2646: x_msg_data => x_msg_data );
2647: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2648: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2649: ELSIF x_return_status = G_RET_STS_ERROR THEN
2650: RAISE OKL_API.G_EXCEPTION_ERROR;
2651: END IF;
2652: END IF;
2653:
2654: IF (lb_copy_cashflow) THEN
2665: ,x_msg_data => x_msg_data
2666: );
2667:
2668: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2669: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2670: ELSIF x_return_status = G_RET_STS_ERROR THEN
2671: RAISE OKL_API.G_EXCEPTION_ERROR;
2672: END IF;
2673: END IF;
2667:
2668: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2669: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2670: ELSIF x_return_status = G_RET_STS_ERROR THEN
2671: RAISE OKL_API.G_EXCEPTION_ERROR;
2672: END IF;
2673: END IF;
2674:
2675: EXCEPTION
2673: END IF;
2674:
2675: EXCEPTION
2676:
2677: WHEN OKL_API.G_EXCEPTION_ERROR THEN
2678:
2679: IF p_transaction_control = G_TRUE THEN
2680: ROLLBACK TO l_program_name;
2681: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2682: END IF;
2683:
2684: x_return_status := G_RET_STS_ERROR;
2685:
2686: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2687:
2688: IF p_transaction_control = G_TRUE THEN
2689: ROLLBACK TO l_program_name;
2690: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2693: x_return_status := G_RET_STS_UNEXP_ERROR;
2694:
2695: WHEN OTHERS THEN
2696:
2697: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2698: p_msg_name => G_DB_ERROR,
2699: p_token1 => G_PROG_NAME_TOKEN,
2700: p_token1_value => l_api_name,
2701: p_token2 => G_SQLCODE_TOKEN,
2771: ,p_lrev_tbl => l_assoc_asset_tbl
2772: );
2773:
2774: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2775: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2776: ELSIF x_return_status = G_RET_STS_ERROR THEN
2777: RAISE OKL_API.G_EXCEPTION_ERROR;
2778: END IF;
2779:
2773:
2774: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2775: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2776: ELSIF x_return_status = G_RET_STS_ERROR THEN
2777: RAISE OKL_API.G_EXCEPTION_ERROR;
2778: END IF;
2779:
2780: END IF;
2781:
2790: ,x_msg_data => x_msg_data
2791: );
2792:
2793: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2794: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2795: ELSIF x_return_status = G_RET_STS_ERROR THEN
2796: RAISE OKL_API.G_EXCEPTION_ERROR;
2797: END IF;
2798:
2792:
2793: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2794: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2795: ELSIF x_return_status = G_RET_STS_ERROR THEN
2796: RAISE OKL_API.G_EXCEPTION_ERROR;
2797: END IF;
2798:
2799: l_fee_rec.id := p_fee_id;
2800:
2807: ,p_feev_rec => l_fee_rec
2808: );
2809:
2810: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2811: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2812: ELSIF x_return_status = G_RET_STS_ERROR THEN
2813: RAISE OKL_API.G_EXCEPTION_ERROR;
2814: END IF;
2815:
2809:
2810: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2811: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2812: ELSIF x_return_status = G_RET_STS_ERROR THEN
2813: RAISE OKL_API.G_EXCEPTION_ERROR;
2814: END IF;
2815:
2816: /*
2817: SELECT qte.parent_object_id,qte.parent_object_code
2831: ,p_parent_object_id => l_p_id
2832: );
2833:
2834: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2835: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2836: ELSIF x_return_status = G_RET_STS_ERROR THEN
2837: RAISE OKL_API.G_EXCEPTION_ERROR;
2838: END IF;*/
2839:
2833:
2834: IF x_return_status = G_RET_STS_UNEXP_ERROR THEN
2835: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2836: ELSIF x_return_status = G_RET_STS_ERROR THEN
2837: RAISE OKL_API.G_EXCEPTION_ERROR;
2838: END IF;*/
2839:
2840: x_return_status := G_RET_STS_SUCCESS;
2841:
2840: x_return_status := G_RET_STS_SUCCESS;
2841:
2842: EXCEPTION
2843:
2844: WHEN OKL_API.G_EXCEPTION_ERROR THEN
2845:
2846: IF p_transaction_control = G_TRUE THEN
2847: ROLLBACK TO l_program_name;
2848: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2849: END IF;
2850:
2851: x_return_status := G_RET_STS_ERROR;
2852:
2853: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2854:
2855: IF p_transaction_control = G_TRUE THEN
2856: ROLLBACK TO l_program_name;
2857: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2860: x_return_status := G_RET_STS_UNEXP_ERROR;
2861:
2862: WHEN OTHERS THEN
2863:
2864: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2865: p_msg_name => G_DB_ERROR,
2866: p_token1 => G_PROG_NAME_TOKEN,
2867: p_token1_value => l_api_name,
2868: p_token2 => G_SQLCODE_TOKEN,