95: l_api_name VARCHAR2(30) := 'add_months_new';
96: l_return_status VARCHAR2(1);
97: BEGIN
98: -- Initialize the status
99: l_return_status := OKL_API.G_RET_STS_SUCCESS;
100:
101: l_month := to_char( p_start_date, 'MM' );
102: l_year := to_char( p_start_date, 'YYYY' );
103: l_day := to_char( p_start_date, 'DD' );
157: -- Return things
158: x_date := to_date( l_day || '-' || l_month || '-' || l_year, 'DD-MM-YYYY' );
159: x_return_status := l_return_status;
160: EXCEPTION
161: WHEN OKL_API.G_EXCEPTION_ERROR THEN
162: x_return_status := G_RET_STS_ERROR;
163: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
164: x_return_status := G_RET_STS_UNEXP_ERROR;
165: WHEN OTHERS THEN
159: x_return_status := l_return_status;
160: EXCEPTION
161: WHEN OKL_API.G_EXCEPTION_ERROR THEN
162: x_return_status := G_RET_STS_ERROR;
163: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
164: x_return_status := G_RET_STS_UNEXP_ERROR;
165: WHEN OTHERS THEN
166: OKL_API.SET_MESSAGE (
167: p_app_name => G_APP_NAME,
162: x_return_status := G_RET_STS_ERROR;
163: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
164: x_return_status := G_RET_STS_UNEXP_ERROR;
165: WHEN OTHERS THEN
166: OKL_API.SET_MESSAGE (
167: p_app_name => G_APP_NAME,
168: p_msg_name => G_DB_ERROR,
169: p_token1 => G_PROG_NAME_TOKEN,
170: p_token1_value => l_api_name,
211:
212: BEGIN
213: -- Initialize Things ...
214: l_start_date := p_start_date;
215: l_return_status := OKL_API.G_RET_STS_SUCCESS;
216: l_start_date := trunc(p_start_date);
217: l_start_day := to_char( l_start_date, 'DD');
218: l_month := to_char(p_start_date, 'MM');
219:
229: p_start_date => l_start_date,
230: p_months_after => p_periods_after * p_months_per_period,
231: x_date => l_temp_date,
232: x_return_status => l_return_status);
233: IF(l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
234: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
235: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
236: RAISE OKL_API.G_EXCEPTION_ERROR;
237: END IF;
230: p_months_after => p_periods_after * p_months_per_period,
231: x_date => l_temp_date,
232: x_return_status => l_return_status);
233: IF(l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
234: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
235: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
236: RAISE OKL_API.G_EXCEPTION_ERROR;
237: END IF;
238: -- IF to_char( l_temp_date, 'DD' ) >= l_start_day
231: x_date => l_temp_date,
232: x_return_status => l_return_status);
233: IF(l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
234: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
235: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
236: RAISE OKL_API.G_EXCEPTION_ERROR;
237: END IF;
238: -- IF to_char( l_temp_date, 'DD' ) >= l_start_day
239: -- THEN
232: x_return_status => l_return_status);
233: IF(l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
234: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
235: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
236: RAISE OKL_API.G_EXCEPTION_ERROR;
237: END IF;
238: -- IF to_char( l_temp_date, 'DD' ) >= l_start_day
239: -- THEN
240: -- l_temp_date := l_temp_date - 1;
244: p_start_date => l_start_date,
245: p_months_after => (p_periods_after-1)* p_months_per_period,
246: x_date => l_temp_date,
247: x_return_status => l_return_status);
248: IF(l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
249: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
250: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
251: RAISE OKL_API.G_EXCEPTION_ERROR;
252: END IF;
245: p_months_after => (p_periods_after-1)* p_months_per_period,
246: x_date => l_temp_date,
247: x_return_status => l_return_status);
248: IF(l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
249: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
250: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
251: RAISE OKL_API.G_EXCEPTION_ERROR;
252: END IF;
253: END IF; -- changed by djanaswa for bug 6007644
246: x_date => l_temp_date,
247: x_return_status => l_return_status);
248: IF(l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
249: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
250: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
251: RAISE OKL_API.G_EXCEPTION_ERROR;
252: END IF;
253: END IF; -- changed by djanaswa for bug 6007644
254:
247: x_return_status => l_return_status);
248: IF(l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
249: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
250: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
251: RAISE OKL_API.G_EXCEPTION_ERROR;
252: END IF;
253: END IF; -- changed by djanaswa for bug 6007644
254:
255: -- Note:
303: -- Return the things
304: x_date := l_temp_date;
305: x_return_status := l_return_status;
306: EXCEPTION
307: WHEN OKL_API.G_EXCEPTION_ERROR THEN
308: x_return_status := G_RET_STS_ERROR;
309: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
310: x_return_status := G_RET_STS_UNEXP_ERROR;
311: WHEN OTHERS THEN
305: x_return_status := l_return_status;
306: EXCEPTION
307: WHEN OKL_API.G_EXCEPTION_ERROR THEN
308: x_return_status := G_RET_STS_ERROR;
309: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
310: x_return_status := G_RET_STS_UNEXP_ERROR;
311: WHEN OTHERS THEN
312: OKL_API.SET_MESSAGE (
313: p_app_name => G_APP_NAME,
308: x_return_status := G_RET_STS_ERROR;
309: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
310: x_return_status := G_RET_STS_UNEXP_ERROR;
311: WHEN OTHERS THEN
312: OKL_API.SET_MESSAGE (
313: p_app_name => G_APP_NAME,
314: p_msg_name => G_DB_ERROR,
315: p_token1 => G_PROG_NAME_TOKEN,
316: p_token1_value => l_api_name,
427:
428: ELSIF (p_line_style IN ('FEE', 'FREE_FORM1') OR p_line_style IS NULL) AND
429: (p_sty_purpose <> 'SECURITY_DEPOSIT') THEN
430:
431: If ( p_fee_type = 'INCOME' AND p_recurr_yn = OKL_API.G_FALSE ) Then
432: --x_mapped_stream := 'AMORTIZED FEE INCOME';
433: OKL_ISG_UTILS_PVT.get_dep_stream_type(
434: p_khr_id => p_khr_id,
435: p_deal_type => p_deal_type,
584: x_return_status := G_RET_STS_SUCCESS;
585: -- print( l_prog_name, 'end' );
586: EXCEPTION
587:
588: WHEN OKL_API.G_EXCEPTION_ERROR THEN
589:
590: x_return_status := G_RET_STS_ERROR;
591:
592: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
588: WHEN OKL_API.G_EXCEPTION_ERROR THEN
589:
590: x_return_status := G_RET_STS_ERROR;
591:
592: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
593:
594: x_return_status := G_RET_STS_UNEXP_ERROR;
595:
596: WHEN OTHERS THEN
594: x_return_status := G_RET_STS_UNEXP_ERROR;
595:
596: WHEN OTHERS THEN
597:
598: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
599: p_msg_name => G_DB_ERROR,
600: p_token1 => G_PROG_NAME_TOKEN,
601: p_token1_value => l_prog_name,
602: p_token2 => G_SQLCODE_TOKEN,
673: x_return_status => x_return_status,
674: x_primary_sty_id => l_sty_id,
675: x_primary_sty_name => l_stream_name);
676: -- print( l_prog_name, ' stream name ' || l_stream_name );
677: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
678: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
679: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
680: RAISE OKL_API.G_EXCEPTION_ERROR;
681: END IF;
674: x_primary_sty_id => l_sty_id,
675: x_primary_sty_name => l_stream_name);
676: -- print( l_prog_name, ' stream name ' || l_stream_name );
677: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
678: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
679: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
680: RAISE OKL_API.G_EXCEPTION_ERROR;
681: END IF;
682:
675: x_primary_sty_name => l_stream_name);
676: -- print( l_prog_name, ' stream name ' || l_stream_name );
677: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
678: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
679: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
680: RAISE OKL_API.G_EXCEPTION_ERROR;
681: END IF;
682:
683: -- Creates a new Stream Header record populating the input values passed
676: -- print( l_prog_name, ' stream name ' || l_stream_name );
677: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
678: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
679: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
680: RAISE OKL_API.G_EXCEPTION_ERROR;
681: END IF;
682:
683: -- Creates a new Stream Header record populating the input values passed
684: -- and generates a transaction number for the header.
688: p_sty_id => l_sty_id,
689: p_purpose_code => 'STUBS',
690: x_stmv_rec => p_stmv_rec,
691: x_return_status => x_return_status);
692: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
693: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
694: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
695: RAISE OKL_API.G_EXCEPTION_ERROR;
696: END IF;
689: p_purpose_code => 'STUBS',
690: x_stmv_rec => p_stmv_rec,
691: x_return_status => x_return_status);
692: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
693: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
694: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
695: RAISE OKL_API.G_EXCEPTION_ERROR;
696: END IF;
697: -- Updating the Stream Header Details as per the need
690: x_stmv_rec => p_stmv_rec,
691: x_return_status => x_return_status);
692: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
693: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
694: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
695: RAISE OKL_API.G_EXCEPTION_ERROR;
696: END IF;
697: -- Updating the Stream Header Details as per the need
698: p_stmv_rec.date_history := sysdate ;
691: x_return_status => x_return_status);
692: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
693: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
694: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
695: RAISE OKL_API.G_EXCEPTION_ERROR;
696: END IF;
697: -- Updating the Stream Header Details as per the need
698: p_stmv_rec.date_history := sysdate ;
699: p_stmv_rec.say_code := 'HIST' ;
720: p_stmv_rec,
721: p_selv_tbl,
722: x_stmv_rec,
723: x_selv_tbl);
724: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
725: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
726: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
727: RAISE OKL_API.G_EXCEPTION_ERROR;
728: END IF;
721: p_selv_tbl,
722: x_stmv_rec,
723: x_selv_tbl);
724: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
725: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
726: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
727: RAISE OKL_API.G_EXCEPTION_ERROR;
728: END IF;
729: --print( l_prog_name, ' after create_stub ', x_return_status );
722: x_stmv_rec,
723: x_selv_tbl);
724: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
725: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
726: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
727: RAISE OKL_API.G_EXCEPTION_ERROR;
728: END IF;
729: --print( l_prog_name, ' after create_stub ', x_return_status );
730: --print( l_prog_name, ' # of stubf created ' || to_chaR( x_selv_tbl.COUNT ) );
723: x_selv_tbl);
724: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
725: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
726: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
727: RAISE OKL_API.G_EXCEPTION_ERROR;
728: END IF;
729: --print( l_prog_name, ' after create_stub ', x_return_status );
730: --print( l_prog_name, ' # of stubf created ' || to_chaR( x_selv_tbl.COUNT ) );
731: --x_se_id := x_selv_tbl(x_selv_tbl.FIRST).id;
911: x_msg_data => x_msg_data,
912: x_se_id => l_se_id );
913:
914: print( l_prog_name, 'stub', x_return_status );
915: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
916: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
917: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
918: RAISE OKL_API.G_EXCEPTION_ERROR;
919: END IF;
912: x_se_id => l_se_id );
913:
914: print( l_prog_name, 'stub', x_return_status );
915: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
916: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
917: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
918: RAISE OKL_API.G_EXCEPTION_ERROR;
919: END IF;
920:
913:
914: print( l_prog_name, 'stub', x_return_status );
915: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
916: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
917: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
918: RAISE OKL_API.G_EXCEPTION_ERROR;
919: END IF;
920:
921: For r_rollover_fee in c_rollover_fee
914: print( l_prog_name, 'stub', x_return_status );
915: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
916: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
917: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
918: RAISE OKL_API.G_EXCEPTION_ERROR;
919: END IF;
920:
921: For r_rollover_fee in c_rollover_fee
922: LOOP
985: x_return_status => lx_return_status,
986: x_msg_count => x_msg_count,
987: x_msg_data => x_msg_data,
988: p_recurrence_date => l_recurrence_date);
989: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
990: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
991: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
992: RAISE OKL_API.G_EXCEPTION_ERROR;
993: END IF;
986: x_msg_count => x_msg_count,
987: x_msg_data => x_msg_data,
988: p_recurrence_date => l_recurrence_date);
989: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
990: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
991: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
992: RAISE OKL_API.G_EXCEPTION_ERROR;
993: END IF;
994:
987: x_msg_data => x_msg_data,
988: p_recurrence_date => l_recurrence_date);
989: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
990: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
991: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
992: RAISE OKL_API.G_EXCEPTION_ERROR;
993: END IF;
994:
995: j := l_selv_tbl.COUNT;
988: p_recurrence_date => l_recurrence_date);
989: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
990: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
991: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
992: RAISE OKL_API.G_EXCEPTION_ERROR;
993: END IF;
994:
995: j := l_selv_tbl.COUNT;
996: For i in l_tmp_selv_tbl.FIRST..l_tmp_selv_tbl.LAST
1014: p_purpose_code => NULL,
1015: x_stmv_rec => l_stmv_rec,
1016: x_return_status => lx_return_status);
1017:
1018: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1019: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1020: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1021: RAISE OKL_API.G_EXCEPTION_ERROR;
1022: END IF;
1015: x_stmv_rec => l_stmv_rec,
1016: x_return_status => lx_return_status);
1017:
1018: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1019: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1020: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1021: RAISE OKL_API.G_EXCEPTION_ERROR;
1022: END IF;
1023:
1016: x_return_status => lx_return_status);
1017:
1018: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1019: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1020: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1021: RAISE OKL_API.G_EXCEPTION_ERROR;
1022: END IF;
1023:
1024:
1017:
1018: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1019: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1020: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1021: RAISE OKL_API.G_EXCEPTION_ERROR;
1022: END IF;
1023:
1024:
1025: lx_return_status := Okl_Streams_Util.round_streams_amount(
1031: p_selv_tbl => l_selv_tbl,
1032: x_selv_tbl => lx_selv_tbl);
1033:
1034: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
1035: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1036: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
1037: RAISE OKL_API.G_EXCEPTION_ERROR;
1038: END IF;
1039:
1033:
1034: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
1035: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1036: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
1037: RAISE OKL_API.G_EXCEPTION_ERROR;
1038: END IF;
1039:
1040: l_selv_tbl.DELETE;
1041: l_selv_tbl := lx_selv_tbl;
1053: p_selv_tbl => l_selv_tbl,
1054: x_stmv_rec => lx_stmv_rec,
1055: x_selv_tbl => lx_selv_tbl);
1056:
1057: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1058: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1059: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1060: RAISE OKL_API.G_EXCEPTION_ERROR;
1061: END IF;
1054: x_stmv_rec => lx_stmv_rec,
1055: x_selv_tbl => lx_selv_tbl);
1056:
1057: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1058: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1059: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1060: RAISE OKL_API.G_EXCEPTION_ERROR;
1061: END IF;
1062:
1055: x_selv_tbl => lx_selv_tbl);
1056:
1057: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1058: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1059: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1060: RAISE OKL_API.G_EXCEPTION_ERROR;
1061: END IF;
1062:
1063: print( l_prog_name, 'amortize with capital cost ' || to_char(l_capital_cost) );
1056:
1057: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1058: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1059: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1060: RAISE OKL_API.G_EXCEPTION_ERROR;
1061: END IF;
1062:
1063: print( l_prog_name, 'amortize with capital cost ' || to_char(l_capital_cost) );
1064:
1083: x_return_status => lx_return_status);
1084:
1085: print( l_prog_name, 'amortize ', lx_return_status );
1086:
1087: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1088: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1089: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1090: RAISE OKL_API.G_EXCEPTION_ERROR;
1091: END IF;
1084:
1085: print( l_prog_name, 'amortize ', lx_return_status );
1086:
1087: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1088: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1089: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1090: RAISE OKL_API.G_EXCEPTION_ERROR;
1091: END IF;
1092:
1085: print( l_prog_name, 'amortize ', lx_return_status );
1086:
1087: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1088: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1089: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1090: RAISE OKL_API.G_EXCEPTION_ERROR;
1091: END IF;
1092:
1093:
1086:
1087: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1088: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1089: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1090: RAISE OKL_API.G_EXCEPTION_ERROR;
1091: END IF;
1092:
1093:
1094: OKL_ISG_UTILS_PVT.get_dependent_stream_type(
1098: x_return_status => x_return_status,
1099: x_dependent_sty_id => l_pre_tax_inc_id,
1100: x_dependent_sty_name => l_sty_name);
1101:
1102: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1103: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1104: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
1105: RAISE OKL_API.G_EXCEPTION_ERROR;
1106: END IF;
1099: x_dependent_sty_id => l_pre_tax_inc_id,
1100: x_dependent_sty_name => l_sty_name);
1101:
1102: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1103: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1104: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
1105: RAISE OKL_API.G_EXCEPTION_ERROR;
1106: END IF;
1107:
1100: x_dependent_sty_name => l_sty_name);
1101:
1102: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1103: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1104: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
1105: RAISE OKL_API.G_EXCEPTION_ERROR;
1106: END IF;
1107:
1108: OKL_ISG_UTILS_PVT.get_dependent_stream_type(
1101:
1102: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1103: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1104: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
1105: RAISE OKL_API.G_EXCEPTION_ERROR;
1106: END IF;
1107:
1108: OKL_ISG_UTILS_PVT.get_dependent_stream_type(
1109: p_khr_id => p_khr_id,
1112: x_return_status => lx_return_status,
1113: x_dependent_sty_id => l_interest_id,
1114: x_dependent_sty_name => l_sty_name);
1115:
1116: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1117: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1118: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1119: RAISE OKL_API.G_EXCEPTION_ERROR;
1120: END IF;
1113: x_dependent_sty_id => l_interest_id,
1114: x_dependent_sty_name => l_sty_name);
1115:
1116: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1117: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1118: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1119: RAISE OKL_API.G_EXCEPTION_ERROR;
1120: END IF;
1121:
1114: x_dependent_sty_name => l_sty_name);
1115:
1116: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1117: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1118: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1119: RAISE OKL_API.G_EXCEPTION_ERROR;
1120: END IF;
1121:
1122: OKL_ISG_UTILS_PVT.get_dependent_stream_type(
1115:
1116: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1117: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1118: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1119: RAISE OKL_API.G_EXCEPTION_ERROR;
1120: END IF;
1121:
1122: OKL_ISG_UTILS_PVT.get_dependent_stream_type(
1123: p_khr_id => p_khr_id,
1126: x_return_status => lx_return_status,
1127: x_dependent_sty_id => l_principal_id,
1128: x_dependent_sty_name => l_sty_name);
1129:
1130: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1131: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1132: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1133: RAISE OKL_API.G_EXCEPTION_ERROR;
1134: END IF;
1127: x_dependent_sty_id => l_principal_id,
1128: x_dependent_sty_name => l_sty_name);
1129:
1130: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1131: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1132: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1133: RAISE OKL_API.G_EXCEPTION_ERROR;
1134: END IF;
1135:
1128: x_dependent_sty_name => l_sty_name);
1129:
1130: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1131: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1132: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1133: RAISE OKL_API.G_EXCEPTION_ERROR;
1134: END IF;
1135:
1136: OKL_ISG_UTILS_PVT.get_dependent_stream_type(
1129:
1130: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1131: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1132: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1133: RAISE OKL_API.G_EXCEPTION_ERROR;
1134: END IF;
1135:
1136: OKL_ISG_UTILS_PVT.get_dependent_stream_type(
1137: p_khr_id => p_khr_id,
1140: x_return_status => lx_return_status,
1141: x_dependent_sty_id => l_prin_bal_id,
1142: x_dependent_sty_name => l_sty_name);
1143:
1144: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1145: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1146: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1147: RAISE OKL_API.G_EXCEPTION_ERROR;
1148: END IF;
1141: x_dependent_sty_id => l_prin_bal_id,
1142: x_dependent_sty_name => l_sty_name);
1143:
1144: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1145: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1146: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1147: RAISE OKL_API.G_EXCEPTION_ERROR;
1148: END IF;
1149:
1142: x_dependent_sty_name => l_sty_name);
1143:
1144: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1145: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1146: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1147: RAISE OKL_API.G_EXCEPTION_ERROR;
1148: END IF;
1149:
1150: OKL_ISG_UTILS_PVT.get_dependent_stream_type(
1143:
1144: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1145: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1146: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1147: RAISE OKL_API.G_EXCEPTION_ERROR;
1148: END IF;
1149:
1150: OKL_ISG_UTILS_PVT.get_dependent_stream_type(
1151: p_khr_id => p_khr_id,
1154: x_return_status => lx_return_status,
1155: x_dependent_sty_id => l_termination_id,
1156: x_dependent_sty_name => l_sty_name);
1157:
1158: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1159: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1160: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1161: RAISE OKL_API.G_EXCEPTION_ERROR;
1162: END IF;
1155: x_dependent_sty_id => l_termination_id,
1156: x_dependent_sty_name => l_sty_name);
1157:
1158: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1159: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1160: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1161: RAISE OKL_API.G_EXCEPTION_ERROR;
1162: END IF;
1163:
1156: x_dependent_sty_name => l_sty_name);
1157:
1158: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1159: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1160: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1161: RAISE OKL_API.G_EXCEPTION_ERROR;
1162: END IF;
1163:
1164: IF l_principal_tbl.COUNT > 0 AND (l_principal_id IS NOT NULL) Then
1157:
1158: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1159: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1160: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1161: RAISE OKL_API.G_EXCEPTION_ERROR;
1162: END IF;
1163:
1164: IF l_principal_tbl.COUNT > 0 AND (l_principal_id IS NOT NULL) Then
1165:
1169: p_purpose_code => NULL,
1170: x_stmv_rec => l_stmv_rec,
1171: x_return_status => lx_return_status);
1172:
1173: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1174: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1175: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1176: RAISE OKL_API.G_EXCEPTION_ERROR;
1177: END IF;
1170: x_stmv_rec => l_stmv_rec,
1171: x_return_status => lx_return_status);
1172:
1173: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1174: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1175: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1176: RAISE OKL_API.G_EXCEPTION_ERROR;
1177: END IF;
1178:
1171: x_return_status => lx_return_status);
1172:
1173: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1174: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1175: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1176: RAISE OKL_API.G_EXCEPTION_ERROR;
1177: END IF;
1178:
1179:
1172:
1173: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1174: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1175: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1176: RAISE OKL_API.G_EXCEPTION_ERROR;
1177: END IF;
1178:
1179:
1180: l_stmv_rec.say_code := 'CURR';
1190: p_selv_tbl => l_principal_tbl,
1191: x_selv_tbl => lx_selv_tbl);
1192:
1193: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
1194: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1195: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
1196: RAISE OKL_API.G_EXCEPTION_ERROR;
1197: END IF;
1198:
1192:
1193: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
1194: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1195: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
1196: RAISE OKL_API.G_EXCEPTION_ERROR;
1197: END IF;
1198:
1199: l_principal_tbl.DELETE;
1200: l_principal_tbl := lx_selv_tbl;
1208: p_selv_tbl => l_principal_tbl,
1209: x_stmv_rec => lx_stmv_rec,
1210: x_selv_tbl => lx_selv_tbl);
1211:
1212: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1213: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1214: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1215: RAISE OKL_API.G_EXCEPTION_ERROR;
1216: END IF;
1209: x_stmv_rec => lx_stmv_rec,
1210: x_selv_tbl => lx_selv_tbl);
1211:
1212: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1213: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1214: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1215: RAISE OKL_API.G_EXCEPTION_ERROR;
1216: END IF;
1217:
1210: x_selv_tbl => lx_selv_tbl);
1211:
1212: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1213: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1214: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1215: RAISE OKL_API.G_EXCEPTION_ERROR;
1216: END IF;
1217:
1218: END IF;
1211:
1212: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1213: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1214: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1215: RAISE OKL_API.G_EXCEPTION_ERROR;
1216: END IF;
1217:
1218: END IF;
1219:
1225: p_purpose_code => NULL,
1226: x_stmv_rec => l_stmv_rec,
1227: x_return_status => lx_return_status);
1228:
1229: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1230: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1231: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1232: RAISE OKL_API.G_EXCEPTION_ERROR;
1233: END IF;
1226: x_stmv_rec => l_stmv_rec,
1227: x_return_status => lx_return_status);
1228:
1229: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1230: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1231: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1232: RAISE OKL_API.G_EXCEPTION_ERROR;
1233: END IF;
1234:
1227: x_return_status => lx_return_status);
1228:
1229: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1230: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1231: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1232: RAISE OKL_API.G_EXCEPTION_ERROR;
1233: END IF;
1234:
1235:
1228:
1229: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1230: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1231: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1232: RAISE OKL_API.G_EXCEPTION_ERROR;
1233: END IF;
1234:
1235:
1236: l_stmv_rec.say_code := 'CURR';
1246: p_selv_tbl => l_interest_tbl,
1247: x_selv_tbl => lx_selv_tbl);
1248:
1249: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
1250: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1251: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
1252: RAISE OKL_API.G_EXCEPTION_ERROR;
1253: END IF;
1254:
1248:
1249: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
1250: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1251: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
1252: RAISE OKL_API.G_EXCEPTION_ERROR;
1253: END IF;
1254:
1255: l_interest_tbl.DELETE;
1256: l_interest_tbl := lx_selv_tbl;
1264: p_selv_tbl => l_interest_tbl,
1265: x_stmv_rec => lx_stmv_rec,
1266: x_selv_tbl => lx_selv_tbl);
1267:
1268: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1269: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1270: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1271: RAISE OKL_API.G_EXCEPTION_ERROR;
1272: END IF;
1265: x_stmv_rec => lx_stmv_rec,
1266: x_selv_tbl => lx_selv_tbl);
1267:
1268: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1269: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1270: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1271: RAISE OKL_API.G_EXCEPTION_ERROR;
1272: END IF;
1273:
1266: x_selv_tbl => lx_selv_tbl);
1267:
1268: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1269: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1270: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1271: RAISE OKL_API.G_EXCEPTION_ERROR;
1272: END IF;
1273:
1274: END IF;
1267:
1268: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1269: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1270: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1271: RAISE OKL_API.G_EXCEPTION_ERROR;
1272: END IF;
1273:
1274: END IF;
1275:
1281: p_purpose_code => NULL,
1282: x_stmv_rec => l_stmv_rec,
1283: x_return_status => lx_return_status);
1284:
1285: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1286: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1287: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1288: RAISE OKL_API.G_EXCEPTION_ERROR;
1289: END IF;
1282: x_stmv_rec => l_stmv_rec,
1283: x_return_status => lx_return_status);
1284:
1285: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1286: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1287: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1288: RAISE OKL_API.G_EXCEPTION_ERROR;
1289: END IF;
1290:
1283: x_return_status => lx_return_status);
1284:
1285: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1286: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1287: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1288: RAISE OKL_API.G_EXCEPTION_ERROR;
1289: END IF;
1290:
1291:
1284:
1285: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1286: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1287: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1288: RAISE OKL_API.G_EXCEPTION_ERROR;
1289: END IF;
1290:
1291:
1292: l_stmv_rec.say_code := 'CURR';
1302: p_selv_tbl => l_prin_bal_tbl,
1303: x_selv_tbl => lx_selv_tbl);
1304:
1305: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
1306: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1307: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
1308: RAISE OKL_API.G_EXCEPTION_ERROR;
1309: END IF;
1310:
1304:
1305: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
1306: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1307: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
1308: RAISE OKL_API.G_EXCEPTION_ERROR;
1309: END IF;
1310:
1311: l_prin_bal_tbl.DELETE;
1312: l_prin_bal_tbl := lx_selv_tbl;
1320: p_selv_tbl => l_prin_bal_tbl,
1321: x_stmv_rec => lx_stmv_rec,
1322: x_selv_tbl => lx_selv_tbl);
1323:
1324: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1325: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1326: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1327: RAISE OKL_API.G_EXCEPTION_ERROR;
1328: END IF;
1321: x_stmv_rec => lx_stmv_rec,
1322: x_selv_tbl => lx_selv_tbl);
1323:
1324: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1325: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1326: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1327: RAISE OKL_API.G_EXCEPTION_ERROR;
1328: END IF;
1329:
1322: x_selv_tbl => lx_selv_tbl);
1323:
1324: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1325: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1326: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1327: RAISE OKL_API.G_EXCEPTION_ERROR;
1328: END IF;
1329:
1330: END IF;
1323:
1324: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1325: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1326: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1327: RAISE OKL_API.G_EXCEPTION_ERROR;
1328: END IF;
1329:
1330: END IF;
1331:
1337: p_purpose_code => NULL,
1338: x_stmv_rec => l_stmv_rec,
1339: x_return_status => lx_return_status);
1340:
1341: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1342: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1343: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1344: RAISE OKL_API.G_EXCEPTION_ERROR;
1345: END IF;
1338: x_stmv_rec => l_stmv_rec,
1339: x_return_status => lx_return_status);
1340:
1341: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1342: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1343: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1344: RAISE OKL_API.G_EXCEPTION_ERROR;
1345: END IF;
1346:
1339: x_return_status => lx_return_status);
1340:
1341: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1342: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1343: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1344: RAISE OKL_API.G_EXCEPTION_ERROR;
1345: END IF;
1346:
1347:
1340:
1341: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1342: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1343: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1344: RAISE OKL_API.G_EXCEPTION_ERROR;
1345: END IF;
1346:
1347:
1348: l_stmv_rec.say_code := 'CURR';
1358: p_selv_tbl => l_termination_tbl,
1359: x_selv_tbl => lx_selv_tbl);
1360:
1361: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
1362: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1363: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
1364: RAISE OKL_API.G_EXCEPTION_ERROR;
1365: END IF;
1366:
1360:
1361: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
1362: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1363: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
1364: RAISE OKL_API.G_EXCEPTION_ERROR;
1365: END IF;
1366:
1367: l_termination_tbl.DELETE;
1368: l_termination_tbl := lx_selv_tbl;
1376: p_selv_tbl => l_termination_tbl,
1377: x_stmv_rec => lx_stmv_rec,
1378: x_selv_tbl => lx_selv_tbl);
1379:
1380: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1381: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1382: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1383: RAISE OKL_API.G_EXCEPTION_ERROR;
1384: END IF;
1377: x_stmv_rec => lx_stmv_rec,
1378: x_selv_tbl => lx_selv_tbl);
1379:
1380: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1381: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1382: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1383: RAISE OKL_API.G_EXCEPTION_ERROR;
1384: END IF;
1385:
1378: x_selv_tbl => lx_selv_tbl);
1379:
1380: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1381: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1382: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1383: RAISE OKL_API.G_EXCEPTION_ERROR;
1384: END IF;
1385:
1386: END IF;
1379:
1380: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1381: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1382: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1383: RAISE OKL_API.G_EXCEPTION_ERROR;
1384: END IF;
1385:
1386: END IF;
1387:
1393: p_purpose_code => NULL,
1394: x_stmv_rec => l_stmv_rec,
1395: x_return_status => lx_return_status);
1396:
1397: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1398: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1399: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1400: RAISE OKL_API.G_EXCEPTION_ERROR;
1401: END IF;
1394: x_stmv_rec => l_stmv_rec,
1395: x_return_status => lx_return_status);
1396:
1397: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1398: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1399: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1400: RAISE OKL_API.G_EXCEPTION_ERROR;
1401: END IF;
1402:
1395: x_return_status => lx_return_status);
1396:
1397: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1398: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1399: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1400: RAISE OKL_API.G_EXCEPTION_ERROR;
1401: END IF;
1402:
1403: l_stmv_rec.say_code := 'CURR';
1396:
1397: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1398: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1399: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1400: RAISE OKL_API.G_EXCEPTION_ERROR;
1401: END IF;
1402:
1403: l_stmv_rec.say_code := 'CURR';
1404: l_stmv_rec.active_yn := 'Y';
1414: p_selv_tbl => l_pre_tax_inc_tbl,
1415: x_selv_tbl => lx_selv_tbl);
1416:
1417: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
1418: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1419: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
1420: RAISE OKL_API.G_EXCEPTION_ERROR;
1421: END IF;
1422:
1416:
1417: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
1418: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1419: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
1420: RAISE OKL_API.G_EXCEPTION_ERROR;
1421: END IF;
1422:
1423: l_pre_tax_inc_tbl.DELETE;
1424: l_pre_tax_inc_tbl := lx_selv_tbl;
1432: p_selv_tbl => l_pre_tax_inc_tbl,
1433: x_stmv_rec => lx_stmv_rec,
1434: x_selv_tbl => lx_selv_tbl);
1435:
1436: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1437: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1438: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1439: RAISE OKL_API.G_EXCEPTION_ERROR;
1440: END IF;
1433: x_stmv_rec => lx_stmv_rec,
1434: x_selv_tbl => lx_selv_tbl);
1435:
1436: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1437: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1438: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1439: RAISE OKL_API.G_EXCEPTION_ERROR;
1440: END IF;
1441:
1434: x_selv_tbl => lx_selv_tbl);
1435:
1436: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1437: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1438: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1439: RAISE OKL_API.G_EXCEPTION_ERROR;
1440: END IF;
1441:
1442: END IF;
1435:
1436: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1437: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1438: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
1439: RAISE OKL_API.G_EXCEPTION_ERROR;
1440: END IF;
1441:
1442: END IF;
1443:
1454: END LOOP;
1455:
1456: EXCEPTION
1457:
1458: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1459:
1460: x_return_status := G_RET_STS_ERROR;
1461:
1462: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1458: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1459:
1460: x_return_status := G_RET_STS_ERROR;
1461:
1462: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1463:
1464: x_return_status := G_RET_STS_UNEXP_ERROR;
1465:
1466: WHEN OTHERS THEN
1464: x_return_status := G_RET_STS_UNEXP_ERROR;
1465:
1466: WHEN OTHERS THEN
1467:
1468: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1469: p_msg_name => G_DB_ERROR,
1470: p_token1 => G_PROG_NAME_TOKEN,
1471: p_token1_value => l_prog_name,
1472: p_token2 => G_SQLCODE_TOKEN,
1507: p_end_date => p_amount_date,
1508: p_arrears => 'N',
1509: x_return_status => x_return_status);
1510:
1511: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1512: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1513: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
1514: RAISE OKL_API.G_EXCEPTION_ERROR;
1515: END IF;
1508: p_arrears => 'N',
1509: x_return_status => x_return_status);
1510:
1511: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1512: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1513: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
1514: RAISE OKL_API.G_EXCEPTION_ERROR;
1515: END IF;
1516:
1509: x_return_status => x_return_status);
1510:
1511: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1512: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1513: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
1514: RAISE OKL_API.G_EXCEPTION_ERROR;
1515: END IF;
1516:
1517:
1510:
1511: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1512: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1513: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
1514: RAISE OKL_API.G_EXCEPTION_ERROR;
1515: END IF;
1516:
1517:
1518: IF p_frequency = 'M' THEN
1536: x_pv_amount := p_amount / POWER( 1 + (p_rate/(l_cf_ppy*100)), l_periods );
1537:
1538: --print(l_prog_name, 'end' );
1539: EXCEPTION
1540: WHEN OKL_API.G_EXCEPTION_ERROR
1541: THEN
1542: x_return_status := G_RET_STS_ERROR;
1543:
1544: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1540: WHEN OKL_API.G_EXCEPTION_ERROR
1541: THEN
1542: x_return_status := G_RET_STS_ERROR;
1543:
1544: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1545:
1546: x_return_status := G_RET_STS_UNEXP_ERROR;
1547:
1548: WHEN OTHERS THEN
1546: x_return_status := G_RET_STS_UNEXP_ERROR;
1547:
1548: WHEN OTHERS THEN
1549:
1550: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1551: p_msg_name => G_DB_ERROR,
1552: p_token1 => G_PROG_NAME_TOKEN,
1553: p_token1_value => l_prog_name,
1554: p_token2 => G_SQLCODE_TOKEN,
1601: END LOOP;
1602: --print(l_prog_name, 'end' );
1603:
1604: EXCEPTION
1605: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1606: x_return_status := G_RET_STS_ERROR;
1607: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1608: x_return_status := G_RET_STS_UNEXP_ERROR;
1609: WHEN OTHERS THEN
1603:
1604: EXCEPTION
1605: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1606: x_return_status := G_RET_STS_ERROR;
1607: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1608: x_return_status := G_RET_STS_UNEXP_ERROR;
1609: WHEN OTHERS THEN
1610: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1611: p_msg_name => G_DB_ERROR,
1606: x_return_status := G_RET_STS_ERROR;
1607: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1608: x_return_status := G_RET_STS_UNEXP_ERROR;
1609: WHEN OTHERS THEN
1610: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1611: p_msg_name => G_DB_ERROR,
1612: p_token1 => G_PROG_NAME_TOKEN,
1613: p_token1_value => l_prog_name,
1614: p_token2 => G_SQLCODE_TOKEN,
1711: x_return_status => x_return_status,
1712: x_dependent_sty_id => l_sty_id,
1713: x_dependent_sty_name => l_sty_name);
1714:
1715: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1716: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1717: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
1718: RAISE OKL_API.G_EXCEPTION_ERROR;
1719: END IF;
1712: x_dependent_sty_id => l_sty_id,
1713: x_dependent_sty_name => l_sty_name);
1714:
1715: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1716: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1717: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
1718: RAISE OKL_API.G_EXCEPTION_ERROR;
1719: END IF;
1720: ELSIF p_deal_type IN ('LEASEDF', 'LEASEST') THEN
1713: x_dependent_sty_name => l_sty_name);
1714:
1715: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1716: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1717: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
1718: RAISE OKL_API.G_EXCEPTION_ERROR;
1719: END IF;
1720: ELSIF p_deal_type IN ('LEASEDF', 'LEASEST') THEN
1721: --l_sty_name := 'PRE-TAX INCOME';
1714:
1715: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1716: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1717: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
1718: RAISE OKL_API.G_EXCEPTION_ERROR;
1719: END IF;
1720: ELSIF p_deal_type IN ('LEASEDF', 'LEASEST') THEN
1721: --l_sty_name := 'PRE-TAX INCOME';
1722: OKL_ISG_UTILS_PVT.get_dependent_stream_type(
1727: x_return_status => x_return_status,
1728: x_dependent_sty_id => l_sty_id,
1729: x_dependent_sty_name => l_sty_name);
1730:
1731: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1732: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1733: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
1734: RAISE OKL_API.G_EXCEPTION_ERROR;
1735: END IF;
1728: x_dependent_sty_id => l_sty_id,
1729: x_dependent_sty_name => l_sty_name);
1730:
1731: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1732: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1733: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
1734: RAISE OKL_API.G_EXCEPTION_ERROR;
1735: END IF;
1736:
1729: x_dependent_sty_name => l_sty_name);
1730:
1731: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1732: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1733: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
1734: RAISE OKL_API.G_EXCEPTION_ERROR;
1735: END IF;
1736:
1737: ELSIF p_deal_type IN ('LOAN', 'LOAN-REVOLVING') THEN
1730:
1731: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1732: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1733: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
1734: RAISE OKL_API.G_EXCEPTION_ERROR;
1735: END IF;
1736:
1737: ELSIF p_deal_type IN ('LOAN', 'LOAN-REVOLVING') THEN
1738: --l_sty_name := 'PRE-TAX INCOME';
1744: x_return_status => x_return_status,
1745: x_dependent_sty_id => l_sty_id,
1746: x_dependent_sty_name => l_sty_name);
1747:
1748: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1749: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1750: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
1751: RAISE OKL_API.G_EXCEPTION_ERROR;
1752: END IF;
1745: x_dependent_sty_id => l_sty_id,
1746: x_dependent_sty_name => l_sty_name);
1747:
1748: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1749: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1750: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
1751: RAISE OKL_API.G_EXCEPTION_ERROR;
1752: END IF;
1753:
1746: x_dependent_sty_name => l_sty_name);
1747:
1748: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1749: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1750: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
1751: RAISE OKL_API.G_EXCEPTION_ERROR;
1752: END IF;
1753:
1754: END IF;
1747:
1748: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
1749: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1750: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
1751: RAISE OKL_API.G_EXCEPTION_ERROR;
1752: END IF;
1753:
1754: END IF;
1755:
1803: print( l_prog_name, 'end' );
1804:
1805: EXCEPTION
1806:
1807: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1808:
1809: x_return_status := G_RET_STS_ERROR;
1810:
1811: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1807: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1808:
1809: x_return_status := G_RET_STS_ERROR;
1810:
1811: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1812:
1813: x_return_status := G_RET_STS_UNEXP_ERROR;
1814:
1815: WHEN OTHERS THEN
1813: x_return_status := G_RET_STS_UNEXP_ERROR;
1814:
1815: WHEN OTHERS THEN
1816:
1817: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1818: p_msg_name => G_DB_ERROR,
1819: p_token1 => G_PROG_NAME_TOKEN,
1820: p_token1_value => l_prog_name,
1821: p_token2 => G_SQLCODE_TOKEN,
1926: x_sty_id := p_sty_id;
1927:
1928: ELSE
1929:
1930: OKL_API.SET_MESSAGE(p_app_name => G_APP_NAME,
1931: p_msg_name => 'OKL_STREAM_ID_NOT_FOUND',
1932: p_token1 => 'STY_ID',
1933: p_token1_value => p_sty_id);
1934:
1931: p_msg_name => 'OKL_STREAM_ID_NOT_FOUND',
1932: p_token1 => 'STY_ID',
1933: p_token1_value => p_sty_id);
1934:
1935: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1936:
1937: END IF;
1938:
1939: ELSIF p_sty_name IS NOT NULL THEN
1948: x_sty_name := p_sty_name;
1949:
1950: ELSE
1951:
1952: OKL_API.SET_MESSAGE(p_app_name => G_APP_NAME,
1953: p_msg_name => 'OKL_STREAM_TYPE_NOT_FOUND',
1954: p_token1 => 'STY_NAME',
1955: p_token1_value => p_sty_name);
1956:
1953: p_msg_name => 'OKL_STREAM_TYPE_NOT_FOUND',
1954: p_token1 => 'STY_NAME',
1955: p_token1_value => p_sty_name);
1956:
1957: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1958:
1959: END IF;
1960:
1961: END IF;
1964: print( l_prog_name, 'end' );
1965:
1966: EXCEPTION
1967:
1968: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1969:
1970: x_return_status := G_RET_STS_ERROR;
1971:
1972: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1968: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1969:
1970: x_return_status := G_RET_STS_ERROR;
1971:
1972: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1973:
1974: x_return_status := G_RET_STS_UNEXP_ERROR;
1975:
1976: WHEN OTHERS THEN
1974: x_return_status := G_RET_STS_UNEXP_ERROR;
1975:
1976: WHEN OTHERS THEN
1977:
1978: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
1979: p_msg_name => G_DB_ERROR,
1980: p_token1 => G_PROG_NAME_TOKEN,
1981: p_token1_value => l_prog_name,
1982: p_token2 => G_SQLCODE_TOKEN,
2128:
2129: ELSIF (p_line_style IN ('FEE', 'FREE_FORM1') OR p_line_style IS NULL) AND
2130: (p_sty_purpose <> 'SECURITY_DEPOSIT') THEN
2131:
2132: If ( p_fee_type = 'INCOME' AND p_recurr_yn = OKL_API.G_FALSE ) Then
2133: --x_mapped_stream := 'AMORTIZED FEE INCOME';
2134: OKL_ISG_UTILS_PVT.get_dependent_stream_type(
2135: p_khr_id => p_khr_id,
2136: p_deal_type => p_deal_type,
2339: print( l_prog_name, 'end' );
2340:
2341: EXCEPTION
2342:
2343: WHEN OKL_API.G_EXCEPTION_ERROR THEN
2344:
2345: x_return_status := G_RET_STS_ERROR;
2346:
2347: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2343: WHEN OKL_API.G_EXCEPTION_ERROR THEN
2344:
2345: x_return_status := G_RET_STS_ERROR;
2346:
2347: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2348:
2349: x_return_status := G_RET_STS_UNEXP_ERROR;
2350:
2351: WHEN OTHERS THEN
2349: x_return_status := G_RET_STS_UNEXP_ERROR;
2350:
2351: WHEN OTHERS THEN
2352:
2353: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2354: p_msg_name => G_DB_ERROR,
2355: p_token1 => G_PROG_NAME_TOKEN,
2356: p_token1_value => l_prog_name,
2357: p_token2 => G_SQLCODE_TOKEN,
2386: IF l_months IS NOT NULL THEN
2387: x_return_status := G_RET_STS_SUCCESS;
2388: RETURN l_months;
2389: ELSE
2390: OKL_API.SET_MESSAGE(p_app_name => G_APP_NAME,
2391: p_msg_name => 'OKL_INVALID_FREQUENCY_CODE',
2392: p_token1 => 'FRQ_CODE',
2393: p_token1_value => p_frequency);
2394: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2390: OKL_API.SET_MESSAGE(p_app_name => G_APP_NAME,
2391: p_msg_name => 'OKL_INVALID_FREQUENCY_CODE',
2392: p_token1 => 'FRQ_CODE',
2393: p_token1_value => p_frequency);
2394: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2395: END IF;
2396: EXCEPTION
2397: WHEN OKL_API.G_EXCEPTION_ERROR
2398: THEN
2393: p_token1_value => p_frequency);
2394: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2395: END IF;
2396: EXCEPTION
2397: WHEN OKL_API.G_EXCEPTION_ERROR
2398: THEN
2399: x_return_status := G_RET_STS_ERROR;
2400: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR
2401: THEN
2396: EXCEPTION
2397: WHEN OKL_API.G_EXCEPTION_ERROR
2398: THEN
2399: x_return_status := G_RET_STS_ERROR;
2400: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR
2401: THEN
2402: x_return_status := G_RET_STS_UNEXP_ERROR;
2403: WHEN OTHERS
2404: THEN
2401: THEN
2402: x_return_status := G_RET_STS_UNEXP_ERROR;
2403: WHEN OTHERS
2404: THEN
2405: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2406: p_msg_name => G_DB_ERROR,
2407: p_token1 => G_PROG_NAME_TOKEN,
2408: p_token1_value => l_prog_name,
2409: p_token2 => G_SQLCODE_TOKEN,
2449: IF l_date IS NOT NULL THEN
2450: x_return_status := G_RET_STS_SUCCESS;
2451: RETURN l_date;
2452: ELSE
2453: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2454: END IF;
2455:
2456: print( l_prog_name, 'end' );
2457: EXCEPTION
2455:
2456: print( l_prog_name, 'end' );
2457: EXCEPTION
2458:
2459: WHEN OKL_API.G_EXCEPTION_ERROR THEN
2460:
2461: x_return_status := G_RET_STS_ERROR;
2462:
2463: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2459: WHEN OKL_API.G_EXCEPTION_ERROR THEN
2460:
2461: x_return_status := G_RET_STS_ERROR;
2462:
2463: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2464:
2465: x_return_status := G_RET_STS_UNEXP_ERROR;
2466:
2467: WHEN OTHERS THEN
2465: x_return_status := G_RET_STS_UNEXP_ERROR;
2466:
2467: WHEN OTHERS THEN
2468:
2469: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2470: p_msg_name => G_DB_ERROR,
2471: p_token1 => G_PROG_NAME_TOKEN,
2472: p_token1_value => l_prog_name,
2473: p_token2 => G_SQLCODE_TOKEN,
2501: l_count := 2;
2502: ELSIF p_structure IN ('1STLAST3', '3') THEN
2503: l_count := 3;
2504: ELSE
2505: OKL_API.SET_MESSAGE(p_app_name => G_APP_NAME,
2506: p_msg_name => 'OKL_INVALID_PAYMENT_STRUCTURE',
2507: p_token1 => 'STRUCTURE_CODE',
2508: p_token1_value => p_structure);
2509: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2505: OKL_API.SET_MESSAGE(p_app_name => G_APP_NAME,
2506: p_msg_name => 'OKL_INVALID_PAYMENT_STRUCTURE',
2507: p_token1 => 'STRUCTURE_CODE',
2508: p_token1_value => p_structure);
2509: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2510: END IF;
2511:
2512: x_return_status := G_RET_STS_SUCCESS;
2513: print( l_prog_name, 'end' );
2514: RETURN l_count;
2515:
2516: EXCEPTION
2517:
2518: WHEN OKL_API.G_EXCEPTION_ERROR THEN
2519:
2520: x_return_status := G_RET_STS_ERROR;
2521:
2522: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2518: WHEN OKL_API.G_EXCEPTION_ERROR THEN
2519:
2520: x_return_status := G_RET_STS_ERROR;
2521:
2522: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2523:
2524: x_return_status := G_RET_STS_UNEXP_ERROR;
2525:
2526: WHEN OTHERS THEN
2524: x_return_status := G_RET_STS_UNEXP_ERROR;
2525:
2526: WHEN OTHERS THEN
2527:
2528: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2529: p_msg_name => G_DB_ERROR,
2530: p_token1 => G_PROG_NAME_TOKEN,
2531: p_token1_value => l_prog_name,
2532: p_token2 => G_SQLCODE_TOKEN,
2566: RETURN l_fraction;
2567:
2568: EXCEPTION
2569:
2570: WHEN OKL_API.G_EXCEPTION_ERROR THEN
2571:
2572: x_return_status := G_RET_STS_ERROR;
2573:
2574: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2570: WHEN OKL_API.G_EXCEPTION_ERROR THEN
2571:
2572: x_return_status := G_RET_STS_ERROR;
2573:
2574: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2575:
2576: x_return_status := G_RET_STS_UNEXP_ERROR;
2577:
2578: WHEN OTHERS THEN
2576: x_return_status := G_RET_STS_UNEXP_ERROR;
2577:
2578: WHEN OTHERS THEN
2579:
2580: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2581: p_msg_name => G_DB_ERROR,
2582: p_token1 => G_PROG_NAME_TOKEN,
2583: p_token1_value => l_prog_name,
2584: p_token2 => G_SQLCODE_TOKEN,
2637:
2638: --print( l_prog_name, 'end' );
2639: EXCEPTION
2640:
2641: WHEN OKL_API.G_EXCEPTION_ERROR THEN
2642:
2643: x_return_status := G_RET_STS_ERROR;
2644:
2645: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2641: WHEN OKL_API.G_EXCEPTION_ERROR THEN
2642:
2643: x_return_status := G_RET_STS_ERROR;
2644:
2645: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2646:
2647: x_return_status := G_RET_STS_UNEXP_ERROR;
2648:
2649: WHEN OTHERS THEN
2647: x_return_status := G_RET_STS_UNEXP_ERROR;
2648:
2649: WHEN OTHERS THEN
2650:
2651: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2652: p_msg_name => G_DB_ERROR,
2653: p_token1 => G_PROG_NAME_TOKEN,
2654: p_token1_value => l_prog_name,
2655: p_token2 => G_SQLCODE_TOKEN,
2712: print( l_prog_name, 'begin' );
2713: l_months_factor := get_months_factor( p_frequency => p_frequency,
2714: x_return_status => lx_return_status);
2715:
2716: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
2717: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2718: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
2719: RAISE OKL_API.G_EXCEPTION_ERROR;
2720: END IF;
2713: l_months_factor := get_months_factor( p_frequency => p_frequency,
2714: x_return_status => lx_return_status);
2715:
2716: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
2717: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2718: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
2719: RAISE OKL_API.G_EXCEPTION_ERROR;
2720: END IF;
2721:
2714: x_return_status => lx_return_status);
2715:
2716: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
2717: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2718: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
2719: RAISE OKL_API.G_EXCEPTION_ERROR;
2720: END IF;
2721:
2722:
2715:
2716: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
2717: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2718: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
2719: RAISE OKL_API.G_EXCEPTION_ERROR;
2720: END IF;
2721:
2722:
2723: -- djanaswa ER6274342 start
2726: p_khr_id => p_khr_id,
2727: x_arrears_pay_dates_option => l_arrears_pay_dates_option,
2728: x_return_status => lx_return_status);
2729:
2730: IF(lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
2731: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2732: ELSIF (lx_return_status = OKL_API.G_RET_STS_ERROR) THEN
2733: RAISE OKL_API.G_EXCEPTION_ERROR;
2734: END IF;
2727: x_arrears_pay_dates_option => l_arrears_pay_dates_option,
2728: x_return_status => lx_return_status);
2729:
2730: IF(lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
2731: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2732: ELSIF (lx_return_status = OKL_API.G_RET_STS_ERROR) THEN
2733: RAISE OKL_API.G_EXCEPTION_ERROR;
2734: END IF;
2735: END IF;
2728: x_return_status => lx_return_status);
2729:
2730: IF(lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
2731: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2732: ELSIF (lx_return_status = OKL_API.G_RET_STS_ERROR) THEN
2733: RAISE OKL_API.G_EXCEPTION_ERROR;
2734: END IF;
2735: END IF;
2736:
2729:
2730: IF(lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
2731: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2732: ELSIF (lx_return_status = OKL_API.G_RET_STS_ERROR) THEN
2733: RAISE OKL_API.G_EXCEPTION_ERROR;
2734: END IF;
2735: END IF;
2736:
2737: -- djanaswa ER6274342 end
2795: x_date => x_selv_tbl(i).stream_element_date,
2796: x_return_status => lx_return_status,
2797: p_recurrence_date => p_recurrence_date,
2798: p_arrears_pay_dates_option => l_arrears_pay_dates_option);
2799: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
2800: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2801: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
2802: RAISE OKL_API.G_EXCEPTION_ERROR;
2803: END IF;
2796: x_return_status => lx_return_status,
2797: p_recurrence_date => p_recurrence_date,
2798: p_arrears_pay_dates_option => l_arrears_pay_dates_option);
2799: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
2800: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2801: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
2802: RAISE OKL_API.G_EXCEPTION_ERROR;
2803: END IF;
2804: -- Modified by RGOOTY: End
2797: p_recurrence_date => p_recurrence_date,
2798: p_arrears_pay_dates_option => l_arrears_pay_dates_option);
2799: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
2800: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2801: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
2802: RAISE OKL_API.G_EXCEPTION_ERROR;
2803: END IF;
2804: -- Modified by RGOOTY: End
2805:
2798: p_arrears_pay_dates_option => l_arrears_pay_dates_option);
2799: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
2800: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2801: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
2802: RAISE OKL_API.G_EXCEPTION_ERROR;
2803: END IF;
2804: -- Modified by RGOOTY: End
2805:
2806: x_selv_tbl(i).se_line_number := i; -- TBD
2812: print( l_prog_name, 'end' );
2813:
2814: EXCEPTION
2815:
2816: WHEN OKL_API.G_EXCEPTION_ERROR THEN
2817:
2818: x_return_status := G_RET_STS_ERROR;
2819:
2820: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2816: WHEN OKL_API.G_EXCEPTION_ERROR THEN
2817:
2818: x_return_status := G_RET_STS_ERROR;
2819:
2820: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2821:
2822: x_return_status := G_RET_STS_UNEXP_ERROR;
2823:
2824: WHEN OTHERS THEN
2822: x_return_status := G_RET_STS_UNEXP_ERROR;
2823:
2824: WHEN OTHERS THEN
2825:
2826: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
2827: p_msg_name => G_DB_ERROR,
2828: p_token1 => G_PROG_NAME_TOKEN,
2829: p_token1_value => l_prog_name,
2830: p_token2 => G_SQLCODE_TOKEN,
2898: print( l_prog_name, 'begin' );
2899: l_months_factor := get_months_factor( p_frequency => p_frequency,
2900: x_return_status => lx_return_status);
2901:
2902: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
2903: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2904: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
2905: RAISE OKL_API.G_EXCEPTION_ERROR;
2906: END IF;
2899: l_months_factor := get_months_factor( p_frequency => p_frequency,
2900: x_return_status => lx_return_status);
2901:
2902: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
2903: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2904: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
2905: RAISE OKL_API.G_EXCEPTION_ERROR;
2906: END IF;
2907:
2900: x_return_status => lx_return_status);
2901:
2902: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
2903: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2904: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
2905: RAISE OKL_API.G_EXCEPTION_ERROR;
2906: END IF;
2907:
2908: -- djanaswa ER6274342 start
2901:
2902: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
2903: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2904: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
2905: RAISE OKL_API.G_EXCEPTION_ERROR;
2906: END IF;
2907:
2908: -- djanaswa ER6274342 start
2909: IF p_advance_or_arrears = 'ARREARS' THEN
2911: p_khr_id => p_khr_id,
2912: x_arrears_pay_dates_option => l_arrears_pay_dates_option,
2913: x_return_status => lx_return_status);
2914:
2915: IF(lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
2916: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2917: ELSIF (lx_return_status = OKL_API.G_RET_STS_ERROR) THEN
2918: RAISE OKL_API.G_EXCEPTION_ERROR;
2919: END IF;
2912: x_arrears_pay_dates_option => l_arrears_pay_dates_option,
2913: x_return_status => lx_return_status);
2914:
2915: IF(lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
2916: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2917: ELSIF (lx_return_status = OKL_API.G_RET_STS_ERROR) THEN
2918: RAISE OKL_API.G_EXCEPTION_ERROR;
2919: END IF;
2920: END IF;
2913: x_return_status => lx_return_status);
2914:
2915: IF(lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
2916: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2917: ELSIF (lx_return_status = OKL_API.G_RET_STS_ERROR) THEN
2918: RAISE OKL_API.G_EXCEPTION_ERROR;
2919: END IF;
2920: END IF;
2921:
2914:
2915: IF(lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
2916: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2917: ELSIF (lx_return_status = OKL_API.G_RET_STS_ERROR) THEN
2918: RAISE OKL_API.G_EXCEPTION_ERROR;
2919: END IF;
2920: END IF;
2921:
2922: -- djanaswa ER6274342 end
2979: x_date => x_selv_tbl(i).stream_element_date,
2980: x_return_status => lx_return_status,
2981: p_recurrence_date => p_recurrence_date,
2982: p_arrears_pay_dates_option => l_arrears_pay_dates_option);
2983: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
2984: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2985: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
2986: RAISE OKL_API.G_EXCEPTION_ERROR;
2987: END IF;
2980: x_return_status => lx_return_status,
2981: p_recurrence_date => p_recurrence_date,
2982: p_arrears_pay_dates_option => l_arrears_pay_dates_option);
2983: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
2984: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2985: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
2986: RAISE OKL_API.G_EXCEPTION_ERROR;
2987: END IF;
2988: -- Modified by RGOOTY: End
2981: p_recurrence_date => p_recurrence_date,
2982: p_arrears_pay_dates_option => l_arrears_pay_dates_option);
2983: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
2984: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2985: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
2986: RAISE OKL_API.G_EXCEPTION_ERROR;
2987: END IF;
2988: -- Modified by RGOOTY: End
2989:
2982: p_arrears_pay_dates_option => l_arrears_pay_dates_option);
2983: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
2984: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2985: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
2986: RAISE OKL_API.G_EXCEPTION_ERROR;
2987: END IF;
2988: -- Modified by RGOOTY: End
2989:
2990: x_selv_tbl(i).se_line_number := i; -- TBD
3024: p_currency_code => p_currency_code,
3025: x_selv_tbl => x_pt_tbl,
3026: x_return_status => lx_return_status);
3027:
3028: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
3029: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
3030: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
3031: RAISE OKL_API.G_EXCEPTION_ERROR;
3032: END IF;
3025: x_selv_tbl => x_pt_tbl,
3026: x_return_status => lx_return_status);
3027:
3028: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
3029: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
3030: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
3031: RAISE OKL_API.G_EXCEPTION_ERROR;
3032: END IF;
3033:
3026: x_return_status => lx_return_status);
3027:
3028: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
3029: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
3030: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
3031: RAISE OKL_API.G_EXCEPTION_ERROR;
3032: END IF;
3033:
3034:
3027:
3028: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
3029: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
3030: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
3031: RAISE OKL_API.G_EXCEPTION_ERROR;
3032: END IF;
3033:
3034:
3035: END IF;
3038: print( l_prog_name, 'end' );
3039:
3040: EXCEPTION
3041:
3042: WHEN OKL_API.G_EXCEPTION_ERROR THEN
3043:
3044: x_return_status := G_RET_STS_ERROR;
3045:
3046: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3042: WHEN OKL_API.G_EXCEPTION_ERROR THEN
3043:
3044: x_return_status := G_RET_STS_ERROR;
3045:
3046: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3047:
3048: x_return_status := G_RET_STS_UNEXP_ERROR;
3049:
3050: WHEN OTHERS THEN
3048: x_return_status := G_RET_STS_UNEXP_ERROR;
3049:
3050: WHEN OTHERS THEN
3051:
3052: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
3053: p_msg_name => G_DB_ERROR,
3054: p_token1 => G_PROG_NAME_TOKEN,
3055: p_token1_value => l_prog_name,
3056: p_token2 => G_SQLCODE_TOKEN,
3107: -- print( l_prog_name, 'begin' );
3108: l_fractional_month := get_fractional_month(p_start_date => p_start_date,
3109: x_return_status => lx_return_status);
3110:
3111: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
3112: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
3113: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
3114: RAISE OKL_API.G_EXCEPTION_ERROR;
3115: END IF;
3108: l_fractional_month := get_fractional_month(p_start_date => p_start_date,
3109: x_return_status => lx_return_status);
3110:
3111: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
3112: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
3113: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
3114: RAISE OKL_API.G_EXCEPTION_ERROR;
3115: END IF;
3116:
3109: x_return_status => lx_return_status);
3110:
3111: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
3112: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
3113: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
3114: RAISE OKL_API.G_EXCEPTION_ERROR;
3115: END IF;
3116:
3117: l_months_factor := get_months_factor(p_frequency => p_frequency,
3110:
3111: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
3112: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
3113: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
3114: RAISE OKL_API.G_EXCEPTION_ERROR;
3115: END IF;
3116:
3117: l_months_factor := get_months_factor(p_frequency => p_frequency,
3118: x_return_status => lx_return_status);
3116:
3117: l_months_factor := get_months_factor(p_frequency => p_frequency,
3118: x_return_status => lx_return_status);
3119:
3120: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
3121: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
3122: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
3123: RAISE OKL_API.G_EXCEPTION_ERROR;
3124: END IF;
3117: l_months_factor := get_months_factor(p_frequency => p_frequency,
3118: x_return_status => lx_return_status);
3119:
3120: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
3121: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
3122: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
3123: RAISE OKL_API.G_EXCEPTION_ERROR;
3124: END IF;
3125:
3118: x_return_status => lx_return_status);
3119:
3120: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
3121: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
3122: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
3123: RAISE OKL_API.G_EXCEPTION_ERROR;
3124: END IF;
3125:
3126: If ( p_periods IS NULL ) AND ( p_stub_days IS NOT NULL ) THen
3119:
3120: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
3121: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
3122: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
3123: RAISE OKL_API.G_EXCEPTION_ERROR;
3124: END IF;
3125:
3126: If ( p_periods IS NULL ) AND ( p_stub_days IS NOT NULL ) THen
3127:
3148: p_arrears => 'Y',
3149: x_return_status => lx_return_status);
3150: END IF;
3151:
3152: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
3153: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
3154: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
3155: RAISE OKL_API.G_EXCEPTION_ERROR;
3156: END IF;
3149: x_return_status => lx_return_status);
3150: END IF;
3151:
3152: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
3153: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
3154: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
3155: RAISE OKL_API.G_EXCEPTION_ERROR;
3156: END IF;
3157:
3150: END IF;
3151:
3152: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
3153: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
3154: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
3155: RAISE OKL_API.G_EXCEPTION_ERROR;
3156: END IF;
3157:
3158: l_stream_amount := l_amount_per_day * l_day_count;
3151:
3152: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
3153: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
3154: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
3155: RAISE OKL_API.G_EXCEPTION_ERROR;
3156: END IF;
3157:
3158: l_stream_amount := l_amount_per_day * l_day_count;
3159: x_selv_tbl(i).amount := l_stream_amount;
3244:
3245: End If;
3246:
3247: print( l_prog_name, 'end' );
3248: x_return_status := OKL_API.G_RET_STS_SUCCESS;
3249: EXCEPTION
3250:
3251: WHEN OKL_API.G_EXCEPTION_ERROR THEN
3252:
3247: print( l_prog_name, 'end' );
3248: x_return_status := OKL_API.G_RET_STS_SUCCESS;
3249: EXCEPTION
3250:
3251: WHEN OKL_API.G_EXCEPTION_ERROR THEN
3252:
3253: x_return_status := G_RET_STS_ERROR;
3254:
3255: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3251: WHEN OKL_API.G_EXCEPTION_ERROR THEN
3252:
3253: x_return_status := G_RET_STS_ERROR;
3254:
3255: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3256:
3257: x_return_status := G_RET_STS_UNEXP_ERROR;
3258:
3259: WHEN OTHERS THEN
3257: x_return_status := G_RET_STS_UNEXP_ERROR;
3258:
3259: WHEN OTHERS THEN
3260:
3261: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
3262: p_msg_name => G_DB_ERROR,
3263: p_token1 => G_PROG_NAME_TOKEN,
3264: p_token1_value => l_prog_name,
3265: p_token2 => G_SQLCODE_TOKEN,
3404: RETURN l_days;
3405:
3406: EXCEPTION
3407:
3408: WHEN OKL_API.G_EXCEPTION_ERROR THEN
3409:
3410: x_return_status := G_RET_STS_ERROR;
3411:
3412: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3408: WHEN OKL_API.G_EXCEPTION_ERROR THEN
3409:
3410: x_return_status := G_RET_STS_ERROR;
3411:
3412: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3413:
3414: x_return_status := G_RET_STS_UNEXP_ERROR;
3415:
3416: WHEN OTHERS THEN
3414: x_return_status := G_RET_STS_UNEXP_ERROR;
3415:
3416: WHEN OTHERS THEN
3417:
3418: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
3419: p_msg_name => G_DB_ERROR,
3420: p_token1 => G_PROG_NAME_TOKEN,
3421: p_token1_value => l_prog_name,
3422: p_token2 => G_SQLCODE_TOKEN,
3528:
3529:
3530: EXCEPTION
3531:
3532: WHEN OKL_API.G_EXCEPTION_ERROR THEN
3533:
3534: x_return_status := G_RET_STS_ERROR;
3535:
3536: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3532: WHEN OKL_API.G_EXCEPTION_ERROR THEN
3533:
3534: x_return_status := G_RET_STS_ERROR;
3535:
3536: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3537:
3538: x_return_status := G_RET_STS_UNEXP_ERROR;
3539:
3540: WHEN OTHERS THEN
3538: x_return_status := G_RET_STS_UNEXP_ERROR;
3539:
3540: WHEN OTHERS THEN
3541:
3542: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
3543: p_msg_name => G_DB_ERROR,
3544: p_token1 => G_PROG_NAME_TOKEN,
3545: p_token1_value => l_prog_name,
3546: p_token2 => G_SQLCODE_TOKEN,
3656:
3657:
3658: EXCEPTION
3659:
3660: WHEN OKL_API.G_EXCEPTION_ERROR THEN
3661:
3662: x_return_status := G_RET_STS_ERROR;
3663:
3664: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3660: WHEN OKL_API.G_EXCEPTION_ERROR THEN
3661:
3662: x_return_status := G_RET_STS_ERROR;
3663:
3664: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3665:
3666: x_return_status := G_RET_STS_UNEXP_ERROR;
3667:
3668: WHEN OTHERS THEN
3666: x_return_status := G_RET_STS_UNEXP_ERROR;
3667:
3668: WHEN OTHERS THEN
3669:
3670: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
3671: p_msg_name => G_DB_ERROR,
3672: p_token1 => G_PROG_NAME_TOKEN,
3673: p_token1_value => l_prog_name,
3674: p_token2 => G_SQLCODE_TOKEN,
3853: WHERE id = l_ele_id_del_tbl(indx) AND
3854: stm_id = l_streamid_del_tbl(indx);
3855: EXCEPTION
3856: WHEN OTHERS THEN
3857: okl_api.set_message (
3858: p_app_name => G_APP_NAME,
3859: p_msg_name => G_DB_ERROR,
3860: p_token1 => G_PROG_NAME_TOKEN,
3861: p_token1_value => 'consolidate_acc_streams',
3862: p_token2 => G_SQLCODE_TOKEN,
3863: p_token2_value => sqlcode,
3864: p_token3 => G_SQLERRM_TOKEN,
3865: p_token3_value => sqlerrm);
3866: x_return_status := Okl_Api.G_RET_STS_UNEXP_ERROR;
3867: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
3868: END;
3869: END IF; -- IF l_ele_id_del_tbl.COUNT > 0
3870:
3863: p_token2_value => sqlcode,
3864: p_token3 => G_SQLERRM_TOKEN,
3865: p_token3_value => sqlerrm);
3866: x_return_status := Okl_Api.G_RET_STS_UNEXP_ERROR;
3867: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
3868: END;
3869: END IF; -- IF l_ele_id_del_tbl.COUNT > 0
3870:
3871: --print( l_prog_name, 'Deleted Redundant Stream Elements ' );
3882: WHERE id = l_ele_id_mod_tbl(indx) AND
3883: stm_id = l_streamid_mod_tbl(indx);
3884: EXCEPTION
3885: WHEN OTHERS THEN
3886: okl_api.set_message (
3887: p_app_name => G_APP_NAME,
3888: p_msg_name => G_DB_ERROR,
3889: p_token1 => G_PROG_NAME_TOKEN,
3890: p_token1_value => 'consolidate_acc_streams',
3891: p_token2 => G_SQLCODE_TOKEN,
3892: p_token2_value => sqlcode,
3893: p_token3 => G_SQLERRM_TOKEN,
3894: p_token3_value => sqlerrm);
3895: x_return_status := Okl_Api.G_RET_STS_UNEXP_ERROR;
3896: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
3897: END;
3898: END IF; -- IF l_ele_id_mod_tbl.COUNT > 0
3899:
3892: p_token2_value => sqlcode,
3893: p_token3 => G_SQLERRM_TOKEN,
3894: p_token3_value => sqlerrm);
3895: x_return_status := Okl_Api.G_RET_STS_UNEXP_ERROR;
3896: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
3897: END;
3898: END IF; -- IF l_ele_id_mod_tbl.COUNT > 0
3899:
3900: x_return_status := G_RET_STS_SUCCESS;
3901: -- print( l_prog_name, 'end' );
3902:
3903: EXCEPTION
3904:
3905: WHEN OKL_API.G_EXCEPTION_ERROR THEN
3906:
3907: x_return_status := G_RET_STS_ERROR;
3908:
3909: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3905: WHEN OKL_API.G_EXCEPTION_ERROR THEN
3906:
3907: x_return_status := G_RET_STS_ERROR;
3908:
3909: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3910:
3911: x_return_status := G_RET_STS_UNEXP_ERROR;
3912:
3913: WHEN OTHERS THEN
3911: x_return_status := G_RET_STS_UNEXP_ERROR;
3912:
3913: WHEN OTHERS THEN
3914:
3915: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
3916: p_msg_name => G_DB_ERROR,
3917: p_token1 => G_PROG_NAME_TOKEN,
3918: p_token1_value => l_prog_name,
3919: p_token2 => G_SQLCODE_TOKEN,
4194: x_primary_sty_name => l_rv_sty_name);
4195:
4196: -- djanaswa ER6274342 start
4197:
4198: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4199: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4200: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4201: RAISE OKL_API.G_EXCEPTION_ERROR;
4202: END IF;
4195:
4196: -- djanaswa ER6274342 start
4197:
4198: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4199: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4200: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4201: RAISE OKL_API.G_EXCEPTION_ERROR;
4202: END IF;
4203:
4196: -- djanaswa ER6274342 start
4197:
4198: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4199: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4200: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4201: RAISE OKL_API.G_EXCEPTION_ERROR;
4202: END IF;
4203:
4204: OKL_ISG_UTILS_PVT.get_arrears_pay_dates_option(
4197:
4198: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4199: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4200: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4201: RAISE OKL_API.G_EXCEPTION_ERROR;
4202: END IF;
4203:
4204: OKL_ISG_UTILS_PVT.get_arrears_pay_dates_option(
4205: p_khr_id => p_khr_id,
4205: p_khr_id => p_khr_id,
4206: x_arrears_pay_dates_option => l_arrears_pay_dates_option,
4207: x_return_status => lx_return_status);
4208:
4209: IF(lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
4210: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4211: ELSIF (lx_return_status = OKL_API.G_RET_STS_ERROR) THEN
4212: RAISE OKL_API.G_EXCEPTION_ERROR;
4213: END IF;
4206: x_arrears_pay_dates_option => l_arrears_pay_dates_option,
4207: x_return_status => lx_return_status);
4208:
4209: IF(lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
4210: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4211: ELSIF (lx_return_status = OKL_API.G_RET_STS_ERROR) THEN
4212: RAISE OKL_API.G_EXCEPTION_ERROR;
4213: END IF;
4214:
4207: x_return_status => lx_return_status);
4208:
4209: IF(lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
4210: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4211: ELSIF (lx_return_status = OKL_API.G_RET_STS_ERROR) THEN
4212: RAISE OKL_API.G_EXCEPTION_ERROR;
4213: END IF;
4214:
4215: -- djanaswa ER6274342 end
4208:
4209: IF(lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
4210: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4211: ELSIF (lx_return_status = OKL_API.G_RET_STS_ERROR) THEN
4212: RAISE OKL_API.G_EXCEPTION_ERROR;
4213: END IF;
4214:
4215: -- djanaswa ER6274342 end
4216:
4235: p_purpose_code => l_purpose_code,
4236: x_stmv_rec => l_stmv_rec,
4237: x_return_status => lx_return_status);
4238:
4239: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4240: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4241: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4242: RAISE OKL_API.G_EXCEPTION_ERROR;
4243: END IF;
4236: x_stmv_rec => l_stmv_rec,
4237: x_return_status => lx_return_status);
4238:
4239: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4240: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4241: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4242: RAISE OKL_API.G_EXCEPTION_ERROR;
4243: END IF;
4244:
4237: x_return_status => lx_return_status);
4238:
4239: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4240: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4241: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4242: RAISE OKL_API.G_EXCEPTION_ERROR;
4243: END IF;
4244:
4245: l_selv_tbl(1).amount := l_line_rec.residual_value;
4238:
4239: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4240: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4241: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4242: RAISE OKL_API.G_EXCEPTION_ERROR;
4243: END IF;
4244:
4245: l_selv_tbl(1).amount := l_line_rec.residual_value;
4246: l_selv_tbl(1).stream_element_date := l_hdr.end_date;
4267: p_rounding_rule => G_ROUNDING_RULE,
4268: p_apply_rnd_diff=> G_DIFF_LOOKUP_CODE);
4269:
4270: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
4271: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4272: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
4273: RAISE OKL_API.G_EXCEPTION_ERROR;
4274: END IF;
4275: l_selv_tbl.DELETE;
4269:
4270: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
4271: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4272: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
4273: RAISE OKL_API.G_EXCEPTION_ERROR;
4274: END IF;
4275: l_selv_tbl.DELETE;
4276: l_selv_tbl := lx_selv_tbl;
4277: --Accumulate Stream Header: 4346646
4279: p_stmv_rec => l_stmv_rec,
4280: x_full_stmv_tbl => l_stmv_tbl,
4281: x_return_status => lx_return_status );
4282: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
4283: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4284: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
4285: RAISE OKL_API.G_EXCEPTION_ERROR;
4286: END IF;
4287: --Accumulate Stream Elements
4281: x_return_status => lx_return_status );
4282: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
4283: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4284: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
4285: RAISE OKL_API.G_EXCEPTION_ERROR;
4286: END IF;
4287: --Accumulate Stream Elements
4288: OKL_STREAMS_UTIL.accumulate_strm_elements(
4289: p_stm_index_no => l_stmv_tbl.LAST,
4290: p_selv_tbl => l_selv_tbl,
4291: x_full_selv_tbl => l_full_selv_tbl,
4292: x_return_status => lx_return_status );
4293: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
4294: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4295: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
4296: RAISE OKL_API.G_EXCEPTION_ERROR;
4297: END IF;
4298: l_stmv_rec := NULL;
4292: x_return_status => lx_return_status );
4293: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
4294: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4295: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
4296: RAISE OKL_API.G_EXCEPTION_ERROR;
4297: END IF;
4298: l_stmv_rec := NULL;
4299: l_selv_tbl.delete;
4300: lx_stmv_rec := NULL;
4314: x_return_status => lx_return_status,
4315: x_primary_sty_id => l_capred_sty_id,
4316: x_primary_sty_name => l_capred_sty_name);
4317: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
4318: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4319: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
4320: RAISE OKL_API.G_EXCEPTION_ERROR;
4321: END IF;
4322:
4316: x_primary_sty_name => l_capred_sty_name);
4317: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
4318: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4319: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
4320: RAISE OKL_API.G_EXCEPTION_ERROR;
4321: END IF;
4322:
4323: l_selv_tbl.delete;
4324: IF ( l_capred_sty_id IS NOT NULL ) THEN
4329: p_purpose_code => l_purpose_code,
4330: x_stmv_rec => l_stmv_rec,
4331: x_return_status => lx_return_status);
4332:
4333: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4334: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4335: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4336: RAISE OKL_API.G_EXCEPTION_ERROR;
4337: END IF;
4330: x_stmv_rec => l_stmv_rec,
4331: x_return_status => lx_return_status);
4332:
4333: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4334: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4335: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4336: RAISE OKL_API.G_EXCEPTION_ERROR;
4337: END IF;
4338:
4331: x_return_status => lx_return_status);
4332:
4333: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4334: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4335: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4336: RAISE OKL_API.G_EXCEPTION_ERROR;
4337: END IF;
4338:
4339: IF (l_line_rec.capital_reduction IS NULL ) Then
4332:
4333: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4334: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4335: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4336: RAISE OKL_API.G_EXCEPTION_ERROR;
4337: END IF;
4338:
4339: IF (l_line_rec.capital_reduction IS NULL ) Then
4340: l_selv_tbl(1).amount := l_line_rec.oec * l_line_rec.capital_reduction_percent * 0.01;
4360: p_rounding_rule => G_ROUNDING_RULE,
4361: p_apply_rnd_diff=> G_DIFF_LOOKUP_CODE);
4362:
4363: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
4364: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4365: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
4366: RAISE OKL_API.G_EXCEPTION_ERROR;
4367: END IF;
4368:
4362:
4363: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
4364: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4365: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
4366: RAISE OKL_API.G_EXCEPTION_ERROR;
4367: END IF;
4368:
4369: l_selv_tbl.DELETE;
4370: l_selv_tbl := lx_selv_tbl;
4374: p_stmv_rec => l_stmv_rec,
4375: x_full_stmv_tbl => l_stmv_tbl,
4376: x_return_status => lx_return_status );
4377: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
4378: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4379: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
4380: RAISE OKL_API.G_EXCEPTION_ERROR;
4381: END IF;
4382:
4376: x_return_status => lx_return_status );
4377: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
4378: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4379: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
4380: RAISE OKL_API.G_EXCEPTION_ERROR;
4381: END IF;
4382:
4383: --Accumulate Stream Elements
4384: OKL_STREAMS_UTIL.accumulate_strm_elements(
4386: p_selv_tbl => l_selv_tbl,
4387: x_full_selv_tbl => l_full_selv_tbl,
4388: x_return_status => lx_return_status );
4389: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
4390: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4391: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
4392: RAISE OKL_API.G_EXCEPTION_ERROR;
4393: END IF;
4394:
4388: x_return_status => lx_return_status );
4389: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
4390: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4391: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
4392: RAISE OKL_API.G_EXCEPTION_ERROR;
4393: END IF;
4394:
4395: l_stmv_rec := NULL;
4396: l_selv_tbl.delete;
4410: x_msg_count => x_msg_count,
4411: x_msg_data => x_msg_data,
4412: x_asbv_tbl => l_asbv_tbl);
4413:
4414: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4415: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4416: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4417: RAISE OKL_API.G_EXCEPTION_ERROR;
4418: END IF;
4411: x_msg_data => x_msg_data,
4412: x_asbv_tbl => l_asbv_tbl);
4413:
4414: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4415: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4416: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4417: RAISE OKL_API.G_EXCEPTION_ERROR;
4418: END IF;
4419:
4412: x_asbv_tbl => l_asbv_tbl);
4413:
4414: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4415: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4416: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4417: RAISE OKL_API.G_EXCEPTION_ERROR;
4418: END IF;
4419:
4420: print( l_prog_name, ' count ' || to_char(l_asbv_tbl.count));
4413:
4414: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4415: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4416: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4417: RAISE OKL_API.G_EXCEPTION_ERROR;
4418: END IF;
4419:
4420: print( l_prog_name, ' count ' || to_char(l_asbv_tbl.count));
4421:
4436: l_months_factor := get_months_factor(
4437: p_frequency => r_inflows.frequency,
4438: x_return_status => lx_return_status );
4439:
4440: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4441: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4442: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4443: RAISE OKL_API.G_EXCEPTION_ERROR;
4444: END IF;
4437: p_frequency => r_inflows.frequency,
4438: x_return_status => lx_return_status );
4439:
4440: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4441: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4442: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4443: RAISE OKL_API.G_EXCEPTION_ERROR;
4444: END IF;
4445:
4438: x_return_status => lx_return_status );
4439:
4440: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4441: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4442: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4443: RAISE OKL_API.G_EXCEPTION_ERROR;
4444: END IF;
4445:
4446: -- djanaswa ER6274342 added parameter p_arrears_pay_dates_option
4439:
4440: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4441: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4442: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4443: RAISE OKL_API.G_EXCEPTION_ERROR;
4444: END IF;
4445:
4446: -- djanaswa ER6274342 added parameter p_arrears_pay_dates_option
4447:
4450: p_months_increment => l_months_factor,
4451: p_arrears_pay_dates_option => l_arrears_pay_dates_option,
4452: x_return_status => lx_return_status );
4453:
4454: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4455: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4456: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4457: RAISE OKL_API.G_EXCEPTION_ERROR;
4458: END IF;
4451: p_arrears_pay_dates_option => l_arrears_pay_dates_option,
4452: x_return_status => lx_return_status );
4453:
4454: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4455: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4456: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4457: RAISE OKL_API.G_EXCEPTION_ERROR;
4458: END IF;
4459: l_end_date := ADD_MONTHS(l_first_sel_date,
4452: x_return_status => lx_return_status );
4453:
4454: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4455: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4456: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4457: RAISE OKL_API.G_EXCEPTION_ERROR;
4458: END IF;
4459: l_end_date := ADD_MONTHS(l_first_sel_date,
4460: l_months_factor*(l_asbv_tbl(i).maximum_term-1));
4453:
4454: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4455: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4456: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4457: RAISE OKL_API.G_EXCEPTION_ERROR;
4458: END IF;
4459: l_end_date := ADD_MONTHS(l_first_sel_date,
4460: l_months_factor*(l_asbv_tbl(i).maximum_term-1));
4461:
4470: p_amount => l_asbv_tbl(i).amount,
4471: x_selv_tbl => l_selv_tbl,
4472: x_return_status => lx_return_status);
4473:
4474: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4475: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4476: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4477: RAISE OKL_API.G_EXCEPTION_ERROR;
4478: END IF;
4471: x_selv_tbl => l_selv_tbl,
4472: x_return_status => lx_return_status);
4473:
4474: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4475: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4476: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4477: RAISE OKL_API.G_EXCEPTION_ERROR;
4478: END IF;
4479:
4472: x_return_status => lx_return_status);
4473:
4474: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4475: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4476: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4477: RAISE OKL_API.G_EXCEPTION_ERROR;
4478: END IF;
4479:
4480: ElsIf (l_asbv_tbl(i).accounting_method_code = 'NET' ) Then
4473:
4474: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4475: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4476: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4477: RAISE OKL_API.G_EXCEPTION_ERROR;
4478: END IF;
4479:
4480: ElsIf (l_asbv_tbl(i).accounting_method_code = 'NET' ) Then
4481:
4491: p_currency_code => l_hdr.currency_code,
4492: x_selv_tbl => l_selv_tbl,
4493: x_return_status => lx_return_status);
4494:
4495: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4496: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4497: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4498: RAISE OKL_API.G_EXCEPTION_ERROR;
4499: END IF;
4492: x_selv_tbl => l_selv_tbl,
4493: x_return_status => lx_return_status);
4494:
4495: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4496: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4497: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4498: RAISE OKL_API.G_EXCEPTION_ERROR;
4499: END IF;
4500:
4493: x_return_status => lx_return_status);
4494:
4495: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4496: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4497: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4498: RAISE OKL_API.G_EXCEPTION_ERROR;
4499: END IF;
4500:
4501: -- bug# 3330636
4494:
4495: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4496: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4497: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4498: RAISE OKL_API.G_EXCEPTION_ERROR;
4499: END IF;
4500:
4501: -- bug# 3330636
4502: l_tmp_selv_tbl := l_selv_tbl;
4519: OPEN c_strm_name ( l_asbv_tbl(i).stream_type_id );
4520: FETCH c_strm_name INTO l_subsidy_stream;
4521: CLOSE c_strm_name;
4522:
4523: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
4524: p_msg_name => 'OKL_NO_SUBSIDY_MAP',
4525: p_token1 => 'SUBS',
4526: p_token1_value => l_subsidy_stream);
4527:
4525: p_token1 => 'SUBS',
4526: p_token1_value => l_subsidy_stream);
4527:
4528: CLOSE c_subsidy_strm;
4529: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4530:
4531: END IF;
4532: CLOSE c_subsidy_strm;
4533:
4551: p_purpose_code => l_purpose_code,
4552: x_stmv_rec => l_stmv_rec,
4553: x_return_status => lx_return_status);
4554:
4555: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4556: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4557: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4558: RAISE OKL_API.G_EXCEPTION_ERROR;
4559: END IF;
4552: x_stmv_rec => l_stmv_rec,
4553: x_return_status => lx_return_status);
4554:
4555: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4556: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4557: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4558: RAISE OKL_API.G_EXCEPTION_ERROR;
4559: END IF;
4560:
4553: x_return_status => lx_return_status);
4554:
4555: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4556: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4557: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4558: RAISE OKL_API.G_EXCEPTION_ERROR;
4559: END IF;
4560:
4561:
4554:
4555: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4556: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4557: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4558: RAISE OKL_API.G_EXCEPTION_ERROR;
4559: END IF;
4560:
4561:
4562: lx_return_status := Okl_Streams_Util.round_streams_amount_esg(
4573: p_rounding_rule => G_ROUNDING_RULE,
4574: p_apply_rnd_diff=> G_DIFF_LOOKUP_CODE);
4575:
4576: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
4577: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4578: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
4579: RAISE OKL_API.G_EXCEPTION_ERROR;
4580: END IF;
4581:
4575:
4576: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
4577: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4578: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
4579: RAISE OKL_API.G_EXCEPTION_ERROR;
4580: END IF;
4581:
4582: l_selv_tbl.DELETE;
4583: l_selv_tbl := lx_selv_tbl;
4591: p_selv_tbl => l_selv_tbl,
4592: x_stmv_rec => lx_stmv_rec,
4593: x_selv_tbl => lx_selv_tbl);
4594:
4595: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4596: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4597: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4598: RAISE OKL_API.G_EXCEPTION_ERROR;
4599: END IF;
4592: x_stmv_rec => lx_stmv_rec,
4593: x_selv_tbl => lx_selv_tbl);
4594:
4595: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4596: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4597: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4598: RAISE OKL_API.G_EXCEPTION_ERROR;
4599: END IF;
4600:
4593: x_selv_tbl => lx_selv_tbl);
4594:
4595: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4596: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4597: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4598: RAISE OKL_API.G_EXCEPTION_ERROR;
4599: END IF;
4600:
4601: l_selv_tbl.delete;
4594:
4595: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4596: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4597: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4598: RAISE OKL_API.G_EXCEPTION_ERROR;
4599: END IF;
4600:
4601: l_selv_tbl.delete;
4602:
4629:
4630:
4631: IF ( l_sty_id is not null ) THEN
4632:
4633: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4634: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4635: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4636: RAISE OKL_API.G_EXCEPTION_ERROR;
4637: END IF;
4630:
4631: IF ( l_sty_id is not null ) THEN
4632:
4633: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4634: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4635: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4636: RAISE OKL_API.G_EXCEPTION_ERROR;
4637: END IF;
4638:
4631: IF ( l_sty_id is not null ) THEN
4632:
4633: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4634: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4635: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4636: RAISE OKL_API.G_EXCEPTION_ERROR;
4637: END IF;
4638:
4639: get_stream_header(p_khr_id => p_khr_id,
4632:
4633: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4634: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4635: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4636: RAISE OKL_API.G_EXCEPTION_ERROR;
4637: END IF;
4638:
4639: get_stream_header(p_khr_id => p_khr_id,
4640: p_kle_id => l_line_rec.id,
4642: p_purpose_code => l_purpose_code,
4643: x_stmv_rec => l_stmv_rec,
4644: x_return_status => lx_return_status);
4645:
4646: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4647: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4648: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4649: RAISE OKL_API.G_EXCEPTION_ERROR;
4650: END IF;
4643: x_stmv_rec => l_stmv_rec,
4644: x_return_status => lx_return_status);
4645:
4646: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4647: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4648: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4649: RAISE OKL_API.G_EXCEPTION_ERROR;
4650: END IF;
4651:
4644: x_return_status => lx_return_status);
4645:
4646: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4647: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4648: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4649: RAISE OKL_API.G_EXCEPTION_ERROR;
4650: END IF;
4651:
4652: l_selv_tbl.delete;
4645:
4646: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4647: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4648: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4649: RAISE OKL_API.G_EXCEPTION_ERROR;
4650: END IF;
4651:
4652: l_selv_tbl.delete;
4653:
4685: x_return_status => lx_return_status,
4686: x_msg_count => x_msg_count,
4687: x_msg_data => x_msg_data);
4688:
4689: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4690: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4691: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4692: RAISE OKL_API.G_EXCEPTION_ERROR;
4693: END IF;
4686: x_msg_count => x_msg_count,
4687: x_msg_data => x_msg_data);
4688:
4689: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4690: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4691: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4692: RAISE OKL_API.G_EXCEPTION_ERROR;
4693: END IF;
4694: l_pv_amount := l_pv_amount + x_pv_amount;
4687: x_msg_data => x_msg_data);
4688:
4689: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4690: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4691: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4692: RAISE OKL_API.G_EXCEPTION_ERROR;
4693: END IF;
4694: l_pv_amount := l_pv_amount + x_pv_amount;
4695: END IF;
4688:
4689: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4690: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4691: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4692: RAISE OKL_API.G_EXCEPTION_ERROR;
4693: END IF;
4694: l_pv_amount := l_pv_amount + x_pv_amount;
4695: END IF;
4696: END LOOP;
4718: p_rounding_rule => G_ROUNDING_RULE,
4719: p_apply_rnd_diff=> G_DIFF_LOOKUP_CODE);
4720:
4721: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
4722: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4723: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
4724: RAISE OKL_API.G_EXCEPTION_ERROR;
4725: END IF;
4726:
4720:
4721: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
4722: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4723: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
4724: RAISE OKL_API.G_EXCEPTION_ERROR;
4725: END IF;
4726:
4727: l_selv_tbl.DELETE;
4728: l_selv_tbl := lx_selv_tbl;
4736: p_selv_tbl => l_selv_tbl,
4737: x_stmv_rec => lx_stmv_rec,
4738: x_selv_tbl => lx_selv_tbl);
4739:
4740: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4741: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4742: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4743: RAISE OKL_API.G_EXCEPTION_ERROR;
4744: END IF;
4737: x_stmv_rec => lx_stmv_rec,
4738: x_selv_tbl => lx_selv_tbl);
4739:
4740: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4741: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4742: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4743: RAISE OKL_API.G_EXCEPTION_ERROR;
4744: END IF;
4745: END IF;
4738: x_selv_tbl => lx_selv_tbl);
4739:
4740: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4741: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4742: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4743: RAISE OKL_API.G_EXCEPTION_ERROR;
4744: END IF;
4745: END IF;
4746:
4739:
4740: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4741: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4742: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4743: RAISE OKL_API.G_EXCEPTION_ERROR;
4744: END IF;
4745: END IF;
4746:
4747: END IF;
4760: l_full_selv_tbl,
4761: lx_stmv_tbl,
4762: lx_full_selv_tbl);
4763:
4764: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4765: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4766: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4767: RAISE OKL_API.G_EXCEPTION_ERROR;
4768: END IF;
4761: lx_stmv_tbl,
4762: lx_full_selv_tbl);
4763:
4764: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4765: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4766: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4767: RAISE OKL_API.G_EXCEPTION_ERROR;
4768: END IF;
4769: END IF;
4762: lx_full_selv_tbl);
4763:
4764: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4765: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4766: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4767: RAISE OKL_API.G_EXCEPTION_ERROR;
4768: END IF;
4769: END IF;
4770:
4763:
4764: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4765: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4766: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4767: RAISE OKL_API.G_EXCEPTION_ERROR;
4768: END IF;
4769: END IF;
4770:
4771: END IF;
4768: END IF;
4769: END IF;
4770:
4771: END IF;
4772: x_return_status := OKL_API.G_RET_STS_SUCCESS;
4773:
4774: -- Added by RGOOTY: End
4775: -- print( l_prog_name, 'end');
4776:
4775: -- print( l_prog_name, 'end');
4776:
4777: EXCEPTION
4778:
4779: WHEN OKL_API.G_EXCEPTION_ERROR THEN
4780:
4781: x_return_status := G_RET_STS_ERROR;
4782:
4783: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
4779: WHEN OKL_API.G_EXCEPTION_ERROR THEN
4780:
4781: x_return_status := G_RET_STS_ERROR;
4782:
4783: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
4784:
4785: x_return_status := G_RET_STS_UNEXP_ERROR;
4786:
4787: WHEN OTHERS THEN
4785: x_return_status := G_RET_STS_UNEXP_ERROR;
4786:
4787: WHEN OTHERS THEN
4788:
4789: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
4790: p_msg_name => G_DB_ERROR,
4791: p_token1 => G_PROG_NAME_TOKEN,
4792: p_token1_value => l_prog_name,
4793: p_token2 => G_SQLCODE_TOKEN,
4894: x_msg_count => x_msg_count,
4895: x_msg_data => x_msg_data,
4896: x_se_id => l_se_id );
4897: --print( l_prog_name, 'stub', x_return_status );
4898: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4899: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4900: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
4901: RAISE OKL_API.G_EXCEPTION_ERROR;
4902: END IF;
4895: x_msg_data => x_msg_data,
4896: x_se_id => l_se_id );
4897: --print( l_prog_name, 'stub', x_return_status );
4898: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4899: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4900: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
4901: RAISE OKL_API.G_EXCEPTION_ERROR;
4902: END IF;
4903:
4896: x_se_id => l_se_id );
4897: --print( l_prog_name, 'stub', x_return_status );
4898: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4899: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4900: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
4901: RAISE OKL_API.G_EXCEPTION_ERROR;
4902: END IF;
4903:
4904: ---------------------------------------------
4897: --print( l_prog_name, 'stub', x_return_status );
4898: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4899: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4900: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
4901: RAISE OKL_API.G_EXCEPTION_ERROR;
4902: END IF;
4903:
4904: ---------------------------------------------
4905: -- STEP 1: Spread cash INFLOW
4911: p_sty_id => p_sty_id, -- p_sty_id is passed
4912: p_purpose_code => l_purpose_code, -- 'FLOW'
4913: x_stmv_rec => l_stmv_rec,
4914: x_return_status => lx_return_status);
4915: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4916: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4917: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4918: RAISE OKL_API.G_EXCEPTION_ERROR;
4919: END IF;
4912: p_purpose_code => l_purpose_code, -- 'FLOW'
4913: x_stmv_rec => l_stmv_rec,
4914: x_return_status => lx_return_status);
4915: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4916: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4917: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4918: RAISE OKL_API.G_EXCEPTION_ERROR;
4919: END IF;
4920:
4913: x_stmv_rec => l_stmv_rec,
4914: x_return_status => lx_return_status);
4915: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4916: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4917: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4918: RAISE OKL_API.G_EXCEPTION_ERROR;
4919: END IF;
4920:
4921: l_stmv_rec.purpose_code := 'FLOW';
4914: x_return_status => lx_return_status);
4915: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4916: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4917: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4918: RAISE OKL_API.G_EXCEPTION_ERROR;
4919: END IF;
4920:
4921: l_stmv_rec.purpose_code := 'FLOW';
4922: -- Proceed with Creating the RENT Stream Header
4927: x_msg_count => x_msg_count,
4928: x_msg_data => x_msg_data,
4929: p_stmv_rec => l_stmv_rec,
4930: x_stmv_rec => lx_stmv_rec);
4931: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4932: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4933: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4934: RAISE OKL_API.G_EXCEPTION_ERROR;
4935: END IF;
4928: x_msg_data => x_msg_data,
4929: p_stmv_rec => l_stmv_rec,
4930: x_stmv_rec => lx_stmv_rec);
4931: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4932: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4933: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4934: RAISE OKL_API.G_EXCEPTION_ERROR;
4935: END IF;
4936:
4929: p_stmv_rec => l_stmv_rec,
4930: x_stmv_rec => lx_stmv_rec);
4931: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4932: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4933: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4934: RAISE OKL_API.G_EXCEPTION_ERROR;
4935: END IF;
4936:
4937: --print( l_prog_name, 'created header' );
4930: x_stmv_rec => lx_stmv_rec);
4931: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4932: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4933: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
4934: RAISE OKL_API.G_EXCEPTION_ERROR;
4935: END IF;
4936:
4937: --print( l_prog_name, 'created header' );
4938: x_payment_count := 0;
4942: FOR i IN p_payment_tbl.FIRST..p_payment_tbl.LAST
4943: LOOP
4944: IF p_payment_tbl(i).start_date IS NULL
4945: THEN
4946: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
4947: p_msg_name => 'OKL_NO_SLL_SDATE');
4948: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4949: END IF;
4950: /*
4944: IF p_payment_tbl(i).start_date IS NULL
4945: THEN
4946: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
4947: p_msg_name => 'OKL_NO_SLL_SDATE');
4948: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4949: END IF;
4950: /*
4951: * calculate stream elements for each payment level
4952: * also means that if there are multiple payment levels for an asset, streams are
4993: x_return_status => lx_return_status,
4994: x_msg_count => x_msg_count,
4995: x_msg_data => x_msg_data,
4996: p_recurrence_date => l_recurrence_date);
4997: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4998: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4999: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5000: RAISE OKL_API.G_EXCEPTION_ERROR;
5001: END IF;
4994: x_msg_count => x_msg_count,
4995: x_msg_data => x_msg_data,
4996: p_recurrence_date => l_recurrence_date);
4997: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4998: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4999: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5000: RAISE OKL_API.G_EXCEPTION_ERROR;
5001: END IF;
5002:
4995: x_msg_data => x_msg_data,
4996: p_recurrence_date => l_recurrence_date);
4997: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4998: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4999: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5000: RAISE OKL_API.G_EXCEPTION_ERROR;
5001: END IF;
5002:
5003: --print( l_prog_name, 'created elements ' || to_char(l_selv_tbl.COUNT) );
4996: p_recurrence_date => l_recurrence_date);
4997: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
4998: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4999: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5000: RAISE OKL_API.G_EXCEPTION_ERROR;
5001: END IF;
5002:
5003: --print( l_prog_name, 'created elements ' || to_char(l_selv_tbl.COUNT) );
5004: FOR j in 1..l_selv_tbl.COUNT
5034: x_msg_data => x_msg_data,
5035: p_selv_tbl => l_selv_tbl,
5036: x_selv_tbl => lx_selv_tbl);
5037:
5038: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5039: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5040: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5041: RAISE OKL_API.G_EXCEPTION_ERROR;
5042: END IF;
5035: p_selv_tbl => l_selv_tbl,
5036: x_selv_tbl => lx_selv_tbl);
5037:
5038: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5039: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5040: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5041: RAISE OKL_API.G_EXCEPTION_ERROR;
5042: END IF;
5043:
5036: x_selv_tbl => lx_selv_tbl);
5037:
5038: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5039: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5040: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5041: RAISE OKL_API.G_EXCEPTION_ERROR;
5042: END IF;
5043:
5044: --print( l_prog_name, 'created elements ' || to_char(l_ele_count) );
5037:
5038: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5039: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5040: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5041: RAISE OKL_API.G_EXCEPTION_ERROR;
5042: END IF;
5043:
5044: --print( l_prog_name, 'created elements ' || to_char(l_ele_count) );
5045: -- Deleting the Stream Elements for next iteration.
5072: x_msg_count => x_msg_count,
5073: x_msg_data => x_msg_data,
5074: p_selv_tbl => l_selv_tbl,
5075: x_selv_tbl => lx_selv_tbl);
5076: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5077: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5078: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5079: RAISE OKL_API.G_EXCEPTION_ERROR;
5080: END IF;
5073: x_msg_data => x_msg_data,
5074: p_selv_tbl => l_selv_tbl,
5075: x_selv_tbl => lx_selv_tbl);
5076: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5077: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5078: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5079: RAISE OKL_API.G_EXCEPTION_ERROR;
5080: END IF;
5081: --print( l_prog_name, 'created elements rates ' || to_char(l_ele_count) );
5074: p_selv_tbl => l_selv_tbl,
5075: x_selv_tbl => lx_selv_tbl);
5076: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5077: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5078: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5079: RAISE OKL_API.G_EXCEPTION_ERROR;
5080: END IF;
5081: --print( l_prog_name, 'created elements rates ' || to_char(l_ele_count) );
5082: --print( l_prog_name, ' pass thru count ' || to_char(l_pt_tbl.COUNT) );
5075: x_selv_tbl => lx_selv_tbl);
5076: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5077: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5078: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5079: RAISE OKL_API.G_EXCEPTION_ERROR;
5080: END IF;
5081: --print( l_prog_name, 'created elements rates ' || to_char(l_ele_count) );
5082: --print( l_prog_name, ' pass thru count ' || to_char(l_pt_tbl.COUNT) );
5083:
5092: p_dependent_sty_purpose => 'PASS_THRU_EXP_ACCRUAL',
5093: x_return_status => lx_return_status,
5094: x_dependent_sty_id => l_passthrough_id,
5095: x_dependent_sty_name => l_sty_name);
5096: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5097: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5098: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5099: RAISE OKL_API.G_EXCEPTION_ERROR;
5100: END IF;
5093: x_return_status => lx_return_status,
5094: x_dependent_sty_id => l_passthrough_id,
5095: x_dependent_sty_name => l_sty_name);
5096: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5097: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5098: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5099: RAISE OKL_API.G_EXCEPTION_ERROR;
5100: END IF;
5101: END IF;
5094: x_dependent_sty_id => l_passthrough_id,
5095: x_dependent_sty_name => l_sty_name);
5096: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5097: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5098: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5099: RAISE OKL_API.G_EXCEPTION_ERROR;
5100: END IF;
5101: END IF;
5102: IF l_passthrough_id IS NOT NULL
5095: x_dependent_sty_name => l_sty_name);
5096: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5097: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5098: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5099: RAISE OKL_API.G_EXCEPTION_ERROR;
5100: END IF;
5101: END IF;
5102: IF l_passthrough_id IS NOT NULL
5103: THEN
5107: p_purpose_code => l_purpose_code,
5108: x_stmv_rec => l_pt_rec,
5109: x_return_status => lx_return_status);
5110:
5111: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5112: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5113: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5114: RAISE OKL_API.G_EXCEPTION_ERROR;
5115: END IF;
5108: x_stmv_rec => l_pt_rec,
5109: x_return_status => lx_return_status);
5110:
5111: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5112: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5113: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5114: RAISE OKL_API.G_EXCEPTION_ERROR;
5115: END IF;
5116:
5109: x_return_status => lx_return_status);
5110:
5111: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5112: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5113: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5114: RAISE OKL_API.G_EXCEPTION_ERROR;
5115: END IF;
5116:
5117: l_pt_rec.purpose_code := 'PLOW';
5110:
5111: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5112: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5113: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5114: RAISE OKL_API.G_EXCEPTION_ERROR;
5115: END IF;
5116:
5117: l_pt_rec.purpose_code := 'PLOW';
5118: lx_return_status := Okl_Streams_Util.round_streams_amount(
5124: p_selv_tbl => l_pt_tbl,
5125: x_selv_tbl => lx_selv_tbl);
5126:
5127: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
5128: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5129: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
5130: RAISE OKL_API.G_EXCEPTION_ERROR;
5131: END IF;
5132: l_pt_tbl.DELETE;
5126:
5127: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
5128: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5129: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
5130: RAISE OKL_API.G_EXCEPTION_ERROR;
5131: END IF;
5132: l_pt_tbl.DELETE;
5133: l_pt_tbl := lx_selv_tbl;
5134: -- Create additional Pass Through Streams
5142: p_selv_tbl => l_pt_tbl,
5143: x_stmv_rec => lx_stmv_rec,
5144: x_selv_tbl => lx_selv_tbl);
5145:
5146: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5147: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5148: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5149: RAISE OKL_API.G_EXCEPTION_ERROR;
5150: END IF;
5143: x_stmv_rec => lx_stmv_rec,
5144: x_selv_tbl => lx_selv_tbl);
5145:
5146: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5147: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5148: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5149: RAISE OKL_API.G_EXCEPTION_ERROR;
5150: END IF;
5151: END IF;
5144: x_selv_tbl => lx_selv_tbl);
5145:
5146: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5147: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5148: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5149: RAISE OKL_API.G_EXCEPTION_ERROR;
5150: END IF;
5151: END IF;
5152: END IF;
5145:
5146: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5147: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5148: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5149: RAISE OKL_API.G_EXCEPTION_ERROR;
5150: END IF;
5151: END IF;
5152: END IF;
5153: -- Clear out reusable data structures
5166: x_return_status := lx_return_status;
5167:
5168: EXCEPTION
5169:
5170: WHEN OKL_API.G_EXCEPTION_ERROR THEN
5171:
5172: x_return_status := G_RET_STS_ERROR;
5173:
5174: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
5170: WHEN OKL_API.G_EXCEPTION_ERROR THEN
5171:
5172: x_return_status := G_RET_STS_ERROR;
5173:
5174: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
5175:
5176: x_return_status := G_RET_STS_UNEXP_ERROR;
5177:
5178: WHEN OTHERS THEN
5176: x_return_status := G_RET_STS_UNEXP_ERROR;
5177:
5178: WHEN OTHERS THEN
5179:
5180: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
5181: p_msg_name => G_DB_ERROR,
5182: p_token1 => G_PROG_NAME_TOKEN,
5183: p_token1_value => l_prog_name,
5184: p_token2 => G_SQLCODE_TOKEN,
5424: x_msg_data => x_msg_data,
5425: x_se_id => l_se_id );
5426: -- print( l_prog_name, ' generate_stub_elements ', x_return_status );
5427:
5428: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5429: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5430: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
5431: RAISE OKL_API.G_EXCEPTION_ERROR;
5432: END IF;
5425: x_se_id => l_se_id );
5426: -- print( l_prog_name, ' generate_stub_elements ', x_return_status );
5427:
5428: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5429: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5430: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
5431: RAISE OKL_API.G_EXCEPTION_ERROR;
5432: END IF;
5433:
5426: -- print( l_prog_name, ' generate_stub_elements ', x_return_status );
5427:
5428: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5429: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5430: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
5431: RAISE OKL_API.G_EXCEPTION_ERROR;
5432: END IF;
5433:
5434: --Added by prasjain for bug 5474827
5427:
5428: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5429: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5430: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
5431: RAISE OKL_API.G_EXCEPTION_ERROR;
5432: END IF;
5433:
5434: --Added by prasjain for bug 5474827
5435: x_se_id := l_se_id;
5445: IF ( (l_inflow.lty_code = 'SOLD_SERVICE' OR l_inflow.lty_code = 'LINK_SERV_ASSET') AND
5446: p_generation_type = 'SERVICE_LINES') OR (p_generation_type = 'FULL') THEN
5447: IF l_inflow.start_date IS NULL
5448: THEN
5449: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
5450: p_msg_name => 'OKL_NO_SLL_SDATE');
5451: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5452: END IF;
5453:
5447: IF l_inflow.start_date IS NULL
5448: THEN
5449: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
5450: p_msg_name => 'OKL_NO_SLL_SDATE');
5451: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5452: END IF;
5453:
5454: --Added by djanaswa for bug 6007644
5455: IF((l_inflow.periods IS NULL) AND (l_inflow.stub_days IS NOT NULL)) THEN
5493: x_msg_count => x_msg_count,
5494: x_msg_data => x_msg_data,
5495: p_recurrence_date => l_recurrence_date);
5496:
5497: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5498: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5499: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5500: RAISE OKL_API.G_EXCEPTION_ERROR;
5501: END IF;
5494: x_msg_data => x_msg_data,
5495: p_recurrence_date => l_recurrence_date);
5496:
5497: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5498: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5499: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5500: RAISE OKL_API.G_EXCEPTION_ERROR;
5501: END IF;
5502:
5495: p_recurrence_date => l_recurrence_date);
5496:
5497: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5498: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5499: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5500: RAISE OKL_API.G_EXCEPTION_ERROR;
5501: END IF;
5502:
5503: IF ( l_inflow.stub_days IS NOT NULL ) AND ( l_inflow.periods IS NULL )
5496:
5497: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5498: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5499: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5500: RAISE OKL_API.G_EXCEPTION_ERROR;
5501: END IF;
5502:
5503: IF ( l_inflow.stub_days IS NOT NULL ) AND ( l_inflow.periods IS NULL )
5504: THEN
5523: p_purpose_code => l_purpose_code,
5524: x_stmv_rec => l_stmv_rec,
5525: x_return_status => lx_return_status);
5526:
5527: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5528: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5529: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5530: RAISE OKL_API.G_EXCEPTION_ERROR;
5531: END IF;
5524: x_stmv_rec => l_stmv_rec,
5525: x_return_status => lx_return_status);
5526:
5527: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5528: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5529: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5530: RAISE OKL_API.G_EXCEPTION_ERROR;
5531: END IF;
5532:
5525: x_return_status => lx_return_status);
5526:
5527: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5528: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5529: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5530: RAISE OKL_API.G_EXCEPTION_ERROR;
5531: END IF;
5532:
5533: lx_return_status := Okl_Streams_Util.round_streams_amount_esg(
5526:
5527: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5528: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5529: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5530: RAISE OKL_API.G_EXCEPTION_ERROR;
5531: END IF;
5532:
5533: lx_return_status := Okl_Streams_Util.round_streams_amount_esg(
5534: p_api_version => g_api_version,
5544: p_rounding_rule => G_ROUNDING_RULE,
5545: p_apply_rnd_diff=> G_DIFF_LOOKUP_CODE);
5546:
5547: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
5548: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5549: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
5550: RAISE OKL_API.G_EXCEPTION_ERROR;
5551: END IF;
5552:
5546:
5547: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
5548: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5549: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
5550: RAISE OKL_API.G_EXCEPTION_ERROR;
5551: END IF;
5552:
5553: l_selv_tbl.DELETE;
5554: l_selv_tbl := lx_selv_tbl;
5558: p_stmv_rec => l_stmv_rec,
5559: x_full_stmv_tbl => l_stmv_tbl,
5560: x_return_status => lx_return_status );
5561: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
5562: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5563: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
5564: RAISE OKL_API.G_EXCEPTION_ERROR;
5565: END IF;
5566:
5560: x_return_status => lx_return_status );
5561: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
5562: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5563: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
5564: RAISE OKL_API.G_EXCEPTION_ERROR;
5565: END IF;
5566:
5567: --Accumulate Stream Elements
5568: OKL_STREAMS_UTIL.accumulate_strm_elements(
5570: p_selv_tbl => l_selv_tbl,
5571: x_full_selv_tbl => l_full_selv_tbl,
5572: x_return_status => lx_return_status );
5573: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
5574: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5575: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
5576: RAISE OKL_API.G_EXCEPTION_ERROR;
5577: END IF;
5578: /*
5572: x_return_status => lx_return_status );
5573: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
5574: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5575: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
5576: RAISE OKL_API.G_EXCEPTION_ERROR;
5577: END IF;
5578: /*
5579: okl_streams_pub.create_streams(p_api_version => G_API_VERSION,
5580: p_init_msg_list => G_FALSE,
5585: p_selv_tbl => l_selv_tbl,
5586: x_stmv_rec => lx_stmv_rec,
5587: x_selv_tbl => lx_selv_tbl);
5588:
5589: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5590: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5591: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5592: RAISE OKL_API.G_EXCEPTION_ERROR;
5593: END IF;
5586: x_stmv_rec => lx_stmv_rec,
5587: x_selv_tbl => lx_selv_tbl);
5588:
5589: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5590: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5591: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5592: RAISE OKL_API.G_EXCEPTION_ERROR;
5593: END IF;
5594: */
5587: x_selv_tbl => lx_selv_tbl);
5588:
5589: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5590: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5591: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5592: RAISE OKL_API.G_EXCEPTION_ERROR;
5593: END IF;
5594: */
5595: IF l_pt_tbl.COUNT > 0 THEN
5588:
5589: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5590: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5591: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5592: RAISE OKL_API.G_EXCEPTION_ERROR;
5593: END IF;
5594: */
5595: IF l_pt_tbl.COUNT > 0 THEN
5596: --Added by mansrini on 30-Jun-2005 for generating pass through accrual streams for service lines
5603: p_dependent_sty_purpose => 'PASS_THRU_EXP_ACCRUAL',
5604: x_return_status => lx_return_status,
5605: x_dependent_sty_id => l_passthrough_id,
5606: x_dependent_sty_name => l_sty_name);
5607: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5608: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5609: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5610: RAISE OKL_API.G_EXCEPTION_ERROR;
5611: END IF;
5604: x_return_status => lx_return_status,
5605: x_dependent_sty_id => l_passthrough_id,
5606: x_dependent_sty_name => l_sty_name);
5607: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5608: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5609: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5610: RAISE OKL_API.G_EXCEPTION_ERROR;
5611: END IF;
5612: ELSIF (l_inflow.lty_code = 'SOLD_SERVICE') OR (l_inflow.lty_code = 'LINK_SERV_ASSET') THEN
5605: x_dependent_sty_id => l_passthrough_id,
5606: x_dependent_sty_name => l_sty_name);
5607: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5608: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5609: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5610: RAISE OKL_API.G_EXCEPTION_ERROR;
5611: END IF;
5612: ELSIF (l_inflow.lty_code = 'SOLD_SERVICE') OR (l_inflow.lty_code = 'LINK_SERV_ASSET') THEN
5613: OKL_ISG_UTILS_PVT.get_dependent_stream_type(
5606: x_dependent_sty_name => l_sty_name);
5607: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5608: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5609: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5610: RAISE OKL_API.G_EXCEPTION_ERROR;
5611: END IF;
5612: ELSIF (l_inflow.lty_code = 'SOLD_SERVICE') OR (l_inflow.lty_code = 'LINK_SERV_ASSET') THEN
5613: OKL_ISG_UTILS_PVT.get_dependent_stream_type(
5614: p_khr_id => p_khr_id,
5617: p_dependent_sty_purpose => 'PASS_THRU_SVC_EXP_ACCRUAL',
5618: x_return_status => lx_return_status,
5619: x_dependent_sty_id => l_passthrough_id,
5620: x_dependent_sty_name => l_sty_name);
5621: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5622: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5623: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5624: RAISE OKL_API.G_EXCEPTION_ERROR;
5625: END IF;
5618: x_return_status => lx_return_status,
5619: x_dependent_sty_id => l_passthrough_id,
5620: x_dependent_sty_name => l_sty_name);
5621: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5622: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5623: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5624: RAISE OKL_API.G_EXCEPTION_ERROR;
5625: END IF;
5626: END IF;
5619: x_dependent_sty_id => l_passthrough_id,
5620: x_dependent_sty_name => l_sty_name);
5621: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5622: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5623: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5624: RAISE OKL_API.G_EXCEPTION_ERROR;
5625: END IF;
5626: END IF;
5627: --Bug 4434343 - End of Changes
5620: x_dependent_sty_name => l_sty_name);
5621: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5622: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5623: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5624: RAISE OKL_API.G_EXCEPTION_ERROR;
5625: END IF;
5626: END IF;
5627: --Bug 4434343 - End of Changes
5628:
5635: p_purpose_code => l_purpose_code,
5636: x_stmv_rec => l_pt_rec,
5637: x_return_status => lx_return_status);
5638:
5639: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5640: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5641: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5642: RAISE OKL_API.G_EXCEPTION_ERROR;
5643: END IF;
5636: x_stmv_rec => l_pt_rec,
5637: x_return_status => lx_return_status);
5638:
5639: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5640: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5641: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5642: RAISE OKL_API.G_EXCEPTION_ERROR;
5643: END IF;
5644:
5637: x_return_status => lx_return_status);
5638:
5639: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5640: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5641: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5642: RAISE OKL_API.G_EXCEPTION_ERROR;
5643: END IF;
5644:
5645:
5638:
5639: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5640: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5641: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5642: RAISE OKL_API.G_EXCEPTION_ERROR;
5643: END IF;
5644:
5645:
5646: lx_return_status := Okl_Streams_Util.round_streams_amount_esg(
5657: p_rounding_rule => G_ROUNDING_RULE,
5658: p_apply_rnd_diff=> G_DIFF_LOOKUP_CODE);
5659:
5660: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
5661: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5662: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
5663: RAISE OKL_API.G_EXCEPTION_ERROR;
5664: END IF;
5665:
5659:
5660: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
5661: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5662: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
5663: RAISE OKL_API.G_EXCEPTION_ERROR;
5664: END IF;
5665:
5666: l_pt_tbl.DELETE;
5667: l_pt_tbl := lx_selv_tbl;
5670: p_stmv_rec => l_pt_rec,
5671: x_full_stmv_tbl => l_stmv_tbl,
5672: x_return_status => lx_return_status );
5673: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
5674: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5675: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
5676: RAISE OKL_API.G_EXCEPTION_ERROR;
5677: END IF;
5678:
5672: x_return_status => lx_return_status );
5673: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
5674: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5675: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
5676: RAISE OKL_API.G_EXCEPTION_ERROR;
5677: END IF;
5678:
5679: --Accumulate Stream Elements
5680: OKL_STREAMS_UTIL.accumulate_strm_elements(
5682: p_selv_tbl => l_pt_tbl,
5683: x_full_selv_tbl => l_full_selv_tbl,
5684: x_return_status => lx_return_status );
5685: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
5686: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5687: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
5688: RAISE OKL_API.G_EXCEPTION_ERROR;
5689: END IF;
5690: /*
5684: x_return_status => lx_return_status );
5685: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
5686: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5687: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
5688: RAISE OKL_API.G_EXCEPTION_ERROR;
5689: END IF;
5690: /*
5691: okl_streams_pub.create_streams(p_api_version => G_API_VERSION,
5692: p_init_msg_list => G_FALSE,
5697: p_selv_tbl => l_pt_tbl,
5698: x_stmv_rec => lx_stmv_rec,
5699: x_selv_tbl => lx_selv_tbl);
5700:
5701: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5702: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5703: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5704: RAISE OKL_API.G_EXCEPTION_ERROR;
5705: END IF;
5698: x_stmv_rec => lx_stmv_rec,
5699: x_selv_tbl => lx_selv_tbl);
5700:
5701: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5702: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5703: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5704: RAISE OKL_API.G_EXCEPTION_ERROR;
5705: END IF;
5706: */
5699: x_selv_tbl => lx_selv_tbl);
5700:
5701: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5702: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5703: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5704: RAISE OKL_API.G_EXCEPTION_ERROR;
5705: END IF;
5706: */
5707: End If;
5700:
5701: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5702: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5703: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5704: RAISE OKL_API.G_EXCEPTION_ERROR;
5705: END IF;
5706: */
5707: End If;
5708: END IF;
5737: x_return_status => lx_return_status,
5738: x_dependent_sty_id => l_passthrough_pro_fee_id,
5739: x_dependent_sty_name => l_sty_name);
5740:
5741: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5742: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5743: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5744: RAISE OKL_API.G_EXCEPTION_ERROR;
5745: END IF;
5738: x_dependent_sty_id => l_passthrough_pro_fee_id,
5739: x_dependent_sty_name => l_sty_name);
5740:
5741: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5742: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5743: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5744: RAISE OKL_API.G_EXCEPTION_ERROR;
5745: END IF;
5746:
5739: x_dependent_sty_name => l_sty_name);
5740:
5741: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5742: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5743: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5744: RAISE OKL_API.G_EXCEPTION_ERROR;
5745: END IF;
5746:
5747: END IF;
5740:
5741: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5742: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5743: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5744: RAISE OKL_API.G_EXCEPTION_ERROR;
5745: END IF;
5746:
5747: END IF;
5748:
5754: p_purpose_code => l_purpose_code,
5755: x_stmv_rec => l_pt_pro_fee_rec,
5756: x_return_status => lx_return_status);
5757:
5758: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5759: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5760: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5761: RAISE OKL_API.G_EXCEPTION_ERROR;
5762: END IF;
5755: x_stmv_rec => l_pt_pro_fee_rec,
5756: x_return_status => lx_return_status);
5757:
5758: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5759: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5760: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5761: RAISE OKL_API.G_EXCEPTION_ERROR;
5762: END IF;
5763:
5756: x_return_status => lx_return_status);
5757:
5758: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5759: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5760: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5761: RAISE OKL_API.G_EXCEPTION_ERROR;
5762: END IF;
5763:
5764:
5757:
5758: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5759: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5760: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5761: RAISE OKL_API.G_EXCEPTION_ERROR;
5762: END IF;
5763:
5764:
5765: lx_return_status := Okl_Streams_Util.round_streams_amount_esg(
5776: p_rounding_rule => G_ROUNDING_RULE,
5777: p_apply_rnd_diff=> G_DIFF_LOOKUP_CODE);
5778:
5779: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
5780: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5781: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
5782: RAISE OKL_API.G_EXCEPTION_ERROR;
5783: END IF;
5784:
5778:
5779: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
5780: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5781: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
5782: RAISE OKL_API.G_EXCEPTION_ERROR;
5783: END IF;
5784:
5785: l_pt_pro_fee_tbl.DELETE;
5786: l_pt_pro_fee_tbl := lx_selv_tbl;
5790: x_full_stmv_tbl => l_stmv_tbl,
5791: x_return_status => lx_return_status );
5792:
5793: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
5794: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5795: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
5796: RAISE OKL_API.G_EXCEPTION_ERROR;
5797: END IF;
5798:
5792:
5793: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
5794: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5795: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
5796: RAISE OKL_API.G_EXCEPTION_ERROR;
5797: END IF;
5798:
5799: --Accumulate Stream Elements
5800: OKL_STREAMS_UTIL.accumulate_strm_elements(
5802: p_selv_tbl => l_pt_pro_fee_tbl,
5803: x_full_selv_tbl => l_full_selv_tbl,
5804: x_return_status => lx_return_status );
5805:
5806: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5807: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5808: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5809: RAISE OKL_API.G_EXCEPTION_ERROR;
5810: END IF;
5803: x_full_selv_tbl => l_full_selv_tbl,
5804: x_return_status => lx_return_status );
5805:
5806: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5807: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5808: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5809: RAISE OKL_API.G_EXCEPTION_ERROR;
5810: END IF;
5811:
5804: x_return_status => lx_return_status );
5805:
5806: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5807: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5808: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5809: RAISE OKL_API.G_EXCEPTION_ERROR;
5810: END IF;
5811:
5812: End If;
5805:
5806: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5807: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5808: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5809: RAISE OKL_API.G_EXCEPTION_ERROR;
5810: END IF;
5811:
5812: End If;
5813:
5844: l_stmv_tbl,
5845: l_full_selv_tbl,
5846: lx_stmv_tbl,
5847: lx_full_selv_tbl);
5848: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5849: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5850: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5851: RAISE OKL_API.G_EXCEPTION_ERROR;
5852: END IF;
5845: l_full_selv_tbl,
5846: lx_stmv_tbl,
5847: lx_full_selv_tbl);
5848: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5849: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5850: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5851: RAISE OKL_API.G_EXCEPTION_ERROR;
5852: END IF;
5853:
5846: lx_stmv_tbl,
5847: lx_full_selv_tbl);
5848: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5849: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5850: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5851: RAISE OKL_API.G_EXCEPTION_ERROR;
5852: END IF;
5853:
5854: EXCEPTION
5847: lx_full_selv_tbl);
5848: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5849: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5850: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
5851: RAISE OKL_API.G_EXCEPTION_ERROR;
5852: END IF;
5853:
5854: EXCEPTION
5855:
5852: END IF;
5853:
5854: EXCEPTION
5855:
5856: WHEN OKL_API.G_EXCEPTION_ERROR THEN
5857:
5858: x_return_status := G_RET_STS_ERROR;
5859:
5860: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
5856: WHEN OKL_API.G_EXCEPTION_ERROR THEN
5857:
5858: x_return_status := G_RET_STS_ERROR;
5859:
5860: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
5861:
5862: x_return_status := G_RET_STS_UNEXP_ERROR;
5863:
5864: WHEN OTHERS THEN
5862: x_return_status := G_RET_STS_UNEXP_ERROR;
5863:
5864: WHEN OTHERS THEN
5865:
5866: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
5867: p_msg_name => G_DB_ERROR,
5868: p_token1 => G_PROG_NAME_TOKEN,
5869: p_token1_value => l_prog_name,
5870: p_token2 => G_SQLCODE_TOKEN,
5960: p_source => 'ISG',
5961: x_days_in_month => l_day_convention_month,
5962: x_days_in_year => l_day_convention_year,
5963: x_return_status => x_return_status);
5964: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5965: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5966: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
5967: RAISE OKL_API.G_EXCEPTION_ERROR;
5968: END IF;
5961: x_days_in_month => l_day_convention_month,
5962: x_days_in_year => l_day_convention_year,
5963: x_return_status => x_return_status);
5964: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5965: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5966: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
5967: RAISE OKL_API.G_EXCEPTION_ERROR;
5968: END IF;
5969:
5962: x_days_in_year => l_day_convention_year,
5963: x_return_status => x_return_status);
5964: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5965: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5966: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
5967: RAISE OKL_API.G_EXCEPTION_ERROR;
5968: END IF;
5969:
5970: OPEN OKL_ISG_UTILS_PVT.G_GET_K_INFO_CSR (p_khr_id);
5963: x_return_status => x_return_status);
5964: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5965: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5966: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
5967: RAISE OKL_API.G_EXCEPTION_ERROR;
5968: END IF;
5969:
5970: OPEN OKL_ISG_UTILS_PVT.G_GET_K_INFO_CSR (p_khr_id);
5971: FETCH OKL_ISG_UTILS_PVT.G_GET_K_INFO_CSR INTO p_get_k_info_csr;
5984: x_return_status => x_return_status,
5985: x_dependent_sty_id => l_dep_sty_id,
5986: x_dependent_sty_name => l_mapped_sty_name,
5987: p_get_k_info_rec => p_get_k_info_csr);
5988: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5989: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5990: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
5991: RAISE OKL_API.G_EXCEPTION_ERROR;
5992: END IF;
5985: x_dependent_sty_id => l_dep_sty_id,
5986: x_dependent_sty_name => l_mapped_sty_name,
5987: p_get_k_info_rec => p_get_k_info_csr);
5988: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5989: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5990: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
5991: RAISE OKL_API.G_EXCEPTION_ERROR;
5992: END IF;
5993:
5986: x_dependent_sty_name => l_mapped_sty_name,
5987: p_get_k_info_rec => p_get_k_info_csr);
5988: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5989: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5990: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
5991: RAISE OKL_API.G_EXCEPTION_ERROR;
5992: END IF;
5993:
5994: --If Rental Accrual stream is not present in the SGT, then exit the procedure
5987: p_get_k_info_rec => p_get_k_info_csr);
5988: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5989: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5990: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
5991: RAISE OKL_API.G_EXCEPTION_ERROR;
5992: END IF;
5993:
5994: --If Rental Accrual stream is not present in the SGT, then exit the procedure
5995: IF(l_mapped_sty_name IS NULL) THEN
6014: p_days_in_year => l_day_convention_year,
6015: p_end_date => l_end_date,
6016: p_arrears => 'Y',
6017: x_return_status => x_return_status);
6018: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
6019: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
6020: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
6021: RAISE OKL_API.G_EXCEPTION_ERROR;
6022: END IF;
6015: p_end_date => l_end_date,
6016: p_arrears => 'Y',
6017: x_return_status => x_return_status);
6018: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
6019: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
6020: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
6021: RAISE OKL_API.G_EXCEPTION_ERROR;
6022: END IF;
6023:
6016: p_arrears => 'Y',
6017: x_return_status => x_return_status);
6018: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
6019: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
6020: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
6021: RAISE OKL_API.G_EXCEPTION_ERROR;
6022: END IF;
6023:
6024: IF(l_day_convention_month = '30' AND l_day_convention_year = '360') THEN
6017: x_return_status => x_return_status);
6018: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
6019: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
6020: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
6021: RAISE OKL_API.G_EXCEPTION_ERROR;
6022: END IF;
6023:
6024: IF(l_day_convention_month = '30' AND l_day_convention_year = '360') THEN
6025: l_start_day := to_char(l_start_date, 'DD' );
6055: p_days_in_year => l_day_convention_year,
6056: p_end_date => l_month_end,
6057: p_arrears => 'Y',
6058: x_return_status => x_return_status);
6059: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
6060: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
6061: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
6062: RAISE OKL_API.G_EXCEPTION_ERROR;
6063: END IF;
6056: p_end_date => l_month_end,
6057: p_arrears => 'Y',
6058: x_return_status => x_return_status);
6059: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
6060: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
6061: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
6062: RAISE OKL_API.G_EXCEPTION_ERROR;
6063: END IF;
6064:
6057: p_arrears => 'Y',
6058: x_return_status => x_return_status);
6059: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
6060: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
6061: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
6062: RAISE OKL_API.G_EXCEPTION_ERROR;
6063: END IF;
6064:
6065: l_selv_tbl(i).amount := l_days * l_daily_amt;
6058: x_return_status => x_return_status);
6059: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
6060: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
6061: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
6062: RAISE OKL_API.G_EXCEPTION_ERROR;
6063: END IF;
6064:
6065: l_selv_tbl(i).amount := l_days * l_daily_amt;
6066:
6087: p_rounding_rule => G_ROUNDING_RULE,
6088: p_apply_rnd_diff=> G_DIFF_LOOKUP_CODE);
6089:
6090: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
6091: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
6092: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
6093: RAISE OKL_API.G_EXCEPTION_ERROR;
6094: END IF;
6095:
6089:
6090: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
6091: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
6092: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
6093: RAISE OKL_API.G_EXCEPTION_ERROR;
6094: END IF;
6095:
6096: l_selv_tbl.DELETE;
6097: l_selv_tbl := lx_selv_tbl;
6101: p_sty_id => l_dep_sty_id,
6102: p_purpose_code => p_purpose_code,
6103: x_stmv_rec => l_stmv_rec,
6104: x_return_status => x_return_status);
6105: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
6106: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
6107: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
6108: RAISE OKL_API.G_EXCEPTION_ERROR;
6109: END IF;
6102: p_purpose_code => p_purpose_code,
6103: x_stmv_rec => l_stmv_rec,
6104: x_return_status => x_return_status);
6105: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
6106: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
6107: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
6108: RAISE OKL_API.G_EXCEPTION_ERROR;
6109: END IF;
6110:
6103: x_stmv_rec => l_stmv_rec,
6104: x_return_status => x_return_status);
6105: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
6106: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
6107: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
6108: RAISE OKL_API.G_EXCEPTION_ERROR;
6109: END IF;
6110:
6111: --Accumulate Stream Header
6104: x_return_status => x_return_status);
6105: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
6106: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
6107: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
6108: RAISE OKL_API.G_EXCEPTION_ERROR;
6109: END IF;
6110:
6111: --Accumulate Stream Header
6112: OKL_STREAMS_UTIL.accumulate_strm_headers(
6113: p_stmv_rec => l_stmv_rec,
6114: x_full_stmv_tbl => l_stmv_tbl,
6115: x_return_status => x_return_status );
6116: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
6117: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
6118: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
6119: RAISE OKL_API.G_EXCEPTION_ERROR;
6120: END IF;
6121:
6115: x_return_status => x_return_status );
6116: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
6117: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
6118: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
6119: RAISE OKL_API.G_EXCEPTION_ERROR;
6120: END IF;
6121:
6122: --Accumulate Stream Elements
6123: OKL_STREAMS_UTIL.accumulate_strm_elements(
6125: p_selv_tbl => l_selv_tbl,
6126: x_full_selv_tbl => l_full_selv_tbl,
6127: x_return_status => x_return_status );
6128: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
6129: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
6130: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
6131: RAISE OKL_API.G_EXCEPTION_ERROR;
6132: END IF;
6133: END IF;
6127: x_return_status => x_return_status );
6128: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
6129: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
6130: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
6131: RAISE OKL_API.G_EXCEPTION_ERROR;
6132: END IF;
6133: END IF;
6134:
6135: END LOOP; --Assets loop
6147: l_stmv_tbl,
6148: l_full_selv_tbl,
6149: lx_stmv_tbl,
6150: lx_full_selv_tbl);
6151: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
6152: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
6153: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
6154: RAISE OKL_API.G_EXCEPTION_ERROR;
6155: END IF;
6148: l_full_selv_tbl,
6149: lx_stmv_tbl,
6150: lx_full_selv_tbl);
6151: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
6152: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
6153: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
6154: RAISE OKL_API.G_EXCEPTION_ERROR;
6155: END IF;
6156: END IF;
6149: lx_stmv_tbl,
6150: lx_full_selv_tbl);
6151: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
6152: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
6153: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
6154: RAISE OKL_API.G_EXCEPTION_ERROR;
6155: END IF;
6156: END IF;
6157:
6150: lx_full_selv_tbl);
6151: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
6152: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
6153: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
6154: RAISE OKL_API.G_EXCEPTION_ERROR;
6155: END IF;
6156: END IF;
6157:
6158: x_return_status := G_RET_STS_SUCCESS;
6157:
6158: x_return_status := G_RET_STS_SUCCESS;
6159:
6160: EXCEPTION
6161: WHEN OKL_API.G_EXCEPTION_ERROR THEN
6162: x_return_status := G_RET_STS_ERROR;
6163: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
6164: x_return_status := G_RET_STS_UNEXP_ERROR;
6165: WHEN OTHERS THEN
6159:
6160: EXCEPTION
6161: WHEN OKL_API.G_EXCEPTION_ERROR THEN
6162: x_return_status := G_RET_STS_ERROR;
6163: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
6164: x_return_status := G_RET_STS_UNEXP_ERROR;
6165: WHEN OTHERS THEN
6166: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
6167: p_msg_name => G_DB_ERROR,
6162: x_return_status := G_RET_STS_ERROR;
6163: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
6164: x_return_status := G_RET_STS_UNEXP_ERROR;
6165: WHEN OTHERS THEN
6166: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
6167: p_msg_name => G_DB_ERROR,
6168: p_token1 => G_PROG_NAME_TOKEN,
6169: p_token1_value => l_prog_name,
6170: p_token2 => G_SQLCODE_TOKEN,
6189: --
6190: -- End of comments
6191: PROCEDURE COPY_ACCRUAL_STREAMS_ISG(
6192: p_api_version IN NUMBER,
6193: p_init_msg_list IN VARCHAR2 DEFAULT OKL_API.G_FALSE,
6194: x_return_status OUT NOCOPY VARCHAR2,
6195: x_msg_count OUT NOCOPY NUMBER,
6196: x_msg_data OUT NOCOPY VARCHAR2,
6197: p_chr_id IN VARCHAR2,
6485: l_curr_term_flag VARCHAR2(1);
6486: l_prog_name CONSTANT VARCHAR2(100) := G_PKG_NAME || '.' || l_api_name;
6487:
6488: BEGIN
6489: x_return_status := OKL_API.G_RET_STS_SUCCESS;
6490: x_return_status := OKL_API.START_ACTIVITY (
6491: l_api_name
6492: ,p_init_msg_list
6493: ,'_PVT'
6486: l_prog_name CONSTANT VARCHAR2(100) := G_PKG_NAME || '.' || l_api_name;
6487:
6488: BEGIN
6489: x_return_status := OKL_API.G_RET_STS_SUCCESS;
6490: x_return_status := OKL_API.START_ACTIVITY (
6491: l_api_name
6492: ,p_init_msg_list
6493: ,'_PVT'
6494: ,x_return_status);
6492: ,p_init_msg_list
6493: ,'_PVT'
6494: ,x_return_status);
6495: -- Check if activity started successfully
6496: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
6497: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
6498: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
6499: RAISE OKL_API.G_EXCEPTION_ERROR;
6500: END IF;
6493: ,'_PVT'
6494: ,x_return_status);
6495: -- Check if activity started successfully
6496: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
6497: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
6498: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
6499: RAISE OKL_API.G_EXCEPTION_ERROR;
6500: END IF;
6501:
6494: ,x_return_status);
6495: -- Check if activity started successfully
6496: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
6497: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
6498: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
6499: RAISE OKL_API.G_EXCEPTION_ERROR;
6500: END IF;
6501:
6502: print(l_prog_name, '---------------------------------------------------------------------------' );
6495: -- Check if activity started successfully
6496: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
6497: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
6498: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
6499: RAISE OKL_API.G_EXCEPTION_ERROR;
6500: END IF;
6501:
6502: print(l_prog_name, '---------------------------------------------------------------------------' );
6503: print(l_prog_name, l_api_name || ': Begin' );
6802: , l_selv_tbl
6803: , lx_stmv_tbl
6804: , lx_selv_tbl);
6805: print(l_prog_name, 'After calling OKL_STREAMS_PUB.CREATE_STREAMS_PERF : ' || TO_CHAR(SYSDATE, 'DD-MON-YYYY HH:MI:SS') || 'x_return_status= ' || x_return_status);
6806: IF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
6807: RAISE OKL_API.G_EXCEPTION_ERROR;
6808: ELSIF (x_return_status <> OKL_API.G_RET_STS_SUCCESS) THEN
6809: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
6810: END IF;
6803: , lx_stmv_tbl
6804: , lx_selv_tbl);
6805: print(l_prog_name, 'After calling OKL_STREAMS_PUB.CREATE_STREAMS_PERF : ' || TO_CHAR(SYSDATE, 'DD-MON-YYYY HH:MI:SS') || 'x_return_status= ' || x_return_status);
6806: IF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
6807: RAISE OKL_API.G_EXCEPTION_ERROR;
6808: ELSIF (x_return_status <> OKL_API.G_RET_STS_SUCCESS) THEN
6809: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
6810: END IF;
6811: END IF; -- l_stmv_tbl count check
6804: , lx_selv_tbl);
6805: print(l_prog_name, 'After calling OKL_STREAMS_PUB.CREATE_STREAMS_PERF : ' || TO_CHAR(SYSDATE, 'DD-MON-YYYY HH:MI:SS') || 'x_return_status= ' || x_return_status);
6806: IF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
6807: RAISE OKL_API.G_EXCEPTION_ERROR;
6808: ELSIF (x_return_status <> OKL_API.G_RET_STS_SUCCESS) THEN
6809: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
6810: END IF;
6811: END IF; -- l_stmv_tbl count check
6812:
6805: print(l_prog_name, 'After calling OKL_STREAMS_PUB.CREATE_STREAMS_PERF : ' || TO_CHAR(SYSDATE, 'DD-MON-YYYY HH:MI:SS') || 'x_return_status= ' || x_return_status);
6806: IF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
6807: RAISE OKL_API.G_EXCEPTION_ERROR;
6808: ELSIF (x_return_status <> OKL_API.G_RET_STS_SUCCESS) THEN
6809: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
6810: END IF;
6811: END IF; -- l_stmv_tbl count check
6812:
6813: -- End of API
6810: END IF;
6811: END IF; -- l_stmv_tbl count check
6812:
6813: -- End of API
6814: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
6815: EXCEPTION
6816: WHEN OKL_API.G_EXCEPTION_ERROR
6817: THEN
6818: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
6812:
6813: -- End of API
6814: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
6815: EXCEPTION
6816: WHEN OKL_API.G_EXCEPTION_ERROR
6817: THEN
6818: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
6819: p_api_name => l_api_name,
6820: p_pkg_name => g_pkg_name,
6814: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
6815: EXCEPTION
6816: WHEN OKL_API.G_EXCEPTION_ERROR
6817: THEN
6818: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
6819: p_api_name => l_api_name,
6820: p_pkg_name => g_pkg_name,
6821: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
6822: x_msg_count => x_msg_count,
6817: THEN
6818: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
6819: p_api_name => l_api_name,
6820: p_pkg_name => g_pkg_name,
6821: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
6822: x_msg_count => x_msg_count,
6823: x_msg_data => x_msg_data,
6824: p_api_type => g_api_type);
6825: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR
6821: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
6822: x_msg_count => x_msg_count,
6823: x_msg_data => x_msg_data,
6824: p_api_type => g_api_type);
6825: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR
6826: THEN
6827: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
6828: p_api_name => l_api_name,
6829: p_pkg_name => g_pkg_name,
6823: x_msg_data => x_msg_data,
6824: p_api_type => g_api_type);
6825: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR
6826: THEN
6827: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
6828: p_api_name => l_api_name,
6829: p_pkg_name => g_pkg_name,
6830: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
6831: x_msg_count => x_msg_count,
6826: THEN
6827: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
6828: p_api_name => l_api_name,
6829: p_pkg_name => g_pkg_name,
6830: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
6831: x_msg_count => x_msg_count,
6832: x_msg_data => x_msg_data,
6833: p_api_type => g_api_type);
6834: WHEN OTHERS
6832: x_msg_data => x_msg_data,
6833: p_api_type => g_api_type);
6834: WHEN OTHERS
6835: THEN
6836: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
6837: p_api_name => l_api_name,
6838: p_pkg_name => g_pkg_name,
6839: p_exc_name => 'OTHERS',
6840: x_msg_count => x_msg_count,
7175:
7176: BEGIN
7177: -- Added by RGOOTY: For Debugging purposes
7178: L_DEBUG_ENABLED := OKL_DEBUG_PUB.CHECK_LOG_ENABLED;
7179: x_return_status := OKL_API.G_RET_STS_SUCCESS;
7180: x_return_status := OKL_API.START_ACTIVITY(
7181: p_api_name => l_api_name,
7182: p_pkg_name => g_pkg_name,
7183: p_init_msg_list => p_init_msg_list,
7176: BEGIN
7177: -- Added by RGOOTY: For Debugging purposes
7178: L_DEBUG_ENABLED := OKL_DEBUG_PUB.CHECK_LOG_ENABLED;
7179: x_return_status := OKL_API.G_RET_STS_SUCCESS;
7180: x_return_status := OKL_API.START_ACTIVITY(
7181: p_api_name => l_api_name,
7182: p_pkg_name => g_pkg_name,
7183: p_init_msg_list => p_init_msg_list,
7184: l_api_version => p_api_version,
7184: l_api_version => p_api_version,
7185: p_api_version => p_api_version,
7186: p_api_type => G_API_TYPE,
7187: x_return_status => x_return_status);
7188: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR)
7189: THEN
7190: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
7191: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR)
7192: THEN
7186: p_api_type => G_API_TYPE,
7187: x_return_status => x_return_status);
7188: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR)
7189: THEN
7190: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
7191: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR)
7192: THEN
7193: RAISE OKL_API.G_EXCEPTION_ERROR;
7194: END IF;
7187: x_return_status => x_return_status);
7188: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR)
7189: THEN
7190: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
7191: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR)
7192: THEN
7193: RAISE OKL_API.G_EXCEPTION_ERROR;
7194: END IF;
7195: -- Initialize the things
7189: THEN
7190: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
7191: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR)
7192: THEN
7193: RAISE OKL_API.G_EXCEPTION_ERROR;
7194: END IF;
7195: -- Initialize the things
7196: l_rebook_date := TRUNC(p_rebook_date);
7197: l_rebook_type := p_rebook_type;
7254: ,x_days_in_year => l_day_convention_year
7255: ,x_return_status => x_return_status);
7256: print(l_prog_name, 'Day Convention Month/Year = ' || l_day_convention_month || '/' || l_day_convention_year );
7257: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
7258: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
7259: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
7260: RAISE OKL_API.G_EXCEPTION_ERROR;
7261: END IF;
7262: l_flip_prb_rbk_reason := 'NO_REASON';
7256: print(l_prog_name, 'Day Convention Month/Year = ' || l_day_convention_month || '/' || l_day_convention_year );
7257: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
7258: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
7259: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
7260: RAISE OKL_API.G_EXCEPTION_ERROR;
7261: END IF;
7262: l_flip_prb_rbk_reason := 'NO_REASON';
7263: END IF;
7264:
7285: x_return_status => x_return_status,
7286: x_dependent_sty_id => l_inc_stream_id,
7287: x_dependent_sty_name => l_inc_stream_name);
7288: print(l_prog_name, '1. ' || p_deal_type || ': Income Stream Name = ' || l_inc_stream_name );
7289: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
7290: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
7291: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
7292: RAISE OKL_API.G_EXCEPTION_ERROR;
7293: END IF;
7286: x_dependent_sty_id => l_inc_stream_id,
7287: x_dependent_sty_name => l_inc_stream_name);
7288: print(l_prog_name, '1. ' || p_deal_type || ': Income Stream Name = ' || l_inc_stream_name );
7289: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
7290: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
7291: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
7292: RAISE OKL_API.G_EXCEPTION_ERROR;
7293: END IF;
7294: ELSIF p_deal_type IN ('LEASEDF', 'LEASEST')
7287: x_dependent_sty_name => l_inc_stream_name);
7288: print(l_prog_name, '1. ' || p_deal_type || ': Income Stream Name = ' || l_inc_stream_name );
7289: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
7290: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
7291: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
7292: RAISE OKL_API.G_EXCEPTION_ERROR;
7293: END IF;
7294: ELSIF p_deal_type IN ('LEASEDF', 'LEASEST')
7295: THEN
7288: print(l_prog_name, '1. ' || p_deal_type || ': Income Stream Name = ' || l_inc_stream_name );
7289: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
7290: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
7291: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
7292: RAISE OKL_API.G_EXCEPTION_ERROR;
7293: END IF;
7294: ELSIF p_deal_type IN ('LEASEDF', 'LEASEST')
7295: THEN
7296: OKL_ISG_UTILS_PVT.get_dependent_stream_type(
7301: x_return_status => x_return_status,
7302: x_dependent_sty_id => l_inc_stream_id,
7303: x_dependent_sty_name => l_inc_stream_name);
7304: print(l_prog_name, '2. ' || p_deal_type || ': Income Stream Name = ' || l_inc_stream_name );
7305: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
7306: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
7307: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
7308: RAISE OKL_API.G_EXCEPTION_ERROR;
7309: END IF;
7302: x_dependent_sty_id => l_inc_stream_id,
7303: x_dependent_sty_name => l_inc_stream_name);
7304: print(l_prog_name, '2. ' || p_deal_type || ': Income Stream Name = ' || l_inc_stream_name );
7305: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
7306: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
7307: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
7308: RAISE OKL_API.G_EXCEPTION_ERROR;
7309: END IF;
7310: ELSIF p_deal_type IN ('LOAN', 'LOAN-REVOLVING')
7303: x_dependent_sty_name => l_inc_stream_name);
7304: print(l_prog_name, '2. ' || p_deal_type || ': Income Stream Name = ' || l_inc_stream_name );
7305: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
7306: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
7307: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
7308: RAISE OKL_API.G_EXCEPTION_ERROR;
7309: END IF;
7310: ELSIF p_deal_type IN ('LOAN', 'LOAN-REVOLVING')
7311: THEN
7304: print(l_prog_name, '2. ' || p_deal_type || ': Income Stream Name = ' || l_inc_stream_name );
7305: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
7306: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
7307: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
7308: RAISE OKL_API.G_EXCEPTION_ERROR;
7309: END IF;
7310: ELSIF p_deal_type IN ('LOAN', 'LOAN-REVOLVING')
7311: THEN
7312: OKL_ISG_UTILS_PVT.get_dependent_stream_type(
7317: x_return_status => x_return_status,
7318: x_dependent_sty_id => l_inc_stream_id,
7319: x_dependent_sty_name => l_inc_stream_name);
7320: print(l_prog_name, '3. ' || p_deal_type || ': Income Stream Name = ' || l_inc_stream_name );
7321: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
7322: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
7323: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
7324: RAISE OKL_API.G_EXCEPTION_ERROR;
7325: END IF;
7318: x_dependent_sty_id => l_inc_stream_id,
7319: x_dependent_sty_name => l_inc_stream_name);
7320: print(l_prog_name, '3. ' || p_deal_type || ': Income Stream Name = ' || l_inc_stream_name );
7321: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
7322: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
7323: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
7324: RAISE OKL_API.G_EXCEPTION_ERROR;
7325: END IF;
7326: END IF;
7319: x_dependent_sty_name => l_inc_stream_name);
7320: print(l_prog_name, '3. ' || p_deal_type || ': Income Stream Name = ' || l_inc_stream_name );
7321: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
7322: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
7323: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
7324: RAISE OKL_API.G_EXCEPTION_ERROR;
7325: END IF;
7326: END IF;
7327: -- Initialize the variable l_need_to_fetch_inc_strms
7320: print(l_prog_name, '3. ' || p_deal_type || ': Income Stream Name = ' || l_inc_stream_name );
7321: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
7322: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
7323: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
7324: RAISE OKL_API.G_EXCEPTION_ERROR;
7325: END IF;
7326: END IF;
7327: -- Initialize the variable l_need_to_fetch_inc_strms
7328: l_need_to_fetch_inc_strms := 'Y';
7765: ,p_end_date => l_term_end_date
7766: ,p_arrears => 'Y'
7767: ,x_return_status => x_return_status);
7768: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
7769: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
7770: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
7771: RAISE OKL_API.G_EXCEPTION_ERROR;
7772: END IF;
7773: print(l_prog_name, 'Rebook Effective Date | End Date | Days Remaining' );
7767: ,x_return_status => x_return_status);
7768: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
7769: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
7770: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
7771: RAISE OKL_API.G_EXCEPTION_ERROR;
7772: END IF;
7773: print(l_prog_name, 'Rebook Effective Date | End Date | Days Remaining' );
7774: print(l_prog_name,l_rebook_eff_date ||' | ' || l_term_end_date || ' | ' || l_rem_days);
7775:
7829: ,p_end_date => l_per_end_date
7830: ,p_arrears => 'Y'
7831: ,x_return_status => x_return_status);
7832: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
7833: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
7834: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
7835: RAISE OKL_API.G_EXCEPTION_ERROR;
7836: END IF;
7837: l_per_adjustment := l_acc_adjustment * l_per_days / l_rem_days;
7831: ,x_return_status => x_return_status);
7832: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
7833: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
7834: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
7835: RAISE OKL_API.G_EXCEPTION_ERROR;
7836: END IF;
7837: l_per_adjustment := l_acc_adjustment * l_per_days / l_rem_days;
7838:
7839: -- Store the Accrual Adjustment prior modifications for reporting purposes
7848: ELSE
7849: -- Round the Accrual Adjustment Amount
7850: okl_accounting_util.round_amount(
7851: p_api_version => p_api_version
7852: ,p_init_msg_list => OKL_API.G_FALSE
7853: ,x_return_status => x_return_status
7854: ,x_msg_count => x_msg_count
7855: ,x_msg_data => x_msg_data
7856: ,p_amount => l_per_adjustment
7856: ,p_amount => l_per_adjustment
7857: ,p_currency_code => p_currency_code
7858: ,p_round_option => 'STM'
7859: ,x_rounded_amount => l_per_rounded_adjustment);
7860: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
7861: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
7862: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
7863: RAISE OKL_API.G_EXCEPTION_ERROR;
7864: END IF;
7857: ,p_currency_code => p_currency_code
7858: ,p_round_option => 'STM'
7859: ,x_rounded_amount => l_per_rounded_adjustment);
7860: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
7861: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
7862: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
7863: RAISE OKL_API.G_EXCEPTION_ERROR;
7864: END IF;
7865: -- Add the Accrual Adjustment amount
7858: ,p_round_option => 'STM'
7859: ,x_rounded_amount => l_per_rounded_adjustment);
7860: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
7861: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
7862: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
7863: RAISE OKL_API.G_EXCEPTION_ERROR;
7864: END IF;
7865: -- Add the Accrual Adjustment amount
7866: l_work_acc_strms_tbl(inx_work).se_amount := l_work_acc_strms_tbl(inx_work).se_amount
7859: ,x_rounded_amount => l_per_rounded_adjustment);
7860: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
7861: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
7862: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
7863: RAISE OKL_API.G_EXCEPTION_ERROR;
7864: END IF;
7865: -- Add the Accrual Adjustment amount
7866: l_work_acc_strms_tbl(inx_work).se_amount := l_work_acc_strms_tbl(inx_work).se_amount
7867: + l_per_rounded_adjustment;
7896: || '|' || l_selv_tbl(k).stm_id);
7897: end loop;
7898: x_return_status := Okl_Streams_Util.round_streams_amount(
7899: p_api_version => p_api_version,
7900: p_init_msg_list => OKL_API.G_FALSE,
7901: x_msg_count => x_msg_count,
7902: x_msg_data => x_msg_data,
7903: p_chr_id => p_khr_id,
7904: p_selv_tbl => l_selv_tbl,
7906:
7907: print(l_prog_name, 'After calling Okl_Streams_Util.round_streams_amount' || x_return_status);
7908:
7909: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
7910: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
7911: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
7912: RAISE OKL_API.G_EXCEPTION_ERROR;
7913: END IF;
7914:
7908:
7909: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
7910: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
7911: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
7912: RAISE OKL_API.G_EXCEPTION_ERROR;
7913: END IF;
7914:
7915: print(l_prog_name, 'Total Number of Stream Elements rounded ' || lx_selv_tbl.COUNT );
7916:
7946:
7947: ELSE
7948: print(l_prog_name, 'Switched Back to Retrospective Method. Reason= ' || l_flip_prb_rbk_reason);
7949: END IF; -- If l_flip_prb_rbk_reason = 'NO_REASON'
7950: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
7951: print( l_api_name, 'end' );
7952: EXCEPTION
7953: WHEN OKL_API.G_EXCEPTION_ERROR
7954: THEN
7949: END IF; -- If l_flip_prb_rbk_reason = 'NO_REASON'
7950: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
7951: print( l_api_name, 'end' );
7952: EXCEPTION
7953: WHEN OKL_API.G_EXCEPTION_ERROR
7954: THEN
7955: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
7956: p_api_name => l_api_name,
7957: p_pkg_name => g_pkg_name,
7951: print( l_api_name, 'end' );
7952: EXCEPTION
7953: WHEN OKL_API.G_EXCEPTION_ERROR
7954: THEN
7955: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
7956: p_api_name => l_api_name,
7957: p_pkg_name => g_pkg_name,
7958: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
7959: x_msg_count => x_msg_count,
7954: THEN
7955: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
7956: p_api_name => l_api_name,
7957: p_pkg_name => g_pkg_name,
7958: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
7959: x_msg_count => x_msg_count,
7960: x_msg_data => x_msg_data,
7961: p_api_type => g_api_type);
7962: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR
7958: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
7959: x_msg_count => x_msg_count,
7960: x_msg_data => x_msg_data,
7961: p_api_type => g_api_type);
7962: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR
7963: THEN
7964: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
7965: p_api_name => l_api_name,
7966: p_pkg_name => g_pkg_name,
7960: x_msg_data => x_msg_data,
7961: p_api_type => g_api_type);
7962: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR
7963: THEN
7964: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
7965: p_api_name => l_api_name,
7966: p_pkg_name => g_pkg_name,
7967: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
7968: x_msg_count => x_msg_count,
7963: THEN
7964: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
7965: p_api_name => l_api_name,
7966: p_pkg_name => g_pkg_name,
7967: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
7968: x_msg_count => x_msg_count,
7969: x_msg_data => x_msg_data,
7970: p_api_type => g_api_type);
7971:
7970: p_api_type => g_api_type);
7971:
7972: WHEN OTHERS
7973: THEN
7974: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
7975: p_api_name => l_api_name,
7976: p_pkg_name => g_pkg_name,
7977: p_exc_name => 'OTHERS',
7978: x_msg_count => x_msg_count,
8319: prof_rate VARCHAR2(256);
8320: contract_comments VARCHAR2(256);
8321:
8322: l_recurr_yn VARCHAR2(1) := NULL;
8323: l_blnHasFinFees VARCHAR2(1) := OKL_API.G_FALSE;
8324:
8325: l_clev_tbl okl_okc_migration_pvt.clev_tbl_type;
8326: l_klev_tbl okl_contract_pub.klev_tbl_type;
8327: x_clev_tbl okl_okc_migration_pvt.clev_tbl_type;
8488: x_currency_code => G_CURRENCY_CODE,
8489: x_rounding_rule => G_ROUNDING_RULE,
8490: x_apply_rnd_diff => G_DIFF_LOOKUP_CODE,
8491: x_return_status => x_return_status);
8492: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8493: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8494: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
8495: RAISE OKL_API.G_EXCEPTION_ERROR;
8496: END IF;
8489: x_rounding_rule => G_ROUNDING_RULE,
8490: x_apply_rnd_diff => G_DIFF_LOOKUP_CODE,
8491: x_return_status => x_return_status);
8492: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8493: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8494: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
8495: RAISE OKL_API.G_EXCEPTION_ERROR;
8496: END IF;
8497:
8490: x_apply_rnd_diff => G_DIFF_LOOKUP_CODE,
8491: x_return_status => x_return_status);
8492: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8493: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8494: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
8495: RAISE OKL_API.G_EXCEPTION_ERROR;
8496: END IF;
8497:
8498: OPEN G_HDR(p_khr_id);
8491: x_return_status => x_return_status);
8492: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8493: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8494: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
8495: RAISE OKL_API.G_EXCEPTION_ERROR;
8496: END IF;
8497:
8498: OPEN G_HDR(p_khr_id);
8499: FETCH G_HDR INTO r_hdr;
8529: x_msg_count => x_msg_count,
8530: x_msg_data => x_msg_data,
8531: p_khr_id => p_khr_id);
8532:
8533: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8534: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8535: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
8536: RAISE OKL_API.G_EXCEPTION_ERROR;
8537: END IF;
8530: x_msg_data => x_msg_data,
8531: p_khr_id => p_khr_id);
8532:
8533: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8534: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8535: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
8536: RAISE OKL_API.G_EXCEPTION_ERROR;
8537: END IF;
8538:
8531: p_khr_id => p_khr_id);
8532:
8533: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8534: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8535: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
8536: RAISE OKL_API.G_EXCEPTION_ERROR;
8537: END IF;
8538:
8539: -- Get the Prospective Rebooking Option from System Options
8532:
8533: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8534: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8535: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
8536: RAISE OKL_API.G_EXCEPTION_ERROR;
8537: END IF;
8538:
8539: -- Get the Prospective Rebooking Option from System Options
8540: l_prosp_rebook_flag := 'N';
8584: x_return_status => x_return_status,
8585: x_msg_count => x_msg_count,
8586: x_msg_data => x_msg_data,
8587: x_se_id => l_se_id); --Added by prasjain for bug 5474827
8588: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8589: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8590: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
8591: RAISE OKL_API.G_EXCEPTION_ERROR;
8592: END IF;
8585: x_msg_count => x_msg_count,
8586: x_msg_data => x_msg_data,
8587: x_se_id => l_se_id); --Added by prasjain for bug 5474827
8588: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8589: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8590: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
8591: RAISE OKL_API.G_EXCEPTION_ERROR;
8592: END IF;
8593:
8586: x_msg_data => x_msg_data,
8587: x_se_id => l_se_id); --Added by prasjain for bug 5474827
8588: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8589: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8590: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
8591: RAISE OKL_API.G_EXCEPTION_ERROR;
8592: END IF;
8593:
8594: END IF;
8587: x_se_id => l_se_id); --Added by prasjain for bug 5474827
8588: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8589: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8590: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
8591: RAISE OKL_API.G_EXCEPTION_ERROR;
8592: END IF;
8593:
8594: END IF;
8595: -- Added by RGOOTY: End
8598: print( l_prog_name, ' payment count ' || l_payment_count);
8599: */
8600:
8601: -- cursor to check for existense of financed fee
8602: l_blnHasFinFees := OKL_API.G_FALSE;
8603: l_fee_type := NULL;
8604: OPEN c_financed_fees;
8605: FETCH c_financed_fees INTO r_financed_fees;
8606: IF ( c_financed_fees%FOUND ) Then
8603: l_fee_type := NULL;
8604: OPEN c_financed_fees;
8605: FETCH c_financed_fees INTO r_financed_fees;
8606: IF ( c_financed_fees%FOUND ) Then
8607: l_blnHasFinFees := OKL_API.G_TRUE;
8608: l_fee_type := r_financed_fees.fee_type;
8609: --'FINANCED';
8610: End If;
8611: CLOSE c_financed_fees;
8626: x_mapped_stream => l_mapped_sty_name,
8627: x_return_status => lx_return_status,
8628: p_hdr => r_hdr,
8629: p_rollover_pmnts => r_rollover_pmnts);
8630: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8631: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8632: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8633: RAISE OKL_API.G_EXCEPTION_ERROR;
8634: END IF;
8627: x_return_status => lx_return_status,
8628: p_hdr => r_hdr,
8629: p_rollover_pmnts => r_rollover_pmnts);
8630: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8631: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8632: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8633: RAISE OKL_API.G_EXCEPTION_ERROR;
8634: END IF;
8635:
8628: p_hdr => r_hdr,
8629: p_rollover_pmnts => r_rollover_pmnts);
8630: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8631: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8632: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8633: RAISE OKL_API.G_EXCEPTION_ERROR;
8634: END IF;
8635:
8636: print( l_prog_name, ' mapped sty name' || l_mapped_sty_name || ' has fees ' || l_blnHasFinFees );
8629: p_rollover_pmnts => r_rollover_pmnts);
8630: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8631: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8632: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8633: RAISE OKL_API.G_EXCEPTION_ERROR;
8634: END IF;
8635:
8636: print( l_prog_name, ' mapped sty name' || l_mapped_sty_name || ' has fees ' || l_blnHasFinFees );
8637:
8637:
8638:
8639:
8640:
8641: IF (l_mapped_sty_name IS NOT NULL) OR ( l_blnHasFinFees = OKL_API.G_TRUE ) THEN
8642: -- print( l_prog_name, ' loop calc amort o');
8643:
8644: FOR l_fin_asset IN c_fin_assets LOOP
8645:
8731: x_msg_count => x_msg_count,
8732: p_asset_cle_id => l_fin_asset.id,
8733: x_subsidy_amount=> l_subsidy_amount);
8734:
8735: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8736: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8737: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8738: RAISE OKL_API.G_EXCEPTION_ERROR;
8739: END IF;
8732: p_asset_cle_id => l_fin_asset.id,
8733: x_subsidy_amount=> l_subsidy_amount);
8734:
8735: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8736: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8737: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8738: RAISE OKL_API.G_EXCEPTION_ERROR;
8739: END IF;
8740: l_capital_cost := l_capital_cost + l_subsidy_amount;
8733: x_subsidy_amount=> l_subsidy_amount);
8734:
8735: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8736: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8737: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8738: RAISE OKL_API.G_EXCEPTION_ERROR;
8739: END IF;
8740: l_capital_cost := l_capital_cost + l_subsidy_amount;
8741: END IF;
8734:
8735: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8736: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8737: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8738: RAISE OKL_API.G_EXCEPTION_ERROR;
8739: END IF;
8740: l_capital_cost := l_capital_cost + l_subsidy_amount;
8741: END IF;
8742:
8754: x_sty_id => l_pre_tax_inc_id,
8755: x_sty_name => l_sty_name,
8756: x_return_status => lx_return_status);
8757:
8758: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8759: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8760: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8761: RAISE OKL_API.G_EXCEPTION_ERROR;
8762: END IF;
8755: x_sty_name => l_sty_name,
8756: x_return_status => lx_return_status);
8757:
8758: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8759: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8760: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8761: RAISE OKL_API.G_EXCEPTION_ERROR;
8762: END IF;
8763:
8756: x_return_status => lx_return_status);
8757:
8758: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8759: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8760: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8761: RAISE OKL_API.G_EXCEPTION_ERROR;
8762: END IF;
8763:
8764: OKL_ISG_UTILS_PVT.get_dep_stream_type(
8757:
8758: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8759: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8760: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8761: RAISE OKL_API.G_EXCEPTION_ERROR;
8762: END IF;
8763:
8764: OKL_ISG_UTILS_PVT.get_dep_stream_type(
8765: p_khr_id => p_khr_id,
8772: p_get_k_info_rec => p_get_k_info_csr);
8773:
8774: print( l_prog_name, ' INTEREST_PAYMENT ' || l_sty_name );
8775:
8776: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8777: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8778: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8779: RAISE OKL_API.G_EXCEPTION_ERROR;
8780: END IF;
8773:
8774: print( l_prog_name, ' INTEREST_PAYMENT ' || l_sty_name );
8775:
8776: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8777: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8778: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8779: RAISE OKL_API.G_EXCEPTION_ERROR;
8780: END IF;
8781:
8774: print( l_prog_name, ' INTEREST_PAYMENT ' || l_sty_name );
8775:
8776: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8777: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8778: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8779: RAISE OKL_API.G_EXCEPTION_ERROR;
8780: END IF;
8781:
8782: OKL_ISG_UTILS_PVT.get_dep_stream_type(
8775:
8776: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8777: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8778: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8779: RAISE OKL_API.G_EXCEPTION_ERROR;
8780: END IF;
8781:
8782: OKL_ISG_UTILS_PVT.get_dep_stream_type(
8783: p_khr_id => p_khr_id,
8791:
8792:
8793: print( l_prog_name, ' PRINCIPAL_PAYMENT ' || l_sty_name );
8794:
8795: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8796: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8797: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8798: RAISE OKL_API.G_EXCEPTION_ERROR;
8799: END IF;
8792:
8793: print( l_prog_name, ' PRINCIPAL_PAYMENT ' || l_sty_name );
8794:
8795: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8796: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8797: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8798: RAISE OKL_API.G_EXCEPTION_ERROR;
8799: END IF;
8800:
8793: print( l_prog_name, ' PRINCIPAL_PAYMENT ' || l_sty_name );
8794:
8795: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8796: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8797: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8798: RAISE OKL_API.G_EXCEPTION_ERROR;
8799: END IF;
8800:
8801: OKL_ISG_UTILS_PVT.get_dep_stream_type(
8794:
8795: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8796: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8797: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8798: RAISE OKL_API.G_EXCEPTION_ERROR;
8799: END IF;
8800:
8801: OKL_ISG_UTILS_PVT.get_dep_stream_type(
8802: p_khr_id => p_khr_id,
8809: p_get_k_info_rec => p_get_k_info_csr);
8810:
8811: print( l_prog_name, ' PRINCIPAL_BALANCE ' || l_sty_name );
8812:
8813: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8814: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8815: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8816: RAISE OKL_API.G_EXCEPTION_ERROR;
8817: END IF;
8810:
8811: print( l_prog_name, ' PRINCIPAL_BALANCE ' || l_sty_name );
8812:
8813: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8814: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8815: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8816: RAISE OKL_API.G_EXCEPTION_ERROR;
8817: END IF;
8818:
8811: print( l_prog_name, ' PRINCIPAL_BALANCE ' || l_sty_name );
8812:
8813: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8814: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8815: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8816: RAISE OKL_API.G_EXCEPTION_ERROR;
8817: END IF;
8818:
8819: OKL_ISG_UTILS_PVT.get_dep_stream_type(
8812:
8813: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8814: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8815: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8816: RAISE OKL_API.G_EXCEPTION_ERROR;
8817: END IF;
8818:
8819: OKL_ISG_UTILS_PVT.get_dep_stream_type(
8820: p_khr_id => p_khr_id,
8825: x_dependent_sty_id => l_termination_id,
8826: x_dependent_sty_name => l_sty_name,
8827: p_get_k_info_rec => p_get_k_info_csr);
8828:
8829: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8830: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8831: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8832: RAISE OKL_API.G_EXCEPTION_ERROR;
8833: END IF;
8826: x_dependent_sty_name => l_sty_name,
8827: p_get_k_info_rec => p_get_k_info_csr);
8828:
8829: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8830: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8831: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8832: RAISE OKL_API.G_EXCEPTION_ERROR;
8833: END IF;
8834:
8827: p_get_k_info_rec => p_get_k_info_csr);
8828:
8829: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8830: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8831: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8832: RAISE OKL_API.G_EXCEPTION_ERROR;
8833: END IF;
8834:
8835:
8828:
8829: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8830: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8831: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8832: RAISE OKL_API.G_EXCEPTION_ERROR;
8833: END IF;
8834:
8835:
8836: print( l_prog_name, ' calling loan amort ' );
8869: ); --Added by bkatraga for bug 5370233
8870:
8871:
8872: prof_rate := fnd_profile.value('OKL_BOOK_CONTRACT_WITHOUT_IRR');
8873: IF ((lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) OR
8874: (lx_return_status = OKL_API.G_RET_STS_ERROR)) AND
8875: (nvl(prof_rate, 'N') = 'Y')
8876: THEN
8877: lx_return_status := OKL_API.G_RET_STS_SUCCESS;
8870:
8871:
8872: prof_rate := fnd_profile.value('OKL_BOOK_CONTRACT_WITHOUT_IRR');
8873: IF ((lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) OR
8874: (lx_return_status = OKL_API.G_RET_STS_ERROR)) AND
8875: (nvl(prof_rate, 'N') = 'Y')
8876: THEN
8877: lx_return_status := OKL_API.G_RET_STS_SUCCESS;
8878: OKL_API.init_msg_list( 'T' );
8873: IF ((lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) OR
8874: (lx_return_status = OKL_API.G_RET_STS_ERROR)) AND
8875: (nvl(prof_rate, 'N') = 'Y')
8876: THEN
8877: lx_return_status := OKL_API.G_RET_STS_SUCCESS;
8878: OKL_API.init_msg_list( 'T' );
8879: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
8880: p_msg_name => 'OKL_CANNOT_CALC_IIR');
8881: contract_comments := fnd_message.get_string(OKL_API.G_APP_NAME,
8874: (lx_return_status = OKL_API.G_RET_STS_ERROR)) AND
8875: (nvl(prof_rate, 'N') = 'Y')
8876: THEN
8877: lx_return_status := OKL_API.G_RET_STS_SUCCESS;
8878: OKL_API.init_msg_list( 'T' );
8879: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
8880: p_msg_name => 'OKL_CANNOT_CALC_IIR');
8881: contract_comments := fnd_message.get_string(OKL_API.G_APP_NAME,
8882: 'OKL_CANNOT_CALC_IIR');
8875: (nvl(prof_rate, 'N') = 'Y')
8876: THEN
8877: lx_return_status := OKL_API.G_RET_STS_SUCCESS;
8878: OKL_API.init_msg_list( 'T' );
8879: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
8880: p_msg_name => 'OKL_CANNOT_CALC_IIR');
8881: contract_comments := fnd_message.get_string(OKL_API.G_APP_NAME,
8882: 'OKL_CANNOT_CALC_IIR');
8883:
8877: lx_return_status := OKL_API.G_RET_STS_SUCCESS;
8878: OKL_API.init_msg_list( 'T' );
8879: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
8880: p_msg_name => 'OKL_CANNOT_CALC_IIR');
8881: contract_comments := fnd_message.get_string(OKL_API.G_APP_NAME,
8882: 'OKL_CANNOT_CALC_IIR');
8883:
8884: UPDATE OKC_K_HEADERS_TL
8885: SET COMMENTS = CONTRACT_COMMENTS
8886: WHERE ID = P_KHR_ID
8887: AND LANGUAGE = USERENV('LANG');
8888: END IF;
8889:
8890: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8891: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8892: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8893: RAISE OKL_API.G_EXCEPTION_ERROR;
8894: END IF;
8887: AND LANGUAGE = USERENV('LANG');
8888: END IF;
8889:
8890: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8891: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8892: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8893: RAISE OKL_API.G_EXCEPTION_ERROR;
8894: END IF;
8895:
8888: END IF;
8889:
8890: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8891: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8892: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8893: RAISE OKL_API.G_EXCEPTION_ERROR;
8894: END IF;
8895:
8896:
8889:
8890: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8891: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8892: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8893: RAISE OKL_API.G_EXCEPTION_ERROR;
8894: END IF;
8895:
8896:
8897: IF l_interim_interest <> 0 THEN
8942: ,p_income_strm_sty_id => l_pre_tax_inc_id
8943: ); --Added by bkatraga for bug 5370233
8944:
8945: prof_rate := fnd_profile.value('OKL_BOOK_CONTRACT_WITHOUT_IRR');
8946: IF ((lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) OR
8947: (lx_return_status = OKL_API.G_RET_STS_ERROR)) AND
8948: (nvl(prof_rate, 'N') = 'Y') THEN
8949:
8950: lx_return_status := OKL_API.G_RET_STS_SUCCESS;
8943: ); --Added by bkatraga for bug 5370233
8944:
8945: prof_rate := fnd_profile.value('OKL_BOOK_CONTRACT_WITHOUT_IRR');
8946: IF ((lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) OR
8947: (lx_return_status = OKL_API.G_RET_STS_ERROR)) AND
8948: (nvl(prof_rate, 'N') = 'Y') THEN
8949:
8950: lx_return_status := OKL_API.G_RET_STS_SUCCESS;
8951: OKL_API.init_msg_list( 'T' );
8946: IF ((lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) OR
8947: (lx_return_status = OKL_API.G_RET_STS_ERROR)) AND
8948: (nvl(prof_rate, 'N') = 'Y') THEN
8949:
8950: lx_return_status := OKL_API.G_RET_STS_SUCCESS;
8951: OKL_API.init_msg_list( 'T' );
8952: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
8953: p_msg_name => 'OKL_CANNOT_CALC_IIR');
8954: contract_comments := fnd_message.get_string(OKL_API.G_APP_NAME,
8947: (lx_return_status = OKL_API.G_RET_STS_ERROR)) AND
8948: (nvl(prof_rate, 'N') = 'Y') THEN
8949:
8950: lx_return_status := OKL_API.G_RET_STS_SUCCESS;
8951: OKL_API.init_msg_list( 'T' );
8952: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
8953: p_msg_name => 'OKL_CANNOT_CALC_IIR');
8954: contract_comments := fnd_message.get_string(OKL_API.G_APP_NAME,
8955: 'OKL_CANNOT_CALC_IIR');
8948: (nvl(prof_rate, 'N') = 'Y') THEN
8949:
8950: lx_return_status := OKL_API.G_RET_STS_SUCCESS;
8951: OKL_API.init_msg_list( 'T' );
8952: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
8953: p_msg_name => 'OKL_CANNOT_CALC_IIR');
8954: contract_comments := fnd_message.get_string(OKL_API.G_APP_NAME,
8955: 'OKL_CANNOT_CALC_IIR');
8956:
8950: lx_return_status := OKL_API.G_RET_STS_SUCCESS;
8951: OKL_API.init_msg_list( 'T' );
8952: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
8953: p_msg_name => 'OKL_CANNOT_CALC_IIR');
8954: contract_comments := fnd_message.get_string(OKL_API.G_APP_NAME,
8955: 'OKL_CANNOT_CALC_IIR');
8956:
8957: UPDATE OKC_K_HEADERS_TL
8958: SET COMMENTS = CONTRACT_COMMENTS
8958: SET COMMENTS = CONTRACT_COMMENTS
8959: WHERE ID = P_KHR_ID
8960: AND LANGUAGE = USERENV('LANG');
8961: END IF;
8962: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8963: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8964: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8965: RAISE OKL_API.G_EXCEPTION_ERROR;
8966: END IF;
8959: WHERE ID = P_KHR_ID
8960: AND LANGUAGE = USERENV('LANG');
8961: END IF;
8962: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8963: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8964: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8965: RAISE OKL_API.G_EXCEPTION_ERROR;
8966: END IF;
8967:
8960: AND LANGUAGE = USERENV('LANG');
8961: END IF;
8962: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8963: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8964: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8965: RAISE OKL_API.G_EXCEPTION_ERROR;
8966: END IF;
8967:
8968: IF l_interim_interest <> 0 THEN
8961: END IF;
8962: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8963: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8964: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8965: RAISE OKL_API.G_EXCEPTION_ERROR;
8966: END IF;
8967:
8968: IF l_interim_interest <> 0 THEN
8969: i := i + 1;
8990: print( l_prog_name, ' deal type ' || l_deal_type );
8991: print( l_prog_name, ' fee type ' || l_fee_type );
8992: print( l_prog_name, ' count ' || l_pre_tax_inc_tbl.COUNT);
8993:
8994: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8995: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8996: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8997: RAISE OKL_API.G_EXCEPTION_ERROR;
8998: END IF;
8991: print( l_prog_name, ' fee type ' || l_fee_type );
8992: print( l_prog_name, ' count ' || l_pre_tax_inc_tbl.COUNT);
8993:
8994: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8995: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8996: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8997: RAISE OKL_API.G_EXCEPTION_ERROR;
8998: END IF;
8999:
8992: print( l_prog_name, ' count ' || l_pre_tax_inc_tbl.COUNT);
8993:
8994: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8995: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8996: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8997: RAISE OKL_API.G_EXCEPTION_ERROR;
8998: END IF;
8999:
9000:
8993:
8994: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
8995: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
8996: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
8997: RAISE OKL_API.G_EXCEPTION_ERROR;
8998: END IF;
8999:
9000:
9001: --print( l_prog_name, ' inserting principal ' );
9012: p_purpose_code => l_purpose_code,
9013: x_stmv_rec => l_stmv_rec,
9014: x_return_status => lx_return_status);
9015:
9016: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9017: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9018: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9019: RAISE OKL_API.G_EXCEPTION_ERROR;
9020: END IF;
9013: x_stmv_rec => l_stmv_rec,
9014: x_return_status => lx_return_status);
9015:
9016: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9017: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9018: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9019: RAISE OKL_API.G_EXCEPTION_ERROR;
9020: END IF;
9021:
9014: x_return_status => lx_return_status);
9015:
9016: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9017: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9018: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9019: RAISE OKL_API.G_EXCEPTION_ERROR;
9020: END IF;
9021:
9022: lx_return_status := Okl_Streams_Util.round_streams_amount_esg(
9015:
9016: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9017: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9018: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9019: RAISE OKL_API.G_EXCEPTION_ERROR;
9020: END IF;
9021:
9022: lx_return_status := Okl_Streams_Util.round_streams_amount_esg(
9023: p_api_version => g_api_version,
9033: p_rounding_rule => G_ROUNDING_RULE,
9034: p_apply_rnd_diff=> G_DIFF_LOOKUP_CODE);
9035:
9036: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
9037: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9038: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
9039: RAISE OKL_API.G_EXCEPTION_ERROR;
9040: END IF;
9041:
9035:
9036: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
9037: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9038: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
9039: RAISE OKL_API.G_EXCEPTION_ERROR;
9040: END IF;
9041:
9042: l_principal_tbl.DELETE;
9043: l_principal_tbl := lx_selv_tbl;
9050: p_stmv_rec => l_stmv_rec,
9051: p_selv_tbl => l_principal_tbl,
9052: x_stmv_rec => lx_stmv_rec,
9053: x_selv_tbl => lx_selv_tbl);
9054: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9055: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9056: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9057: RAISE OKL_API.G_EXCEPTION_ERROR;
9058: END IF;
9051: p_selv_tbl => l_principal_tbl,
9052: x_stmv_rec => lx_stmv_rec,
9053: x_selv_tbl => lx_selv_tbl);
9054: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9055: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9056: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9057: RAISE OKL_API.G_EXCEPTION_ERROR;
9058: END IF;
9059: END IF;
9052: x_stmv_rec => lx_stmv_rec,
9053: x_selv_tbl => lx_selv_tbl);
9054: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9055: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9056: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9057: RAISE OKL_API.G_EXCEPTION_ERROR;
9058: END IF;
9059: END IF;
9060: --print( l_prog_name, ' inserting interest ' );
9053: x_selv_tbl => lx_selv_tbl);
9054: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9055: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9056: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9057: RAISE OKL_API.G_EXCEPTION_ERROR;
9058: END IF;
9059: END IF;
9060: --print( l_prog_name, ' inserting interest ' );
9061: IF l_interest_tbl.COUNT > 0 AND ( l_interest_id IS NOT NULL) AND
9073: p_purpose_code => l_purpose_code,
9074: x_stmv_rec => l_stmv_rec,
9075: x_return_status => lx_return_status);
9076:
9077: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9078: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9079: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9080: RAISE OKL_API.G_EXCEPTION_ERROR;
9081: END IF;
9074: x_stmv_rec => l_stmv_rec,
9075: x_return_status => lx_return_status);
9076:
9077: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9078: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9079: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9080: RAISE OKL_API.G_EXCEPTION_ERROR;
9081: END IF;
9082:
9075: x_return_status => lx_return_status);
9076:
9077: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9078: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9079: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9080: RAISE OKL_API.G_EXCEPTION_ERROR;
9081: END IF;
9082:
9083: lx_return_status := Okl_Streams_Util.round_streams_amount_esg(
9076:
9077: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9078: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9079: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9080: RAISE OKL_API.G_EXCEPTION_ERROR;
9081: END IF;
9082:
9083: lx_return_status := Okl_Streams_Util.round_streams_amount_esg(
9084: p_api_version => g_api_version,
9094: p_rounding_rule => G_ROUNDING_RULE,
9095: p_apply_rnd_diff=> G_DIFF_LOOKUP_CODE);
9096:
9097: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
9098: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9099: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
9100: RAISE OKL_API.G_EXCEPTION_ERROR;
9101: END IF;
9102:
9096:
9097: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
9098: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9099: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
9100: RAISE OKL_API.G_EXCEPTION_ERROR;
9101: END IF;
9102:
9103: l_interest_tbl.DELETE;
9104: l_interest_tbl := lx_selv_tbl;
9113: p_selv_tbl => l_interest_tbl,
9114: x_stmv_rec => lx_stmv_rec,
9115: x_selv_tbl => lx_selv_tbl);
9116:
9117: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9118: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9119: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9120: RAISE OKL_API.G_EXCEPTION_ERROR;
9121: END IF;
9114: x_stmv_rec => lx_stmv_rec,
9115: x_selv_tbl => lx_selv_tbl);
9116:
9117: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9118: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9119: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9120: RAISE OKL_API.G_EXCEPTION_ERROR;
9121: END IF;
9122: END IF;
9115: x_selv_tbl => lx_selv_tbl);
9116:
9117: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9118: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9119: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9120: RAISE OKL_API.G_EXCEPTION_ERROR;
9121: END IF;
9122: END IF;
9123: -- print( l_prog_name, ' inserting prin bal ' );
9116:
9117: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9118: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9119: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9120: RAISE OKL_API.G_EXCEPTION_ERROR;
9121: END IF;
9122: END IF;
9123: -- print( l_prog_name, ' inserting prin bal ' );
9124: IF l_prin_bal_tbl.COUNT > 0 AND (l_prin_bal_id IS NOT NULL) AND
9134: p_purpose_code => l_purpose_code,
9135: x_stmv_rec => l_stmv_rec,
9136: x_return_status => lx_return_status);
9137:
9138: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9139: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9140: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9141: RAISE OKL_API.G_EXCEPTION_ERROR;
9142: END IF;
9135: x_stmv_rec => l_stmv_rec,
9136: x_return_status => lx_return_status);
9137:
9138: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9139: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9140: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9141: RAISE OKL_API.G_EXCEPTION_ERROR;
9142: END IF;
9143:
9136: x_return_status => lx_return_status);
9137:
9138: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9139: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9140: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9141: RAISE OKL_API.G_EXCEPTION_ERROR;
9142: END IF;
9143:
9144: lx_return_status := Okl_Streams_Util.round_streams_amount_esg(
9137:
9138: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9139: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9140: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9141: RAISE OKL_API.G_EXCEPTION_ERROR;
9142: END IF;
9143:
9144: lx_return_status := Okl_Streams_Util.round_streams_amount_esg(
9145: p_api_version => g_api_version,
9155: p_rounding_rule => G_ROUNDING_RULE,
9156: p_apply_rnd_diff=> G_DIFF_LOOKUP_CODE);
9157:
9158: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
9159: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9160: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
9161: RAISE OKL_API.G_EXCEPTION_ERROR;
9162: END IF;
9163:
9157:
9158: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
9159: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9160: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
9161: RAISE OKL_API.G_EXCEPTION_ERROR;
9162: END IF;
9163:
9164: l_prin_bal_tbl.DELETE;
9165: l_prin_bal_tbl := lx_selv_tbl;
9173: p_selv_tbl => l_prin_bal_tbl,
9174: x_stmv_rec => lx_stmv_rec,
9175: x_selv_tbl => lx_selv_tbl);
9176:
9177: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9178: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9179: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9180: RAISE OKL_API.G_EXCEPTION_ERROR;
9181: END IF;
9174: x_stmv_rec => lx_stmv_rec,
9175: x_selv_tbl => lx_selv_tbl);
9176:
9177: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9178: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9179: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9180: RAISE OKL_API.G_EXCEPTION_ERROR;
9181: END IF;
9182: END IF;
9175: x_selv_tbl => lx_selv_tbl);
9176:
9177: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9178: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9179: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9180: RAISE OKL_API.G_EXCEPTION_ERROR;
9181: END IF;
9182: END IF;
9183:
9176:
9177: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9178: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9179: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9180: RAISE OKL_API.G_EXCEPTION_ERROR;
9181: END IF;
9182: END IF;
9183:
9184: -- print( l_prog_name, ' inserting termin ' );
9189: p_purpose_code => l_purpose_code,
9190: x_stmv_rec => l_stmv_rec,
9191: x_return_status => lx_return_status);
9192:
9193: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9194: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9195: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9196: RAISE OKL_API.G_EXCEPTION_ERROR;
9197: END IF;
9190: x_stmv_rec => l_stmv_rec,
9191: x_return_status => lx_return_status);
9192:
9193: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9194: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9195: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9196: RAISE OKL_API.G_EXCEPTION_ERROR;
9197: END IF;
9198:
9191: x_return_status => lx_return_status);
9192:
9193: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9194: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9195: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9196: RAISE OKL_API.G_EXCEPTION_ERROR;
9197: END IF;
9198:
9199: lx_return_status := Okl_Streams_Util.round_streams_amount_esg(
9192:
9193: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9194: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9195: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9196: RAISE OKL_API.G_EXCEPTION_ERROR;
9197: END IF;
9198:
9199: lx_return_status := Okl_Streams_Util.round_streams_amount_esg(
9200: p_api_version => g_api_version,
9210: p_rounding_rule => G_ROUNDING_RULE,
9211: p_apply_rnd_diff=> G_DIFF_LOOKUP_CODE);
9212:
9213: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
9214: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9215: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
9216: RAISE OKL_API.G_EXCEPTION_ERROR;
9217: END IF;
9218:
9212:
9213: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
9214: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9215: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
9216: RAISE OKL_API.G_EXCEPTION_ERROR;
9217: END IF;
9218:
9219: l_termination_tbl.DELETE;
9220: l_termination_tbl := lx_selv_tbl;
9227: p_stmv_rec => l_stmv_rec,
9228: p_selv_tbl => l_termination_tbl,
9229: x_stmv_rec => lx_stmv_rec,
9230: x_selv_tbl => lx_selv_tbl);
9231: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9232: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9233: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9234: RAISE OKL_API.G_EXCEPTION_ERROR;
9235: END IF;
9228: p_selv_tbl => l_termination_tbl,
9229: x_stmv_rec => lx_stmv_rec,
9230: x_selv_tbl => lx_selv_tbl);
9231: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9232: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9233: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9234: RAISE OKL_API.G_EXCEPTION_ERROR;
9235: END IF;
9236: END IF;
9229: x_stmv_rec => lx_stmv_rec,
9230: x_selv_tbl => lx_selv_tbl);
9231: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9232: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9233: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9234: RAISE OKL_API.G_EXCEPTION_ERROR;
9235: END IF;
9236: END IF;
9237: -- print( l_prog_name, ' inserting pre-tax ' );
9230: x_selv_tbl => lx_selv_tbl);
9231: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9232: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9233: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9234: RAISE OKL_API.G_EXCEPTION_ERROR;
9235: END IF;
9236: END IF;
9237: -- print( l_prog_name, ' inserting pre-tax ' );
9238: IF l_pre_tax_inc_tbl.COUNT > 0 AND (l_pre_tax_inc_id is NOT NULL) THEN
9242: p_purpose_code => l_purpose_code,
9243: x_stmv_rec => l_stmv_rec,
9244: x_return_status => lx_return_status);
9245:
9246: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9247: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9248: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9249: RAISE OKL_API.G_EXCEPTION_ERROR;
9250: END IF;
9243: x_stmv_rec => l_stmv_rec,
9244: x_return_status => lx_return_status);
9245:
9246: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9247: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9248: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9249: RAISE OKL_API.G_EXCEPTION_ERROR;
9250: END IF;
9251:
9244: x_return_status => lx_return_status);
9245:
9246: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9247: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9248: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9249: RAISE OKL_API.G_EXCEPTION_ERROR;
9250: END IF;
9251:
9252: lx_return_status := Okl_Streams_Util.round_streams_amount_esg(
9245:
9246: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9247: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9248: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9249: RAISE OKL_API.G_EXCEPTION_ERROR;
9250: END IF;
9251:
9252: lx_return_status := Okl_Streams_Util.round_streams_amount_esg(
9253: p_api_version => g_api_version,
9263: p_rounding_rule => G_ROUNDING_RULE,
9264: p_apply_rnd_diff=> G_DIFF_LOOKUP_CODE);
9265:
9266: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
9267: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9268: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
9269: RAISE OKL_API.G_EXCEPTION_ERROR;
9270: END IF;
9271:
9265:
9266: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
9267: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9268: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
9269: RAISE OKL_API.G_EXCEPTION_ERROR;
9270: END IF;
9271:
9272: l_pre_tax_inc_tbl.DELETE;
9273: l_pre_tax_inc_tbl := lx_selv_tbl;
9281: p_selv_tbl => l_pre_tax_inc_tbl,
9282: x_stmv_rec => lx_stmv_rec,
9283: x_selv_tbl => lx_selv_tbl);
9284:
9285: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9286: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9287: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9288: RAISE OKL_API.G_EXCEPTION_ERROR;
9289: END IF;
9282: x_stmv_rec => lx_stmv_rec,
9283: x_selv_tbl => lx_selv_tbl);
9284:
9285: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9286: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9287: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9288: RAISE OKL_API.G_EXCEPTION_ERROR;
9289: END IF;
9290: END IF;
9283: x_selv_tbl => lx_selv_tbl);
9284:
9285: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9286: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9287: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9288: RAISE OKL_API.G_EXCEPTION_ERROR;
9289: END IF;
9290: END IF;
9291: -- Clear out data structures
9284:
9285: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9286: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9287: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9288: RAISE OKL_API.G_EXCEPTION_ERROR;
9289: END IF;
9290: END IF;
9291: -- Clear out data structures
9292: l_principal_tbl.delete;
9317: p_klev_tbl => l_klev_tbl,
9318: p_edit_mode => 'N',
9319: x_clev_tbl => x_clev_tbl,
9320: x_klev_tbl => x_klev_tbl);
9321: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9322: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9323: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9324: RAISE OKL_API.G_EXCEPTION_ERROR;
9325: END IF;
9318: p_edit_mode => 'N',
9319: x_clev_tbl => x_clev_tbl,
9320: x_klev_tbl => x_klev_tbl);
9321: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9322: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9323: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9324: RAISE OKL_API.G_EXCEPTION_ERROR;
9325: END IF;
9326: End If;
9319: x_clev_tbl => x_clev_tbl,
9320: x_klev_tbl => x_klev_tbl);
9321: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9322: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9323: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9324: RAISE OKL_API.G_EXCEPTION_ERROR;
9325: END IF;
9326: End If;
9327: END IF;
9320: x_klev_tbl => x_klev_tbl);
9321: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9322: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9323: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9324: RAISE OKL_API.G_EXCEPTION_ERROR;
9325: END IF;
9326: End If;
9327: END IF;
9328: END IF;
9336: ---------------------------------------------
9337:
9338: IF l_payment_count = 0 THEN
9339:
9340: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
9341: p_msg_name => 'OKL_NO_SLL_DEFINED');
9342:
9343: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9344:
9339:
9340: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
9341: p_msg_name => 'OKL_NO_SLL_DEFINED');
9342:
9343: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9344:
9345: END IF;
9346:
9347: -- Calculate IRR after all inflow stream elements have been generated but before accrual
9361: x_return_status => lx_return_status);
9362:
9363: prof_rate := fnd_profile.value('OKL_BOOK_CONTRACT_WITHOUT_IRR');
9364:
9365: IF ((lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) OR
9366: (lx_return_status = OKL_API.G_RET_STS_ERROR)) AND
9367: (nvl(prof_rate, 'N') = 'Y') THEN
9368:
9369: lx_return_status := OKL_API.G_RET_STS_SUCCESS;
9362:
9363: prof_rate := fnd_profile.value('OKL_BOOK_CONTRACT_WITHOUT_IRR');
9364:
9365: IF ((lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) OR
9366: (lx_return_status = OKL_API.G_RET_STS_ERROR)) AND
9367: (nvl(prof_rate, 'N') = 'Y') THEN
9368:
9369: lx_return_status := OKL_API.G_RET_STS_SUCCESS;
9370: OKL_API.init_msg_list( 'T' );
9365: IF ((lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) OR
9366: (lx_return_status = OKL_API.G_RET_STS_ERROR)) AND
9367: (nvl(prof_rate, 'N') = 'Y') THEN
9368:
9369: lx_return_status := OKL_API.G_RET_STS_SUCCESS;
9370: OKL_API.init_msg_list( 'T' );
9371: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
9372: p_msg_name => 'OKL_CANNOT_CALC_IIR');
9373:
9366: (lx_return_status = OKL_API.G_RET_STS_ERROR)) AND
9367: (nvl(prof_rate, 'N') = 'Y') THEN
9368:
9369: lx_return_status := OKL_API.G_RET_STS_SUCCESS;
9370: OKL_API.init_msg_list( 'T' );
9371: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
9372: p_msg_name => 'OKL_CANNOT_CALC_IIR');
9373:
9374: -- select nvl(comments, '') into contract_comments
9367: (nvl(prof_rate, 'N') = 'Y') THEN
9368:
9369: lx_return_status := OKL_API.G_RET_STS_SUCCESS;
9370: OKL_API.init_msg_list( 'T' );
9371: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
9372: p_msg_name => 'OKL_CANNOT_CALC_IIR');
9373:
9374: -- select nvl(comments, '') into contract_comments
9375: -- from okc_K_headers_tl
9376: -- where id = p_khr_id
9377: -- and language = userenv('LANG');
9378:
9379: -- contract_comments := concat(contract_comments, ' : ');
9380: contract_comments := fnd_message.get_string(OKL_API.G_APP_NAME,'OKL_CANNOT_CALC_IIR');
9381:
9382: update okc_K_headers_tl
9383: set comments = contract_comments
9384: where id = p_khr_id
9385: and language = userenv('LANG');
9386:
9387: End If;
9388:
9389: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9390: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9391: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9392: RAISE OKL_API.G_EXCEPTION_ERROR;
9393: END IF;
9386:
9387: End If;
9388:
9389: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9390: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9391: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9392: RAISE OKL_API.G_EXCEPTION_ERROR;
9393: END IF;
9394:
9387: End If;
9388:
9389: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9390: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9391: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9392: RAISE OKL_API.G_EXCEPTION_ERROR;
9393: END IF;
9394:
9395: x_contract_rates.sub_pre_tax_irr := l_sub_pre_tax_irr;
9388:
9389: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9390: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9391: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9392: RAISE OKL_API.G_EXCEPTION_ERROR;
9393: END IF;
9394:
9395: x_contract_rates.sub_pre_tax_irr := l_sub_pre_tax_irr;
9396:
9405: x_return_status => lx_return_status);
9406:
9407: prof_rate := fnd_profile.value('OKL_BOOK_CONTRACT_WITHOUT_IRR');
9408:
9409: IF ((lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) OR
9410: (lx_return_status = OKL_API.G_RET_STS_ERROR)) AND
9411: (nvl(prof_rate, 'N') = 'Y') THEN
9412:
9413: lx_return_status := OKL_API.G_RET_STS_SUCCESS;
9406:
9407: prof_rate := fnd_profile.value('OKL_BOOK_CONTRACT_WITHOUT_IRR');
9408:
9409: IF ((lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) OR
9410: (lx_return_status = OKL_API.G_RET_STS_ERROR)) AND
9411: (nvl(prof_rate, 'N') = 'Y') THEN
9412:
9413: lx_return_status := OKL_API.G_RET_STS_SUCCESS;
9414: OKL_API.init_msg_list( 'T' );
9409: IF ((lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) OR
9410: (lx_return_status = OKL_API.G_RET_STS_ERROR)) AND
9411: (nvl(prof_rate, 'N') = 'Y') THEN
9412:
9413: lx_return_status := OKL_API.G_RET_STS_SUCCESS;
9414: OKL_API.init_msg_list( 'T' );
9415: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
9416: p_msg_name => 'OKL_CANNOT_CALC_IIR');
9417:
9410: (lx_return_status = OKL_API.G_RET_STS_ERROR)) AND
9411: (nvl(prof_rate, 'N') = 'Y') THEN
9412:
9413: lx_return_status := OKL_API.G_RET_STS_SUCCESS;
9414: OKL_API.init_msg_list( 'T' );
9415: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
9416: p_msg_name => 'OKL_CANNOT_CALC_IIR');
9417:
9418: -- select nvl(comments, '') into contract_comments
9411: (nvl(prof_rate, 'N') = 'Y') THEN
9412:
9413: lx_return_status := OKL_API.G_RET_STS_SUCCESS;
9414: OKL_API.init_msg_list( 'T' );
9415: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
9416: p_msg_name => 'OKL_CANNOT_CALC_IIR');
9417:
9418: -- select nvl(comments, '') into contract_comments
9419: -- from okc_K_headers_tl
9420: -- where id = p_khr_id
9421: -- and language = userenv('LANG');
9422:
9423: -- contract_comments := concat(contract_comments, ' : ');
9424: contract_comments := fnd_message.get_string(OKL_API.G_APP_NAME,'OKL_CANNOT_CALC_IIR');
9425:
9426: update okc_K_headers_tl
9427: set comments = contract_comments
9428: where id = p_khr_id
9429: and language = userenv('LANG');
9430:
9431: End If;
9432:
9433: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9434: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9435: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9436: RAISE OKL_API.G_EXCEPTION_ERROR;
9437: END IF;
9430:
9431: End If;
9432:
9433: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9434: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9435: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9436: RAISE OKL_API.G_EXCEPTION_ERROR;
9437: END IF;
9438:
9431: End If;
9432:
9433: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9434: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9435: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9436: RAISE OKL_API.G_EXCEPTION_ERROR;
9437: END IF;
9438:
9439: x_contract_rates.sub_impl_interest_rate := l_sub_pre_tax_irr;
9432:
9433: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9434: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9435: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9436: RAISE OKL_API.G_EXCEPTION_ERROR;
9437: END IF;
9438:
9439: x_contract_rates.sub_impl_interest_rate := l_sub_pre_tax_irr;
9440:
9451: x_return_status => lx_return_status);
9452:
9453: prof_rate := fnd_profile.value('OKL_BOOK_CONTRACT_WITHOUT_IRR');
9454:
9455: IF ((lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) OR
9456: (lx_return_status = OKL_API.G_RET_STS_ERROR)) AND
9457: (nvl(prof_rate, 'N') = 'Y') THEN
9458:
9459: lx_return_status := OKL_API.G_RET_STS_SUCCESS;
9452:
9453: prof_rate := fnd_profile.value('OKL_BOOK_CONTRACT_WITHOUT_IRR');
9454:
9455: IF ((lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) OR
9456: (lx_return_status = OKL_API.G_RET_STS_ERROR)) AND
9457: (nvl(prof_rate, 'N') = 'Y') THEN
9458:
9459: lx_return_status := OKL_API.G_RET_STS_SUCCESS;
9460: OKL_API.init_msg_list( 'T' );
9455: IF ((lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) OR
9456: (lx_return_status = OKL_API.G_RET_STS_ERROR)) AND
9457: (nvl(prof_rate, 'N') = 'Y') THEN
9458:
9459: lx_return_status := OKL_API.G_RET_STS_SUCCESS;
9460: OKL_API.init_msg_list( 'T' );
9461: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
9462: p_msg_name => 'OKL_CANNOT_CALC_IIR');
9463:
9456: (lx_return_status = OKL_API.G_RET_STS_ERROR)) AND
9457: (nvl(prof_rate, 'N') = 'Y') THEN
9458:
9459: lx_return_status := OKL_API.G_RET_STS_SUCCESS;
9460: OKL_API.init_msg_list( 'T' );
9461: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
9462: p_msg_name => 'OKL_CANNOT_CALC_IIR');
9463:
9464: -- select nvl(comments, '') into contract_comments
9457: (nvl(prof_rate, 'N') = 'Y') THEN
9458:
9459: lx_return_status := OKL_API.G_RET_STS_SUCCESS;
9460: OKL_API.init_msg_list( 'T' );
9461: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
9462: p_msg_name => 'OKL_CANNOT_CALC_IIR');
9463:
9464: -- select nvl(comments, '') into contract_comments
9465: -- from okc_K_headers_tl
9466: -- where id = p_khr_id
9467: -- and language = userenv('LANG');
9468:
9469: -- contract_comments := concat(contract_comments, ' : ');
9470: contract_comments := fnd_message.get_string(OKL_API.G_APP_NAME,'OKL_CANNOT_CALC_IIR');
9471:
9472: update okc_K_headers_tl
9473: set comments = contract_comments
9474: where id = p_khr_id
9476:
9477: End If;
9478:
9479: print( l_prog_name, ' compute irr ', lx_return_status );
9480: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9481: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9482: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9483: RAISE OKL_API.G_EXCEPTION_ERROR;
9484: END IF;
9477: End If;
9478:
9479: print( l_prog_name, ' compute irr ', lx_return_status );
9480: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9481: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9482: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9483: RAISE OKL_API.G_EXCEPTION_ERROR;
9484: END IF;
9485:
9478:
9479: print( l_prog_name, ' compute irr ', lx_return_status );
9480: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9481: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9482: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9483: RAISE OKL_API.G_EXCEPTION_ERROR;
9484: END IF;
9485:
9486: print( l_prog_name, ' pre tax irr ' || to_char( nvl(l_pre_tax_irr, -999) ) , lx_return_status );
9479: print( l_prog_name, ' compute irr ', lx_return_status );
9480: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9481: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9482: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9483: RAISE OKL_API.G_EXCEPTION_ERROR;
9484: END IF;
9485:
9486: print( l_prog_name, ' pre tax irr ' || to_char( nvl(l_pre_tax_irr, -999) ) , lx_return_status );
9487: x_contract_rates.pre_tax_irr := l_pre_tax_irr;
9497: x_return_status => lx_return_status);
9498:
9499: prof_rate := fnd_profile.value('OKL_BOOK_CONTRACT_WITHOUT_IRR');
9500:
9501: IF ((lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) OR
9502: (lx_return_status = OKL_API.G_RET_STS_ERROR)) AND
9503: (nvl(prof_rate, 'N') = 'Y') THEN
9504:
9505: lx_return_status := OKL_API.G_RET_STS_SUCCESS;
9498:
9499: prof_rate := fnd_profile.value('OKL_BOOK_CONTRACT_WITHOUT_IRR');
9500:
9501: IF ((lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) OR
9502: (lx_return_status = OKL_API.G_RET_STS_ERROR)) AND
9503: (nvl(prof_rate, 'N') = 'Y') THEN
9504:
9505: lx_return_status := OKL_API.G_RET_STS_SUCCESS;
9506: OKL_API.init_msg_list( 'T' );
9501: IF ((lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) OR
9502: (lx_return_status = OKL_API.G_RET_STS_ERROR)) AND
9503: (nvl(prof_rate, 'N') = 'Y') THEN
9504:
9505: lx_return_status := OKL_API.G_RET_STS_SUCCESS;
9506: OKL_API.init_msg_list( 'T' );
9507: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
9508: p_msg_name => 'OKL_CANNOT_CALC_IIR');
9509:
9502: (lx_return_status = OKL_API.G_RET_STS_ERROR)) AND
9503: (nvl(prof_rate, 'N') = 'Y') THEN
9504:
9505: lx_return_status := OKL_API.G_RET_STS_SUCCESS;
9506: OKL_API.init_msg_list( 'T' );
9507: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
9508: p_msg_name => 'OKL_CANNOT_CALC_IIR');
9509:
9510: -- select nvl(comments, '') into contract_comments
9503: (nvl(prof_rate, 'N') = 'Y') THEN
9504:
9505: lx_return_status := OKL_API.G_RET_STS_SUCCESS;
9506: OKL_API.init_msg_list( 'T' );
9507: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
9508: p_msg_name => 'OKL_CANNOT_CALC_IIR');
9509:
9510: -- select nvl(comments, '') into contract_comments
9511: -- from okc_K_headers_tl
9512: -- where id = p_khr_id
9513: -- and language = userenv('LANG');
9514:
9515: -- contract_comments := concat(contract_comments, ' : ');
9516: contract_comments := fnd_message.get_string(OKL_API.G_APP_NAME,'OKL_CANNOT_CALC_IIR');
9517:
9518: update okc_K_headers_tl
9519: set comments = contract_comments
9520: where id = p_khr_id
9522:
9523: End If;
9524:
9525: -- print( l_prog_name, ' compute iir ', lx_return_status );
9526: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9527: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9528: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9529: RAISE OKL_API.G_EXCEPTION_ERROR;
9530: END IF;
9523: End If;
9524:
9525: -- print( l_prog_name, ' compute iir ', lx_return_status );
9526: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9527: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9528: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9529: RAISE OKL_API.G_EXCEPTION_ERROR;
9530: END IF;
9531:
9524:
9525: -- print( l_prog_name, ' compute iir ', lx_return_status );
9526: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9527: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9528: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9529: RAISE OKL_API.G_EXCEPTION_ERROR;
9530: END IF;
9531:
9532: print( l_prog_name, ' pre tax iir ' || to_char( nvl(l_pre_tax_irr, -999) ) , lx_return_status );
9525: -- print( l_prog_name, ' compute iir ', lx_return_status );
9526: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9527: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9528: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9529: RAISE OKL_API.G_EXCEPTION_ERROR;
9530: END IF;
9531:
9532: print( l_prog_name, ' pre tax iir ' || to_char( nvl(l_pre_tax_irr, -999) ) , lx_return_status );
9533: x_contract_rates.implicit_interest_rate := l_pre_tax_irr;
9551: p_purpose_code => l_purpose_code,
9552: x_return_status => lx_return_status,
9553: x_msg_count => x_msg_count,
9554: x_msg_data => x_msg_data);
9555: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9556: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9557: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9558: RAISE OKL_API.G_EXCEPTION_ERROR;
9559: END IF;
9552: x_return_status => lx_return_status,
9553: x_msg_count => x_msg_count,
9554: x_msg_data => x_msg_data);
9555: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9556: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9557: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9558: RAISE OKL_API.G_EXCEPTION_ERROR;
9559: END IF;
9560: END IF;
9553: x_msg_count => x_msg_count,
9554: x_msg_data => x_msg_data);
9555: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9556: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9557: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9558: RAISE OKL_API.G_EXCEPTION_ERROR;
9559: END IF;
9560: END IF;
9561: --end bkatraga
9554: x_msg_data => x_msg_data);
9555: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9556: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9557: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9558: RAISE OKL_API.G_EXCEPTION_ERROR;
9559: END IF;
9560: END IF;
9561: --end bkatraga
9562:
9568: x_sty_id => l_sty_id,
9569: x_sty_name => l_sty_name,
9570: x_return_status => lx_return_status);
9571:
9572: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9573: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9574: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9575: RAISE OKL_API.G_EXCEPTION_ERROR;
9576: END IF;
9569: x_sty_name => l_sty_name,
9570: x_return_status => lx_return_status);
9571:
9572: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9573: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9574: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9575: RAISE OKL_API.G_EXCEPTION_ERROR;
9576: END IF;
9577:
9570: x_return_status => lx_return_status);
9571:
9572: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9573: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9574: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9575: RAISE OKL_API.G_EXCEPTION_ERROR;
9576: END IF;
9577:
9578: l_primary_sty_id := l_sty_id;
9571:
9572: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9573: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9574: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9575: RAISE OKL_API.G_EXCEPTION_ERROR;
9576: END IF;
9577:
9578: l_primary_sty_id := l_sty_id;
9579: -- Changed by RGOOTY: Start
9598: -- Per MKMITTAL, payments defined from LLA UI are implicitly billable. And
9599: -- every billable payment must generate accrual (MKMITTAL, SRAWLING)
9600:
9601: If( TO_NUMBER(nvl(l_inflow.periods, 0)) > 1 ) Then
9602: l_recurr_yn := OKL_API.G_TRUE;
9603: ElsIf( TO_NUMBER(nvl(l_inflow.periods, 0)) = 1 ) Then
9604: l_recurr_yn := OKL_API.G_FALSE;
9605: ENd If;
9606:
9600:
9601: If( TO_NUMBER(nvl(l_inflow.periods, 0)) > 1 ) Then
9602: l_recurr_yn := OKL_API.G_TRUE;
9603: ElsIf( TO_NUMBER(nvl(l_inflow.periods, 0)) = 1 ) Then
9604: l_recurr_yn := OKL_API.G_FALSE;
9605: ENd If;
9606:
9607: -- Asking ISG to get the AMORTIZED_FEE_INCOME dependent streams
9608: IF l_inflow.fee_line_level_type = 'INCOME_AMORT'
9606:
9607: -- Asking ISG to get the AMORTIZED_FEE_INCOME dependent streams
9608: IF l_inflow.fee_line_level_type = 'INCOME_AMORT'
9609: THEN
9610: l_recurr_yn := OKL_API.G_FALSE;
9611: ELSIF l_inflow.fee_line_level_type = 'INCOME_ACCRUED'
9612: THEN
9613: l_recurr_yn := OKL_API.G_TRUE;
9614: END IF;
9609: THEN
9610: l_recurr_yn := OKL_API.G_FALSE;
9611: ELSIF l_inflow.fee_line_level_type = 'INCOME_ACCRUED'
9612: THEN
9613: l_recurr_yn := OKL_API.G_TRUE;
9614: END IF;
9615: print( l_prog_name, ' l_recurr_yn : ' || l_recurr_yn );
9616: print( l_prog_name, ' lty_code : ' || l_inflow.lty_code );
9617: print( l_prog_name, ' l_primary_sty_id : ' || to_char(l_primary_sty_id) );
9631: p_hdr => r_hdr,
9632: p_rollover_pmnts => r_rollover_pmnts);
9633: print( l_prog_name, ' l_mapped_sty_name ' || to_char(l_mapped_sty_name) );
9634:
9635: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9636: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9637: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9638: RAISE OKL_API.G_EXCEPTION_ERROR;
9639: END IF;
9632: p_rollover_pmnts => r_rollover_pmnts);
9633: print( l_prog_name, ' l_mapped_sty_name ' || to_char(l_mapped_sty_name) );
9634:
9635: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9636: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9637: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9638: RAISE OKL_API.G_EXCEPTION_ERROR;
9639: END IF;
9640:
9633: print( l_prog_name, ' l_mapped_sty_name ' || to_char(l_mapped_sty_name) );
9634:
9635: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9636: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9637: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9638: RAISE OKL_API.G_EXCEPTION_ERROR;
9639: END IF;
9640:
9641: inf_start_date := l_inflow.start_date;
9634:
9635: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9636: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9637: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9638: RAISE OKL_API.G_EXCEPTION_ERROR;
9639: END IF;
9640:
9641: inf_start_date := l_inflow.start_date;
9642: l_rental_accr_stream := 'N'; --Added by RGOOTY for bug 9305846
9752: p_amount => l_inflow.origination_income,
9753: x_selv_tbl => l_selv_tbl,
9754: x_return_status => lx_return_status);
9755: print( l_prog_name, 'After calling the get_amortized_accruals API lx_return_status=' || lx_return_status );
9756: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9757: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9758: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9759: RAISE OKL_API.G_EXCEPTION_ERROR;
9760: END IF;
9753: x_selv_tbl => l_selv_tbl,
9754: x_return_status => lx_return_status);
9755: print( l_prog_name, 'After calling the get_amortized_accruals API lx_return_status=' || lx_return_status );
9756: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9757: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9758: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9759: RAISE OKL_API.G_EXCEPTION_ERROR;
9760: END IF;
9761: ELSE
9754: x_return_status => lx_return_status);
9755: print( l_prog_name, 'After calling the get_amortized_accruals API lx_return_status=' || lx_return_status );
9756: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9757: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9758: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9759: RAISE OKL_API.G_EXCEPTION_ERROR;
9760: END IF;
9761: ELSE
9762: IF l_inflow.fee_line_level_type = 'INCOME_ACCRUED' AND
9755: print( l_prog_name, 'After calling the get_amortized_accruals API lx_return_status=' || lx_return_status );
9756: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9757: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9758: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9759: RAISE OKL_API.G_EXCEPTION_ERROR;
9760: END IF;
9761: ELSE
9762: IF l_inflow.fee_line_level_type = 'INCOME_ACCRUED' AND
9763: l_inflow.origination_income IS NOT NULL AND
9809: p_currency_code => l_hdr.currency_code,
9810: x_selv_tbl => l_selv_tbl,
9811: x_return_status => lx_return_status);
9812: print( l_prog_name, 'After calling the get_accrual_elements lx_return_status=' || lx_return_status );
9813: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9814: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9815: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9816: RAISE OKL_API.G_EXCEPTION_ERROR;
9817: END IF;
9810: x_selv_tbl => l_selv_tbl,
9811: x_return_status => lx_return_status);
9812: print( l_prog_name, 'After calling the get_accrual_elements lx_return_status=' || lx_return_status );
9813: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9814: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9815: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9816: RAISE OKL_API.G_EXCEPTION_ERROR;
9817: END IF;
9818: END IF; --Added by RGOOTY for bug 9305846
9811: x_return_status => lx_return_status);
9812: print( l_prog_name, 'After calling the get_accrual_elements lx_return_status=' || lx_return_status );
9813: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9814: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9815: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9816: RAISE OKL_API.G_EXCEPTION_ERROR;
9817: END IF;
9818: END IF; --Added by RGOOTY for bug 9305846
9819: END IF;
9812: print( l_prog_name, 'After calling the get_accrual_elements lx_return_status=' || lx_return_status );
9813: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9814: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9815: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9816: RAISE OKL_API.G_EXCEPTION_ERROR;
9817: END IF;
9818: END IF; --Added by RGOOTY for bug 9305846
9819: END IF;
9820:
9822: x_sty_id => l_sty_id,
9823: x_sty_name => l_sty_name,
9824: x_return_status => lx_return_status);
9825:
9826: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9827: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9828: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9829: RAISE OKL_API.G_EXCEPTION_ERROR;
9830: END IF;
9823: x_sty_name => l_sty_name,
9824: x_return_status => lx_return_status);
9825:
9826: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9827: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9828: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9829: RAISE OKL_API.G_EXCEPTION_ERROR;
9830: END IF;
9831:
9824: x_return_status => lx_return_status);
9825:
9826: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9827: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9828: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9829: RAISE OKL_API.G_EXCEPTION_ERROR;
9830: END IF;
9831:
9832: --Modified by kthiruva on 27-May-2005
9825:
9826: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9827: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9828: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9829: RAISE OKL_API.G_EXCEPTION_ERROR;
9830: END IF;
9831:
9832: --Modified by kthiruva on 27-May-2005
9833: --Bug 4371472 - Start of Changes
9839: p_purpose_code => l_purpose_code,
9840: x_stmv_rec => l_stmv_rec,
9841: x_return_status => lx_return_status);
9842:
9843: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9844: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9845: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9846: RAISE OKL_API.G_EXCEPTION_ERROR;
9847: END IF;
9840: x_stmv_rec => l_stmv_rec,
9841: x_return_status => lx_return_status);
9842:
9843: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9844: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9845: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9846: RAISE OKL_API.G_EXCEPTION_ERROR;
9847: END IF;
9848:
9841: x_return_status => lx_return_status);
9842:
9843: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9844: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9845: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9846: RAISE OKL_API.G_EXCEPTION_ERROR;
9847: END IF;
9848:
9849: --
9842:
9843: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9844: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9845: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9846: RAISE OKL_API.G_EXCEPTION_ERROR;
9847: END IF;
9848:
9849: --
9850: -- call process API to create parent Stream Header and its child Stream Elements
9864: p_rounding_rule => G_ROUNDING_RULE,
9865: p_apply_rnd_diff=> G_DIFF_LOOKUP_CODE);
9866:
9867: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
9868: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9869: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
9870: RAISE OKL_API.G_EXCEPTION_ERROR;
9871: END IF;
9872:
9866:
9867: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
9868: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9869: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
9870: RAISE OKL_API.G_EXCEPTION_ERROR;
9871: END IF;
9872:
9873: l_selv_tbl.DELETE;
9874: l_selv_tbl := lx_selv_tbl;
9877: p_stmv_rec => l_stmv_rec,
9878: x_full_stmv_tbl => l_stmv_tbl,
9879: x_return_status => lx_return_status );
9880: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
9881: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9882: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
9883: RAISE OKL_API.G_EXCEPTION_ERROR;
9884: END IF;
9885: --Accumulate Stream Elements
9879: x_return_status => lx_return_status );
9880: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
9881: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9882: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
9883: RAISE OKL_API.G_EXCEPTION_ERROR;
9884: END IF;
9885: --Accumulate Stream Elements
9886: OKL_STREAMS_UTIL.accumulate_strm_elements(
9887: p_stm_index_no => l_stmv_tbl.LAST,
9888: p_selv_tbl => l_selv_tbl,
9889: x_full_selv_tbl => l_full_selv_tbl,
9890: x_return_status => lx_return_status );
9891: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
9892: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9893: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
9894: RAISE OKL_API.G_EXCEPTION_ERROR;
9895: END IF;
9896:
9890: x_return_status => lx_return_status );
9891: IF (lx_return_status = G_RET_STS_UNEXP_ERROR) THEN
9892: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9893: ELSIF (lx_return_status = G_RET_STS_ERROR) THEN
9894: RAISE OKL_API.G_EXCEPTION_ERROR;
9895: END IF;
9896:
9897: END IF;
9898: --Bug 4371472 - End of Changes
9928: l_stmv_tbl,
9929: l_full_selv_tbl,
9930: lx_stmv_tbl,
9931: lx_full_selv_tbl);
9932: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9933: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9934: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9935: RAISE OKL_API.G_EXCEPTION_ERROR;
9936: END IF;
9929: l_full_selv_tbl,
9930: lx_stmv_tbl,
9931: lx_full_selv_tbl);
9932: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9933: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9934: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9935: RAISE OKL_API.G_EXCEPTION_ERROR;
9936: END IF;
9937: END IF;
9930: lx_stmv_tbl,
9931: lx_full_selv_tbl);
9932: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9933: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9934: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9935: RAISE OKL_API.G_EXCEPTION_ERROR;
9936: END IF;
9937: END IF;
9938: END IF;
9931: lx_full_selv_tbl);
9932: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9933: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9934: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9935: RAISE OKL_API.G_EXCEPTION_ERROR;
9936: END IF;
9937: END IF;
9938: END IF;
9939: -- Added by RGOOTY: End
9949: x_return_status => x_return_status,
9950: x_msg_count => x_msg_count,
9951: x_msg_data => x_msg_data);
9952:
9953: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9954: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9955: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
9956: RAISE OKL_API.G_EXCEPTION_ERROR;
9957: END IF;
9950: x_msg_count => x_msg_count,
9951: x_msg_data => x_msg_data);
9952:
9953: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9954: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9955: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
9956: RAISE OKL_API.G_EXCEPTION_ERROR;
9957: END IF;
9958:
9951: x_msg_data => x_msg_data);
9952:
9953: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9954: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9955: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
9956: RAISE OKL_API.G_EXCEPTION_ERROR;
9957: END IF;
9958:
9959: print( l_prog_name, ' non gen cash flows ', x_return_status );
9952:
9953: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9954: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9955: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
9956: RAISE OKL_API.G_EXCEPTION_ERROR;
9957: END IF;
9958:
9959: print( l_prog_name, ' non gen cash flows ', x_return_status );
9960: print( l_prog_name, ' gen type ' || p_generation_type );
9973: x_return_status => lx_return_status,
9974: x_msg_count => x_msg_count,
9975: x_msg_data => x_msg_data);
9976:
9977: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9978: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9979: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9980: RAISE OKL_API.G_EXCEPTION_ERROR;
9981: END IF;
9974: x_msg_count => x_msg_count,
9975: x_msg_data => x_msg_data);
9976:
9977: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9978: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9979: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9980: RAISE OKL_API.G_EXCEPTION_ERROR;
9981: END IF;
9982:
9975: x_msg_data => x_msg_data);
9976:
9977: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9978: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9979: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9980: RAISE OKL_API.G_EXCEPTION_ERROR;
9981: END IF;
9982:
9983:
9976:
9977: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
9978: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
9979: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
9980: RAISE OKL_API.G_EXCEPTION_ERROR;
9981: END IF;
9982:
9983:
9984:
10001: x_return_status => x_return_status,
10002: x_dependent_sty_id => l_sty_id,
10003: x_dependent_sty_name => l_sty_name);
10004:
10005: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10006: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10007: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10008: RAISE OKL_API.G_EXCEPTION_ERROR;
10009: END IF;
10002: x_dependent_sty_id => l_sty_id,
10003: x_dependent_sty_name => l_sty_name);
10004:
10005: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10006: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10007: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10008: RAISE OKL_API.G_EXCEPTION_ERROR;
10009: END IF;
10010:
10003: x_dependent_sty_name => l_sty_name);
10004:
10005: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10006: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10007: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10008: RAISE OKL_API.G_EXCEPTION_ERROR;
10009: END IF;
10010:
10011: If ( l_sty_id IS NOT NULL ) Then
10004:
10005: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10006: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10007: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10008: RAISE OKL_API.G_EXCEPTION_ERROR;
10009: END IF;
10010:
10011: If ( l_sty_id IS NOT NULL ) Then
10012:
10023: End if;
10024: END IF;
10025:
10026:
10027: If ( nvl(l_blnHasFinFees, OKL_API.G_FALSE) = OKL_APi.G_TRUE ) Then
10028: -- print( l_prog_name, ' updating financed fees ' );
10029:
10030: FOR r_financed_fees in c_financed_fees
10031: LOOP
10047: x_return_status => x_return_status,
10048: x_dependent_sty_id => l_sty_id,
10049: x_dependent_sty_name => l_sty_name);
10050:
10051: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10052: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10053: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10054: RAISE OKL_API.G_EXCEPTION_ERROR;
10055: END IF;
10048: x_dependent_sty_id => l_sty_id,
10049: x_dependent_sty_name => l_sty_name);
10050:
10051: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10052: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10053: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10054: RAISE OKL_API.G_EXCEPTION_ERROR;
10055: END IF;
10056:
10049: x_dependent_sty_name => l_sty_name);
10050:
10051: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10052: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10053: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10054: RAISE OKL_API.G_EXCEPTION_ERROR;
10055: END IF;
10056:
10057: If ( l_sty_id IS NOT NULL ) Then
10050:
10051: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10052: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10053: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10054: RAISE OKL_API.G_EXCEPTION_ERROR;
10055: END IF;
10056:
10057: If ( l_sty_id IS NOT NULL ) Then
10058:
10099: p_purpose_code => l_purpose_code,
10100: x_return_status => lx_return_status);
10101: -- print( l_prog_name, ' consolidated ', lx_return_status );
10102:
10103: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10104: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10105: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
10106: RAISE OKL_API.G_EXCEPTION_ERROR;
10107: END IF;
10100: x_return_status => lx_return_status);
10101: -- print( l_prog_name, ' consolidated ', lx_return_status );
10102:
10103: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10104: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10105: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
10106: RAISE OKL_API.G_EXCEPTION_ERROR;
10107: END IF;
10108: END IF;
10101: -- print( l_prog_name, ' consolidated ', lx_return_status );
10102:
10103: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10104: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10105: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
10106: RAISE OKL_API.G_EXCEPTION_ERROR;
10107: END IF;
10108: END IF;
10109:
10102:
10103: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10104: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10105: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
10106: RAISE OKL_API.G_EXCEPTION_ERROR;
10107: END IF;
10108: END IF;
10109:
10110: IF (p_generation_type <> 'SERVICE_LINES' AND
10117: x_return_status => lx_return_status);
10118:
10119: -- print( l_prog_name, ' consolidated ', lx_return_status );
10120:
10121: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10122: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10123: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
10124: RAISE OKL_API.G_EXCEPTION_ERROR;
10125: END IF;
10118:
10119: -- print( l_prog_name, ' consolidated ', lx_return_status );
10120:
10121: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10122: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10123: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
10124: RAISE OKL_API.G_EXCEPTION_ERROR;
10125: END IF;
10126: --bakuchib changes
10119: -- print( l_prog_name, ' consolidated ', lx_return_status );
10120:
10121: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10122: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10123: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
10124: RAISE OKL_API.G_EXCEPTION_ERROR;
10125: END IF;
10126: --bakuchib changes
10127: END IF;
10120:
10121: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10122: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10123: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
10124: RAISE OKL_API.G_EXCEPTION_ERROR;
10125: END IF;
10126: --bakuchib changes
10127: END IF;
10128:
10132: p_purpose_code => l_purpose_code,
10133: x_return_status => lx_return_status);
10134: -- print( l_prog_name, ' consolidated ', lx_return_status );
10135:
10136: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10137: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10138: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
10139: RAISE OKL_API.G_EXCEPTION_ERROR;
10140: END IF;
10133: x_return_status => lx_return_status);
10134: -- print( l_prog_name, ' consolidated ', lx_return_status );
10135:
10136: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10137: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10138: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
10139: RAISE OKL_API.G_EXCEPTION_ERROR;
10140: END IF;
10141:
10134: -- print( l_prog_name, ' consolidated ', lx_return_status );
10135:
10136: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10137: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10138: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
10139: RAISE OKL_API.G_EXCEPTION_ERROR;
10140: END IF;
10141:
10142: END IF;
10135:
10136: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10137: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10138: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
10139: RAISE OKL_API.G_EXCEPTION_ERROR;
10140: END IF;
10141:
10142: END IF;
10143:
10155: ,x_return_status => lx_return_status
10156: ,x_msg_count => x_msg_count
10157: ,x_msg_data => x_msg_data
10158: );
10159: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10160: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10161: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
10162: RAISE OKL_API.G_EXCEPTION_ERROR;
10163: END IF;
10156: ,x_msg_count => x_msg_count
10157: ,x_msg_data => x_msg_data
10158: );
10159: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10160: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10161: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
10162: RAISE OKL_API.G_EXCEPTION_ERROR;
10163: END IF;
10164:
10157: ,x_msg_data => x_msg_data
10158: );
10159: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10160: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10161: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
10162: RAISE OKL_API.G_EXCEPTION_ERROR;
10163: END IF;
10164:
10165: -- 15-Sep-10 SECHAWLA 10045043 : begin
10158: );
10159: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10160: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10161: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
10162: RAISE OKL_API.G_EXCEPTION_ERROR;
10163: END IF;
10164:
10165: -- 15-Sep-10 SECHAWLA 10045043 : begin
10166: -- Added following code to generate passthru service expense accrual streams
10177: ,x_msg_count => x_msg_count
10178: ,x_msg_data => x_msg_data
10179: ) ;
10180:
10181: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10182: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10183: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
10184: RAISE OKL_API.G_EXCEPTION_ERROR;
10185: END IF;
10178: ,x_msg_data => x_msg_data
10179: ) ;
10180:
10181: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10182: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10183: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
10184: RAISE OKL_API.G_EXCEPTION_ERROR;
10185: END IF;
10186: -- 15-Sep-10 SECHAWLA 10045043 : end
10179: ) ;
10180:
10181: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10182: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10183: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
10184: RAISE OKL_API.G_EXCEPTION_ERROR;
10185: END IF;
10186: -- 15-Sep-10 SECHAWLA 10045043 : end
10187:
10180:
10181: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10182: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10183: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
10184: RAISE OKL_API.G_EXCEPTION_ERROR;
10185: END IF;
10186: -- 15-Sep-10 SECHAWLA 10045043 : end
10187:
10188:
10221: ,x_msg_data => x_msg_data
10222: ,p_chr_id => p_khr_id
10223: ,p_purpose_code => l_purpose_code
10224: ,p_source_call => 'ISG');
10225: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10226: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10227: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
10228: RAISE OKL_API.G_EXCEPTION_ERROR;
10229: END IF;
10222: ,p_chr_id => p_khr_id
10223: ,p_purpose_code => l_purpose_code
10224: ,p_source_call => 'ISG');
10225: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10226: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10227: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
10228: RAISE OKL_API.G_EXCEPTION_ERROR;
10229: END IF;
10230: END IF;
10223: ,p_purpose_code => l_purpose_code
10224: ,p_source_call => 'ISG');
10225: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10226: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10227: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
10228: RAISE OKL_API.G_EXCEPTION_ERROR;
10229: END IF;
10230: END IF;
10231: -- Bug 12944979: RGOOTY: End
10224: ,p_source_call => 'ISG');
10225: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10226: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10227: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
10228: RAISE OKL_API.G_EXCEPTION_ERROR;
10229: END IF;
10230: END IF;
10231: -- Bug 12944979: RGOOTY: End
10232:
10263: ,p_purpose_code => l_purpose_code
10264: ,x_return_status => lx_return_status
10265: ,x_msg_count => x_msg_count
10266: ,x_msg_data => x_msg_data);
10267: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10268: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10269: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
10270: RAISE OKL_API.G_EXCEPTION_ERROR;
10271: END IF;
10264: ,x_return_status => lx_return_status
10265: ,x_msg_count => x_msg_count
10266: ,x_msg_data => x_msg_data);
10267: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10268: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10269: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
10270: RAISE OKL_API.G_EXCEPTION_ERROR;
10271: END IF;
10272: END IF;
10265: ,x_msg_count => x_msg_count
10266: ,x_msg_data => x_msg_data);
10267: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10268: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10269: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
10270: RAISE OKL_API.G_EXCEPTION_ERROR;
10271: END IF;
10272: END IF;
10273:
10266: ,x_msg_data => x_msg_data);
10267: IF lx_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10268: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10269: ELSIF lx_return_status = OKL_API.G_RET_STS_ERROR THEN
10270: RAISE OKL_API.G_EXCEPTION_ERROR;
10271: END IF;
10272: END IF;
10273:
10274: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
10270: RAISE OKL_API.G_EXCEPTION_ERROR;
10271: END IF;
10272: END IF;
10273:
10274: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
10275: p_msg_name => 'OKL_STREAM_GENERATION_SUCCESS');
10276:
10277: x_return_status := G_RET_STS_SUCCESS;
10278: print( l_prog_name, 'end' );
10278: print( l_prog_name, 'end' );
10279:
10280: EXCEPTION
10281:
10282: WHEN OKL_API.G_EXCEPTION_ERROR THEN
10283:
10284: x_return_status := G_RET_STS_ERROR;
10285:
10286: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
10282: WHEN OKL_API.G_EXCEPTION_ERROR THEN
10283:
10284: x_return_status := G_RET_STS_ERROR;
10285:
10286: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
10287:
10288: x_return_status := G_RET_STS_UNEXP_ERROR;
10289:
10290: WHEN OTHERS THEN
10288: x_return_status := G_RET_STS_UNEXP_ERROR;
10289:
10290: WHEN OTHERS THEN
10291:
10292: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
10293: p_msg_name => G_DB_ERROR,
10294: p_token1 => G_PROG_NAME_TOKEN,
10295: p_token1_value => l_prog_name,
10296: p_token2 => G_SQLCODE_TOKEN,
10420:
10421: BEGIN
10422: print( l_api_name, 'begin' );
10423:
10424: x_return_status := OKL_API.G_RET_STS_SUCCESS;
10425:
10426: x_return_status := OKL_API.START_ACTIVITY(
10427: p_api_name => l_api_name,
10428: p_pkg_name => g_pkg_name,
10422: print( l_api_name, 'begin' );
10423:
10424: x_return_status := OKL_API.G_RET_STS_SUCCESS;
10425:
10426: x_return_status := OKL_API.START_ACTIVITY(
10427: p_api_name => l_api_name,
10428: p_pkg_name => g_pkg_name,
10429: p_init_msg_list => p_init_msg_list,
10430: l_api_version => p_api_version,
10432: p_api_type => G_API_TYPE,
10433: x_return_status => x_return_status);
10434:
10435: -- check if activity started successfully
10436: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
10437: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10438: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
10439: raise OKL_API.G_EXCEPTION_ERROR;
10440: End If;
10433: x_return_status => x_return_status);
10434:
10435: -- check if activity started successfully
10436: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
10437: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10438: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
10439: raise OKL_API.G_EXCEPTION_ERROR;
10440: End If;
10441:
10434:
10435: -- check if activity started successfully
10436: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
10437: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10438: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
10439: raise OKL_API.G_EXCEPTION_ERROR;
10440: End If;
10441:
10442: print( l_api_name, 'checking for var rate' );
10435: -- check if activity started successfully
10436: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
10437: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10438: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
10439: raise OKL_API.G_EXCEPTION_ERROR;
10440: End If;
10441:
10442: print( l_api_name, 'checking for var rate' );
10443: If (Is_Var_Rate_Contract( p_khr_id ) = 'N' ) THEN
10450: x_sty_id => l_sty_id,
10451: x_sty_name => l_sty_name,
10452: x_return_status => x_return_status);
10453:
10454: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10455: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10456: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10457: RAISE OKL_API.G_EXCEPTION_ERROR;
10458: END IF;
10451: x_sty_name => l_sty_name,
10452: x_return_status => x_return_status);
10453:
10454: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10455: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10456: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10457: RAISE OKL_API.G_EXCEPTION_ERROR;
10458: END IF;
10459:
10452: x_return_status => x_return_status);
10453:
10454: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10455: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10456: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10457: RAISE OKL_API.G_EXCEPTION_ERROR;
10458: END IF;
10459:
10460: print( l_api_name, 'got stream type' );
10453:
10454: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10455: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10456: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10457: RAISE OKL_API.G_EXCEPTION_ERROR;
10458: END IF;
10459:
10460: print( l_api_name, 'got stream type' );
10461: i := 0;
10480: x_msg_data => x_msg_data,
10481: p_stmv_tbl => l_stmv_tbl,
10482: x_stmv_tbl => x_stmv_tbl);
10483:
10484: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10485: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10486: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10487: RAISE OKL_API.G_EXCEPTION_ERROR;
10488: END IF;
10481: p_stmv_tbl => l_stmv_tbl,
10482: x_stmv_tbl => x_stmv_tbl);
10483:
10484: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10485: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10486: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10487: RAISE OKL_API.G_EXCEPTION_ERROR;
10488: END IF;
10489:
10482: x_stmv_tbl => x_stmv_tbl);
10483:
10484: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10485: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10486: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10487: RAISE OKL_API.G_EXCEPTION_ERROR;
10488: END IF;
10489:
10490: End If;
10483:
10484: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10485: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10486: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10487: RAISE OKL_API.G_EXCEPTION_ERROR;
10488: END IF;
10489:
10490: End If;
10491:
10519: x_return_status => x_return_status,
10520: x_msg_count => x_msg_count,
10521: x_msg_data => x_msg_data);
10522:
10523: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10524: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10525: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10526: RAISE OKL_API.G_EXCEPTION_ERROR;
10527: END IF;
10520: x_msg_count => x_msg_count,
10521: x_msg_data => x_msg_data);
10522:
10523: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10524: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10525: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10526: RAISE OKL_API.G_EXCEPTION_ERROR;
10527: END IF;
10528:
10521: x_msg_data => x_msg_data);
10522:
10523: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10524: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10525: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10526: RAISE OKL_API.G_EXCEPTION_ERROR;
10527: END IF;
10528:
10529: FOR i in 1..lx_selv_tbl.COUNT
10522:
10523: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10524: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10525: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10526: RAISE OKL_API.G_EXCEPTION_ERROR;
10527: END IF;
10528:
10529: FOR i in 1..lx_selv_tbl.COUNT
10530: LOOP
10539: p_purpose_code => p_purpose_code,
10540: x_stmv_rec => l_stmv_rec,
10541: x_return_status => x_return_status);
10542:
10543: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10544: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10545: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10546: RAISE OKL_API.G_EXCEPTION_ERROR;
10547: END IF;
10540: x_stmv_rec => l_stmv_rec,
10541: x_return_status => x_return_status);
10542:
10543: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10544: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10545: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10546: RAISE OKL_API.G_EXCEPTION_ERROR;
10547: END IF;
10548:
10541: x_return_status => x_return_status);
10542:
10543: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10544: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10545: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10546: RAISE OKL_API.G_EXCEPTION_ERROR;
10547: END IF;
10548:
10549:
10542:
10543: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10544: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10545: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10546: RAISE OKL_API.G_EXCEPTION_ERROR;
10547: END IF;
10548:
10549:
10550: x_return_status := Okl_Streams_Util.round_streams_amount(
10556: p_selv_tbl => l_selv_tbl,
10557: x_selv_tbl => lx_selv_tbl);
10558:
10559: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
10560: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10561: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
10562: RAISE OKL_API.G_EXCEPTION_ERROR;
10563: END IF;
10564:
10558:
10559: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
10560: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10561: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
10562: RAISE OKL_API.G_EXCEPTION_ERROR;
10563: END IF;
10564:
10565: l_selv_tbl.DELETE;
10566: l_selv_tbl := lx_selv_tbl;
10574: p_selv_tbl => l_selv_tbl,
10575: x_stmv_rec => lx_stmv_rec,
10576: x_selv_tbl => lx_selv_tbl);
10577:
10578: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10579: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10580: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10581: RAISE OKL_API.G_EXCEPTION_ERROR;
10582: END IF;
10575: x_stmv_rec => lx_stmv_rec,
10576: x_selv_tbl => lx_selv_tbl);
10577:
10578: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10579: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10580: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10581: RAISE OKL_API.G_EXCEPTION_ERROR;
10582: END IF;
10583:
10576: x_selv_tbl => lx_selv_tbl);
10577:
10578: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10579: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10580: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10581: RAISE OKL_API.G_EXCEPTION_ERROR;
10582: END IF;
10583:
10584: */
10577:
10578: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10579: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10580: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10581: RAISE OKL_API.G_EXCEPTION_ERROR;
10582: END IF;
10583:
10584: */
10585: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
10581: RAISE OKL_API.G_EXCEPTION_ERROR;
10582: END IF;
10583:
10584: */
10585: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
10586: print( l_api_name, 'end' );
10587: Exception
10588:
10589: when OKL_API.G_EXCEPTION_ERROR then
10585: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
10586: print( l_api_name, 'end' );
10587: Exception
10588:
10589: when OKL_API.G_EXCEPTION_ERROR then
10590: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
10591: p_api_name => l_api_name,
10592: p_pkg_name => g_pkg_name,
10593: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
10586: print( l_api_name, 'end' );
10587: Exception
10588:
10589: when OKL_API.G_EXCEPTION_ERROR then
10590: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
10591: p_api_name => l_api_name,
10592: p_pkg_name => g_pkg_name,
10593: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
10594: x_msg_count => x_msg_count,
10589: when OKL_API.G_EXCEPTION_ERROR then
10590: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
10591: p_api_name => l_api_name,
10592: p_pkg_name => g_pkg_name,
10593: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
10594: x_msg_count => x_msg_count,
10595: x_msg_data => x_msg_data,
10596: p_api_type => g_api_type);
10597:
10594: x_msg_count => x_msg_count,
10595: x_msg_data => x_msg_data,
10596: p_api_type => g_api_type);
10597:
10598: when OKL_API.G_EXCEPTION_UNEXPECTED_ERROR then
10599: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
10600: p_api_name => l_api_name,
10601: p_pkg_name => g_pkg_name,
10602: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
10595: x_msg_data => x_msg_data,
10596: p_api_type => g_api_type);
10597:
10598: when OKL_API.G_EXCEPTION_UNEXPECTED_ERROR then
10599: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
10600: p_api_name => l_api_name,
10601: p_pkg_name => g_pkg_name,
10602: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
10603: x_msg_count => x_msg_count,
10598: when OKL_API.G_EXCEPTION_UNEXPECTED_ERROR then
10599: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
10600: p_api_name => l_api_name,
10601: p_pkg_name => g_pkg_name,
10602: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
10603: x_msg_count => x_msg_count,
10604: x_msg_data => x_msg_data,
10605: p_api_type => g_api_type);
10606:
10604: x_msg_data => x_msg_data,
10605: p_api_type => g_api_type);
10606:
10607: when OTHERS then
10608: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
10609: p_api_name => l_api_name,
10610: p_pkg_name => g_pkg_name,
10611: p_exc_name => 'OTHERS',
10612: x_msg_count => x_msg_count,
10806: BEGIN
10807:
10808: print( l_api_name, 'begin' );
10809:
10810: x_return_status := OKL_API.G_RET_STS_SUCCESS;
10811:
10812: x_return_status := OKL_API.START_ACTIVITY(
10813: p_api_name => l_api_name,
10814: p_pkg_name => g_pkg_name,
10808: print( l_api_name, 'begin' );
10809:
10810: x_return_status := OKL_API.G_RET_STS_SUCCESS;
10811:
10812: x_return_status := OKL_API.START_ACTIVITY(
10813: p_api_name => l_api_name,
10814: p_pkg_name => g_pkg_name,
10815: p_init_msg_list => p_init_msg_list,
10816: l_api_version => p_api_version,
10818: p_api_type => G_API_TYPE,
10819: x_return_status => x_return_status);
10820:
10821: -- check if activity started successfully
10822: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
10823: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10824: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
10825: raise OKL_API.G_EXCEPTION_ERROR;
10826: End If;
10819: x_return_status => x_return_status);
10820:
10821: -- check if activity started successfully
10822: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
10823: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10824: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
10825: raise OKL_API.G_EXCEPTION_ERROR;
10826: End If;
10827:
10820:
10821: -- check if activity started successfully
10822: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
10823: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10824: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
10825: raise OKL_API.G_EXCEPTION_ERROR;
10826: End If;
10827:
10828: OPEN l_hdrrl_csr;
10821: -- check if activity started successfully
10822: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
10823: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10824: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
10825: raise OKL_API.G_EXCEPTION_ERROR;
10826: End If;
10827:
10828: OPEN l_hdrrl_csr;
10829: FETCH l_hdrrl_csr INTO l_hdrrl_rec;
10841: CLOSE ylds_csr;
10842:
10843: If (nvl(ylds_rec.contract_yield, -360)/360 = -1 ) Then
10844:
10845: OKL_API.SET_MESSAGE(p_app_name => G_APP_NAME,
10846: p_msg_name => 'OKL_AGMNT_NOYLD',
10847: p_token1 => 'AGMNT',
10848: p_token1_value => ylds_rec.agreement_number);
10849:
10846: p_msg_name => 'OKL_AGMNT_NOYLD',
10847: p_token1 => 'AGMNT',
10848: p_token1_value => ylds_rec.agreement_number);
10849:
10850: RAISE OKL_API.G_EXCEPTION_ERROR;
10851:
10852: End If;
10853:
10854: l_khr_yld := ylds_rec.contract_yield / 100.00;
10866: p_stream_type_purpose => r_stm_name.stream_type_purpose,
10867: x_mapped_stream => l_mapped_sty_name,
10868: x_return_status => x_return_status);
10869:
10870: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10871: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10872: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10873: RAISE OKL_API.G_EXCEPTION_ERROR;
10874: END IF;
10867: x_mapped_stream => l_mapped_sty_name,
10868: x_return_status => x_return_status);
10869:
10870: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10871: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10872: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10873: RAISE OKL_API.G_EXCEPTION_ERROR;
10874: END IF;
10875: If l_mapped_sty_name is NOT NULL THen
10868: x_return_status => x_return_status);
10869:
10870: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10871: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10872: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10873: RAISE OKL_API.G_EXCEPTION_ERROR;
10874: END IF;
10875: If l_mapped_sty_name is NOT NULL THen
10876:
10869:
10870: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10871: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10872: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10873: RAISE OKL_API.G_EXCEPTION_ERROR;
10874: END IF;
10875: If l_mapped_sty_name is NOT NULL THen
10876:
10877: get_sty_details (p_sty_name => l_mapped_sty_name,
10878: x_sty_id => l_sty_id,
10879: x_sty_name => l_sty_name,
10880: x_return_status => x_return_status);
10881:
10882: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10883: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10884: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10885: RAISE OKL_API.G_EXCEPTION_ERROR;
10886: END IF;
10879: x_sty_name => l_sty_name,
10880: x_return_status => x_return_status);
10881:
10882: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10883: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10884: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10885: RAISE OKL_API.G_EXCEPTION_ERROR;
10886: END IF;
10887:
10880: x_return_status => x_return_status);
10881:
10882: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10883: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10884: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10885: RAISE OKL_API.G_EXCEPTION_ERROR;
10886: END IF;
10887:
10888: l_stmv_rec := NULL;
10881:
10882: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10883: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10884: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10885: RAISE OKL_API.G_EXCEPTION_ERROR;
10886: END IF;
10887:
10888: l_stmv_rec := NULL;
10889: get_stream_header(p_purpose_code => NULL,
10892: p_sty_id => l_sty_id,
10893: x_stmv_rec => l_stmv_rec,
10894: x_return_status => x_return_status);
10895:
10896: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10897: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10898: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10899: RAISE OKL_API.G_EXCEPTION_ERROR;
10900: END IF;
10893: x_stmv_rec => l_stmv_rec,
10894: x_return_status => x_return_status);
10895:
10896: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10897: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10898: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10899: RAISE OKL_API.G_EXCEPTION_ERROR;
10900: END IF;
10901:
10894: x_return_status => x_return_status);
10895:
10896: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10897: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10898: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10899: RAISE OKL_API.G_EXCEPTION_ERROR;
10900: END IF;
10901:
10902: l_selv_tbl(1).stream_element_date := ylds_rec.contract_start_date;
10895:
10896: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10897: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10898: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10899: RAISE OKL_API.G_EXCEPTION_ERROR;
10900: END IF;
10901:
10902: l_selv_tbl(1).stream_element_date := ylds_rec.contract_start_date;
10903: l_selv_tbl(1).se_line_number := 1;
10914: x_days_in_year => l_day_convention_year,
10915: x_return_status => x_return_status);
10916: print( 'gen_pv_streams', 'Month / Year = ' || l_day_convention_month || '/' || l_day_convention_year );
10917: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
10918: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10919: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
10920: RAISE OKL_API.G_EXCEPTION_ERROR;
10921: END IF;
10922:
10916: print( 'gen_pv_streams', 'Month / Year = ' || l_day_convention_month || '/' || l_day_convention_year );
10917: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
10918: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10919: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
10920: RAISE OKL_API.G_EXCEPTION_ERROR;
10921: END IF;
10922:
10923: FOR sec_strms_rec IN sec_strms_csr
10924: LOOP
10931: p_end_date => l_end_date,
10932: p_arrears => 'N',
10933: x_return_status => x_return_status);
10934:
10935: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10936: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10937: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10938: RAISE OKL_API.G_EXCEPTION_ERROR;
10939: END IF;
10932: p_arrears => 'N',
10933: x_return_status => x_return_status);
10934:
10935: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10936: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10937: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10938: RAISE OKL_API.G_EXCEPTION_ERROR;
10939: END IF;
10940:
10933: x_return_status => x_return_status);
10934:
10935: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10936: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10937: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10938: RAISE OKL_API.G_EXCEPTION_ERROR;
10939: END IF;
10940:
10941: l_selv_tbl(1).amount := l_selv_tbl(1).amount +
10934:
10935: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10936: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10937: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10938: RAISE OKL_API.G_EXCEPTION_ERROR;
10939: END IF;
10940:
10941: l_selv_tbl(1).amount := l_selv_tbl(1).amount +
10942: sec_strms_rec.stream_ele_amount / POWER( 1 + (l_khr_yld/360), l_days );
10958: p_khr_id => p_agreement_id, --p_khr_id => p_contract_id,
10959: x_mapped_stream => l_mapped_sty_name,
10960: x_return_status => x_return_status);
10961:
10962: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10963: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10964: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10965: RAISE OKL_API.G_EXCEPTION_ERROR;
10966: END IF;
10959: x_mapped_stream => l_mapped_sty_name,
10960: x_return_status => x_return_status);
10961:
10962: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10963: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10964: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10965: RAISE OKL_API.G_EXCEPTION_ERROR;
10966: END IF;
10967: If l_mapped_sty_name is NOT NULL THen
10960: x_return_status => x_return_status);
10961:
10962: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10963: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10964: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10965: RAISE OKL_API.G_EXCEPTION_ERROR;
10966: END IF;
10967: If l_mapped_sty_name is NOT NULL THen
10968:
10961:
10962: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10963: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10964: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10965: RAISE OKL_API.G_EXCEPTION_ERROR;
10966: END IF;
10967: If l_mapped_sty_name is NOT NULL THen
10968:
10969: get_sty_details (p_sty_name => l_mapped_sty_name,
10970: x_sty_id => l_sty_id,
10971: x_sty_name => l_sty_name,
10972: x_return_status => x_return_status);
10973:
10974: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10975: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10976: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10977: RAISE OKL_API.G_EXCEPTION_ERROR;
10978: END IF;
10971: x_sty_name => l_sty_name,
10972: x_return_status => x_return_status);
10973:
10974: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10975: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10976: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10977: RAISE OKL_API.G_EXCEPTION_ERROR;
10978: END IF;
10979:
10972: x_return_status => x_return_status);
10973:
10974: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10975: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10976: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10977: RAISE OKL_API.G_EXCEPTION_ERROR;
10978: END IF;
10979:
10980: l_stmv_rec := NULL;
10973:
10974: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10975: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10976: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10977: RAISE OKL_API.G_EXCEPTION_ERROR;
10978: END IF;
10979:
10980: l_stmv_rec := NULL;
10981: get_stream_header(p_purpose_code => NULL,
10984: p_sty_id => l_sty_id,
10985: x_stmv_rec => l_stmv_rec,
10986: x_return_status => x_return_status);
10987:
10988: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10989: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10990: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10991: RAISE OKL_API.G_EXCEPTION_ERROR;
10992: END IF;
10985: x_stmv_rec => l_stmv_rec,
10986: x_return_status => x_return_status);
10987:
10988: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10989: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10990: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10991: RAISE OKL_API.G_EXCEPTION_ERROR;
10992: END IF;
10993:
10986: x_return_status => x_return_status);
10987:
10988: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10989: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10990: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10991: RAISE OKL_API.G_EXCEPTION_ERROR;
10992: END IF;
10993:
10994: l_selv_tbl(1).stream_element_date := ylds_rec.contract_start_date;
10987:
10988: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
10989: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
10990: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
10991: RAISE OKL_API.G_EXCEPTION_ERROR;
10992: END IF;
10993:
10994: l_selv_tbl(1).stream_element_date := ylds_rec.contract_start_date;
10995: l_selv_tbl(1).se_line_number := 1;
11006: x_days_in_year => l_day_convention_year,
11007: x_return_status => x_return_status);
11008: print( 'gen_pv_streams', 'Month / Year = ' || l_day_convention_month || '/' || l_day_convention_year );
11009: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
11010: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11011: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
11012: RAISE OKL_API.G_EXCEPTION_ERROR;
11013: END IF;
11014:
11008: print( 'gen_pv_streams', 'Month / Year = ' || l_day_convention_month || '/' || l_day_convention_year );
11009: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
11010: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11011: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
11012: RAISE OKL_API.G_EXCEPTION_ERROR;
11013: END IF;
11014:
11015: FOR sec_strms_rec IN sec_strms_csr
11016: LOOP
11023: p_end_date => l_end_date,
11024: p_arrears => 'N',
11025: x_return_status => x_return_status);
11026:
11027: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11028: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11029: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11030: RAISE OKL_API.G_EXCEPTION_ERROR;
11031: END IF;
11024: p_arrears => 'N',
11025: x_return_status => x_return_status);
11026:
11027: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11028: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11029: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11030: RAISE OKL_API.G_EXCEPTION_ERROR;
11031: END IF;
11032:
11025: x_return_status => x_return_status);
11026:
11027: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11028: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11029: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11030: RAISE OKL_API.G_EXCEPTION_ERROR;
11031: END IF;
11032:
11033: l_selv_tbl(1).amount := l_selv_tbl(1).amount +
11026:
11027: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11028: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11029: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11030: RAISE OKL_API.G_EXCEPTION_ERROR;
11031: END IF;
11032:
11033: l_selv_tbl(1).amount := l_selv_tbl(1).amount +
11034: sec_strms_rec.stream_ele_amount / POWER( 1 + (l_khr_yld/360), l_days );
11056: CLOSE ylds_pend_csr;
11057:
11058: If (nvl(ylds_rec.contract_yield, -360)/360 = -1 ) Then
11059:
11060: OKL_API.SET_MESSAGE(p_app_name => G_APP_NAME,
11061: p_msg_name => 'OKL_AGMNT_NOYLD',
11062: p_token1 => 'AGMNT',
11063: p_token1_value => ylds_rec.agreement_number);
11064:
11061: p_msg_name => 'OKL_AGMNT_NOYLD',
11062: p_token1 => 'AGMNT',
11063: p_token1_value => ylds_rec.agreement_number);
11064:
11065: RAISE OKL_API.G_EXCEPTION_ERROR;
11066:
11067: End If;
11068:
11069: l_khr_yld := ylds_rec.contract_yield / 100.00;
11080: p_stream_type_purpose => r_stm_name.stream_type_purpose,
11081: x_mapped_stream => l_mapped_sty_name,
11082: x_return_status => x_return_status);
11083:
11084: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11085: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11086: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11087: RAISE OKL_API.G_EXCEPTION_ERROR;
11088: END IF;
11081: x_mapped_stream => l_mapped_sty_name,
11082: x_return_status => x_return_status);
11083:
11084: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11085: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11086: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11087: RAISE OKL_API.G_EXCEPTION_ERROR;
11088: END IF;
11089: If l_mapped_sty_name is NOT NULL THen
11082: x_return_status => x_return_status);
11083:
11084: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11085: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11086: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11087: RAISE OKL_API.G_EXCEPTION_ERROR;
11088: END IF;
11089: If l_mapped_sty_name is NOT NULL THen
11090:
11083:
11084: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11085: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11086: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11087: RAISE OKL_API.G_EXCEPTION_ERROR;
11088: END IF;
11089: If l_mapped_sty_name is NOT NULL THen
11090:
11091: get_sty_details (p_sty_name => l_mapped_sty_name,
11092: x_sty_id => l_sty_id,
11093: x_sty_name => l_sty_name,
11094: x_return_status => x_return_status);
11095:
11096: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11097: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11098: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11099: RAISE OKL_API.G_EXCEPTION_ERROR;
11100: END IF;
11093: x_sty_name => l_sty_name,
11094: x_return_status => x_return_status);
11095:
11096: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11097: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11098: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11099: RAISE OKL_API.G_EXCEPTION_ERROR;
11100: END IF;
11101:
11094: x_return_status => x_return_status);
11095:
11096: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11097: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11098: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11099: RAISE OKL_API.G_EXCEPTION_ERROR;
11100: END IF;
11101:
11102: l_stmv_rec := NULL;
11095:
11096: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11097: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11098: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11099: RAISE OKL_API.G_EXCEPTION_ERROR;
11100: END IF;
11101:
11102: l_stmv_rec := NULL;
11103: get_stream_header(p_purpose_code => NULL,
11106: p_sty_id => l_sty_id,
11107: x_stmv_rec => l_stmv_rec,
11108: x_return_status => x_return_status);
11109:
11110: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11111: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11112: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11113: RAISE OKL_API.G_EXCEPTION_ERROR;
11114: END IF;
11107: x_stmv_rec => l_stmv_rec,
11108: x_return_status => x_return_status);
11109:
11110: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11111: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11112: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11113: RAISE OKL_API.G_EXCEPTION_ERROR;
11114: END IF;
11115:
11108: x_return_status => x_return_status);
11109:
11110: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11111: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11112: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11113: RAISE OKL_API.G_EXCEPTION_ERROR;
11114: END IF;
11115:
11116: l_selv_tbl(1).stream_element_date := ylds_rec.contract_start_date;
11109:
11110: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11111: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11112: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11113: RAISE OKL_API.G_EXCEPTION_ERROR;
11114: END IF;
11115:
11116: l_selv_tbl(1).stream_element_date := ylds_rec.contract_start_date;
11117: l_selv_tbl(1).se_line_number := 1;
11128: x_days_in_year => l_day_convention_year,
11129: x_return_status => x_return_status);
11130: print( 'gen_pv_streams', 'Month / Year = ' || l_day_convention_month || '/' || l_day_convention_year );
11131: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
11132: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11133: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
11134: RAISE OKL_API.G_EXCEPTION_ERROR;
11135: END IF;
11136:
11130: print( 'gen_pv_streams', 'Month / Year = ' || l_day_convention_month || '/' || l_day_convention_year );
11131: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
11132: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11133: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
11134: RAISE OKL_API.G_EXCEPTION_ERROR;
11135: END IF;
11136:
11137: FOR sec_strms_rec IN sec_strms_pend_csr
11138: LOOP
11145: p_end_date => l_end_date,
11146: p_arrears => 'N',
11147: x_return_status => x_return_status);
11148:
11149: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11150: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11151: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11152: RAISE OKL_API.G_EXCEPTION_ERROR;
11153: END IF;
11146: p_arrears => 'N',
11147: x_return_status => x_return_status);
11148:
11149: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11150: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11151: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11152: RAISE OKL_API.G_EXCEPTION_ERROR;
11153: END IF;
11154:
11147: x_return_status => x_return_status);
11148:
11149: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11150: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11151: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11152: RAISE OKL_API.G_EXCEPTION_ERROR;
11153: END IF;
11154:
11155: l_selv_tbl(1).amount := l_selv_tbl(1).amount +
11148:
11149: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11150: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11151: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11152: RAISE OKL_API.G_EXCEPTION_ERROR;
11153: END IF;
11154:
11155: l_selv_tbl(1).amount := l_selv_tbl(1).amount +
11156: sec_strms_rec.stream_ele_amount / POWER( 1 + (l_khr_yld/360), l_days );
11166: p_khr_id => p_agreement_id, --p_khr_id => p_contract_id,
11167: x_mapped_stream => l_mapped_sty_name,
11168: x_return_status => x_return_status);
11169:
11170: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11171: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11172: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11173: RAISE OKL_API.G_EXCEPTION_ERROR;
11174: END IF;
11167: x_mapped_stream => l_mapped_sty_name,
11168: x_return_status => x_return_status);
11169:
11170: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11171: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11172: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11173: RAISE OKL_API.G_EXCEPTION_ERROR;
11174: END IF;
11175: If l_mapped_sty_name is NOT NULL THen
11168: x_return_status => x_return_status);
11169:
11170: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11171: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11172: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11173: RAISE OKL_API.G_EXCEPTION_ERROR;
11174: END IF;
11175: If l_mapped_sty_name is NOT NULL THen
11176:
11169:
11170: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11171: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11172: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11173: RAISE OKL_API.G_EXCEPTION_ERROR;
11174: END IF;
11175: If l_mapped_sty_name is NOT NULL THen
11176:
11177: get_sty_details (p_sty_name => l_mapped_sty_name,
11178: x_sty_id => l_sty_id,
11179: x_sty_name => l_sty_name,
11180: x_return_status => x_return_status);
11181:
11182: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11183: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11184: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11185: RAISE OKL_API.G_EXCEPTION_ERROR;
11186: END IF;
11179: x_sty_name => l_sty_name,
11180: x_return_status => x_return_status);
11181:
11182: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11183: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11184: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11185: RAISE OKL_API.G_EXCEPTION_ERROR;
11186: END IF;
11187:
11180: x_return_status => x_return_status);
11181:
11182: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11183: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11184: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11185: RAISE OKL_API.G_EXCEPTION_ERROR;
11186: END IF;
11187:
11188: l_stmv_rec := NULL;
11181:
11182: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11183: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11184: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11185: RAISE OKL_API.G_EXCEPTION_ERROR;
11186: END IF;
11187:
11188: l_stmv_rec := NULL;
11189: get_stream_header(p_purpose_code => NULL,
11192: p_sty_id => l_sty_id,
11193: x_stmv_rec => l_stmv_rec,
11194: x_return_status => x_return_status);
11195:
11196: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11197: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11198: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11199: RAISE OKL_API.G_EXCEPTION_ERROR;
11200: END IF;
11193: x_stmv_rec => l_stmv_rec,
11194: x_return_status => x_return_status);
11195:
11196: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11197: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11198: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11199: RAISE OKL_API.G_EXCEPTION_ERROR;
11200: END IF;
11201:
11194: x_return_status => x_return_status);
11195:
11196: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11197: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11198: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11199: RAISE OKL_API.G_EXCEPTION_ERROR;
11200: END IF;
11201:
11202: l_selv_tbl(1).stream_element_date := ylds_rec.contract_start_date;
11195:
11196: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11197: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11198: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11199: RAISE OKL_API.G_EXCEPTION_ERROR;
11200: END IF;
11201:
11202: l_selv_tbl(1).stream_element_date := ylds_rec.contract_start_date;
11203: l_selv_tbl(1).se_line_number := 1;
11214: x_days_in_year => l_day_convention_year,
11215: x_return_status => x_return_status);
11216: print( 'gen_pv_streams', 'Month / Year = ' || l_day_convention_month || '/' || l_day_convention_year );
11217: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
11218: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11219: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
11220: RAISE OKL_API.G_EXCEPTION_ERROR;
11221: END IF;
11222:
11216: print( 'gen_pv_streams', 'Month / Year = ' || l_day_convention_month || '/' || l_day_convention_year );
11217: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
11218: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11219: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
11220: RAISE OKL_API.G_EXCEPTION_ERROR;
11221: END IF;
11222:
11223: FOR sec_strms_rec IN sec_strms_pend_csr
11224: LOOP
11231: p_end_date => l_end_date,
11232: p_arrears => 'N',
11233: x_return_status => x_return_status);
11234:
11235: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11236: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11237: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11238: RAISE OKL_API.G_EXCEPTION_ERROR;
11239: END IF;
11232: p_arrears => 'N',
11233: x_return_status => x_return_status);
11234:
11235: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11236: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11237: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11238: RAISE OKL_API.G_EXCEPTION_ERROR;
11239: END IF;
11240:
11233: x_return_status => x_return_status);
11234:
11235: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11236: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11237: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11238: RAISE OKL_API.G_EXCEPTION_ERROR;
11239: END IF;
11240:
11241: l_selv_tbl(1).amount := l_selv_tbl(1).amount +
11234:
11235: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11236: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11237: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11238: RAISE OKL_API.G_EXCEPTION_ERROR;
11239: END IF;
11240:
11241: l_selv_tbl(1).amount := l_selv_tbl(1).amount +
11242: sec_strms_rec.stream_ele_amount / POWER( 1 + (l_khr_yld/360), l_days );
11250:
11251: END IF;
11252:
11253: print( l_api_name, 'end' );
11254: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
11255:
11256: Exception
11257:
11258: when OKL_API.G_EXCEPTION_ERROR then
11254: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
11255:
11256: Exception
11257:
11258: when OKL_API.G_EXCEPTION_ERROR then
11259: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
11260: p_api_name => l_api_name,
11261: p_pkg_name => g_pkg_name,
11262: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
11255:
11256: Exception
11257:
11258: when OKL_API.G_EXCEPTION_ERROR then
11259: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
11260: p_api_name => l_api_name,
11261: p_pkg_name => g_pkg_name,
11262: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
11263: x_msg_count => x_msg_count,
11258: when OKL_API.G_EXCEPTION_ERROR then
11259: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
11260: p_api_name => l_api_name,
11261: p_pkg_name => g_pkg_name,
11262: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
11263: x_msg_count => x_msg_count,
11264: x_msg_data => x_msg_data,
11265: p_api_type => g_api_type);
11266:
11263: x_msg_count => x_msg_count,
11264: x_msg_data => x_msg_data,
11265: p_api_type => g_api_type);
11266:
11267: when OKL_API.G_EXCEPTION_UNEXPECTED_ERROR then
11268: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
11269: p_api_name => l_api_name,
11270: p_pkg_name => g_pkg_name,
11271: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
11264: x_msg_data => x_msg_data,
11265: p_api_type => g_api_type);
11266:
11267: when OKL_API.G_EXCEPTION_UNEXPECTED_ERROR then
11268: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
11269: p_api_name => l_api_name,
11270: p_pkg_name => g_pkg_name,
11271: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
11272: x_msg_count => x_msg_count,
11267: when OKL_API.G_EXCEPTION_UNEXPECTED_ERROR then
11268: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
11269: p_api_name => l_api_name,
11270: p_pkg_name => g_pkg_name,
11271: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
11272: x_msg_count => x_msg_count,
11273: x_msg_data => x_msg_data,
11274: p_api_type => g_api_type);
11275:
11273: x_msg_data => x_msg_data,
11274: p_api_type => g_api_type);
11275:
11276: when OTHERS then
11277: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
11278: p_api_name => l_api_name,
11279: p_pkg_name => g_pkg_name,
11280: p_exc_name => 'OTHERS',
11281: x_msg_count => x_msg_count,
11468: BEGIN
11469:
11470: print( l_api_name, 'begin' );
11471:
11472: x_return_status := OKL_API.G_RET_STS_SUCCESS;
11473:
11474: x_return_status := OKL_API.START_ACTIVITY(
11475: p_api_name => l_api_name,
11476: p_pkg_name => g_pkg_name,
11470: print( l_api_name, 'begin' );
11471:
11472: x_return_status := OKL_API.G_RET_STS_SUCCESS;
11473:
11474: x_return_status := OKL_API.START_ACTIVITY(
11475: p_api_name => l_api_name,
11476: p_pkg_name => g_pkg_name,
11477: p_init_msg_list => p_init_msg_list,
11478: l_api_version => p_api_version,
11480: p_api_type => G_API_TYPE,
11481: x_return_status => x_return_status);
11482:
11483: -- check if activity started successfully
11484: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
11485: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11486: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
11487: raise OKL_API.G_EXCEPTION_ERROR;
11488: End If;
11481: x_return_status => x_return_status);
11482:
11483: -- check if activity started successfully
11484: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
11485: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11486: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
11487: raise OKL_API.G_EXCEPTION_ERROR;
11488: End If;
11489:
11482:
11483: -- check if activity started successfully
11484: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
11485: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11486: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
11487: raise OKL_API.G_EXCEPTION_ERROR;
11488: End If;
11489:
11490: OPEN l_hdrrl_csr;
11483: -- check if activity started successfully
11484: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
11485: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11486: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
11487: raise OKL_API.G_EXCEPTION_ERROR;
11488: End If;
11489:
11490: OPEN l_hdrrl_csr;
11491: FETCH l_hdrrl_csr INTO l_hdrrl_rec;
11511: CLOSE ylds_csr;
11512:
11513: If (( ylds_rec.agmnt_yield = -1 ) OR (ylds_rec.contract_yield = -1 )) Then
11514:
11515: OKL_API.SET_MESSAGE(p_app_name => G_APP_NAME,
11516: p_msg_name => 'OKL_AGMNT_NOYLD',
11517: p_token1 => 'AGMNT',
11518: p_token1_value => ylds_rec.agreement_number);
11519:
11516: p_msg_name => 'OKL_AGMNT_NOYLD',
11517: p_token1 => 'AGMNT',
11518: p_token1_value => ylds_rec.agreement_number);
11519:
11520: RAISE OKL_API.G_EXCEPTION_ERROR;
11521:
11522: End If;
11523:
11524: l_agt_yld := ylds_rec.agmnt_yield/100.0;
11525: l_khr_yld := ylds_rec.contract_yield/100.0;
11526:
11527: ElsIf ( nvl(l_hdrrl_rec.method, 'XYZ') = 'XYZ' ) Then
11528:
11529: OKL_API.SET_MESSAGE(p_app_name => G_APP_NAME,
11530: p_msg_name => 'OKL_INVALID_METHOD',
11531: p_token1 => 'AGMNT',
11532: p_token1_value => ylds_rec.agreement_number);
11533:
11530: p_msg_name => 'OKL_INVALID_METHOD',
11531: p_token1 => 'AGMNT',
11532: p_token1_value => ylds_rec.agreement_number);
11533:
11534: RAISE OKL_API.G_EXCEPTION_ERROR;
11535:
11536: End If;
11537:
11538: OPEN c_stm_name;
11547: p_stream_type_purpose => r_stm_name.stream_type_purpose,
11548: x_mapped_stream => l_mapped_sty_name,
11549: x_return_status => x_return_status);
11550:
11551: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11552: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11553: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11554: RAISE OKL_API.G_EXCEPTION_ERROR;
11555: END IF;
11548: x_mapped_stream => l_mapped_sty_name,
11549: x_return_status => x_return_status);
11550:
11551: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11552: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11553: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11554: RAISE OKL_API.G_EXCEPTION_ERROR;
11555: END IF;
11556: If l_mapped_sty_name IS NOT NULL Then
11549: x_return_status => x_return_status);
11550:
11551: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11552: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11553: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11554: RAISE OKL_API.G_EXCEPTION_ERROR;
11555: END IF;
11556: If l_mapped_sty_name IS NOT NULL Then
11557:
11550:
11551: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11552: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11553: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11554: RAISE OKL_API.G_EXCEPTION_ERROR;
11555: END IF;
11556: If l_mapped_sty_name IS NOT NULL Then
11557:
11558: get_sty_details (p_sty_name => l_mapped_sty_name,
11559: x_sty_id => l_sty_id,
11560: x_sty_name => l_sty_name,
11561: x_return_status => x_return_status);
11562:
11563: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11564: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11565: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11566: RAISE OKL_API.G_EXCEPTION_ERROR;
11567: END IF;
11560: x_sty_name => l_sty_name,
11561: x_return_status => x_return_status);
11562:
11563: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11564: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11565: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11566: RAISE OKL_API.G_EXCEPTION_ERROR;
11567: END IF;
11568:
11561: x_return_status => x_return_status);
11562:
11563: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11564: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11565: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11566: RAISE OKL_API.G_EXCEPTION_ERROR;
11567: END IF;
11568:
11569: l_stmv_rec := NULL;
11562:
11563: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11564: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11565: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11566: RAISE OKL_API.G_EXCEPTION_ERROR;
11567: END IF;
11568:
11569: l_stmv_rec := NULL;
11570: get_stream_header(p_purpose_code => NULL,
11573: p_sty_id => l_sty_id,
11574: x_stmv_rec => l_stmv_rec,
11575: x_return_status => x_return_status);
11576:
11577: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11578: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11579: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11580: RAISE OKL_API.G_EXCEPTION_ERROR;
11581: END IF;
11574: x_stmv_rec => l_stmv_rec,
11575: x_return_status => x_return_status);
11576:
11577: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11578: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11579: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11580: RAISE OKL_API.G_EXCEPTION_ERROR;
11581: END IF;
11582:
11575: x_return_status => x_return_status);
11576:
11577: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11578: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11579: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11580: RAISE OKL_API.G_EXCEPTION_ERROR;
11581: END IF;
11582:
11583: FOR sec_strms_rec IN sec_strms_csr
11576:
11577: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11578: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11579: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11580: RAISE OKL_API.G_EXCEPTION_ERROR;
11581: END IF;
11582:
11583: FOR sec_strms_rec IN sec_strms_csr
11584: LOOP
11611: p_khr_id => p_agreement_id,
11612: x_mapped_stream => l_mapped_sty_name,
11613: x_return_status => x_return_status);
11614:
11615: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11616: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11617: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11618: RAISE OKL_API.G_EXCEPTION_ERROR;
11619: END IF;
11612: x_mapped_stream => l_mapped_sty_name,
11613: x_return_status => x_return_status);
11614:
11615: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11616: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11617: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11618: RAISE OKL_API.G_EXCEPTION_ERROR;
11619: END IF;
11620: If l_mapped_sty_name IS NOT NULL Then
11613: x_return_status => x_return_status);
11614:
11615: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11616: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11617: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11618: RAISE OKL_API.G_EXCEPTION_ERROR;
11619: END IF;
11620: If l_mapped_sty_name IS NOT NULL Then
11621:
11614:
11615: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11616: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11617: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11618: RAISE OKL_API.G_EXCEPTION_ERROR;
11619: END IF;
11620: If l_mapped_sty_name IS NOT NULL Then
11621:
11622: get_sty_details (p_sty_name => l_mapped_sty_name,
11623: x_sty_id => l_sty_id,
11624: x_sty_name => l_sty_name,
11625: x_return_status => x_return_status);
11626:
11627: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11628: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11629: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11630: RAISE OKL_API.G_EXCEPTION_ERROR;
11631: END IF;
11624: x_sty_name => l_sty_name,
11625: x_return_status => x_return_status);
11626:
11627: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11628: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11629: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11630: RAISE OKL_API.G_EXCEPTION_ERROR;
11631: END IF;
11632:
11625: x_return_status => x_return_status);
11626:
11627: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11628: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11629: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11630: RAISE OKL_API.G_EXCEPTION_ERROR;
11631: END IF;
11632:
11633: l_stmv_rec := NULL;
11626:
11627: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11628: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11629: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11630: RAISE OKL_API.G_EXCEPTION_ERROR;
11631: END IF;
11632:
11633: l_stmv_rec := NULL;
11634: get_stream_header(p_purpose_code => NULL,
11637: p_sty_id => l_sty_id,
11638: x_stmv_rec => l_stmv_rec,
11639: x_return_status => x_return_status);
11640:
11641: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11642: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11643: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11644: RAISE OKL_API.G_EXCEPTION_ERROR;
11645: END IF;
11638: x_stmv_rec => l_stmv_rec,
11639: x_return_status => x_return_status);
11640:
11641: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11642: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11643: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11644: RAISE OKL_API.G_EXCEPTION_ERROR;
11645: END IF;
11646:
11639: x_return_status => x_return_status);
11640:
11641: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11642: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11643: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11644: RAISE OKL_API.G_EXCEPTION_ERROR;
11645: END IF;
11646:
11647: FOR sec_strms_rec IN sec_strms_csr
11640:
11641: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11642: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11643: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11644: RAISE OKL_API.G_EXCEPTION_ERROR;
11645: END IF;
11646:
11647: FOR sec_strms_rec IN sec_strms_csr
11648: LOOP
11683: CLOSE ylds_pend_csr;
11684:
11685: If (( ylds_rec.agmnt_yield = -1 ) OR (ylds_rec.contract_yield = -1 )) Then
11686:
11687: OKL_API.SET_MESSAGE(p_app_name => G_APP_NAME,
11688: p_msg_name => 'OKL_AGMNT_NOYLD',
11689: p_token1 => 'AGMNT',
11690: p_token1_value => ylds_rec.agreement_number);
11691:
11688: p_msg_name => 'OKL_AGMNT_NOYLD',
11689: p_token1 => 'AGMNT',
11690: p_token1_value => ylds_rec.agreement_number);
11691:
11692: RAISE OKL_API.G_EXCEPTION_ERROR;
11693:
11694: End If;
11695:
11696: l_agt_yld := ylds_rec.agmnt_yield/100.0;
11697: l_khr_yld := ylds_rec.contract_yield/100.0;
11698:
11699: ElsIf ( nvl(l_hdrrl_rec.method, 'XYZ') = 'XYZ' ) Then
11700:
11701: OKL_API.SET_MESSAGE(p_app_name => G_APP_NAME,
11702: p_msg_name => 'OKL_INVALID_METHOD',
11703: p_token1 => 'AGMNT',
11704: p_token1_value => ylds_rec.agreement_number);
11705:
11702: p_msg_name => 'OKL_INVALID_METHOD',
11703: p_token1 => 'AGMNT',
11704: p_token1_value => ylds_rec.agreement_number);
11705:
11706: RAISE OKL_API.G_EXCEPTION_ERROR;
11707:
11708: End If;
11709:
11710: OPEN c_stm_name;
11719: p_stream_type_purpose => r_stm_name.stream_type_purpose,
11720: x_mapped_stream => l_mapped_sty_name,
11721: x_return_status => x_return_status);
11722:
11723: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11724: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11725: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11726: RAISE OKL_API.G_EXCEPTION_ERROR;
11727: END IF;
11720: x_mapped_stream => l_mapped_sty_name,
11721: x_return_status => x_return_status);
11722:
11723: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11724: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11725: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11726: RAISE OKL_API.G_EXCEPTION_ERROR;
11727: END IF;
11728: If l_mapped_sty_name IS NOT NULL Then
11721: x_return_status => x_return_status);
11722:
11723: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11724: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11725: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11726: RAISE OKL_API.G_EXCEPTION_ERROR;
11727: END IF;
11728: If l_mapped_sty_name IS NOT NULL Then
11729:
11722:
11723: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11724: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11725: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11726: RAISE OKL_API.G_EXCEPTION_ERROR;
11727: END IF;
11728: If l_mapped_sty_name IS NOT NULL Then
11729:
11730: get_sty_details (p_sty_name => l_mapped_sty_name,
11731: x_sty_id => l_sty_id,
11732: x_sty_name => l_sty_name,
11733: x_return_status => x_return_status);
11734:
11735: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11736: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11737: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11738: RAISE OKL_API.G_EXCEPTION_ERROR;
11739: END IF;
11732: x_sty_name => l_sty_name,
11733: x_return_status => x_return_status);
11734:
11735: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11736: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11737: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11738: RAISE OKL_API.G_EXCEPTION_ERROR;
11739: END IF;
11740:
11733: x_return_status => x_return_status);
11734:
11735: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11736: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11737: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11738: RAISE OKL_API.G_EXCEPTION_ERROR;
11739: END IF;
11740:
11741: l_stmv_rec := NULL;
11734:
11735: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11736: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11737: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11738: RAISE OKL_API.G_EXCEPTION_ERROR;
11739: END IF;
11740:
11741: l_stmv_rec := NULL;
11742: get_stream_header(p_purpose_code => NULL,
11745: p_sty_id => l_sty_id,
11746: x_stmv_rec => l_stmv_rec,
11747: x_return_status => x_return_status);
11748:
11749: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11750: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11751: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11752: RAISE OKL_API.G_EXCEPTION_ERROR;
11753: END IF;
11746: x_stmv_rec => l_stmv_rec,
11747: x_return_status => x_return_status);
11748:
11749: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11750: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11751: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11752: RAISE OKL_API.G_EXCEPTION_ERROR;
11753: END IF;
11754:
11747: x_return_status => x_return_status);
11748:
11749: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11750: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11751: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11752: RAISE OKL_API.G_EXCEPTION_ERROR;
11753: END IF;
11754:
11755: FOR sec_strms_rec IN sec_strms_pend_csr
11748:
11749: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11750: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11751: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11752: RAISE OKL_API.G_EXCEPTION_ERROR;
11753: END IF;
11754:
11755: FOR sec_strms_rec IN sec_strms_pend_csr
11756: LOOP
11782: p_khr_id => p_agreement_id,
11783: x_mapped_stream => l_mapped_sty_name,
11784: x_return_status => x_return_status);
11785:
11786: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11787: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11788: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11789: RAISE OKL_API.G_EXCEPTION_ERROR;
11790: END IF;
11783: x_mapped_stream => l_mapped_sty_name,
11784: x_return_status => x_return_status);
11785:
11786: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11787: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11788: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11789: RAISE OKL_API.G_EXCEPTION_ERROR;
11790: END IF;
11791: If l_mapped_sty_name IS NOT NULL Then
11784: x_return_status => x_return_status);
11785:
11786: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11787: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11788: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11789: RAISE OKL_API.G_EXCEPTION_ERROR;
11790: END IF;
11791: If l_mapped_sty_name IS NOT NULL Then
11792:
11785:
11786: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11787: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11788: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11789: RAISE OKL_API.G_EXCEPTION_ERROR;
11790: END IF;
11791: If l_mapped_sty_name IS NOT NULL Then
11792:
11793: get_sty_details (p_sty_name => l_mapped_sty_name,
11794: x_sty_id => l_sty_id,
11795: x_sty_name => l_sty_name,
11796: x_return_status => x_return_status);
11797:
11798: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11799: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11800: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11801: RAISE OKL_API.G_EXCEPTION_ERROR;
11802: END IF;
11795: x_sty_name => l_sty_name,
11796: x_return_status => x_return_status);
11797:
11798: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11799: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11800: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11801: RAISE OKL_API.G_EXCEPTION_ERROR;
11802: END IF;
11803:
11796: x_return_status => x_return_status);
11797:
11798: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11799: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11800: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11801: RAISE OKL_API.G_EXCEPTION_ERROR;
11802: END IF;
11803:
11804: l_stmv_rec := NULL;
11797:
11798: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11799: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11800: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11801: RAISE OKL_API.G_EXCEPTION_ERROR;
11802: END IF;
11803:
11804: l_stmv_rec := NULL;
11805: get_stream_header(p_purpose_code => NULL,
11808: p_sty_id => l_sty_id,
11809: x_stmv_rec => l_stmv_rec,
11810: x_return_status => x_return_status);
11811:
11812: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11813: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11814: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11815: RAISE OKL_API.G_EXCEPTION_ERROR;
11816: END IF;
11809: x_stmv_rec => l_stmv_rec,
11810: x_return_status => x_return_status);
11811:
11812: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11813: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11814: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11815: RAISE OKL_API.G_EXCEPTION_ERROR;
11816: END IF;
11817:
11810: x_return_status => x_return_status);
11811:
11812: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11813: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11814: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11815: RAISE OKL_API.G_EXCEPTION_ERROR;
11816: END IF;
11817:
11818: FOR sec_strms_rec IN sec_strms_pend_csr
11811:
11812: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
11813: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
11814: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
11815: RAISE OKL_API.G_EXCEPTION_ERROR;
11816: END IF;
11817:
11818: FOR sec_strms_rec IN sec_strms_pend_csr
11819: LOOP
11841: END IF;
11842: /* sosharma End Changes*/
11843:
11844: print( l_api_name, 'end' );
11845: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
11846:
11847: Exception
11848:
11849: when OKL_API.G_EXCEPTION_ERROR then
11845: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
11846:
11847: Exception
11848:
11849: when OKL_API.G_EXCEPTION_ERROR then
11850: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
11851: p_api_name => l_api_name,
11852: p_pkg_name => g_pkg_name,
11853: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
11846:
11847: Exception
11848:
11849: when OKL_API.G_EXCEPTION_ERROR then
11850: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
11851: p_api_name => l_api_name,
11852: p_pkg_name => g_pkg_name,
11853: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
11854: x_msg_count => x_msg_count,
11849: when OKL_API.G_EXCEPTION_ERROR then
11850: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
11851: p_api_name => l_api_name,
11852: p_pkg_name => g_pkg_name,
11853: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
11854: x_msg_count => x_msg_count,
11855: x_msg_data => x_msg_data,
11856: p_api_type => g_api_type);
11857:
11854: x_msg_count => x_msg_count,
11855: x_msg_data => x_msg_data,
11856: p_api_type => g_api_type);
11857:
11858: when OKL_API.G_EXCEPTION_UNEXPECTED_ERROR then
11859: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
11860: p_api_name => l_api_name,
11861: p_pkg_name => g_pkg_name,
11862: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
11855: x_msg_data => x_msg_data,
11856: p_api_type => g_api_type);
11857:
11858: when OKL_API.G_EXCEPTION_UNEXPECTED_ERROR then
11859: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
11860: p_api_name => l_api_name,
11861: p_pkg_name => g_pkg_name,
11862: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
11863: x_msg_count => x_msg_count,
11858: when OKL_API.G_EXCEPTION_UNEXPECTED_ERROR then
11859: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
11860: p_api_name => l_api_name,
11861: p_pkg_name => g_pkg_name,
11862: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
11863: x_msg_count => x_msg_count,
11864: x_msg_data => x_msg_data,
11865: p_api_type => g_api_type);
11866:
11864: x_msg_data => x_msg_data,
11865: p_api_type => g_api_type);
11866:
11867: when OTHERS then
11868: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
11869: p_api_name => l_api_name,
11870: p_pkg_name => g_pkg_name,
11871: p_exc_name => 'OTHERS',
11872: x_msg_count => x_msg_count,
12021: BEGIN
12022:
12023: print( l_api_name, 'begin' );
12024:
12025: x_return_status := OKL_API.G_RET_STS_SUCCESS;
12026:
12027: x_return_status := OKL_API.START_ACTIVITY(
12028: p_api_name => l_api_name,
12029: p_pkg_name => g_pkg_name,
12023: print( l_api_name, 'begin' );
12024:
12025: x_return_status := OKL_API.G_RET_STS_SUCCESS;
12026:
12027: x_return_status := OKL_API.START_ACTIVITY(
12028: p_api_name => l_api_name,
12029: p_pkg_name => g_pkg_name,
12030: p_init_msg_list => p_init_msg_list,
12031: l_api_version => p_api_version,
12033: p_api_type => G_API_TYPE,
12034: x_return_status => x_return_status);
12035:
12036: -- check if activity started successfully
12037: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
12038: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12039: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
12040: raise OKL_API.G_EXCEPTION_ERROR;
12041: End If;
12034: x_return_status => x_return_status);
12035:
12036: -- check if activity started successfully
12037: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
12038: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12039: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
12040: raise OKL_API.G_EXCEPTION_ERROR;
12041: End If;
12042:
12035:
12036: -- check if activity started successfully
12037: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
12038: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12039: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
12040: raise OKL_API.G_EXCEPTION_ERROR;
12041: End If;
12042:
12043: print( l_api_name, 'save point' );
12036: -- check if activity started successfully
12037: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
12038: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12039: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
12040: raise OKL_API.G_EXCEPTION_ERROR;
12041: End If;
12042:
12043: print( l_api_name, 'save point' );
12044:
12064: p_stream_type_purpose => sec_strms_rec.stream_type_purpose,
12065: x_mapped_stream => l_mapped_sty_name,
12066: x_return_status => x_return_status);
12067:
12068: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12069: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12070: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12071: RAISE OKL_API.G_EXCEPTION_ERROR;
12072: END IF;
12065: x_mapped_stream => l_mapped_sty_name,
12066: x_return_status => x_return_status);
12067:
12068: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12069: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12070: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12071: RAISE OKL_API.G_EXCEPTION_ERROR;
12072: END IF;
12073:
12066: x_return_status => x_return_status);
12067:
12068: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12069: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12070: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12071: RAISE OKL_API.G_EXCEPTION_ERROR;
12072: END IF;
12073:
12074: If ( l_mapped_sty_name IS NOT NULL ) Then
12067:
12068: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12069: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12070: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12071: RAISE OKL_API.G_EXCEPTION_ERROR;
12072: END IF;
12073:
12074: If ( l_mapped_sty_name IS NOT NULL ) Then
12075:
12098: x_msg_data => x_msg_data,
12099: p_stmv_tbl => l_stmv_tbl,
12100: x_stmv_tbl => x_stmv_tbl);
12101:
12102: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12103: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12104: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12105: RAISE OKL_API.G_EXCEPTION_ERROR;
12106: END IF;
12099: p_stmv_tbl => l_stmv_tbl,
12100: x_stmv_tbl => x_stmv_tbl);
12101:
12102: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12103: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12104: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12105: RAISE OKL_API.G_EXCEPTION_ERROR;
12106: END IF;
12107:
12100: x_stmv_tbl => x_stmv_tbl);
12101:
12102: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12103: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12104: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12105: RAISE OKL_API.G_EXCEPTION_ERROR;
12106: END IF;
12107:
12108: End If;
12101:
12102: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12103: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12104: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12105: RAISE OKL_API.G_EXCEPTION_ERROR;
12106: END IF;
12107:
12108: End If;
12109: l_stmv_tbl.delete;
12118: p_khr_id => sec_strms_rec.agreement_id,
12119: x_mapped_stream => l_mapped_sty_name,
12120: x_return_status => x_return_status);
12121:
12122: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12123: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12124: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12125: RAISE OKL_API.G_EXCEPTION_ERROR;
12126: END IF;
12119: x_mapped_stream => l_mapped_sty_name,
12120: x_return_status => x_return_status);
12121:
12122: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12123: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12124: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12125: RAISE OKL_API.G_EXCEPTION_ERROR;
12126: END IF;
12127:
12120: x_return_status => x_return_status);
12121:
12122: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12123: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12124: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12125: RAISE OKL_API.G_EXCEPTION_ERROR;
12126: END IF;
12127:
12128: If ( l_mapped_sty_name IS NOT NULL ) Then
12121:
12122: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12123: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12124: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12125: RAISE OKL_API.G_EXCEPTION_ERROR;
12126: END IF;
12127:
12128: If ( l_mapped_sty_name IS NOT NULL ) Then
12129:
12152: x_msg_data => x_msg_data,
12153: p_stmv_tbl => l_stmv_tbl,
12154: x_stmv_tbl => x_stmv_tbl);
12155:
12156: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12157: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12158: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12159: RAISE OKL_API.G_EXCEPTION_ERROR;
12160: END IF;
12153: p_stmv_tbl => l_stmv_tbl,
12154: x_stmv_tbl => x_stmv_tbl);
12155:
12156: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12157: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12158: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12159: RAISE OKL_API.G_EXCEPTION_ERROR;
12160: END IF;
12161:
12154: x_stmv_tbl => x_stmv_tbl);
12155:
12156: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12157: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12158: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12159: RAISE OKL_API.G_EXCEPTION_ERROR;
12160: END IF;
12161:
12162: End If;
12155:
12156: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12157: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12158: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12159: RAISE OKL_API.G_EXCEPTION_ERROR;
12160: END IF;
12161:
12162: End If;
12163: l_stmv_tbl.delete;
12184: x_return_status => x_return_status,
12185: x_msg_count => x_msg_count,
12186: x_msg_data => x_msg_data);
12187:
12188: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12189: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12190: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12191: RAISE OKL_API.G_EXCEPTION_ERROR;
12192: END IF;
12185: x_msg_count => x_msg_count,
12186: x_msg_data => x_msg_data);
12187:
12188: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12189: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12190: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12191: RAISE OKL_API.G_EXCEPTION_ERROR;
12192: END IF;
12193:
12186: x_msg_data => x_msg_data);
12187:
12188: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12189: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12190: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12191: RAISE OKL_API.G_EXCEPTION_ERROR;
12192: END IF;
12193:
12194: l_stmv_rec.say_code := 'CURR';
12187:
12188: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12189: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12190: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12191: RAISE OKL_API.G_EXCEPTION_ERROR;
12192: END IF;
12193:
12194: l_stmv_rec.say_code := 'CURR';
12195: l_stmv_rec.date_current := sysdate;
12211: p_selv_tbl => l_selv_tbl,
12212: x_selv_tbl => lx_selv_tbl);
12213:
12214: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
12215: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12216: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
12217: RAISE OKL_API.G_EXCEPTION_ERROR;
12218: END IF;
12219:
12213:
12214: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
12215: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12216: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
12217: RAISE OKL_API.G_EXCEPTION_ERROR;
12218: END IF;
12219:
12220: l_selv_tbl.DELETE;
12221: l_selv_tbl := lx_selv_tbl;
12230: x_stmv_rec => lx_stmv_rec,
12231: x_selv_tbl => lx_selv_tbl);
12232:
12233: print( l_api_name, ' creating pv disb streams : done ', x_return_status );
12234: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12235: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12236: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12237: RAISE OKL_API.G_EXCEPTION_ERROR;
12238: END IF;
12231: x_selv_tbl => lx_selv_tbl);
12232:
12233: print( l_api_name, ' creating pv disb streams : done ', x_return_status );
12234: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12235: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12236: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12237: RAISE OKL_API.G_EXCEPTION_ERROR;
12238: END IF;
12239:
12232:
12233: print( l_api_name, ' creating pv disb streams : done ', x_return_status );
12234: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12235: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12236: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12237: RAISE OKL_API.G_EXCEPTION_ERROR;
12238: END IF;
12239:
12240: l_selv_tbl.delete;
12233: print( l_api_name, ' creating pv disb streams : done ', x_return_status );
12234: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12235: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12236: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12237: RAISE OKL_API.G_EXCEPTION_ERROR;
12238: END IF;
12239:
12240: l_selv_tbl.delete;
12241:
12254: p_khr_id => sec_strms_rec.agreement_id,
12255: x_mapped_stream => l_mapped_sty_name,
12256: x_return_status => x_return_status);
12257:
12258: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12259: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12260: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12261: RAISE OKL_API.G_EXCEPTION_ERROR;
12262: END IF;
12255: x_mapped_stream => l_mapped_sty_name,
12256: x_return_status => x_return_status);
12257:
12258: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12259: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12260: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12261: RAISE OKL_API.G_EXCEPTION_ERROR;
12262: END IF;
12263:
12256: x_return_status => x_return_status);
12257:
12258: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12259: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12260: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12261: RAISE OKL_API.G_EXCEPTION_ERROR;
12262: END IF;
12263:
12264: If ( l_mapped_sty_name IS NOT NULL ) Then
12257:
12258: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12259: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12260: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12261: RAISE OKL_API.G_EXCEPTION_ERROR;
12262: END IF;
12263:
12264: If ( l_mapped_sty_name IS NOT NULL ) Then
12265:
12288: x_msg_data => x_msg_data,
12289: p_stmv_tbl => l_stmv_tbl,
12290: x_stmv_tbl => x_stmv_tbl);
12291:
12292: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12293: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12294: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12295: RAISE OKL_API.G_EXCEPTION_ERROR;
12296: END IF;
12289: p_stmv_tbl => l_stmv_tbl,
12290: x_stmv_tbl => x_stmv_tbl);
12291:
12292: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12293: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12294: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12295: RAISE OKL_API.G_EXCEPTION_ERROR;
12296: END IF;
12297:
12290: x_stmv_tbl => x_stmv_tbl);
12291:
12292: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12293: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12294: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12295: RAISE OKL_API.G_EXCEPTION_ERROR;
12296: END IF;
12297:
12298: End If;
12291:
12292: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12293: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12294: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12295: RAISE OKL_API.G_EXCEPTION_ERROR;
12296: END IF;
12297:
12298: End If;
12299: l_stmv_tbl.delete;
12307: p_khr_id => sec_strms_rec.agreement_id,
12308: x_mapped_stream => l_mapped_sty_name,
12309: x_return_status => x_return_status);
12310:
12311: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12312: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12313: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12314: RAISE OKL_API.G_EXCEPTION_ERROR;
12315: END IF;
12308: x_mapped_stream => l_mapped_sty_name,
12309: x_return_status => x_return_status);
12310:
12311: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12312: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12313: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12314: RAISE OKL_API.G_EXCEPTION_ERROR;
12315: END IF;
12316:
12309: x_return_status => x_return_status);
12310:
12311: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12312: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12313: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12314: RAISE OKL_API.G_EXCEPTION_ERROR;
12315: END IF;
12316:
12317: If ( l_mapped_sty_name IS NOT NULL ) Then
12310:
12311: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12312: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12313: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12314: RAISE OKL_API.G_EXCEPTION_ERROR;
12315: END IF;
12316:
12317: If ( l_mapped_sty_name IS NOT NULL ) Then
12318:
12341: x_msg_data => x_msg_data,
12342: p_stmv_tbl => l_stmv_tbl,
12343: x_stmv_tbl => x_stmv_tbl);
12344:
12345: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12346: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12347: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12348: RAISE OKL_API.G_EXCEPTION_ERROR;
12349: END IF;
12342: p_stmv_tbl => l_stmv_tbl,
12343: x_stmv_tbl => x_stmv_tbl);
12344:
12345: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12346: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12347: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12348: RAISE OKL_API.G_EXCEPTION_ERROR;
12349: END IF;
12350:
12343: x_stmv_tbl => x_stmv_tbl);
12344:
12345: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12346: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12347: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12348: RAISE OKL_API.G_EXCEPTION_ERROR;
12349: END IF;
12350:
12351: End If;
12344:
12345: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12346: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12347: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12348: RAISE OKL_API.G_EXCEPTION_ERROR;
12349: END IF;
12350:
12351: End If;
12352: l_stmv_tbl.delete;
12373: x_return_status => x_return_status,
12374: x_msg_count => x_msg_count,
12375: x_msg_data => x_msg_data);
12376:
12377: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12378: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12379: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12380: RAISE OKL_API.G_EXCEPTION_ERROR;
12381: END IF;
12374: x_msg_count => x_msg_count,
12375: x_msg_data => x_msg_data);
12376:
12377: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12378: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12379: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12380: RAISE OKL_API.G_EXCEPTION_ERROR;
12381: END IF;
12382:
12375: x_msg_data => x_msg_data);
12376:
12377: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12378: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12379: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12380: RAISE OKL_API.G_EXCEPTION_ERROR;
12381: END IF;
12382:
12383: l_stmv_rec.say_code := 'CURR';
12376:
12377: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12378: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12379: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12380: RAISE OKL_API.G_EXCEPTION_ERROR;
12381: END IF;
12382:
12383: l_stmv_rec.say_code := 'CURR';
12384: l_stmv_rec.date_current := sysdate;
12400: p_selv_tbl => l_selv_tbl,
12401: x_selv_tbl => lx_selv_tbl);
12402:
12403: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
12404: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12405: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
12406: RAISE OKL_API.G_EXCEPTION_ERROR;
12407: END IF;
12408:
12402:
12403: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
12404: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12405: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
12406: RAISE OKL_API.G_EXCEPTION_ERROR;
12407: END IF;
12408:
12409: l_selv_tbl.DELETE;
12410: l_selv_tbl := lx_selv_tbl;
12419: x_stmv_rec => lx_stmv_rec,
12420: x_selv_tbl => lx_selv_tbl);
12421:
12422: print( l_api_name, ' creating pv disb streams : done ', x_return_status );
12423: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12424: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12425: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12426: RAISE OKL_API.G_EXCEPTION_ERROR;
12427: END IF;
12420: x_selv_tbl => lx_selv_tbl);
12421:
12422: print( l_api_name, ' creating pv disb streams : done ', x_return_status );
12423: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12424: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12425: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12426: RAISE OKL_API.G_EXCEPTION_ERROR;
12427: END IF;
12428:
12421:
12422: print( l_api_name, ' creating pv disb streams : done ', x_return_status );
12423: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12424: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12425: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12426: RAISE OKL_API.G_EXCEPTION_ERROR;
12427: END IF;
12428:
12429: l_selv_tbl.delete;
12422: print( l_api_name, ' creating pv disb streams : done ', x_return_status );
12423: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12424: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12425: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12426: RAISE OKL_API.G_EXCEPTION_ERROR;
12427: END IF;
12428:
12429: l_selv_tbl.delete;
12430:
12433: END LOOP;
12434:
12435: END IF;
12436:
12437: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
12438: print( l_api_name, 'end' );
12439:
12440: Exception
12441:
12438: print( l_api_name, 'end' );
12439:
12440: Exception
12441:
12442: when OKL_API.G_EXCEPTION_ERROR then
12443: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
12444: p_api_name => l_api_name,
12445: p_pkg_name => g_pkg_name,
12446: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
12439:
12440: Exception
12441:
12442: when OKL_API.G_EXCEPTION_ERROR then
12443: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
12444: p_api_name => l_api_name,
12445: p_pkg_name => g_pkg_name,
12446: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
12447: x_msg_count => x_msg_count,
12442: when OKL_API.G_EXCEPTION_ERROR then
12443: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
12444: p_api_name => l_api_name,
12445: p_pkg_name => g_pkg_name,
12446: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
12447: x_msg_count => x_msg_count,
12448: x_msg_data => x_msg_data,
12449: p_api_type => g_api_type);
12450:
12447: x_msg_count => x_msg_count,
12448: x_msg_data => x_msg_data,
12449: p_api_type => g_api_type);
12450:
12451: when OKL_API.G_EXCEPTION_UNEXPECTED_ERROR then
12452: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
12453: p_api_name => l_api_name,
12454: p_pkg_name => g_pkg_name,
12455: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
12448: x_msg_data => x_msg_data,
12449: p_api_type => g_api_type);
12450:
12451: when OKL_API.G_EXCEPTION_UNEXPECTED_ERROR then
12452: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
12453: p_api_name => l_api_name,
12454: p_pkg_name => g_pkg_name,
12455: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
12456: x_msg_count => x_msg_count,
12451: when OKL_API.G_EXCEPTION_UNEXPECTED_ERROR then
12452: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
12453: p_api_name => l_api_name,
12454: p_pkg_name => g_pkg_name,
12455: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
12456: x_msg_count => x_msg_count,
12457: x_msg_data => x_msg_data,
12458: p_api_type => g_api_type);
12459:
12457: x_msg_data => x_msg_data,
12458: p_api_type => g_api_type);
12459:
12460: when OTHERS then
12461: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
12462: p_api_name => l_api_name,
12463: p_pkg_name => g_pkg_name,
12464: p_exc_name => 'OTHERS',
12465: x_msg_count => x_msg_count,
12618: BEGIN
12619:
12620: print( l_api_name, 'begin' );
12621:
12622: x_return_status := OKL_API.G_RET_STS_SUCCESS;
12623:
12624: x_return_status := OKL_API.START_ACTIVITY(
12625: p_api_name => l_api_name,
12626: p_pkg_name => g_pkg_name,
12620: print( l_api_name, 'begin' );
12621:
12622: x_return_status := OKL_API.G_RET_STS_SUCCESS;
12623:
12624: x_return_status := OKL_API.START_ACTIVITY(
12625: p_api_name => l_api_name,
12626: p_pkg_name => g_pkg_name,
12627: p_init_msg_list => p_init_msg_list,
12628: l_api_version => p_api_version,
12630: p_api_type => G_API_TYPE,
12631: x_return_status => x_return_status);
12632:
12633: -- check if activity started successfully
12634: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
12635: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12636: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
12637: raise OKL_API.G_EXCEPTION_ERROR;
12638: End If;
12631: x_return_status => x_return_status);
12632:
12633: -- check if activity started successfully
12634: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
12635: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12636: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
12637: raise OKL_API.G_EXCEPTION_ERROR;
12638: End If;
12639:
12632:
12633: -- check if activity started successfully
12634: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
12635: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12636: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
12637: raise OKL_API.G_EXCEPTION_ERROR;
12638: End If;
12639:
12640: print( l_api_name, 'save point' );
12633: -- check if activity started successfully
12634: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
12635: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12636: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
12637: raise OKL_API.G_EXCEPTION_ERROR;
12638: End If;
12639:
12640: print( l_api_name, 'save point' );
12641:
12668: x_return_status => x_return_status);
12669:
12670: print( l_api_name, ' mapped sty ' || l_mapped_sty_name );
12671:
12672: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12673: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12674: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12675: RAISE OKL_API.G_EXCEPTION_ERROR;
12676: END IF;
12669:
12670: print( l_api_name, ' mapped sty ' || l_mapped_sty_name );
12671:
12672: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12673: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12674: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12675: RAISE OKL_API.G_EXCEPTION_ERROR;
12676: END IF;
12677:
12670: print( l_api_name, ' mapped sty ' || l_mapped_sty_name );
12671:
12672: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12673: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12674: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12675: RAISE OKL_API.G_EXCEPTION_ERROR;
12676: END IF;
12677:
12678: If l_mapped_sty_name IS NOT NULL Then
12671:
12672: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12673: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12674: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12675: RAISE OKL_API.G_EXCEPTION_ERROR;
12676: END IF;
12677:
12678: If l_mapped_sty_name IS NOT NULL Then
12679:
12700: x_msg_data => x_msg_data,
12701: p_stmv_tbl => l_stmv_tbl,
12702: x_stmv_tbl => x_stmv_tbl);
12703:
12704: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12705: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12706: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12707: RAISE OKL_API.G_EXCEPTION_ERROR;
12708: END IF;
12701: p_stmv_tbl => l_stmv_tbl,
12702: x_stmv_tbl => x_stmv_tbl);
12703:
12704: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12705: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12706: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12707: RAISE OKL_API.G_EXCEPTION_ERROR;
12708: END IF;
12709:
12702: x_stmv_tbl => x_stmv_tbl);
12703:
12704: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12705: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12706: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12707: RAISE OKL_API.G_EXCEPTION_ERROR;
12708: END IF;
12709:
12710: End If;
12703:
12704: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12705: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12706: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12707: RAISE OKL_API.G_EXCEPTION_ERROR;
12708: END IF;
12709:
12710: End If;
12711: l_stmv_tbl.delete;
12722: x_return_status => x_return_status);
12723:
12724: print( l_api_name, ' mapped sty ' || l_mapped_sty_name );
12725:
12726: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12727: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12728: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12729: RAISE OKL_API.G_EXCEPTION_ERROR;
12730: END IF;
12723:
12724: print( l_api_name, ' mapped sty ' || l_mapped_sty_name );
12725:
12726: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12727: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12728: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12729: RAISE OKL_API.G_EXCEPTION_ERROR;
12730: END IF;
12731:
12724: print( l_api_name, ' mapped sty ' || l_mapped_sty_name );
12725:
12726: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12727: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12728: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12729: RAISE OKL_API.G_EXCEPTION_ERROR;
12730: END IF;
12731:
12732: If l_mapped_sty_name IS NOT NULL Then
12725:
12726: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12727: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12728: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12729: RAISE OKL_API.G_EXCEPTION_ERROR;
12730: END IF;
12731:
12732: If l_mapped_sty_name IS NOT NULL Then
12733:
12754: x_msg_data => x_msg_data,
12755: p_stmv_tbl => l_stmv_tbl,
12756: x_stmv_tbl => x_stmv_tbl);
12757:
12758: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12759: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12760: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12761: RAISE OKL_API.G_EXCEPTION_ERROR;
12762: END IF;
12755: p_stmv_tbl => l_stmv_tbl,
12756: x_stmv_tbl => x_stmv_tbl);
12757:
12758: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12759: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12760: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12761: RAISE OKL_API.G_EXCEPTION_ERROR;
12762: END IF;
12763:
12756: x_stmv_tbl => x_stmv_tbl);
12757:
12758: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12759: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12760: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12761: RAISE OKL_API.G_EXCEPTION_ERROR;
12762: END IF;
12763:
12764: End If;
12757:
12758: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12759: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12760: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12761: RAISE OKL_API.G_EXCEPTION_ERROR;
12762: END IF;
12763:
12764: End If;
12765: l_stmv_tbl.delete;
12788: x_return_status => x_return_status,
12789: x_msg_count => x_msg_count,
12790: x_msg_data => x_msg_data);
12791:
12792: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12793: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12794: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12795: RAISE OKL_API.G_EXCEPTION_ERROR;
12796: END IF;
12789: x_msg_count => x_msg_count,
12790: x_msg_data => x_msg_data);
12791:
12792: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12793: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12794: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12795: RAISE OKL_API.G_EXCEPTION_ERROR;
12796: END IF;
12797:
12790: x_msg_data => x_msg_data);
12791:
12792: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12793: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12794: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12795: RAISE OKL_API.G_EXCEPTION_ERROR;
12796: END IF;
12797:
12798: l_stmv_rec.say_code := 'CURR';
12791:
12792: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12793: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12794: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12795: RAISE OKL_API.G_EXCEPTION_ERROR;
12796: END IF;
12797:
12798: l_stmv_rec.say_code := 'CURR';
12799: l_stmv_rec.date_current := sysdate;
12814: p_selv_tbl => l_selv_tbl,
12815: x_selv_tbl => lx_selv_tbl);
12816:
12817: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
12818: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12819: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
12820: RAISE OKL_API.G_EXCEPTION_ERROR;
12821: END IF;
12822:
12816:
12817: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
12818: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12819: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
12820: RAISE OKL_API.G_EXCEPTION_ERROR;
12821: END IF;
12822:
12823: l_selv_tbl.DELETE;
12824: l_selv_tbl := lx_selv_tbl;
12832: p_selv_tbl => l_selv_tbl,
12833: x_stmv_rec => lx_stmv_rec,
12834: x_selv_tbl => lx_selv_tbl);
12835:
12836: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12837: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12838: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12839: RAISE OKL_API.G_EXCEPTION_ERROR;
12840: END IF;
12833: x_stmv_rec => lx_stmv_rec,
12834: x_selv_tbl => lx_selv_tbl);
12835:
12836: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12837: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12838: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12839: RAISE OKL_API.G_EXCEPTION_ERROR;
12840: END IF;
12841:
12834: x_selv_tbl => lx_selv_tbl);
12835:
12836: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12837: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12838: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12839: RAISE OKL_API.G_EXCEPTION_ERROR;
12840: END IF;
12841:
12842: l_selv_tbl.delete;
12835:
12836: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12837: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12838: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12839: RAISE OKL_API.G_EXCEPTION_ERROR;
12840: END IF;
12841:
12842: l_selv_tbl.delete;
12843:
12859: x_return_status => x_return_status);
12860:
12861: print( l_api_name, ' mapped sty ' || l_mapped_sty_name );
12862:
12863: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12864: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12865: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12866: RAISE OKL_API.G_EXCEPTION_ERROR;
12867: END IF;
12860:
12861: print( l_api_name, ' mapped sty ' || l_mapped_sty_name );
12862:
12863: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12864: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12865: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12866: RAISE OKL_API.G_EXCEPTION_ERROR;
12867: END IF;
12868:
12861: print( l_api_name, ' mapped sty ' || l_mapped_sty_name );
12862:
12863: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12864: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12865: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12866: RAISE OKL_API.G_EXCEPTION_ERROR;
12867: END IF;
12868:
12869: If l_mapped_sty_name IS NOT NULL Then
12862:
12863: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12864: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12865: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12866: RAISE OKL_API.G_EXCEPTION_ERROR;
12867: END IF;
12868:
12869: If l_mapped_sty_name IS NOT NULL Then
12870:
12891: x_msg_data => x_msg_data,
12892: p_stmv_tbl => l_stmv_tbl,
12893: x_stmv_tbl => x_stmv_tbl);
12894:
12895: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12896: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12897: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12898: RAISE OKL_API.G_EXCEPTION_ERROR;
12899: END IF;
12892: p_stmv_tbl => l_stmv_tbl,
12893: x_stmv_tbl => x_stmv_tbl);
12894:
12895: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12896: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12897: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12898: RAISE OKL_API.G_EXCEPTION_ERROR;
12899: END IF;
12900:
12893: x_stmv_tbl => x_stmv_tbl);
12894:
12895: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12896: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12897: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12898: RAISE OKL_API.G_EXCEPTION_ERROR;
12899: END IF;
12900:
12901: End If;
12894:
12895: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12896: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12897: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12898: RAISE OKL_API.G_EXCEPTION_ERROR;
12899: END IF;
12900:
12901: End If;
12902: l_stmv_tbl.delete;
12913: x_return_status => x_return_status);
12914:
12915: print( l_api_name, ' mapped sty ' || l_mapped_sty_name );
12916:
12917: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12918: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12919: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12920: RAISE OKL_API.G_EXCEPTION_ERROR;
12921: END IF;
12914:
12915: print( l_api_name, ' mapped sty ' || l_mapped_sty_name );
12916:
12917: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12918: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12919: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12920: RAISE OKL_API.G_EXCEPTION_ERROR;
12921: END IF;
12922:
12915: print( l_api_name, ' mapped sty ' || l_mapped_sty_name );
12916:
12917: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12918: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12919: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12920: RAISE OKL_API.G_EXCEPTION_ERROR;
12921: END IF;
12922:
12923: If l_mapped_sty_name IS NOT NULL Then
12916:
12917: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12918: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12919: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12920: RAISE OKL_API.G_EXCEPTION_ERROR;
12921: END IF;
12922:
12923: If l_mapped_sty_name IS NOT NULL Then
12924:
12945: x_msg_data => x_msg_data,
12946: p_stmv_tbl => l_stmv_tbl,
12947: x_stmv_tbl => x_stmv_tbl);
12948:
12949: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12950: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12951: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12952: RAISE OKL_API.G_EXCEPTION_ERROR;
12953: END IF;
12946: p_stmv_tbl => l_stmv_tbl,
12947: x_stmv_tbl => x_stmv_tbl);
12948:
12949: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12950: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12951: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12952: RAISE OKL_API.G_EXCEPTION_ERROR;
12953: END IF;
12954:
12947: x_stmv_tbl => x_stmv_tbl);
12948:
12949: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12950: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12951: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12952: RAISE OKL_API.G_EXCEPTION_ERROR;
12953: END IF;
12954:
12955: End If;
12948:
12949: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12950: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12951: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12952: RAISE OKL_API.G_EXCEPTION_ERROR;
12953: END IF;
12954:
12955: End If;
12956: l_stmv_tbl.delete;
12981: x_return_status => x_return_status,
12982: x_msg_count => x_msg_count,
12983: x_msg_data => x_msg_data);
12984:
12985: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12986: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12987: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12988: RAISE OKL_API.G_EXCEPTION_ERROR;
12989: END IF;
12982: x_msg_count => x_msg_count,
12983: x_msg_data => x_msg_data);
12984:
12985: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12986: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12987: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12988: RAISE OKL_API.G_EXCEPTION_ERROR;
12989: END IF;
12990:
12983: x_msg_data => x_msg_data);
12984:
12985: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12986: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12987: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12988: RAISE OKL_API.G_EXCEPTION_ERROR;
12989: END IF;
12990:
12991: l_stmv_rec.say_code := 'CURR';
12984:
12985: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
12986: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
12987: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
12988: RAISE OKL_API.G_EXCEPTION_ERROR;
12989: END IF;
12990:
12991: l_stmv_rec.say_code := 'CURR';
12992: l_stmv_rec.date_current := sysdate;
13007: p_selv_tbl => l_selv_tbl,
13008: x_selv_tbl => lx_selv_tbl);
13009:
13010: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
13011: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13012: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
13013: RAISE OKL_API.G_EXCEPTION_ERROR;
13014: END IF;
13015:
13009:
13010: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
13011: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13012: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
13013: RAISE OKL_API.G_EXCEPTION_ERROR;
13014: END IF;
13015:
13016: l_selv_tbl.DELETE;
13017: l_selv_tbl := lx_selv_tbl;
13025: p_selv_tbl => l_selv_tbl,
13026: x_stmv_rec => lx_stmv_rec,
13027: x_selv_tbl => lx_selv_tbl);
13028:
13029: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
13030: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13031: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
13032: RAISE OKL_API.G_EXCEPTION_ERROR;
13033: END IF;
13026: x_stmv_rec => lx_stmv_rec,
13027: x_selv_tbl => lx_selv_tbl);
13028:
13029: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
13030: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13031: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
13032: RAISE OKL_API.G_EXCEPTION_ERROR;
13033: END IF;
13034:
13027: x_selv_tbl => lx_selv_tbl);
13028:
13029: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
13030: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13031: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
13032: RAISE OKL_API.G_EXCEPTION_ERROR;
13033: END IF;
13034:
13035: l_selv_tbl.delete;
13028:
13029: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
13030: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13031: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
13032: RAISE OKL_API.G_EXCEPTION_ERROR;
13033: END IF;
13034:
13035: l_selv_tbl.delete;
13036:
13039: END LOOP;
13040:
13041: END IF;
13042:
13043: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
13044: print( l_api_name, 'end' );
13045:
13046: Exception
13047:
13044: print( l_api_name, 'end' );
13045:
13046: Exception
13047:
13048: when OKL_API.G_EXCEPTION_ERROR then
13049: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13050: p_api_name => l_api_name,
13051: p_pkg_name => g_pkg_name,
13052: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
13045:
13046: Exception
13047:
13048: when OKL_API.G_EXCEPTION_ERROR then
13049: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13050: p_api_name => l_api_name,
13051: p_pkg_name => g_pkg_name,
13052: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
13053: x_msg_count => x_msg_count,
13048: when OKL_API.G_EXCEPTION_ERROR then
13049: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13050: p_api_name => l_api_name,
13051: p_pkg_name => g_pkg_name,
13052: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
13053: x_msg_count => x_msg_count,
13054: x_msg_data => x_msg_data,
13055: p_api_type => g_api_type);
13056:
13053: x_msg_count => x_msg_count,
13054: x_msg_data => x_msg_data,
13055: p_api_type => g_api_type);
13056:
13057: when OKL_API.G_EXCEPTION_UNEXPECTED_ERROR then
13058: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13059: p_api_name => l_api_name,
13060: p_pkg_name => g_pkg_name,
13061: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
13054: x_msg_data => x_msg_data,
13055: p_api_type => g_api_type);
13056:
13057: when OKL_API.G_EXCEPTION_UNEXPECTED_ERROR then
13058: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13059: p_api_name => l_api_name,
13060: p_pkg_name => g_pkg_name,
13061: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
13062: x_msg_count => x_msg_count,
13057: when OKL_API.G_EXCEPTION_UNEXPECTED_ERROR then
13058: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13059: p_api_name => l_api_name,
13060: p_pkg_name => g_pkg_name,
13061: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
13062: x_msg_count => x_msg_count,
13063: x_msg_data => x_msg_data,
13064: p_api_type => g_api_type);
13065:
13063: x_msg_data => x_msg_data,
13064: p_api_type => g_api_type);
13065:
13066: when OTHERS then
13067: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13068: p_api_name => l_api_name,
13069: p_pkg_name => g_pkg_name,
13070: p_exc_name => 'OTHERS',
13071: x_msg_count => x_msg_count,
13091: BEGIN
13092:
13093: print( l_api_name, 'begin' );
13094:
13095: x_return_status := OKL_API.G_RET_STS_SUCCESS;
13096:
13097: x_return_status := OKL_API.START_ACTIVITY(
13098: p_api_name => l_api_name,
13099: p_pkg_name => g_pkg_name,
13093: print( l_api_name, 'begin' );
13094:
13095: x_return_status := OKL_API.G_RET_STS_SUCCESS;
13096:
13097: x_return_status := OKL_API.START_ACTIVITY(
13098: p_api_name => l_api_name,
13099: p_pkg_name => g_pkg_name,
13100: p_init_msg_list => p_init_msg_list,
13101: l_api_version => p_api_version,
13103: p_api_type => G_API_TYPE,
13104: x_return_status => x_return_status);
13105:
13106: -- check if activity started successfully
13107: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13108: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13109: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13110: raise OKL_API.G_EXCEPTION_ERROR;
13111: End If;
13104: x_return_status => x_return_status);
13105:
13106: -- check if activity started successfully
13107: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13108: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13109: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13110: raise OKL_API.G_EXCEPTION_ERROR;
13111: End If;
13112:
13105:
13106: -- check if activity started successfully
13107: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13108: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13109: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13110: raise OKL_API.G_EXCEPTION_ERROR;
13111: End If;
13112:
13113: gen_disbursement_streams(p_api_version => p_api_version,
13106: -- check if activity started successfully
13107: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13108: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13109: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13110: raise OKL_API.G_EXCEPTION_ERROR;
13111: End If;
13112:
13113: gen_disbursement_streams(p_api_version => p_api_version,
13114: p_init_msg_list => p_init_msg_list,
13120: x_return_status => x_return_status,
13121: x_msg_count => x_msg_count,
13122: x_msg_data => x_msg_data);
13123:
13124: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13125: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13126: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13127: raise OKL_API.G_EXCEPTION_ERROR;
13128: End If;
13121: x_msg_count => x_msg_count,
13122: x_msg_data => x_msg_data);
13123:
13124: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13125: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13126: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13127: raise OKL_API.G_EXCEPTION_ERROR;
13128: End If;
13129:
13122: x_msg_data => x_msg_data);
13123:
13124: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13125: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13126: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13127: raise OKL_API.G_EXCEPTION_ERROR;
13128: End If;
13129:
13130: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
13123:
13124: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13125: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13126: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13127: raise OKL_API.G_EXCEPTION_ERROR;
13128: End If;
13129:
13130: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
13131: print( l_api_name, 'end' );
13126: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13127: raise OKL_API.G_EXCEPTION_ERROR;
13128: End If;
13129:
13130: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
13131: print( l_api_name, 'end' );
13132: Exception
13133:
13134: when OKL_API.G_EXCEPTION_ERROR then
13130: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
13131: print( l_api_name, 'end' );
13132: Exception
13133:
13134: when OKL_API.G_EXCEPTION_ERROR then
13135: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13136: p_api_name => l_api_name,
13137: p_pkg_name => g_pkg_name,
13138: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
13131: print( l_api_name, 'end' );
13132: Exception
13133:
13134: when OKL_API.G_EXCEPTION_ERROR then
13135: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13136: p_api_name => l_api_name,
13137: p_pkg_name => g_pkg_name,
13138: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
13139: x_msg_count => x_msg_count,
13134: when OKL_API.G_EXCEPTION_ERROR then
13135: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13136: p_api_name => l_api_name,
13137: p_pkg_name => g_pkg_name,
13138: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
13139: x_msg_count => x_msg_count,
13140: x_msg_data => x_msg_data,
13141: p_api_type => g_api_type);
13142:
13139: x_msg_count => x_msg_count,
13140: x_msg_data => x_msg_data,
13141: p_api_type => g_api_type);
13142:
13143: when OKL_API.G_EXCEPTION_UNEXPECTED_ERROR then
13144: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13145: p_api_name => l_api_name,
13146: p_pkg_name => g_pkg_name,
13147: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
13140: x_msg_data => x_msg_data,
13141: p_api_type => g_api_type);
13142:
13143: when OKL_API.G_EXCEPTION_UNEXPECTED_ERROR then
13144: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13145: p_api_name => l_api_name,
13146: p_pkg_name => g_pkg_name,
13147: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
13148: x_msg_count => x_msg_count,
13143: when OKL_API.G_EXCEPTION_UNEXPECTED_ERROR then
13144: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13145: p_api_name => l_api_name,
13146: p_pkg_name => g_pkg_name,
13147: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
13148: x_msg_count => x_msg_count,
13149: x_msg_data => x_msg_data,
13150: p_api_type => g_api_type);
13151:
13149: x_msg_data => x_msg_data,
13150: p_api_type => g_api_type);
13151:
13152: when OTHERS then
13153: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13154: p_api_name => l_api_name,
13155: p_pkg_name => g_pkg_name,
13156: p_exc_name => 'OTHERS',
13157: x_msg_count => x_msg_count,
13175: BEGIN
13176:
13177: print( l_api_name, 'begin' );
13178:
13179: x_return_status := OKL_API.G_RET_STS_SUCCESS;
13180:
13181: x_return_status := OKL_API.START_ACTIVITY(
13182: p_api_name => l_api_name,
13183: p_pkg_name => g_pkg_name,
13177: print( l_api_name, 'begin' );
13178:
13179: x_return_status := OKL_API.G_RET_STS_SUCCESS;
13180:
13181: x_return_status := OKL_API.START_ACTIVITY(
13182: p_api_name => l_api_name,
13183: p_pkg_name => g_pkg_name,
13184: p_init_msg_list => p_init_msg_list,
13185: l_api_version => p_api_version,
13187: p_api_type => G_API_TYPE,
13188: x_return_status => x_return_status);
13189:
13190: -- check if activity started successfully
13191: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13192: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13193: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13194: raise OKL_API.G_EXCEPTION_ERROR;
13195: End If;
13188: x_return_status => x_return_status);
13189:
13190: -- check if activity started successfully
13191: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13192: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13193: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13194: raise OKL_API.G_EXCEPTION_ERROR;
13195: End If;
13196:
13189:
13190: -- check if activity started successfully
13191: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13192: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13193: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13194: raise OKL_API.G_EXCEPTION_ERROR;
13195: End If;
13196:
13197: gen_disbursement_streams(p_api_version => p_api_version,
13190: -- check if activity started successfully
13191: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13192: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13193: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13194: raise OKL_API.G_EXCEPTION_ERROR;
13195: End If;
13196:
13197: gen_disbursement_streams(p_api_version => p_api_version,
13198: p_init_msg_list => p_init_msg_list,
13202: x_return_status => x_return_status,
13203: x_msg_count => x_msg_count,
13204: x_msg_data => x_msg_data);
13205:
13206: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13207: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13208: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13209: raise OKL_API.G_EXCEPTION_ERROR;
13210: End If;
13203: x_msg_count => x_msg_count,
13204: x_msg_data => x_msg_data);
13205:
13206: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13207: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13208: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13209: raise OKL_API.G_EXCEPTION_ERROR;
13210: End If;
13211:
13204: x_msg_data => x_msg_data);
13205:
13206: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13207: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13208: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13209: raise OKL_API.G_EXCEPTION_ERROR;
13210: End If;
13211:
13212: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
13205:
13206: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13207: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13208: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13209: raise OKL_API.G_EXCEPTION_ERROR;
13210: End If;
13211:
13212: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
13213: print( l_api_name, 'end' );
13208: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13209: raise OKL_API.G_EXCEPTION_ERROR;
13210: End If;
13211:
13212: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
13213: print( l_api_name, 'end' );
13214: Exception
13215:
13216: when OKL_API.G_EXCEPTION_ERROR then
13212: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
13213: print( l_api_name, 'end' );
13214: Exception
13215:
13216: when OKL_API.G_EXCEPTION_ERROR then
13217: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13218: p_api_name => l_api_name,
13219: p_pkg_name => g_pkg_name,
13220: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
13213: print( l_api_name, 'end' );
13214: Exception
13215:
13216: when OKL_API.G_EXCEPTION_ERROR then
13217: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13218: p_api_name => l_api_name,
13219: p_pkg_name => g_pkg_name,
13220: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
13221: x_msg_count => x_msg_count,
13216: when OKL_API.G_EXCEPTION_ERROR then
13217: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13218: p_api_name => l_api_name,
13219: p_pkg_name => g_pkg_name,
13220: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
13221: x_msg_count => x_msg_count,
13222: x_msg_data => x_msg_data,
13223: p_api_type => g_api_type);
13224:
13221: x_msg_count => x_msg_count,
13222: x_msg_data => x_msg_data,
13223: p_api_type => g_api_type);
13224:
13225: when OKL_API.G_EXCEPTION_UNEXPECTED_ERROR then
13226: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13227: p_api_name => l_api_name,
13228: p_pkg_name => g_pkg_name,
13229: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
13222: x_msg_data => x_msg_data,
13223: p_api_type => g_api_type);
13224:
13225: when OKL_API.G_EXCEPTION_UNEXPECTED_ERROR then
13226: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13227: p_api_name => l_api_name,
13228: p_pkg_name => g_pkg_name,
13229: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
13230: x_msg_count => x_msg_count,
13225: when OKL_API.G_EXCEPTION_UNEXPECTED_ERROR then
13226: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13227: p_api_name => l_api_name,
13228: p_pkg_name => g_pkg_name,
13229: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
13230: x_msg_count => x_msg_count,
13231: x_msg_data => x_msg_data,
13232: p_api_type => g_api_type);
13233:
13231: x_msg_data => x_msg_data,
13232: p_api_type => g_api_type);
13233:
13234: when OTHERS then
13235: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13236: p_api_name => l_api_name,
13237: p_pkg_name => g_pkg_name,
13238: p_exc_name => 'OTHERS',
13239: x_msg_count => x_msg_count,
13257: BEGIN
13258:
13259: print( l_api_name, 'begin' );
13260:
13261: x_return_status := OKL_API.G_RET_STS_SUCCESS;
13262:
13263: x_return_status := OKL_API.START_ACTIVITY(
13264: p_api_name => l_api_name,
13265: p_pkg_name => g_pkg_name,
13259: print( l_api_name, 'begin' );
13260:
13261: x_return_status := OKL_API.G_RET_STS_SUCCESS;
13262:
13263: x_return_status := OKL_API.START_ACTIVITY(
13264: p_api_name => l_api_name,
13265: p_pkg_name => g_pkg_name,
13266: p_init_msg_list => p_init_msg_list,
13267: l_api_version => p_api_version,
13269: p_api_type => G_API_TYPE,
13270: x_return_status => x_return_status);
13271:
13272: -- check if activity started successfully
13273: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13274: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13275: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13276: raise OKL_API.G_EXCEPTION_ERROR;
13277: End If;
13270: x_return_status => x_return_status);
13271:
13272: -- check if activity started successfully
13273: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13274: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13275: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13276: raise OKL_API.G_EXCEPTION_ERROR;
13277: End If;
13278:
13271:
13272: -- check if activity started successfully
13273: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13274: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13275: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13276: raise OKL_API.G_EXCEPTION_ERROR;
13277: End If;
13278:
13279: gen_pv_disb_streams(p_api_version => p_api_version,
13272: -- check if activity started successfully
13273: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13274: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13275: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13276: raise OKL_API.G_EXCEPTION_ERROR;
13277: End If;
13278:
13279: gen_pv_disb_streams(p_api_version => p_api_version,
13280: p_init_msg_list => p_init_msg_list,
13285: x_return_status => x_return_status,
13286: x_msg_count => x_msg_count,
13287: x_msg_data => x_msg_data);
13288:
13289: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13290: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13291: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13292: raise OKL_API.G_EXCEPTION_ERROR;
13293: End If;
13286: x_msg_count => x_msg_count,
13287: x_msg_data => x_msg_data);
13288:
13289: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13290: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13291: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13292: raise OKL_API.G_EXCEPTION_ERROR;
13293: End If;
13294:
13287: x_msg_data => x_msg_data);
13288:
13289: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13290: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13291: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13292: raise OKL_API.G_EXCEPTION_ERROR;
13293: End If;
13294:
13295: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
13288:
13289: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13290: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13291: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13292: raise OKL_API.G_EXCEPTION_ERROR;
13293: End If;
13294:
13295: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
13296: print( l_api_name, 'end' );
13291: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13292: raise OKL_API.G_EXCEPTION_ERROR;
13293: End If;
13294:
13295: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
13296: print( l_api_name, 'end' );
13297: Exception
13298:
13299: when OKL_API.G_EXCEPTION_ERROR then
13295: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
13296: print( l_api_name, 'end' );
13297: Exception
13298:
13299: when OKL_API.G_EXCEPTION_ERROR then
13300: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13301: p_api_name => l_api_name,
13302: p_pkg_name => g_pkg_name,
13303: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
13296: print( l_api_name, 'end' );
13297: Exception
13298:
13299: when OKL_API.G_EXCEPTION_ERROR then
13300: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13301: p_api_name => l_api_name,
13302: p_pkg_name => g_pkg_name,
13303: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
13304: x_msg_count => x_msg_count,
13299: when OKL_API.G_EXCEPTION_ERROR then
13300: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13301: p_api_name => l_api_name,
13302: p_pkg_name => g_pkg_name,
13303: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
13304: x_msg_count => x_msg_count,
13305: x_msg_data => x_msg_data,
13306: p_api_type => g_api_type);
13307:
13304: x_msg_count => x_msg_count,
13305: x_msg_data => x_msg_data,
13306: p_api_type => g_api_type);
13307:
13308: when OKL_API.G_EXCEPTION_UNEXPECTED_ERROR then
13309: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13310: p_api_name => l_api_name,
13311: p_pkg_name => g_pkg_name,
13312: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
13305: x_msg_data => x_msg_data,
13306: p_api_type => g_api_type);
13307:
13308: when OKL_API.G_EXCEPTION_UNEXPECTED_ERROR then
13309: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13310: p_api_name => l_api_name,
13311: p_pkg_name => g_pkg_name,
13312: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
13313: x_msg_count => x_msg_count,
13308: when OKL_API.G_EXCEPTION_UNEXPECTED_ERROR then
13309: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13310: p_api_name => l_api_name,
13311: p_pkg_name => g_pkg_name,
13312: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
13313: x_msg_count => x_msg_count,
13314: x_msg_data => x_msg_data,
13315: p_api_type => g_api_type);
13316:
13314: x_msg_data => x_msg_data,
13315: p_api_type => g_api_type);
13316:
13317: when OTHERS then
13318: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13319: p_api_name => l_api_name,
13320: p_pkg_name => g_pkg_name,
13321: p_exc_name => 'OTHERS',
13322: x_msg_count => x_msg_count,
13340: BEGIN
13341:
13342: print( l_api_name, 'begin' );
13343:
13344: x_return_status := OKL_API.G_RET_STS_SUCCESS;
13345:
13346: x_return_status := OKL_API.START_ACTIVITY(
13347: p_api_name => l_api_name,
13348: p_pkg_name => g_pkg_name,
13342: print( l_api_name, 'begin' );
13343:
13344: x_return_status := OKL_API.G_RET_STS_SUCCESS;
13345:
13346: x_return_status := OKL_API.START_ACTIVITY(
13347: p_api_name => l_api_name,
13348: p_pkg_name => g_pkg_name,
13349: p_init_msg_list => p_init_msg_list,
13350: l_api_version => p_api_version,
13352: p_api_type => G_API_TYPE,
13353: x_return_status => x_return_status);
13354:
13355: -- check if activity started successfully
13356: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13357: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13358: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13359: raise OKL_API.G_EXCEPTION_ERROR;
13360: End If;
13353: x_return_status => x_return_status);
13354:
13355: -- check if activity started successfully
13356: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13357: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13358: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13359: raise OKL_API.G_EXCEPTION_ERROR;
13360: End If;
13361:
13354:
13355: -- check if activity started successfully
13356: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13357: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13358: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13359: raise OKL_API.G_EXCEPTION_ERROR;
13360: End If;
13361:
13362: gen_pv_disb_streams(p_api_version => p_api_version,
13355: -- check if activity started successfully
13356: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13357: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13358: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13359: raise OKL_API.G_EXCEPTION_ERROR;
13360: End If;
13361:
13362: gen_pv_disb_streams(p_api_version => p_api_version,
13363: p_init_msg_list => p_init_msg_list,
13367: x_return_status => x_return_status,
13368: x_msg_count => x_msg_count,
13369: x_msg_data => x_msg_data);
13370:
13371: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13372: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13373: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13374: raise OKL_API.G_EXCEPTION_ERROR;
13375: End If;
13368: x_msg_count => x_msg_count,
13369: x_msg_data => x_msg_data);
13370:
13371: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13372: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13373: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13374: raise OKL_API.G_EXCEPTION_ERROR;
13375: End If;
13376:
13369: x_msg_data => x_msg_data);
13370:
13371: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13372: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13373: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13374: raise OKL_API.G_EXCEPTION_ERROR;
13375: End If;
13376:
13377: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
13370:
13371: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13372: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13373: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13374: raise OKL_API.G_EXCEPTION_ERROR;
13375: End If;
13376:
13377: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
13378: print( l_api_name, 'end' );
13373: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13374: raise OKL_API.G_EXCEPTION_ERROR;
13375: End If;
13376:
13377: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
13378: print( l_api_name, 'end' );
13379: Exception
13380:
13381: when OKL_API.G_EXCEPTION_ERROR then
13377: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
13378: print( l_api_name, 'end' );
13379: Exception
13380:
13381: when OKL_API.G_EXCEPTION_ERROR then
13382: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13383: p_api_name => l_api_name,
13384: p_pkg_name => g_pkg_name,
13385: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
13378: print( l_api_name, 'end' );
13379: Exception
13380:
13381: when OKL_API.G_EXCEPTION_ERROR then
13382: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13383: p_api_name => l_api_name,
13384: p_pkg_name => g_pkg_name,
13385: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
13386: x_msg_count => x_msg_count,
13381: when OKL_API.G_EXCEPTION_ERROR then
13382: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13383: p_api_name => l_api_name,
13384: p_pkg_name => g_pkg_name,
13385: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
13386: x_msg_count => x_msg_count,
13387: x_msg_data => x_msg_data,
13388: p_api_type => g_api_type);
13389:
13386: x_msg_count => x_msg_count,
13387: x_msg_data => x_msg_data,
13388: p_api_type => g_api_type);
13389:
13390: when OKL_API.G_EXCEPTION_UNEXPECTED_ERROR then
13391: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13392: p_api_name => l_api_name,
13393: p_pkg_name => g_pkg_name,
13394: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
13387: x_msg_data => x_msg_data,
13388: p_api_type => g_api_type);
13389:
13390: when OKL_API.G_EXCEPTION_UNEXPECTED_ERROR then
13391: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13392: p_api_name => l_api_name,
13393: p_pkg_name => g_pkg_name,
13394: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
13395: x_msg_count => x_msg_count,
13390: when OKL_API.G_EXCEPTION_UNEXPECTED_ERROR then
13391: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13392: p_api_name => l_api_name,
13393: p_pkg_name => g_pkg_name,
13394: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
13395: x_msg_count => x_msg_count,
13396: x_msg_data => x_msg_data,
13397: p_api_type => g_api_type);
13398:
13396: x_msg_data => x_msg_data,
13397: p_api_type => g_api_type);
13398:
13399: when OTHERS then
13400: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
13401: p_api_name => l_api_name,
13402: p_pkg_name => g_pkg_name,
13403: p_exc_name => 'OTHERS',
13404: x_msg_count => x_msg_count,
13565: x_primary_sty_id => l_sty_id,
13566: x_primary_sty_name => l_stream_name);
13567:
13568: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
13569: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13570: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
13571: RAISE OKL_API.G_EXCEPTION_ERROR;
13572: END IF;
13573: --l_stream_name := 'RENT';
13567:
13568: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
13569: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13570: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
13571: RAISE OKL_API.G_EXCEPTION_ERROR;
13572: END IF;
13573: --l_stream_name := 'RENT';
13574: End If;
13575:
13588: x_days_in_year => l_day_convention_year,
13589: x_return_status => x_return_status);
13590: print( 'get_line_principal_bal', 'Month / Year = ' || l_day_convention_month || '/' || l_day_convention_year );
13591: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
13592: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13593: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
13594: RAISE OKL_API.G_EXCEPTION_ERROR;
13595: END IF;
13596: l_days := OKL_PRICING_UTILS_PVT.get_day_count (p_start_date => trunc(l_principal_bal_date),
13590: print( 'get_line_principal_bal', 'Month / Year = ' || l_day_convention_month || '/' || l_day_convention_year );
13591: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
13592: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13593: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
13594: RAISE OKL_API.G_EXCEPTION_ERROR;
13595: END IF;
13596: l_days := OKL_PRICING_UTILS_PVT.get_day_count (p_start_date => trunc(l_principal_bal_date),
13597: p_days_in_month => l_day_convention_month,
13598: p_days_in_year => l_day_convention_year,
13601: x_return_status => x_return_status);
13602:
13603: print( l_api_name, ' n days ' || to_char( l_days), x_return_status );
13604:
13605: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
13606: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13607: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
13608: RAISE OKL_API.G_EXCEPTION_ERROR;
13609: END IF;
13602:
13603: print( l_api_name, ' n days ' || to_char( l_days), x_return_status );
13604:
13605: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
13606: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13607: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
13608: RAISE OKL_API.G_EXCEPTION_ERROR;
13609: END IF;
13610:
13603: print( l_api_name, ' n days ' || to_char( l_days), x_return_status );
13604:
13605: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
13606: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13607: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
13608: RAISE OKL_API.G_EXCEPTION_ERROR;
13609: END IF;
13610:
13611: l_accumulated_int := l_principal_balance * l_days * l_iir/360;
13604:
13605: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
13606: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13607: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
13608: RAISE OKL_API.G_EXCEPTION_ERROR;
13609: END IF;
13610:
13611: l_accumulated_int := l_principal_balance * l_days * l_iir/360;
13612:
13621:
13622: print( l_api_name, 'end');
13623: EXCEPTION
13624:
13625: WHEN OKL_API.G_EXCEPTION_ERROR THEN
13626:
13627: x_return_status := G_RET_STS_ERROR;
13628:
13629: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
13625: WHEN OKL_API.G_EXCEPTION_ERROR THEN
13626:
13627: x_return_status := G_RET_STS_ERROR;
13628:
13629: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
13630:
13631: x_return_status := G_RET_STS_UNEXP_ERROR;
13632:
13633: WHEN OTHERS THEN
13631: x_return_status := G_RET_STS_UNEXP_ERROR;
13632:
13633: WHEN OTHERS THEN
13634:
13635: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
13636: p_msg_name => G_DB_ERROR,
13637: p_token1 => G_PROG_NAME_TOKEN,
13638: p_token1_value => l_api_name,
13639: p_token2 => G_SQLCODE_TOKEN,
13691: x_return_status => x_return_status,
13692: x_msg_count => x_msg_count,
13693: x_msg_data => x_msg_data);
13694:
13695: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
13696: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13697: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
13698: RAISE OKL_API.G_EXCEPTION_ERROR;
13699: END IF;
13692: x_msg_count => x_msg_count,
13693: x_msg_data => x_msg_data);
13694:
13695: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
13696: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13697: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
13698: RAISE OKL_API.G_EXCEPTION_ERROR;
13699: END IF;
13700:
13693: x_msg_data => x_msg_data);
13694:
13695: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
13696: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13697: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
13698: RAISE OKL_API.G_EXCEPTION_ERROR;
13699: END IF;
13700:
13701: return;
13694:
13695: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
13696: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13697: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
13698: RAISE OKL_API.G_EXCEPTION_ERROR;
13699: END IF;
13700:
13701: return;
13702:
13718: x_return_status => x_return_status,
13719: x_msg_count => x_msg_count,
13720: x_msg_data => x_msg_data);
13721:
13722: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
13723: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13724: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
13725: RAISE OKL_API.G_EXCEPTION_ERROR;
13726: END IF;
13719: x_msg_count => x_msg_count,
13720: x_msg_data => x_msg_data);
13721:
13722: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
13723: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13724: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
13725: RAISE OKL_API.G_EXCEPTION_ERROR;
13726: END IF;
13727:
13720: x_msg_data => x_msg_data);
13721:
13722: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
13723: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13724: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
13725: RAISE OKL_API.G_EXCEPTION_ERROR;
13726: END IF;
13727:
13728: l_principal_balance := l_principal_balance + x_principal_balance;
13721:
13722: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
13723: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13724: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
13725: RAISE OKL_API.G_EXCEPTION_ERROR;
13726: END IF;
13727:
13728: l_principal_balance := l_principal_balance + x_principal_balance;
13729: l_accumulated_int := l_accumulated_int + x_accumulated_int;
13736: print( l_api_name, 'end');
13737:
13738: EXCEPTION
13739:
13740: WHEN OKL_API.G_EXCEPTION_ERROR THEN
13741:
13742: x_return_status := G_RET_STS_ERROR;
13743:
13744: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
13740: WHEN OKL_API.G_EXCEPTION_ERROR THEN
13741:
13742: x_return_status := G_RET_STS_ERROR;
13743:
13744: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
13745:
13746: x_return_status := G_RET_STS_UNEXP_ERROR;
13747:
13748: WHEN OTHERS THEN
13746: x_return_status := G_RET_STS_UNEXP_ERROR;
13747:
13748: WHEN OTHERS THEN
13749:
13750: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
13751: p_msg_name => G_DB_ERROR,
13752: p_token1 => G_PROG_NAME_TOKEN,
13753: p_token1_value => l_api_name,
13754: p_token2 => G_SQLCODE_TOKEN,
13856: BEGIN
13857:
13858: print( l_api_name, 'begin' );
13859:
13860: x_return_status := OKL_API.G_RET_STS_SUCCESS;
13861:
13862: x_return_status := OKL_API.START_ACTIVITY(
13863: p_api_name => l_api_name,
13864: p_pkg_name => g_pkg_name,
13858: print( l_api_name, 'begin' );
13859:
13860: x_return_status := OKL_API.G_RET_STS_SUCCESS;
13861:
13862: x_return_status := OKL_API.START_ACTIVITY(
13863: p_api_name => l_api_name,
13864: p_pkg_name => g_pkg_name,
13865: p_init_msg_list => p_init_msg_list,
13866: l_api_version => p_api_version,
13868: p_api_type => G_API_TYPE,
13869: x_return_status => x_return_status);
13870:
13871: -- check if activity started successfully
13872: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13873: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13874: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13875: raise OKL_API.G_EXCEPTION_ERROR;
13876: End If;
13869: x_return_status => x_return_status);
13870:
13871: -- check if activity started successfully
13872: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13873: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13874: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13875: raise OKL_API.G_EXCEPTION_ERROR;
13876: End If;
13877:
13870:
13871: -- check if activity started successfully
13872: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13873: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13874: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13875: raise OKL_API.G_EXCEPTION_ERROR;
13876: End If;
13877:
13878: /*
13871: -- check if activity started successfully
13872: If (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
13873: raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13874: ElSIF (x_return_status = OKL_API.G_RET_STS_ERROR) then
13875: raise OKL_API.G_EXCEPTION_ERROR;
13876: End If;
13877:
13878: /*
13879: get_sty_details (p_sty_name => 'VARIABLE INTEREST SCHEDULE',
13880: x_sty_id => l_sty_id,
13881: x_sty_name => l_sty_name,
13882: x_return_status => x_return_status);
13883:
13884: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
13885: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13886: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
13887: RAISE OKL_API.G_EXCEPTION_ERROR;
13888: END IF;
13881: x_sty_name => l_sty_name,
13882: x_return_status => x_return_status);
13883:
13884: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
13885: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13886: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
13887: RAISE OKL_API.G_EXCEPTION_ERROR;
13888: END IF;
13889:
13882: x_return_status => x_return_status);
13883:
13884: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
13885: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13886: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
13887: RAISE OKL_API.G_EXCEPTION_ERROR;
13888: END IF;
13889:
13890: */
13883:
13884: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
13885: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13886: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
13887: RAISE OKL_API.G_EXCEPTION_ERROR;
13888: END IF;
13889:
13890: */
13891: OPEN c_hdr;
13932: x_msg_count => x_msg_count,
13933: x_msg_data => x_msg_data,
13934: p_recurrence_date => l_recurrence_date);
13935:
13936: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
13937: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13938: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
13939: RAISE OKL_API.G_EXCEPTION_ERROR;
13940: END IF;
13933: x_msg_data => x_msg_data,
13934: p_recurrence_date => l_recurrence_date);
13935:
13936: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
13937: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13938: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
13939: RAISE OKL_API.G_EXCEPTION_ERROR;
13940: END IF;
13941:
13934: p_recurrence_date => l_recurrence_date);
13935:
13936: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
13937: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13938: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
13939: RAISE OKL_API.G_EXCEPTION_ERROR;
13940: END IF;
13941:
13942: FOR i in 1..lx_selv_tbl.COUNT
13935:
13936: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
13937: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
13938: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
13939: RAISE OKL_API.G_EXCEPTION_ERROR;
13940: END IF;
13941:
13942: FOR i in 1..lx_selv_tbl.COUNT
13943: LOOP
14004: if(x_next_period_end_date IS NULL) Then
14005: x_next_period_end_date := l_hdr.end_date;
14006: End If;
14007:
14008: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
14009: print( l_api_name, 'end' );
14010:
14011: Exception
14012:
14009: print( l_api_name, 'end' );
14010:
14011: Exception
14012:
14013: when OKL_API.G_EXCEPTION_ERROR then
14014: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
14015: p_api_name => l_api_name,
14016: p_pkg_name => g_pkg_name,
14017: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
14010:
14011: Exception
14012:
14013: when OKL_API.G_EXCEPTION_ERROR then
14014: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
14015: p_api_name => l_api_name,
14016: p_pkg_name => g_pkg_name,
14017: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
14018: x_msg_count => x_msg_count,
14013: when OKL_API.G_EXCEPTION_ERROR then
14014: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
14015: p_api_name => l_api_name,
14016: p_pkg_name => g_pkg_name,
14017: p_exc_name => 'OKL_API.G_RET_STS_ERROR',
14018: x_msg_count => x_msg_count,
14019: x_msg_data => x_msg_data,
14020: p_api_type => g_api_type);
14021:
14018: x_msg_count => x_msg_count,
14019: x_msg_data => x_msg_data,
14020: p_api_type => g_api_type);
14021:
14022: when OKL_API.G_EXCEPTION_UNEXPECTED_ERROR then
14023: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
14024: p_api_name => l_api_name,
14025: p_pkg_name => g_pkg_name,
14026: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
14019: x_msg_data => x_msg_data,
14020: p_api_type => g_api_type);
14021:
14022: when OKL_API.G_EXCEPTION_UNEXPECTED_ERROR then
14023: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
14024: p_api_name => l_api_name,
14025: p_pkg_name => g_pkg_name,
14026: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
14027: x_msg_count => x_msg_count,
14022: when OKL_API.G_EXCEPTION_UNEXPECTED_ERROR then
14023: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
14024: p_api_name => l_api_name,
14025: p_pkg_name => g_pkg_name,
14026: p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
14027: x_msg_count => x_msg_count,
14028: x_msg_data => x_msg_data,
14029: p_api_type => g_api_type);
14030:
14028: x_msg_data => x_msg_data,
14029: p_api_type => g_api_type);
14030:
14031: when OTHERS then
14032: x_return_status := OKL_API.HANDLE_EXCEPTIONS(
14033: p_api_name => l_api_name,
14034: p_pkg_name => g_pkg_name,
14035: p_exc_name => 'OTHERS',
14036: x_msg_count => x_msg_count,
14124:
14125: -- Generate streams for the payments
14126: FOR l_inflow IN c_inflows LOOP
14127: IF l_inflow.start_date IS NULL THEN
14128: OKL_API.SET_MESSAGE ( p_app_name => G_APP_NAME
14129: , p_msg_name => 'OKL_NO_SLL_SDATE');
14130: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14131: END IF;
14132:
14126: FOR l_inflow IN c_inflows LOOP
14127: IF l_inflow.start_date IS NULL THEN
14128: OKL_API.SET_MESSAGE ( p_app_name => G_APP_NAME
14129: , p_msg_name => 'OKL_NO_SLL_SDATE');
14130: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14131: END IF;
14132:
14133: IF((l_inflow.periods IS NULL) AND (l_inflow.stub_days IS NOT NULL)) THEN
14134: --Set the recurrence date to null for stub payment
14165: x_msg_count => x_msg_count,
14166: x_msg_data => x_msg_data,
14167: p_recurrence_date => l_recurrence_date);
14168:
14169: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14170: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14171: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14172: RAISE OKL_API.G_EXCEPTION_ERROR;
14173: END IF;
14166: x_msg_data => x_msg_data,
14167: p_recurrence_date => l_recurrence_date);
14168:
14169: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14170: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14171: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14172: RAISE OKL_API.G_EXCEPTION_ERROR;
14173: END IF;
14174:
14167: p_recurrence_date => l_recurrence_date);
14168:
14169: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14170: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14171: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14172: RAISE OKL_API.G_EXCEPTION_ERROR;
14173: END IF;
14174:
14175: get_stream_header(p_khr_id => p_khr_id,
14168:
14169: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14170: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14171: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14172: RAISE OKL_API.G_EXCEPTION_ERROR;
14173: END IF;
14174:
14175: get_stream_header(p_khr_id => p_khr_id,
14176: p_kle_id => l_inflow.cle_id,
14178: p_purpose_code => l_purpose_code,
14179: x_stmv_rec => l_stmv_rec,
14180: x_return_status => x_return_status);
14181:
14182: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14183: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14184: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14185: RAISE OKL_API.G_EXCEPTION_ERROR;
14186: END IF;
14179: x_stmv_rec => l_stmv_rec,
14180: x_return_status => x_return_status);
14181:
14182: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14183: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14184: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14185: RAISE OKL_API.G_EXCEPTION_ERROR;
14186: END IF;
14187:
14180: x_return_status => x_return_status);
14181:
14182: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14183: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14184: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14185: RAISE OKL_API.G_EXCEPTION_ERROR;
14186: END IF;
14187:
14188: x_return_status := Okl_Streams_Util.round_streams_amount_esg(
14181:
14182: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14183: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14184: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14185: RAISE OKL_API.G_EXCEPTION_ERROR;
14186: END IF;
14187:
14188: x_return_status := Okl_Streams_Util.round_streams_amount_esg(
14189: p_api_version => g_api_version,
14199: p_rounding_rule => G_ROUNDING_RULE,
14200: p_apply_rnd_diff=> G_DIFF_LOOKUP_CODE);
14201:
14202: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
14203: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14204: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
14205: RAISE OKL_API.G_EXCEPTION_ERROR;
14206: END IF;
14207:
14201:
14202: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
14203: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14204: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
14205: RAISE OKL_API.G_EXCEPTION_ERROR;
14206: END IF;
14207:
14208: l_selv_tbl.DELETE;
14209: l_selv_tbl := lx_selv_tbl;
14212: OKL_STREAMS_UTIL.accumulate_strm_headers( p_stmv_rec => l_stmv_rec,
14213: x_full_stmv_tbl => l_stmv_tbl,
14214: x_return_status => x_return_status );
14215: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
14216: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14217: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
14218: RAISE OKL_API.G_EXCEPTION_ERROR;
14219: END IF;
14220:
14214: x_return_status => x_return_status );
14215: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
14216: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14217: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
14218: RAISE OKL_API.G_EXCEPTION_ERROR;
14219: END IF;
14220:
14221: --Accumulate Stream Elements
14222: OKL_STREAMS_UTIL.accumulate_strm_elements( p_stm_index_no => l_stmv_tbl.LAST,
14223: p_selv_tbl => l_selv_tbl,
14224: x_full_selv_tbl => l_full_selv_tbl,
14225: x_return_status => x_return_status );
14226: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
14227: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14228: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
14229: RAISE OKL_API.G_EXCEPTION_ERROR;
14230: END IF;
14231:
14225: x_return_status => x_return_status );
14226: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
14227: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14228: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
14229: RAISE OKL_API.G_EXCEPTION_ERROR;
14230: END IF;
14231:
14232: l_stmv_rec := NULL;
14233: l_selv_tbl.delete;
14244: l_stmv_tbl,
14245: l_full_selv_tbl,
14246: lx_stmv_tbl,
14247: lx_full_selv_tbl);
14248: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14249: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14250: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14251: RAISE OKL_API.G_EXCEPTION_ERROR;
14252: END IF;
14245: l_full_selv_tbl,
14246: lx_stmv_tbl,
14247: lx_full_selv_tbl);
14248: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14249: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14250: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14251: RAISE OKL_API.G_EXCEPTION_ERROR;
14252: END IF;
14253:
14246: lx_stmv_tbl,
14247: lx_full_selv_tbl);
14248: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14249: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14250: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14251: RAISE OKL_API.G_EXCEPTION_ERROR;
14252: END IF;
14253:
14254: EXCEPTION
14247: lx_full_selv_tbl);
14248: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14249: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14250: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14251: RAISE OKL_API.G_EXCEPTION_ERROR;
14252: END IF;
14253:
14254: EXCEPTION
14255: WHEN OKL_API.G_EXCEPTION_ERROR THEN
14251: RAISE OKL_API.G_EXCEPTION_ERROR;
14252: END IF;
14253:
14254: EXCEPTION
14255: WHEN OKL_API.G_EXCEPTION_ERROR THEN
14256: x_return_status := G_RET_STS_ERROR;
14257: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
14258: x_return_status := G_RET_STS_UNEXP_ERROR;
14259: WHEN OTHERS THEN
14253:
14254: EXCEPTION
14255: WHEN OKL_API.G_EXCEPTION_ERROR THEN
14256: x_return_status := G_RET_STS_ERROR;
14257: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
14258: x_return_status := G_RET_STS_UNEXP_ERROR;
14259: WHEN OTHERS THEN
14260: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
14261: p_msg_name => G_DB_ERROR,
14256: x_return_status := G_RET_STS_ERROR;
14257: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
14258: x_return_status := G_RET_STS_UNEXP_ERROR;
14259: WHEN OTHERS THEN
14260: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
14261: p_msg_name => G_DB_ERROR,
14262: p_token1 => G_PROG_NAME_TOKEN,
14263: p_token1_value => l_prog_name,
14264: p_token2 => G_SQLCODE_TOKEN,
14396: x_sty_id => l_sty_id,
14397: x_sty_name => l_sty_name,
14398: x_return_status => x_return_status);
14399:
14400: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14401: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14402: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14403: RAISE OKL_API.G_EXCEPTION_ERROR;
14404: END IF;
14397: x_sty_name => l_sty_name,
14398: x_return_status => x_return_status);
14399:
14400: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14401: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14402: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14403: RAISE OKL_API.G_EXCEPTION_ERROR;
14404: END IF;
14405:
14398: x_return_status => x_return_status);
14399:
14400: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14401: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14402: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14403: RAISE OKL_API.G_EXCEPTION_ERROR;
14404: END IF;
14405:
14406: /* R12.1.2 .. racheruv ..commented out the below.
14399:
14400: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14401: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14402: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14403: RAISE OKL_API.G_EXCEPTION_ERROR;
14404: END IF;
14405:
14406: /* R12.1.2 .. racheruv ..commented out the below.
14407: OPEN c_hdr;
14416: x_return_status => x_return_status,
14417: x_dependent_sty_id => l_sty_id,
14418: x_dependent_sty_name => l_mapped_sty_name);
14419:
14420: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14421: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14422: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14423: RAISE OKL_API.G_EXCEPTION_ERROR;
14424: END IF;
14417: x_dependent_sty_id => l_sty_id,
14418: x_dependent_sty_name => l_mapped_sty_name);
14419:
14420: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14421: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14422: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14423: RAISE OKL_API.G_EXCEPTION_ERROR;
14424: END IF;
14425:
14418: x_dependent_sty_name => l_mapped_sty_name);
14419:
14420: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14421: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14422: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14423: RAISE OKL_API.G_EXCEPTION_ERROR;
14424: END IF;
14425:
14426: IF l_mapped_sty_name IS NOT NULL THEN
14419:
14420: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14421: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14422: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14423: RAISE OKL_API.G_EXCEPTION_ERROR;
14424: END IF;
14425:
14426: IF l_mapped_sty_name IS NOT NULL THEN
14427: get_accrual_elements (
14436: p_currency_code => l_currency_code,
14437: x_selv_tbl => l_selv_tbl,
14438: x_return_status => x_return_status);
14439:
14440: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14441: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14442: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14443: RAISE OKL_API.G_EXCEPTION_ERROR;
14444: END IF;
14437: x_selv_tbl => l_selv_tbl,
14438: x_return_status => x_return_status);
14439:
14440: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14441: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14442: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14443: RAISE OKL_API.G_EXCEPTION_ERROR;
14444: END IF;
14445: END IF;
14438: x_return_status => x_return_status);
14439:
14440: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14441: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14442: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14443: RAISE OKL_API.G_EXCEPTION_ERROR;
14444: END IF;
14445: END IF;
14446:
14439:
14440: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14441: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14442: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14443: RAISE OKL_API.G_EXCEPTION_ERROR;
14444: END IF;
14445: END IF;
14446:
14447: get_sty_details (p_sty_name => l_mapped_sty_name,
14448: x_sty_id => l_sty_id,
14449: x_sty_name => l_sty_name,
14450: x_return_status => x_return_status);
14451:
14452: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14453: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14454: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14455: RAISE OKL_API.G_EXCEPTION_ERROR;
14456: END IF;
14449: x_sty_name => l_sty_name,
14450: x_return_status => x_return_status);
14451:
14452: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14453: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14454: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14455: RAISE OKL_API.G_EXCEPTION_ERROR;
14456: END IF;
14457:
14450: x_return_status => x_return_status);
14451:
14452: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14453: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14454: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14455: RAISE OKL_API.G_EXCEPTION_ERROR;
14456: END IF;
14457:
14458: IF (l_selv_tbl.COUNT > 0 ) THEN
14451:
14452: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14453: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14454: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14455: RAISE OKL_API.G_EXCEPTION_ERROR;
14456: END IF;
14457:
14458: IF (l_selv_tbl.COUNT > 0 ) THEN
14459:
14469: p_purpose_code => l_purpose_code,
14470: x_stmv_rec => l_stmv_rec,
14471: x_return_status => x_return_status);
14472:
14473: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14474: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14475: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14476: RAISE OKL_API.G_EXCEPTION_ERROR;
14477: END IF;
14470: x_stmv_rec => l_stmv_rec,
14471: x_return_status => x_return_status);
14472:
14473: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14474: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14475: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14476: RAISE OKL_API.G_EXCEPTION_ERROR;
14477: END IF;
14478:
14471: x_return_status => x_return_status);
14472:
14473: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14474: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14475: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14476: RAISE OKL_API.G_EXCEPTION_ERROR;
14477: END IF;
14478:
14479: x_return_status := Okl_Streams_Util.round_streams_amount_esg(
14472:
14473: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14474: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14475: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14476: RAISE OKL_API.G_EXCEPTION_ERROR;
14477: END IF;
14478:
14479: x_return_status := Okl_Streams_Util.round_streams_amount_esg(
14480: p_api_version => g_api_version,
14490: p_rounding_rule => G_ROUNDING_RULE,
14491: p_apply_rnd_diff=> G_DIFF_LOOKUP_CODE);
14492:
14493: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
14494: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14495: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
14496: RAISE OKL_API.G_EXCEPTION_ERROR;
14497: END IF;
14498:
14492:
14493: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
14494: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14495: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
14496: RAISE OKL_API.G_EXCEPTION_ERROR;
14497: END IF;
14498:
14499: l_selv_tbl.DELETE;
14500: l_selv_tbl := lx_selv_tbl;
14504: p_stmv_rec => l_stmv_rec,
14505: x_full_stmv_tbl => l_stmv_tbl,
14506: x_return_status => x_return_status );
14507: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
14508: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14509: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
14510: RAISE OKL_API.G_EXCEPTION_ERROR;
14511: END IF;
14512:
14506: x_return_status => x_return_status );
14507: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
14508: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14509: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
14510: RAISE OKL_API.G_EXCEPTION_ERROR;
14511: END IF;
14512:
14513: --Accumulate Stream Elements
14514: OKL_STREAMS_UTIL.accumulate_strm_elements(
14516: p_selv_tbl => l_selv_tbl,
14517: x_full_selv_tbl => l_full_selv_tbl,
14518: x_return_status => x_return_status );
14519: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
14520: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14521: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
14522: RAISE OKL_API.G_EXCEPTION_ERROR;
14523: END IF;
14524:
14518: x_return_status => x_return_status );
14519: IF (x_return_status = G_RET_STS_UNEXP_ERROR) THEN
14520: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14521: ELSIF (x_return_status = G_RET_STS_ERROR) THEN
14522: RAISE OKL_API.G_EXCEPTION_ERROR;
14523: END IF;
14524:
14525: END IF;
14526:
14548: l_stmv_tbl,
14549: l_full_selv_tbl,
14550: lx_stmv_tbl,
14551: lx_full_selv_tbl);
14552: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14553: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14554: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14555: RAISE OKL_API.G_EXCEPTION_ERROR;
14556: END IF;
14549: l_full_selv_tbl,
14550: lx_stmv_tbl,
14551: lx_full_selv_tbl);
14552: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14553: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14554: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14555: RAISE OKL_API.G_EXCEPTION_ERROR;
14556: END IF;
14557: END IF;
14550: lx_stmv_tbl,
14551: lx_full_selv_tbl);
14552: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14553: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14554: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14555: RAISE OKL_API.G_EXCEPTION_ERROR;
14556: END IF;
14557: END IF;
14558:
14551: lx_full_selv_tbl);
14552: IF x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
14553: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14554: ELSIF x_return_status = OKL_API.G_RET_STS_ERROR THEN
14555: RAISE OKL_API.G_EXCEPTION_ERROR;
14556: END IF;
14557: END IF;
14558:
14559: l_stmv_tbl.delete; -- R12.1.2
14561:
14562: end loop; -- l_pdt_tbl(i) R12.1.2
14563:
14564: EXCEPTION
14565: WHEN OKL_API.G_EXCEPTION_ERROR THEN
14566: x_return_status := G_RET_STS_ERROR;
14567: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
14568: x_return_status := G_RET_STS_UNEXP_ERROR;
14569: WHEN OTHERS THEN
14563:
14564: EXCEPTION
14565: WHEN OKL_API.G_EXCEPTION_ERROR THEN
14566: x_return_status := G_RET_STS_ERROR;
14567: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
14568: x_return_status := G_RET_STS_UNEXP_ERROR;
14569: WHEN OTHERS THEN
14570: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
14571: p_msg_name => G_DB_ERROR,
14566: x_return_status := G_RET_STS_ERROR;
14567: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
14568: x_return_status := G_RET_STS_UNEXP_ERROR;
14569: WHEN OTHERS THEN
14570: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
14571: p_msg_name => G_DB_ERROR,
14572: p_token1 => G_PROG_NAME_TOKEN,
14573: p_token1_value => l_prog_name,
14574: p_token2 => G_SQLCODE_TOKEN,
14654: last_update_login = FND_GLOBAL.LOGIN_ID -- BUG:14749215 changes end here
14655: WHERE ID = l_strm_id_tbl(i);
14656:
14657: EXCEPTION
14658: WHEN OKL_API.G_EXCEPTION_ERROR THEN
14659: x_return_status := G_RET_STS_ERROR;
14660: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
14661: x_return_status := G_RET_STS_UNEXP_ERROR;
14662: WHEN OTHERS THEN
14656:
14657: EXCEPTION
14658: WHEN OKL_API.G_EXCEPTION_ERROR THEN
14659: x_return_status := G_RET_STS_ERROR;
14660: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
14661: x_return_status := G_RET_STS_UNEXP_ERROR;
14662: WHEN OTHERS THEN
14663: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
14664: p_msg_name => G_DB_ERROR,
14659: x_return_status := G_RET_STS_ERROR;
14660: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
14661: x_return_status := G_RET_STS_UNEXP_ERROR;
14662: WHEN OTHERS THEN
14663: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
14664: p_msg_name => G_DB_ERROR,
14665: p_token1 => G_PROG_NAME_TOKEN,
14666: p_token1_value => l_prog_name,
14667: p_token2 => G_SQLCODE_TOKEN,
14697: WHERE chr.id = p_khr_id;
14698:
14699: l_currency_code okc_k_headers_all_b.currency_code%type;
14700: l_purpose_code VARCHAR2(10) := '-99';
14701: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
14702:
14703: -- R12.1.2 .. start
14704: CURSOR get_multi_gaap_yn(p_khr_id number) IS
14705: select multi_gaap_yn
14709: l_multi_gaap_yn okl_k_headers.multi_gaap_yn%TYPE;
14710: -- R12.1.2 .. end
14711:
14712: BEGIN
14713: x_return_status := OKL_API.G_RET_STS_SUCCESS;
14714:
14715: l_return_status := OKL_API.START_ACTIVITY(
14716: p_api_name => l_api_name,
14717: p_pkg_name => g_pkg_name,
14711:
14712: BEGIN
14713: x_return_status := OKL_API.G_RET_STS_SUCCESS;
14714:
14715: l_return_status := OKL_API.START_ACTIVITY(
14716: p_api_name => l_api_name,
14717: p_pkg_name => g_pkg_name,
14718: p_init_msg_list => p_init_msg_list,
14719: l_api_version => p_api_version,
14721: p_api_type => G_API_TYPE,
14722: x_return_status => l_return_status);
14723:
14724: -- check if activity started successfully
14725: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14726: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14727: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14728: RAISE OKL_API.G_EXCEPTION_ERROR;
14729: END IF;
14722: x_return_status => l_return_status);
14723:
14724: -- check if activity started successfully
14725: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14726: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14727: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14728: RAISE OKL_API.G_EXCEPTION_ERROR;
14729: END IF;
14730:
14723:
14724: -- check if activity started successfully
14725: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14726: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14727: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14728: RAISE OKL_API.G_EXCEPTION_ERROR;
14729: END IF;
14730:
14731: ---------------------------------------------
14724: -- check if activity started successfully
14725: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14726: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14727: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14728: RAISE OKL_API.G_EXCEPTION_ERROR;
14729: END IF;
14730:
14731: ---------------------------------------------
14732: -- STEP 1: Generate Income Streams
14737: , x_return_status => l_return_status
14738: , x_msg_count => x_msg_count
14739: , x_msg_data => x_msg_data);
14740:
14741: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14742: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14743: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14744: RAISE OKL_API.G_EXCEPTION_ERROR;
14745: END IF;
14738: , x_msg_count => x_msg_count
14739: , x_msg_data => x_msg_data);
14740:
14741: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14742: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14743: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14744: RAISE OKL_API.G_EXCEPTION_ERROR;
14745: END IF;
14746:
14739: , x_msg_data => x_msg_data);
14740:
14741: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14742: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14743: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14744: RAISE OKL_API.G_EXCEPTION_ERROR;
14745: END IF;
14746:
14747: ---------------------------------------------
14740:
14741: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14742: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14743: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14744: RAISE OKL_API.G_EXCEPTION_ERROR;
14745: END IF;
14746:
14747: ---------------------------------------------
14748: -- STEP 2: Generate Income Accrual Streams
14753: , x_return_status => l_return_status
14754: , x_msg_count => x_msg_count
14755: , x_msg_data => x_msg_data);
14756:
14757: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14758: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14759: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14760: RAISE OKL_API.G_EXCEPTION_ERROR;
14761: END IF;
14754: , x_msg_count => x_msg_count
14755: , x_msg_data => x_msg_data);
14756:
14757: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14758: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14759: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14760: RAISE OKL_API.G_EXCEPTION_ERROR;
14761: END IF;
14762:
14755: , x_msg_data => x_msg_data);
14756:
14757: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14758: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14759: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14760: RAISE OKL_API.G_EXCEPTION_ERROR;
14761: END IF;
14762:
14763: ---------------------------------------------
14756:
14757: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14758: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14759: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14760: RAISE OKL_API.G_EXCEPTION_ERROR;
14761: END IF;
14762:
14763: ---------------------------------------------
14764: -- STEP 3: Generate Expense Accrual Streams
14773: , p_purpose_code => l_purpose_code
14774: , p_currency_code => l_currency_code
14775: , x_return_status => l_return_status);
14776:
14777: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14778: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14779: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14780: RAISE OKL_API.G_EXCEPTION_ERROR;
14781: END IF;
14774: , p_currency_code => l_currency_code
14775: , x_return_status => l_return_status);
14776:
14777: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14778: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14779: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14780: RAISE OKL_API.G_EXCEPTION_ERROR;
14781: END IF;
14782:
14775: , x_return_status => l_return_status);
14776:
14777: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14778: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14779: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14780: RAISE OKL_API.G_EXCEPTION_ERROR;
14781: END IF;
14782:
14783: -- R12.1.2 .. racheruv .. generate expense for rpt.
14776:
14777: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14778: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14779: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14780: RAISE OKL_API.G_EXCEPTION_ERROR;
14781: END IF;
14782:
14783: -- R12.1.2 .. racheruv .. generate expense for rpt.
14784: open get_multi_gaap_yn(p_khr_id);
14794: , p_purpose_code => l_purpose_code
14795: , p_currency_code => l_currency_code
14796: , x_return_status => l_return_status);
14797:
14798: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14799: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14800: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14801: RAISE OKL_API.G_EXCEPTION_ERROR;
14802: END IF;
14795: , p_currency_code => l_currency_code
14796: , x_return_status => l_return_status);
14797:
14798: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14799: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14800: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14801: RAISE OKL_API.G_EXCEPTION_ERROR;
14802: END IF;
14803:
14796: , x_return_status => l_return_status);
14797:
14798: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14799: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14800: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14801: RAISE OKL_API.G_EXCEPTION_ERROR;
14802: END IF;
14803:
14804: end if;
14797:
14798: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14799: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14800: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14801: RAISE OKL_API.G_EXCEPTION_ERROR;
14802: END IF;
14803:
14804: end if;
14805: -- R12.1.2 .. racheruv .. generate expense for rpt.. end
14815: consolidate_line_streams( p_khr_id => p_khr_id
14816: , p_purpose_code => l_purpose_code
14817: , x_return_status => l_return_status);
14818:
14819: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14820: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14821: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14822: RAISE OKL_API.G_EXCEPTION_ERROR;
14823: END IF;
14816: , p_purpose_code => l_purpose_code
14817: , x_return_status => l_return_status);
14818:
14819: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14820: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14821: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14822: RAISE OKL_API.G_EXCEPTION_ERROR;
14823: END IF;
14824:
14817: , x_return_status => l_return_status);
14818:
14819: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14820: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14821: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14822: RAISE OKL_API.G_EXCEPTION_ERROR;
14823: END IF;
14824:
14825: -- R12.1.2 .. racheruv ..
14818:
14819: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14820: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14821: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14822: RAISE OKL_API.G_EXCEPTION_ERROR;
14823: END IF;
14824:
14825: -- R12.1.2 .. racheruv ..
14826: if l_multi_gaap_yn = 'Y' then
14829: consolidate_line_streams( p_khr_id => p_khr_id
14830: , p_purpose_code => l_purpose_code
14831: , x_return_status => l_return_status);
14832:
14833: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14834: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14835: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14836: RAISE OKL_API.G_EXCEPTION_ERROR;
14837: END IF;
14830: , p_purpose_code => l_purpose_code
14831: , x_return_status => l_return_status);
14832:
14833: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14834: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14835: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14836: RAISE OKL_API.G_EXCEPTION_ERROR;
14837: END IF;
14838: end if;
14831: , x_return_status => l_return_status);
14832:
14833: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14834: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14835: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14836: RAISE OKL_API.G_EXCEPTION_ERROR;
14837: END IF;
14838: end if;
14839: -- R12.1.2 .. racheruv ..
14832:
14833: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14834: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14835: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14836: RAISE OKL_API.G_EXCEPTION_ERROR;
14837: END IF;
14838: end if;
14839: -- R12.1.2 .. racheruv ..
14840:
14846: consolidate_acc_streams( p_khr_id => p_khr_id
14847: , p_purpose_code => l_purpose_code
14848: , x_return_status => l_return_status);
14849:
14850: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14851: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14852: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14853: RAISE OKL_API.G_EXCEPTION_ERROR;
14854: END IF;
14847: , p_purpose_code => l_purpose_code
14848: , x_return_status => l_return_status);
14849:
14850: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14851: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14852: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14853: RAISE OKL_API.G_EXCEPTION_ERROR;
14854: END IF;
14855:
14848: , x_return_status => l_return_status);
14849:
14850: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14851: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14852: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14853: RAISE OKL_API.G_EXCEPTION_ERROR;
14854: END IF;
14855:
14856: -- R12.1.2 .. racheruv ..
14849:
14850: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14851: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14852: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14853: RAISE OKL_API.G_EXCEPTION_ERROR;
14854: END IF;
14855:
14856: -- R12.1.2 .. racheruv ..
14857: if l_multi_gaap_yn = 'Y' then
14860: consolidate_acc_streams( p_khr_id => p_khr_id
14861: , p_purpose_code => l_purpose_code
14862: , x_return_status => l_return_status);
14863:
14864: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14865: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14866: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14867: RAISE OKL_API.G_EXCEPTION_ERROR;
14868: END IF;
14861: , p_purpose_code => l_purpose_code
14862: , x_return_status => l_return_status);
14863:
14864: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14865: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14866: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14867: RAISE OKL_API.G_EXCEPTION_ERROR;
14868: END IF;
14869: end if;
14862: , x_return_status => l_return_status);
14863:
14864: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14865: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14866: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14867: RAISE OKL_API.G_EXCEPTION_ERROR;
14868: END IF;
14869: end if;
14870: -- R12.1.2 .. racheruv ..
14863:
14864: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14865: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14866: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14867: RAISE OKL_API.G_EXCEPTION_ERROR;
14868: END IF;
14869: end if;
14870: -- R12.1.2 .. racheruv ..
14871:
14880: , x_return_status => l_return_status
14881: , x_msg_count => x_msg_count
14882: , x_msg_data => x_msg_data);
14883:
14884: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14885: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14886: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14887: RAISE OKL_API.G_EXCEPTION_ERROR;
14888: END IF;
14881: , x_msg_count => x_msg_count
14882: , x_msg_data => x_msg_data);
14883:
14884: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14885: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14886: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14887: RAISE OKL_API.G_EXCEPTION_ERROR;
14888: END IF;
14889:
14882: , x_msg_data => x_msg_data);
14883:
14884: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14885: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14886: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14887: RAISE OKL_API.G_EXCEPTION_ERROR;
14888: END IF;
14889:
14890: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
14883:
14884: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
14885: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
14886: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14887: RAISE OKL_API.G_EXCEPTION_ERROR;
14888: END IF;
14889:
14890: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
14891:
14886: ElSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
14887: RAISE OKL_API.G_EXCEPTION_ERROR;
14888: END IF;
14889:
14890: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
14891:
14892: EXCEPTION
14893: WHEN OKL_API.G_EXCEPTION_ERROR THEN
14894: l_return_status := G_RET_STS_ERROR;
14889:
14890: OKL_API.END_ACTIVITY(x_msg_count => x_msg_count, x_msg_data => x_msg_data);
14891:
14892: EXCEPTION
14893: WHEN OKL_API.G_EXCEPTION_ERROR THEN
14894: l_return_status := G_RET_STS_ERROR;
14895: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
14896: l_return_status := G_RET_STS_UNEXP_ERROR;
14897: WHEN OTHERS THEN
14891:
14892: EXCEPTION
14893: WHEN OKL_API.G_EXCEPTION_ERROR THEN
14894: l_return_status := G_RET_STS_ERROR;
14895: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
14896: l_return_status := G_RET_STS_UNEXP_ERROR;
14897: WHEN OTHERS THEN
14898: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
14899: p_msg_name => G_DB_ERROR,
14894: l_return_status := G_RET_STS_ERROR;
14895: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
14896: l_return_status := G_RET_STS_UNEXP_ERROR;
14897: WHEN OTHERS THEN
14898: OKL_API.SET_MESSAGE (p_app_name => G_APP_NAME,
14899: p_msg_name => G_DB_ERROR,
14900: p_token1 => G_PROG_NAME_TOKEN,
14901: p_token1_value => l_api_name,
14902: p_token2 => G_SQLCODE_TOKEN,