83: l_return_status := OKL_CONTRACT_INFO.get_syndicate_flag(
84: p_contract_id => l_oinv_rec.khr_id
85: ,x_syndicate_flag => l_syndicate_flag);
86:
87: IF NOT ((l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) OR
88: (l_return_status = okl_api.G_RET_STS_ERROR) OR
89: (l_syndicate_flag = 'Y')) THEN
90: l_cust_reported := l_cust_reported + 1;
91: --dbms_output.put_line('report - ' || l_oinv_rec.khr_id);
84: p_contract_id => l_oinv_rec.khr_id
85: ,x_syndicate_flag => l_syndicate_flag);
86:
87: IF NOT ((l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) OR
88: (l_return_status = okl_api.G_RET_STS_ERROR) OR
89: (l_syndicate_flag = 'Y')) THEN
90: l_cust_reported := l_cust_reported + 1;
91: --dbms_output.put_line('report - ' || l_oinv_rec.khr_id);
92: iex_open_interface_pub.insert_pending(
239: END IF;
240:
241: x_iohv_rec := lx_iohv_rec;
242:
243: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
244: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
245: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
246: RAISE okl_api.G_EXCEPTION_ERROR;
247: END IF;
240:
241: x_iohv_rec := lx_iohv_rec;
242:
243: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
244: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
245: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
246: RAISE okl_api.G_EXCEPTION_ERROR;
247: END IF;
248:
241: x_iohv_rec := lx_iohv_rec;
242:
243: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
244: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
245: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
246: RAISE okl_api.G_EXCEPTION_ERROR;
247: END IF;
248:
249: -- Processing ends
242:
243: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
244: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
245: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
246: RAISE okl_api.G_EXCEPTION_ERROR;
247: END IF;
248:
249: -- Processing ends
250:
247: END IF;
248:
249: -- Processing ends
250:
251: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
252: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
253: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
254: RAISE okl_api.G_EXCEPTION_ERROR;
255: END IF;
248:
249: -- Processing ends
250:
251: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
252: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
253: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
254: RAISE okl_api.G_EXCEPTION_ERROR;
255: END IF;
256:
249: -- Processing ends
250:
251: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
252: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
253: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
254: RAISE okl_api.G_EXCEPTION_ERROR;
255: END IF;
256:
257: x_return_status := l_return_status;
250:
251: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
252: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
253: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
254: RAISE okl_api.G_EXCEPTION_ERROR;
255: END IF;
256:
257: x_return_status := l_return_status;
258: okl_api.END_ACTIVITY(x_msg_count, x_msg_data);
254: RAISE okl_api.G_EXCEPTION_ERROR;
255: END IF;
256:
257: x_return_status := l_return_status;
258: okl_api.END_ACTIVITY(x_msg_count, x_msg_data);
259: EXCEPTION
260: WHEN OKC_API.G_EXCEPTION_ERROR THEN
261: x_return_status := OKC_API.HANDLE_EXCEPTIONS
262: (
384: ,x_msg_count => x_msg_count
385: ,x_msg_data => x_msg_data
386: ,p_iohv_rec => l_iohv_rec
387: ,x_iohv_rec => lx_iohv_rec);
388: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
389: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
390: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
391: RAISE okl_api.G_EXCEPTION_ERROR;
392: END IF;
385: ,x_msg_data => x_msg_data
386: ,p_iohv_rec => l_iohv_rec
387: ,x_iohv_rec => lx_iohv_rec);
388: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
389: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
390: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
391: RAISE okl_api.G_EXCEPTION_ERROR;
392: END IF;
393:
386: ,p_iohv_rec => l_iohv_rec
387: ,x_iohv_rec => lx_iohv_rec);
388: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
389: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
390: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
391: RAISE okl_api.G_EXCEPTION_ERROR;
392: END IF;
393:
394: x_iohv_rec := lx_iohv_rec;
387: ,x_iohv_rec => lx_iohv_rec);
388: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
389: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
390: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
391: RAISE okl_api.G_EXCEPTION_ERROR;
392: END IF;
393:
394: x_iohv_rec := lx_iohv_rec;
395:
394: x_iohv_rec := lx_iohv_rec;
395:
396: -- Processing ends
397: x_return_status := l_return_status;
398: okl_api.END_ACTIVITY(x_msg_count, x_msg_data);
399: EXCEPTION
400: WHEN OKC_API.G_EXCEPTION_ERROR THEN
401: x_return_status := OKC_API.HANDLE_EXCEPTIONS
402: (
804: ,x_msg_count => x_msg_count
805: ,x_msg_data => x_msg_data
806: ,p_oinv_rec => l_oinv_rec
807: ,x_oinv_rec => lx_oinv_rec);
808: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
809: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
810: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
811: RAISE okl_api.G_EXCEPTION_ERROR;
812: END IF;
805: ,x_msg_data => x_msg_data
806: ,p_oinv_rec => l_oinv_rec
807: ,x_oinv_rec => lx_oinv_rec);
808: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
809: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
810: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
811: RAISE okl_api.G_EXCEPTION_ERROR;
812: END IF;
813:
806: ,p_oinv_rec => l_oinv_rec
807: ,x_oinv_rec => lx_oinv_rec);
808: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
809: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
810: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
811: RAISE okl_api.G_EXCEPTION_ERROR;
812: END IF;
813:
814: iex_open_int_hst_pub.insert_open_int_hst(p_api_version => l_api_version
807: ,x_oinv_rec => lx_oinv_rec);
808: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
809: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
810: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
811: RAISE okl_api.G_EXCEPTION_ERROR;
812: END IF;
813:
814: iex_open_int_hst_pub.insert_open_int_hst(p_api_version => l_api_version
815: ,p_init_msg_list => p_init_msg_list
817: ,x_msg_count => x_msg_count
818: ,x_msg_data => x_msg_data
819: ,p_iohv_rec => l_iohv_rec
820: ,x_iohv_rec => lx_iohv_rec);
821: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
822: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
823: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
824: RAISE okl_api.G_EXCEPTION_ERROR;
825: END IF;
818: ,x_msg_data => x_msg_data
819: ,p_iohv_rec => l_iohv_rec
820: ,x_iohv_rec => lx_iohv_rec);
821: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
822: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
823: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
824: RAISE okl_api.G_EXCEPTION_ERROR;
825: END IF;
826: ELSE
819: ,p_iohv_rec => l_iohv_rec
820: ,x_iohv_rec => lx_iohv_rec);
821: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
822: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
823: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
824: RAISE okl_api.G_EXCEPTION_ERROR;
825: END IF;
826: ELSE
827: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
820: ,x_iohv_rec => lx_iohv_rec);
821: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
822: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
823: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
824: RAISE okl_api.G_EXCEPTION_ERROR;
825: END IF;
826: ELSE
827: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
828: ,p_msg_name => G_INVALID_ACTION_STATUS);
825: END IF;
826: ELSE
827: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
828: ,p_msg_name => G_INVALID_ACTION_STATUS);
829: l_return_status := okl_api.G_RET_STS_ERROR;
830: END IF;
831: -- Processing ends
832:
833: x_return_status := l_return_status;
830: END IF;
831: -- Processing ends
832:
833: x_return_status := l_return_status;
834: okl_api.END_ACTIVITY(x_msg_count, x_msg_data);
835: EXCEPTION
836: WHEN OKC_API.G_EXCEPTION_ERROR THEN
837: x_return_status := OKC_API.HANDLE_EXCEPTIONS
838: (
938: ,x_msg_count => x_msg_count
939: ,x_msg_data => x_msg_data
940: ,p_oinv_rec => l_oinv_rec
941: ,x_oinv_rec => lx_oinv_rec);
942: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
943: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
944: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
945: RAISE okl_api.G_EXCEPTION_ERROR;
946: END IF;
939: ,x_msg_data => x_msg_data
940: ,p_oinv_rec => l_oinv_rec
941: ,x_oinv_rec => lx_oinv_rec);
942: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
943: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
944: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
945: RAISE okl_api.G_EXCEPTION_ERROR;
946: END IF;
947:
940: ,p_oinv_rec => l_oinv_rec
941: ,x_oinv_rec => lx_oinv_rec);
942: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
943: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
944: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
945: RAISE okl_api.G_EXCEPTION_ERROR;
946: END IF;
947:
948: iex_open_int_hst_pub.update_open_int_hst(p_api_version => l_api_version
941: ,x_oinv_rec => lx_oinv_rec);
942: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
943: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
944: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
945: RAISE okl_api.G_EXCEPTION_ERROR;
946: END IF;
947:
948: iex_open_int_hst_pub.update_open_int_hst(p_api_version => l_api_version
949: ,p_init_msg_list => p_init_msg_list
951: ,x_msg_count => x_msg_count
952: ,x_msg_data => x_msg_data
953: ,p_iohv_rec => l_iohv_rec
954: ,x_iohv_rec => lx_iohv_rec);
955: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
956: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
957: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
958: RAISE okl_api.G_EXCEPTION_ERROR;
959: END IF;
952: ,x_msg_data => x_msg_data
953: ,p_iohv_rec => l_iohv_rec
954: ,x_iohv_rec => lx_iohv_rec);
955: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
956: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
957: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
958: RAISE okl_api.G_EXCEPTION_ERROR;
959: END IF;
960: ELSE
953: ,p_iohv_rec => l_iohv_rec
954: ,x_iohv_rec => lx_iohv_rec);
955: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
956: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
957: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
958: RAISE okl_api.G_EXCEPTION_ERROR;
959: END IF;
960: ELSE
961: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
954: ,x_iohv_rec => lx_iohv_rec);
955: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
956: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
957: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
958: RAISE okl_api.G_EXCEPTION_ERROR;
959: END IF;
960: ELSE
961: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
962: ,p_msg_name => G_INVALID_ACTION_STATUS);
959: END IF;
960: ELSE
961: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
962: ,p_msg_name => G_INVALID_ACTION_STATUS);
963: l_return_status := okl_api.G_RET_STS_ERROR;
964: END IF;
965: -- Processing ends
966:
967: x_return_status := l_return_status;
964: END IF;
965: -- Processing ends
966:
967: x_return_status := l_return_status;
968: okl_api.END_ACTIVITY(x_msg_count, x_msg_data);
969: EXCEPTION
970: WHEN OKC_API.G_EXCEPTION_ERROR THEN
971: x_return_status := OKC_API.HANDLE_EXCEPTIONS
972: (
1093: ,x_msg_count => x_msg_count
1094: ,x_msg_data => x_msg_data
1095: ,p_oinv_rec => l_oinv_rec
1096: ,x_oinv_rec => lx_oinv_rec);
1097: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1098: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1099: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1100: RAISE okl_api.G_EXCEPTION_ERROR;
1101: END IF;
1094: ,x_msg_data => x_msg_data
1095: ,p_oinv_rec => l_oinv_rec
1096: ,x_oinv_rec => lx_oinv_rec);
1097: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1098: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1099: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1100: RAISE okl_api.G_EXCEPTION_ERROR;
1101: END IF;
1102:
1095: ,p_oinv_rec => l_oinv_rec
1096: ,x_oinv_rec => lx_oinv_rec);
1097: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1098: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1099: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1100: RAISE okl_api.G_EXCEPTION_ERROR;
1101: END IF;
1102:
1103: iex_open_int_hst_pub.insert_open_int_hst(p_api_version => l_api_version
1096: ,x_oinv_rec => lx_oinv_rec);
1097: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1098: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1099: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1100: RAISE okl_api.G_EXCEPTION_ERROR;
1101: END IF;
1102:
1103: iex_open_int_hst_pub.insert_open_int_hst(p_api_version => l_api_version
1104: ,p_init_msg_list => p_init_msg_list
1106: ,x_msg_count => x_msg_count
1107: ,x_msg_data => x_msg_data
1108: ,p_iohv_rec => l_iohv_rec
1109: ,x_iohv_rec => lx_iohv_rec);
1110: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1111: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1112: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1113: RAISE okl_api.G_EXCEPTION_ERROR;
1114: END IF;
1107: ,x_msg_data => x_msg_data
1108: ,p_iohv_rec => l_iohv_rec
1109: ,x_iohv_rec => lx_iohv_rec);
1110: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1111: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1112: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1113: RAISE okl_api.G_EXCEPTION_ERROR;
1114: END IF;
1115: ELSE
1108: ,p_iohv_rec => l_iohv_rec
1109: ,x_iohv_rec => lx_iohv_rec);
1110: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1111: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1112: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1113: RAISE okl_api.G_EXCEPTION_ERROR;
1114: END IF;
1115: ELSE
1116: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
1109: ,x_iohv_rec => lx_iohv_rec);
1110: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1111: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1112: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1113: RAISE okl_api.G_EXCEPTION_ERROR;
1114: END IF;
1115: ELSE
1116: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
1117: ,p_msg_name => G_INVALID_ACTION_STATUS);
1114: END IF;
1115: ELSE
1116: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
1117: ,p_msg_name => G_INVALID_ACTION_STATUS);
1118: l_return_status := okl_api.G_RET_STS_ERROR;
1119: END IF;
1120:
1121: -- Processing ends
1122:
1120:
1121: -- Processing ends
1122:
1123: x_return_status := l_return_status;
1124: okl_api.END_ACTIVITY(x_msg_count, x_msg_data);
1125: EXCEPTION
1126: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1127: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1128: (
1231: ,x_msg_count => x_msg_count
1232: ,x_msg_data => x_msg_data
1233: ,p_oinv_rec => l_oinv_rec
1234: ,x_oinv_rec => lx_oinv_rec);
1235: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1236: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1237: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1238: RAISE okl_api.G_EXCEPTION_ERROR;
1239: END IF;
1232: ,x_msg_data => x_msg_data
1233: ,p_oinv_rec => l_oinv_rec
1234: ,x_oinv_rec => lx_oinv_rec);
1235: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1236: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1237: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1238: RAISE okl_api.G_EXCEPTION_ERROR;
1239: END IF;
1240: */
1233: ,p_oinv_rec => l_oinv_rec
1234: ,x_oinv_rec => lx_oinv_rec);
1235: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1236: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1237: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1238: RAISE okl_api.G_EXCEPTION_ERROR;
1239: END IF;
1240: */
1241:
1234: ,x_oinv_rec => lx_oinv_rec);
1235: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1236: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1237: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1238: RAISE okl_api.G_EXCEPTION_ERROR;
1239: END IF;
1240: */
1241:
1242: iex_open_int_hst_pub.update_open_int_hst(p_api_version => l_api_version
1245: ,x_msg_count => x_msg_count
1246: ,x_msg_data => x_msg_data
1247: ,p_iohv_rec => l_iohv_rec
1248: ,x_iohv_rec => lx_iohv_rec);
1249: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1250: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1251: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1252: RAISE okl_api.G_EXCEPTION_ERROR;
1253: END IF;
1246: ,x_msg_data => x_msg_data
1247: ,p_iohv_rec => l_iohv_rec
1248: ,x_iohv_rec => lx_iohv_rec);
1249: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1250: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1251: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1252: RAISE okl_api.G_EXCEPTION_ERROR;
1253: END IF;
1254: ELSE
1247: ,p_iohv_rec => l_iohv_rec
1248: ,x_iohv_rec => lx_iohv_rec);
1249: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1250: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1251: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1252: RAISE okl_api.G_EXCEPTION_ERROR;
1253: END IF;
1254: ELSE
1255: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
1248: ,x_iohv_rec => lx_iohv_rec);
1249: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1250: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1251: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1252: RAISE okl_api.G_EXCEPTION_ERROR;
1253: END IF;
1254: ELSE
1255: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
1256: ,p_msg_name => G_INVALID_ACTION_STATUS);
1253: END IF;
1254: ELSE
1255: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
1256: ,p_msg_name => G_INVALID_ACTION_STATUS);
1257: l_return_status := okl_api.G_RET_STS_ERROR;
1258: END IF;
1259: -- Processing ends
1260:
1261: x_return_status := l_return_status;
1258: END IF;
1259: -- Processing ends
1260:
1261: x_return_status := l_return_status;
1262: okl_api.END_ACTIVITY(x_msg_count, x_msg_data);
1263: EXCEPTION
1264: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1265: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1266: (
1387: ,x_msg_count => x_msg_count
1388: ,x_msg_data => x_msg_data
1389: ,p_oinv_rec => l_oinv_rec
1390: ,x_oinv_rec => lx_oinv_rec);
1391: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1392: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1393: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1394: RAISE okl_api.G_EXCEPTION_ERROR;
1395: END IF;
1388: ,x_msg_data => x_msg_data
1389: ,p_oinv_rec => l_oinv_rec
1390: ,x_oinv_rec => lx_oinv_rec);
1391: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1392: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1393: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1394: RAISE okl_api.G_EXCEPTION_ERROR;
1395: END IF;
1396:
1389: ,p_oinv_rec => l_oinv_rec
1390: ,x_oinv_rec => lx_oinv_rec);
1391: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1392: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1393: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1394: RAISE okl_api.G_EXCEPTION_ERROR;
1395: END IF;
1396:
1397: IF (p_ext_agncy_id = OKC_API.G_MISS_NUM) THEN
1390: ,x_oinv_rec => lx_oinv_rec);
1391: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1392: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1393: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1394: RAISE okl_api.G_EXCEPTION_ERROR;
1395: END IF;
1396:
1397: IF (p_ext_agncy_id = OKC_API.G_MISS_NUM) THEN
1398: l_ext_agncy_id := NULL;
1406: ,x_msg_count => x_msg_count
1407: ,x_msg_data => x_msg_data
1408: ,p_iohv_rec => l_iohv_rec
1409: ,x_iohv_rec => lx_iohv_rec);
1410: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1411: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1412: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1413: RAISE okl_api.G_EXCEPTION_ERROR;
1414: END IF;
1407: ,x_msg_data => x_msg_data
1408: ,p_iohv_rec => l_iohv_rec
1409: ,x_iohv_rec => lx_iohv_rec);
1410: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1411: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1412: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1413: RAISE okl_api.G_EXCEPTION_ERROR;
1414: END IF;
1415:
1408: ,p_iohv_rec => l_iohv_rec
1409: ,x_iohv_rec => lx_iohv_rec);
1410: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1411: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1412: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1413: RAISE okl_api.G_EXCEPTION_ERROR;
1414: END IF;
1415:
1416: l_iohv_rec := lx_iohv_rec;
1409: ,x_iohv_rec => lx_iohv_rec);
1410: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1411: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1412: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1413: RAISE okl_api.G_EXCEPTION_ERROR;
1414: END IF;
1415:
1416: l_iohv_rec := lx_iohv_rec;
1417:
1469:
1470: -- Processing ends
1471:
1472: x_return_status := l_return_status;
1473: okl_api.END_ACTIVITY(x_msg_count, x_msg_data);
1474: EXCEPTION
1475: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1476: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1477: (
1613:
1614: -- Processing ends
1615:
1616: x_return_status := l_return_status;
1617: okl_api.END_ACTIVITY(x_msg_count, x_msg_data);
1618: EXCEPTION
1619: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1620: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1621: (
1903: END IF;
1904: END IF;
1905: --End bug#5246309 schekuri 29-Jun-2006
1906:
1907: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1908: OKL_API.SET_MESSAGE(G_APP_NAME, G_TASK_CREATION_FAILURE);
1909: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1910: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1911: OKL_API.SET_MESSAGE(G_APP_NAME, G_TASK_CREATION_FAILURE);
1904: END IF;
1905: --End bug#5246309 schekuri 29-Jun-2006
1906:
1907: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1908: OKL_API.SET_MESSAGE(G_APP_NAME, G_TASK_CREATION_FAILURE);
1909: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1910: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1911: OKL_API.SET_MESSAGE(G_APP_NAME, G_TASK_CREATION_FAILURE);
1912: RAISE okl_api.G_EXCEPTION_ERROR;
1905: --End bug#5246309 schekuri 29-Jun-2006
1906:
1907: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1908: OKL_API.SET_MESSAGE(G_APP_NAME, G_TASK_CREATION_FAILURE);
1909: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1910: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1911: OKL_API.SET_MESSAGE(G_APP_NAME, G_TASK_CREATION_FAILURE);
1912: RAISE okl_api.G_EXCEPTION_ERROR;
1913: END IF;
1906:
1907: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1908: OKL_API.SET_MESSAGE(G_APP_NAME, G_TASK_CREATION_FAILURE);
1909: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1910: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1911: OKL_API.SET_MESSAGE(G_APP_NAME, G_TASK_CREATION_FAILURE);
1912: RAISE okl_api.G_EXCEPTION_ERROR;
1913: END IF;
1914:
1907: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1908: OKL_API.SET_MESSAGE(G_APP_NAME, G_TASK_CREATION_FAILURE);
1909: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1910: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1911: OKL_API.SET_MESSAGE(G_APP_NAME, G_TASK_CREATION_FAILURE);
1912: RAISE okl_api.G_EXCEPTION_ERROR;
1913: END IF;
1914:
1915: -- Processing ends
1908: OKL_API.SET_MESSAGE(G_APP_NAME, G_TASK_CREATION_FAILURE);
1909: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1910: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1911: OKL_API.SET_MESSAGE(G_APP_NAME, G_TASK_CREATION_FAILURE);
1912: RAISE okl_api.G_EXCEPTION_ERROR;
1913: END IF;
1914:
1915: -- Processing ends
1916:
1914:
1915: -- Processing ends
1916:
1917: x_return_status := l_return_status;
1918: okl_api.END_ACTIVITY(x_msg_count, x_msg_data);
1919: EXCEPTION
1920: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1921: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1922: (
2113: ,x_email => l_email
2114: ,x_return_status => l_return_status);
2115: END IF;
2116:
2117: IF NOT ((l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) OR
2118: (l_return_status = okl_api.G_RET_STS_ERROR) OR
2119: (l_email = OKC_API.G_MISS_CHAR) OR (l_email IS NULL)) THEN
2120: l_cust_notified := l_cust_notified + 1;
2121:
2114: ,x_return_status => l_return_status);
2115: END IF;
2116:
2117: IF NOT ((l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) OR
2118: (l_return_status = okl_api.G_RET_STS_ERROR) OR
2119: (l_email = OKC_API.G_MISS_CHAR) OR (l_email IS NULL)) THEN
2120: l_cust_notified := l_cust_notified + 1;
2121:
2122: /*
2131: --call fulfillment
2132: /*
2133: OKL_FULFILLMENT_PUB.create_fulfillment (
2134: p_api_version => l_api_version,
2135: p_init_msg_list => okl_api.G_TRUE,
2136: p_agent_id => l_agent_id,
2137: p_content_id => l_content_id,
2138: p_from => l_from,
2139: p_subject => l_subject,
2140: p_email => l_email,
2141: p_bind_var => l_bind_var,
2142: p_bind_val => l_bind_val,
2143: p_bind_var_type => l_bind_var_type,
2144: p_commit => okl_api.G_FALSE,
2145: x_request_id => l_request_id,
2146: x_return_status => l_return_status,
2147: x_msg_count => lx_msg_count,
2148: x_msg_data => lx_msg_data);
2179:
2180: IF l_return_status = OKC_API.G_RET_STS_SUCCESS THEN
2181: complete_notify(
2182: p_api_version => l_api_version,
2183: p_init_msg_list => okl_api.G_TRUE,
2184: p_interface_id => l_oinv_rec.id,
2185: p_hst_id => l_iohv_rec.id,
2186: p_notification_date => SYSDATE,
2187: p_comments => OKC_API.G_MISS_CHAR,
2193: l_task_name := 'Oracle Collections Review Contract';
2194: l_description := 'Oracle Collections Review contract for reporting to credit bureau';
2195: l_start_date := sysdate + to_number(fnd_profile.value('IEX_CB_NOTIFY_GRACE_DAYS'));
2196: create_followup(p_api_version => l_api_version,
2197: p_init_msg_list => okl_api.G_TRUE,
2198: p_oinv_rec => l_oinv_rec,
2199: p_iohv_rec => l_iohv_rec,
2200: p_task_name => l_task_name,
2201: p_description => l_description,
2702: ,x_email => l_email
2703: ,x_return_status => l_return_status);
2704: END IF;
2705:
2706: IF NOT ((l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) OR
2707: (l_return_status = okl_api.G_RET_STS_ERROR) OR
2708: (l_email = OKC_API.G_MISS_CHAR) OR (l_email IS NULL)) THEN
2709: l_ext_agncy_notified := l_ext_agncy_notified + 1;
2710:
2703: ,x_return_status => l_return_status);
2704: END IF;
2705:
2706: IF NOT ((l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) OR
2707: (l_return_status = okl_api.G_RET_STS_ERROR) OR
2708: (l_email = OKC_API.G_MISS_CHAR) OR (l_email IS NULL)) THEN
2709: l_ext_agncy_notified := l_ext_agncy_notified + 1;
2710:
2711: /*
2715:
2716: --call fulfillment
2717: OKL_FULFILLMENT_PUB.create_fulfillment (
2718: p_api_version => l_api_version,
2719: p_init_msg_list => okl_api.G_TRUE,
2720: p_agent_id => l_agent_id,
2721: p_content_id => l_content_id,
2722: p_from => l_from,
2723: p_subject => l_subject,
2724: p_email => l_email,
2725: p_bind_var => l_bind_var,
2726: p_bind_val => l_bind_val,
2727: p_bind_var_type => l_bind_var_type,
2728: p_commit => okl_api.G_FALSE,
2729: x_request_id => l_request_id,
2730: x_return_status => l_return_status,
2731: x_msg_count => lx_msg_count,
2732: x_msg_data => lx_msg_data);
2747:
2748: IF l_return_status = OKC_API.G_RET_STS_SUCCESS THEN
2749: complete_notify_ext_agncy(
2750: p_api_version => l_api_version,
2751: p_init_msg_list => okl_api.G_TRUE,
2752: p_interface_id => l_oinv_rec.id,
2753: p_hst_id => l_iohv_rec.id,
2754: p_notification_date => SYSDATE,
2755: p_comments => null,