49: ) IS
50: l_parameter_list wf_parameter_list_t;
51: l_contract_process VARCHAR2(20);
52: BEGIN
53: x_return_status := OKL_API.G_RET_STS_SUCCESS;
54:
55: -- wrapper API to get contract process. this API determines in which status the
56: -- contract in question is.
57: l_contract_process := okl_lla_util_pvt.get_contract_process(p_chr_id => p_chr_id);
67: p_event_name => p_event_name,
68: p_parameters => l_parameter_list);
69: EXCEPTION
70: WHEN OTHERS THEN
71: x_return_status := OKL_API.G_RET_STS_UNEXP_ERROR;
72: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
73: END raise_business_event;
74:
75: /*
68: p_parameters => l_parameter_list);
69: EXCEPTION
70: WHEN OTHERS THEN
71: x_return_status := OKL_API.G_RET_STS_UNEXP_ERROR;
72: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
73: END raise_business_event;
74:
75: /*
76: * sjalasut: aug 18, 04 added procedure to call private wrapper that raises the business event. END
177: -- Call to Accounting Util package to address Multi Currency requirement
178: -- Start
179: OPEN c_get_currency_code(p_tal_id => l_asdv_rec.tal_id);
180: IF c_get_currency_code%NOTFOUND THEN
181: OKL_API.set_message(p_app_name => G_APP_NAME,
182: p_msg_name => G_LINE_RECORD);
183: RAISE OKL_API.G_EXCEPTION_ERROR;
184: END IF;
185: FETCH c_get_currency_code INTO l_currency_code;
179: OPEN c_get_currency_code(p_tal_id => l_asdv_rec.tal_id);
180: IF c_get_currency_code%NOTFOUND THEN
181: OKL_API.set_message(p_app_name => G_APP_NAME,
182: p_msg_name => G_LINE_RECORD);
183: RAISE OKL_API.G_EXCEPTION_ERROR;
184: END IF;
185: FETCH c_get_currency_code INTO l_currency_code;
186: CLOSE c_get_currency_code;
187:
189: l_asdv_rec.cost :=
190: OKL_ACCOUNTING_UTIL.CROSS_CURRENCY_ROUND_AMOUNT(l_asdv_rec.cost,
191: l_currency_code);
192: IF (l_cost <> 0 AND l_asdv_rec.cost = 0) THEN
193: OKL_API.set_message(p_app_name => G_APP_NAME,
194: p_msg_name => G_AMOUNT_ROUNDING,
195: p_token1 => 'AMT',
196: p_token1_value => to_char(l_cost));
197: RAISE G_EXCEPTION_HALT_VALIDATION;
213: x_msg_count => x_msg_count,
214: x_msg_data => x_msg_data,
215: p_cle_id => l_tal_rec.kle_id);
216:
217: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
218: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
219: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
220: RAISE OKL_API.G_EXCEPTION_ERROR;
221: END IF;
214: x_msg_data => x_msg_data,
215: p_cle_id => l_tal_rec.kle_id);
216:
217: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
218: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
219: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
220: RAISE OKL_API.G_EXCEPTION_ERROR;
221: END IF;
222: END IF;
215: p_cle_id => l_tal_rec.kle_id);
216:
217: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
218: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
219: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
220: RAISE OKL_API.G_EXCEPTION_ERROR;
221: END IF;
222: END IF;
223: --Bug# 4959361
216:
217: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
218: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
219: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
220: RAISE OKL_API.G_EXCEPTION_ERROR;
221: END IF;
222: END IF;
223: --Bug# 4959361
224:
249:
250: --Bug# 3657624 : Depreciation Rate should not be divided by 100
251: /*
252: --Bug# 3573504 : Flat rate method support
253: If nvl(l_asdv_rec.DEPRN_RATE_TAX,OKL_API.G_MISS_NUM) <> OKL_API.G_MISS_NUM then
254: l_asdv_rec.DEPRN_RATE_TAX := l_asdv_rec.DEPRN_RATE_TAX/100;
255: End If;
256: --Bug# 3573504
257: */
274: -- get the contract header id
275: OPEN get_chr_and_cle_id(x_asdv_rec.tal_id);
276: FETCH get_chr_and_cle_id INTO l_chr_id, l_cle_id;
277: CLOSE get_chr_and_cle_id;
278: IF(OKL_LLA_UTIL_PVT.is_lease_contract(l_chr_id)= OKL_API.G_TRUE)THEN
279: raise_business_event(p_api_version => p_api_version,
280: p_init_msg_list => p_init_msg_list,
281: p_chr_id => l_chr_id,
282: p_asset_id => l_cle_id,
284: x_return_status => x_return_status,
285: x_msg_count => x_msg_count,
286: x_msg_data => x_msg_data
287: );
288: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
289: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
290: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
291: RAISE OKL_API.G_EXCEPTION_ERROR;
292: END IF;
285: x_msg_count => x_msg_count,
286: x_msg_data => x_msg_data
287: );
288: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
289: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
290: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
291: RAISE OKL_API.G_EXCEPTION_ERROR;
292: END IF;
293: END IF;
286: x_msg_data => x_msg_data
287: );
288: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
289: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
290: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
291: RAISE OKL_API.G_EXCEPTION_ERROR;
292: END IF;
293: END IF;
294: /*
287: );
288: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
289: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
290: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
291: RAISE OKL_API.G_EXCEPTION_ERROR;
292: END IF;
293: END IF;
294: /*
295: * sjalasut: aug 18, 04 added code to enable business event. END
302:
303: -- We need to change the status of the header whenever there is updating happening
304: -- after the contract status is approved
305: IF (ln_chr_id is NOT NULL) AND
306: (ln_chr_id <> OKL_API.G_MISS_NUM) THEN
307: --cascade edit status on to lines
308: okl_contract_status_pub.cascade_lease_status_edit
309: (p_api_version => p_api_version,
310: p_init_msg_list => p_init_msg_list,
311: x_return_status => x_return_status,
312: x_msg_count => x_msg_count,
313: x_msg_data => x_msg_data,
314: p_chr_id => ln_chr_id);
315: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
316: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
317: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
318: RAISE OKC_API.G_EXCEPTION_ERROR;
319: END IF;
313: x_msg_data => x_msg_data,
314: p_chr_id => ln_chr_id);
315: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
316: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
317: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
318: RAISE OKC_API.G_EXCEPTION_ERROR;
319: END IF;
320: END IF;
321:
387: x_msg_data => x_msg_data,
388: p_asdv_rec => p_asdv_tbl(p),
389: x_asdv_rec => x_asdv_tbl(p));
390:
391: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
392: EXIT WHEN (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR);
393: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
394: EXIT WHEN (x_return_status = OKL_API.G_RET_STS_ERROR);
395: END IF;
388: p_asdv_rec => p_asdv_tbl(p),
389: x_asdv_rec => x_asdv_tbl(p));
390:
391: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
392: EXIT WHEN (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR);
393: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
394: EXIT WHEN (x_return_status = OKL_API.G_RET_STS_ERROR);
395: END IF;
396: EXIT WHEN (p = p_asdv_tbl.LAST);
389: x_asdv_rec => x_asdv_tbl(p));
390:
391: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
392: EXIT WHEN (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR);
393: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
394: EXIT WHEN (x_return_status = OKL_API.G_RET_STS_ERROR);
395: END IF;
396: EXIT WHEN (p = p_asdv_tbl.LAST);
397: p := p_asdv_tbl.NEXT(p);
390:
391: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
392: EXIT WHEN (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR);
393: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
394: EXIT WHEN (x_return_status = OKL_API.G_RET_STS_ERROR);
395: END IF;
396: EXIT WHEN (p = p_asdv_tbl.LAST);
397: p := p_asdv_tbl.NEXT(p);
398: END LOOP;
395: END IF;
396: EXIT WHEN (p = p_asdv_tbl.LAST);
397: p := p_asdv_tbl.NEXT(p);
398: END LOOP;
399: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
400: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
401: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
402: RAISE OKL_API.G_EXCEPTION_ERROR;
403: END IF;
396: EXIT WHEN (p = p_asdv_tbl.LAST);
397: p := p_asdv_tbl.NEXT(p);
398: END LOOP;
399: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
400: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
401: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
402: RAISE OKL_API.G_EXCEPTION_ERROR;
403: END IF;
404: END IF;
397: p := p_asdv_tbl.NEXT(p);
398: END LOOP;
399: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
400: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
401: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
402: RAISE OKL_API.G_EXCEPTION_ERROR;
403: END IF;
404: END IF;
405:
398: END LOOP;
399: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
400: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
401: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
402: RAISE OKL_API.G_EXCEPTION_ERROR;
403: END IF;
404: END IF;
405:
406: -- End Modification
641: -- Start
642: OPEN c_get_currency_code(p_id => l_asdv_rec.id);
643:
644: IF c_get_currency_code%NOTFOUND THEN
645: OKL_API.set_message(p_app_name => G_APP_NAME,
646: p_msg_name => G_LINE_RECORD);
647: RAISE OKL_API.G_EXCEPTION_ERROR;
648: END IF;
649: FETCH c_get_currency_code INTO l_currency_code;
643:
644: IF c_get_currency_code%NOTFOUND THEN
645: OKL_API.set_message(p_app_name => G_APP_NAME,
646: p_msg_name => G_LINE_RECORD);
647: RAISE OKL_API.G_EXCEPTION_ERROR;
648: END IF;
649: FETCH c_get_currency_code INTO l_currency_code;
650: CLOSE c_get_currency_code;
651:
655: OKL_ACCOUNTING_UTIL.CROSS_CURRENCY_ROUND_AMOUNT(l_asdv_rec.cost,
656: l_currency_code);
657:
658: IF (l_cost <> 0 AND l_asdv_rec.cost = 0) THEN
659: OKL_API.set_message(p_app_name => G_APP_NAME,
660: p_msg_name => G_AMOUNT_ROUNDING,
661: p_token1 => 'AMT',
662: p_token1_value => to_char(l_cost));
663: RAISE G_EXCEPTION_HALT_VALIDATION;
679: x_msg_count => x_msg_count,
680: x_msg_data => x_msg_data,
681: p_cle_id => l_tal_rec.kle_id);
682:
683: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
684: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
685: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
686: RAISE OKL_API.G_EXCEPTION_ERROR;
687: END IF;
680: x_msg_data => x_msg_data,
681: p_cle_id => l_tal_rec.kle_id);
682:
683: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
684: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
685: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
686: RAISE OKL_API.G_EXCEPTION_ERROR;
687: END IF;
688: END IF;
681: p_cle_id => l_tal_rec.kle_id);
682:
683: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
684: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
685: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
686: RAISE OKL_API.G_EXCEPTION_ERROR;
687: END IF;
688: END IF;
689: --Bug# 4959361
682:
683: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
684: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
685: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
686: RAISE OKL_API.G_EXCEPTION_ERROR;
687: END IF;
688: END IF;
689: --Bug# 4959361
690:
715:
716: --Bug# 3657624 : Depreciation Rate should not be divided by 100
717: /*
718: --Bug# 3573504 : Flat rate method support
719: If nvl(l_asdv_rec.DEPRN_RATE_TAX,OKL_API.G_MISS_NUM) <> OKL_API.G_MISS_NUM then
720: l_asdv_rec.DEPRN_RATE_TAX := l_asdv_rec.DEPRN_RATE_TAX/100;
721: End If;
722: --Bug# 3573504
723: */
742: CLOSE get_chr_id;
743: -- We need to change the status of the header whenever there is updating happening
744: -- after the contract status is approved
745: IF (ln_chr_id is NOT NULL) AND
746: (ln_chr_id <> OKL_API.G_MISS_NUM) THEN
747: --cascade edit status on to lines
748: okl_contract_status_pub.cascade_lease_status_edit
749: (p_api_version => p_api_version,
750: p_init_msg_list => p_init_msg_list,
751: x_return_status => x_return_status,
752: x_msg_count => x_msg_count,
753: x_msg_data => x_msg_data,
754: p_chr_id => ln_chr_id);
755: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
756: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
757: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
758: RAISE OKC_API.G_EXCEPTION_ERROR;
759: END IF;
753: x_msg_data => x_msg_data,
754: p_chr_id => ln_chr_id);
755: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
756: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
757: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
758: RAISE OKC_API.G_EXCEPTION_ERROR;
759: END IF;
760: END IF;
761: OKC_API.END_ACTIVITY (x_msg_count
826: x_msg_data => x_msg_data,
827: p_asdv_rec => p_asdv_tbl(p),
828: x_asdv_rec => x_asdv_tbl(p));
829:
830: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
831: EXIT WHEN (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR);
832: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
833: EXIT WHEN (x_return_status = OKL_API.G_RET_STS_ERROR);
834: END IF;
827: p_asdv_rec => p_asdv_tbl(p),
828: x_asdv_rec => x_asdv_tbl(p));
829:
830: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
831: EXIT WHEN (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR);
832: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
833: EXIT WHEN (x_return_status = OKL_API.G_RET_STS_ERROR);
834: END IF;
835: EXIT WHEN (p = p_asdv_tbl.LAST);
828: x_asdv_rec => x_asdv_tbl(p));
829:
830: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
831: EXIT WHEN (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR);
832: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
833: EXIT WHEN (x_return_status = OKL_API.G_RET_STS_ERROR);
834: END IF;
835: EXIT WHEN (p = p_asdv_tbl.LAST);
836: p := p_asdv_tbl.NEXT(p);
829:
830: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
831: EXIT WHEN (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR);
832: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
833: EXIT WHEN (x_return_status = OKL_API.G_RET_STS_ERROR);
834: END IF;
835: EXIT WHEN (p = p_asdv_tbl.LAST);
836: p := p_asdv_tbl.NEXT(p);
837: END LOOP;
834: END IF;
835: EXIT WHEN (p = p_asdv_tbl.LAST);
836: p := p_asdv_tbl.NEXT(p);
837: END LOOP;
838: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
839: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
840: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
841: RAISE OKL_API.G_EXCEPTION_ERROR;
842: END IF;
835: EXIT WHEN (p = p_asdv_tbl.LAST);
836: p := p_asdv_tbl.NEXT(p);
837: END LOOP;
838: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
839: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
840: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
841: RAISE OKL_API.G_EXCEPTION_ERROR;
842: END IF;
843: END IF;
836: p := p_asdv_tbl.NEXT(p);
837: END LOOP;
838: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
839: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
840: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
841: RAISE OKL_API.G_EXCEPTION_ERROR;
842: END IF;
843: END IF;
844:
837: END LOOP;
838: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
839: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
840: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
841: RAISE OKL_API.G_EXCEPTION_ERROR;
842: END IF;
843: END IF;
844:
845: -- End Modification
966: x_msg_count => x_msg_count,
967: x_msg_data => x_msg_data,
968: p_cle_id => l_tal_rec.kle_id);
969:
970: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
971: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
972: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
973: RAISE OKL_API.G_EXCEPTION_ERROR;
974: END IF;
967: x_msg_data => x_msg_data,
968: p_cle_id => l_tal_rec.kle_id);
969:
970: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
971: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
972: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
973: RAISE OKL_API.G_EXCEPTION_ERROR;
974: END IF;
975: END IF;
968: p_cle_id => l_tal_rec.kle_id);
969:
970: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
971: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
972: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
973: RAISE OKL_API.G_EXCEPTION_ERROR;
974: END IF;
975: END IF;
976: --Bug# 4959361
969:
970: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
971: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
972: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
973: RAISE OKL_API.G_EXCEPTION_ERROR;
974: END IF;
975: END IF;
976: --Bug# 4959361
977:
1006:
1007: /*
1008: * sjalasut: aug 18, 04 added code to enable business event. BEGIN
1009: */
1010: IF(OKL_LLA_UTIL_PVT.is_lease_contract(l_chr_id)= OKL_API.G_TRUE)THEN
1011: raise_business_event(p_api_version => p_api_version,
1012: p_init_msg_list => p_init_msg_list,
1013: p_chr_id => l_chr_id,
1014: p_asset_id => l_cle_id,
1016: x_return_status => x_return_status,
1017: x_msg_count => x_msg_count,
1018: x_msg_data => x_msg_data
1019: );
1020: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
1021: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1022: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
1023: RAISE OKL_API.G_EXCEPTION_ERROR;
1024: END IF;
1017: x_msg_count => x_msg_count,
1018: x_msg_data => x_msg_data
1019: );
1020: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
1021: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1022: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
1023: RAISE OKL_API.G_EXCEPTION_ERROR;
1024: END IF;
1025: END IF;
1018: x_msg_data => x_msg_data
1019: );
1020: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
1021: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1022: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
1023: RAISE OKL_API.G_EXCEPTION_ERROR;
1024: END IF;
1025: END IF;
1026: /*
1019: );
1020: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
1021: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1022: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
1023: RAISE OKL_API.G_EXCEPTION_ERROR;
1024: END IF;
1025: END IF;
1026: /*
1027: * sjalasut: aug 18, 04 added code to enable business event. END
1029:
1030: -- We need to change the status of the header whenever there is updating happening
1031: -- after the contract status is approved
1032: IF (ln_chr_id is NOT NULL) AND
1033: (ln_chr_id <> OKL_API.G_MISS_NUM) THEN
1034: --cascade edit status on to lines
1035: okl_contract_status_pub.cascade_lease_status_edit
1036: (p_api_version => p_api_version,
1037: p_init_msg_list => p_init_msg_list,
1038: x_return_status => x_return_status,
1039: x_msg_count => x_msg_count,
1040: x_msg_data => x_msg_data,
1041: p_chr_id => ln_chr_id);
1042: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
1043: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1044: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
1045: RAISE OKC_API.G_EXCEPTION_ERROR;
1046: END IF;
1040: x_msg_data => x_msg_data,
1041: p_chr_id => ln_chr_id);
1042: IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
1043: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1044: ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
1045: RAISE OKC_API.G_EXCEPTION_ERROR;
1046: END IF;
1047: END IF;
1048: OKC_API.END_ACTIVITY (x_msg_count