DBA Data[Home] [Help]

APPS.OKL_LOSS_PROV_PVT dependencies on OKL_API

Line 65: Okl_Api.set_message(p_app_name => g_app_name,

61: OPEN depr_csr(l_asset_id, l_corporate_book);
62: FETCH depr_csr INTO l_deprn_amount;
63: CLOSE depr_csr;
64: IF l_deprn_amount IS NULL THEN
65: Okl_Api.set_message(p_app_name => g_app_name,
66: p_msg_name => 'OKL_GLP_DEPR_ERROR',
67: p_token1 => 'ASSET_NUMBER',
68: p_token1_value => l_asset_number);
69: RAISE OKL_API.G_EXCEPTION_ERROR;

Line 69: RAISE OKL_API.G_EXCEPTION_ERROR;

65: Okl_Api.set_message(p_app_name => g_app_name,
66: p_msg_name => 'OKL_GLP_DEPR_ERROR',
67: p_token1 => 'ASSET_NUMBER',
68: p_token1_value => l_asset_number);
69: RAISE OKL_API.G_EXCEPTION_ERROR;
70: END IF;
71:
72: /* calculate the asset book value */
73: l_asset_book_value := NVL(l_original_cost,0) - NVL(l_deprn_amount,0);

Line 84: WHEN OKL_API.G_EXCEPTION_ERROR THEN

80: /* return the calculated net book value */
81: RETURN(l_net_book_value);
82:
83: EXCEPTION
84: WHEN OKL_API.G_EXCEPTION_ERROR THEN
85: -- return null because of error
86: RETURN(NULL);
87:
88: WHEN OTHERS THEN

Line 139: l_init_msg_list VARCHAR2(20) DEFAULT Okl_Api.G_FALSE;

135: ,p_loss_date IN DATE) RETURN NUMBER
136: IS
137: l_formula_name CONSTANT VARCHAR2(30) := 'LP_NET_INVESTMENT_VALUE';
138: l_api_version CONSTANT NUMBER := 1.0;
139: l_init_msg_list VARCHAR2(20) DEFAULT Okl_Api.G_FALSE;
140: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
141: l_msg_count NUMBER;
142: l_msg_data VARCHAR2(2000);
143: l_net_invest_value NUMBER := 0;

Line 140: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;

136: IS
137: l_formula_name CONSTANT VARCHAR2(30) := 'LP_NET_INVESTMENT_VALUE';
138: l_api_version CONSTANT NUMBER := 1.0;
139: l_init_msg_list VARCHAR2(20) DEFAULT Okl_Api.G_FALSE;
140: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
141: l_msg_count NUMBER;
142: l_msg_data VARCHAR2(2000);
143: l_net_invest_value NUMBER := 0;
144: l_ctxt_val_tbl Okl_Account_Dist_Pub.ctxt_val_tbl_type;

Line 165: IF (l_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN

161: ,p_additional_parameters => l_ctxt_val_tbl
162: ,x_value => l_net_invest_value);
163:
164: -- store the highest degree of error
165: IF (l_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN
166: IF (l_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
167: -- need to leave
168: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
169: ELSE

Line 166: IF (l_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN

162: ,x_value => l_net_invest_value);
163:
164: -- store the highest degree of error
165: IF (l_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN
166: IF (l_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
167: -- need to leave
168: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
169: ELSE
170: RAISE OKL_API.G_EXCEPTION_ERROR;

Line 168: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

164: -- store the highest degree of error
165: IF (l_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN
166: IF (l_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
167: -- need to leave
168: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
169: ELSE
170: RAISE OKL_API.G_EXCEPTION_ERROR;
171: END IF;
172: END IF;

Line 170: RAISE OKL_API.G_EXCEPTION_ERROR;

166: IF (l_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
167: -- need to leave
168: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
169: ELSE
170: RAISE OKL_API.G_EXCEPTION_ERROR;
171: END IF;
172: END IF;
173:
174:

Line 179: WHEN OKL_API.G_EXCEPTION_ERROR THEN

175: /* return the calculated net book value */
176: RETURN(l_net_invest_value);
177:
178: EXCEPTION
179: WHEN OKL_API.G_EXCEPTION_ERROR THEN
180: -- return null because of error
181: RETURN(NULL);
182: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
183: -- return null because of error

Line 182: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN

178: EXCEPTION
179: WHEN OKL_API.G_EXCEPTION_ERROR THEN
180: -- return null because of error
181: RETURN(NULL);
182: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
183: -- return null because of error
184: RETURN(NULL);
185:
186: WHEN OTHERS THEN

Line 202: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;

198: l_period_end_date DATE := p_period_end_date;
199: l_principal_bal NUMBER;
200: l_contract_number VARCHAR2(2000);
201: l_last_int_calc_date DATE;
202: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
203: l_kle_id NUMBER;
204: l_prin_bal_id NUMBER;
205:
206: -- cursor to get the contract number

Line 258: Okl_Api.set_message(p_app_name => g_app_name,

254: l_contract_number := i.contract_number;
255: END LOOP;
256:
257: IF l_contract_number IS NULL THEN
258: Okl_Api.set_message(p_app_name => g_app_name,
259: p_msg_name => 'OKL_REV_LPV_CNTRCT_NUM_ERROR');
260: RAISE OKL_API.G_EXCEPTION_ERROR;
261: END IF;
262:

Line 260: RAISE OKL_API.G_EXCEPTION_ERROR;

256:
257: IF l_contract_number IS NULL THEN
258: Okl_Api.set_message(p_app_name => g_app_name,
259: p_msg_name => 'OKL_REV_LPV_CNTRCT_NUM_ERROR');
260: RAISE OKL_API.G_EXCEPTION_ERROR;
261: END IF;
262:
263: IF l_period_end_date IS NULL THEN
264: Okl_Api.Set_Message(p_app_name => g_app_name,

Line 264: Okl_Api.Set_Message(p_app_name => g_app_name,

260: RAISE OKL_API.G_EXCEPTION_ERROR;
261: END IF;
262:
263: IF l_period_end_date IS NULL THEN
264: Okl_Api.Set_Message(p_app_name => g_app_name,
265: p_msg_name => 'OKL_AGN_FE_PERD_END_DATE');
266: RAISE Okl_Api.G_EXCEPTION_ERROR;
267: END IF;
268:

Line 266: RAISE Okl_Api.G_EXCEPTION_ERROR;

262:
263: IF l_period_end_date IS NULL THEN
264: Okl_Api.Set_Message(p_app_name => g_app_name,
265: p_msg_name => 'OKL_AGN_FE_PERD_END_DATE');
266: RAISE Okl_Api.G_EXCEPTION_ERROR;
267: END IF;
268:
269: IF l_period_start_date IS NULL THEN
270: Okl_Api.Set_Message(p_app_name => g_app_name,

Line 270: Okl_Api.Set_Message(p_app_name => g_app_name,

266: RAISE Okl_Api.G_EXCEPTION_ERROR;
267: END IF;
268:
269: IF l_period_start_date IS NULL THEN
270: Okl_Api.Set_Message(p_app_name => g_app_name,
271: p_msg_name => 'OKL_AGN_FE_PERD_START_DATE');
272: RAISE Okl_Api.G_EXCEPTION_ERROR;
273: END IF;
274:

Line 272: RAISE Okl_Api.G_EXCEPTION_ERROR;

268:
269: IF l_period_start_date IS NULL THEN
270: Okl_Api.Set_Message(p_app_name => g_app_name,
271: p_msg_name => 'OKL_AGN_FE_PERD_START_DATE');
272: RAISE Okl_Api.G_EXCEPTION_ERROR;
273: END IF;
274:
275: OKL_STREAMS_UTIL.get_dependent_stream_type(
276: p_khr_id => p_cntrct_id,

Line 282: IF l_return_status <> OKL_API.G_RET_STS_SUCCESS THEN

278: p_dependent_sty_purpose => 'PRINCIPAL_BALANCE',
279: x_return_status => l_return_status,
280: x_dependent_sty_id => l_prin_bal_id);
281:
282: IF l_return_status <> OKL_API.G_RET_STS_SUCCESS THEN
283: Okl_Api.set_message(p_app_name => g_app_name,
284: p_msg_name => 'OKL_AGN_STRM_TYPE_ERROR',
285: p_token1 => 'STREAM_NAME',
286: p_token1_value => 'PRINCIPAL BALANCE');

Line 283: Okl_Api.set_message(p_app_name => g_app_name,

279: x_return_status => l_return_status,
280: x_dependent_sty_id => l_prin_bal_id);
281:
282: IF l_return_status <> OKL_API.G_RET_STS_SUCCESS THEN
283: Okl_Api.set_message(p_app_name => g_app_name,
284: p_msg_name => 'OKL_AGN_STRM_TYPE_ERROR',
285: p_token1 => 'STREAM_NAME',
286: p_token1_value => 'PRINCIPAL BALANCE');
287: RAISE Okl_Api.G_EXCEPTION_ERROR;

Line 287: RAISE Okl_Api.G_EXCEPTION_ERROR;

283: Okl_Api.set_message(p_app_name => g_app_name,
284: p_msg_name => 'OKL_AGN_STRM_TYPE_ERROR',
285: p_token1 => 'STREAM_NAME',
286: p_token1_value => 'PRINCIPAL BALANCE');
287: RAISE Okl_Api.G_EXCEPTION_ERROR;
288: END IF;
289:
290: OPEN principal_bal_csr (p_cntrct_id, l_period_start_date, l_period_end_date, l_prin_bal_id);
291: FETCH principal_bal_csr INTO l_principal_bal;

Line 302: Okl_Api.Set_Message(p_app_name => g_app_name,

298: FETCH prior_prin_bal_csr INTO l_principal_bal;
299: CLOSE prior_prin_bal_csr;
300:
301: IF l_principal_bal IS NULL THEN
302: Okl_Api.Set_Message(p_app_name => g_app_name,
303: p_msg_name => 'OKL_AGN_FE_PRIN_BAL',
304: p_token1 => 'CONTRACT_NUMBER',
305: p_token1_value => l_contract_number);
306: RAISE Okl_Api.G_EXCEPTION_ERROR;

Line 306: RAISE Okl_Api.G_EXCEPTION_ERROR;

302: Okl_Api.Set_Message(p_app_name => g_app_name,
303: p_msg_name => 'OKL_AGN_FE_PRIN_BAL',
304: p_token1 => 'CONTRACT_NUMBER',
305: p_token1_value => l_contract_number);
306: RAISE Okl_Api.G_EXCEPTION_ERROR;
307: END IF;
308: END IF;
309:
310: RETURN l_principal_bal;

Line 313: WHEN Okl_Api.G_EXCEPTION_ERROR THEN

309:
310: RETURN l_principal_bal;
311:
312: EXCEPTION
313: WHEN Okl_Api.G_EXCEPTION_ERROR THEN
314: RETURN NULL;
315:
316: WHEN OTHERS THEN
317: Okl_Api.SET_MESSAGE(

Line 317: Okl_Api.SET_MESSAGE(

313: WHEN Okl_Api.G_EXCEPTION_ERROR THEN
314: RETURN NULL;
315:
316: WHEN OTHERS THEN
317: Okl_Api.SET_MESSAGE(
318: p_app_name => G_APP_NAME,
319: p_msg_name => G_UNEXPECTED_ERROR,
320: p_token1 => G_SQLCODE_TOKEN,
321: p_token1_value => SQLCODE,

Line 413: RAISE OKL_API.G_EXCEPTION_ERROR;

409: OPEN currency_info_csr(p_cntrct_id);
410: FETCH currency_info_csr INTO l_khr_currency_code;
411: CLOSE currency_info_csr;
412: IF l_khr_currency_code IS NULL THEN
413: RAISE OKL_API.G_EXCEPTION_ERROR;
414: END IF;
415:
416: -- retrieve the functional currency code
417: l_func_currency_code := Okl_Accounting_Util.GET_FUNC_CURR_CODE;

Line 419: RAISE OKL_API.G_EXCEPTION_ERROR;

415:
416: -- retrieve the functional currency code
417: l_func_currency_code := Okl_Accounting_Util.GET_FUNC_CURR_CODE;
418: IF l_func_currency_code IS NULL THEN
419: RAISE OKL_API.G_EXCEPTION_ERROR;
420: END IF;
421:
422: l_original_amt := calculate_cntrct_nbv (p_cntrct_id => p_cntrct_id);
423:

Line 437: RAISE Okl_Api.G_EXCEPTION_ERROR;

433: x_currency_conversion_rate => x_currency_conversion_rate,
434: x_currency_conversion_date => x_currency_conversion_date,
435: x_converted_amount => l_converted_amt);
436: IF l_converted_amt IS NULL THEN
437: RAISE Okl_Api.G_EXCEPTION_ERROR;
438: ELSE
439: l_capital_bal := l_converted_amt;
440: END IF;
441: ELSE

Line 486: WHEN OKL_API.G_EXCEPTION_ERROR THEN

482: /* return the calculated net book value */
483: RETURN(l_capital_bal);
484:
485: EXCEPTION
486: WHEN OKL_API.G_EXCEPTION_ERROR THEN
487: /* return null because of error */
488: RETURN(NULL);
489:
490: WHEN OTHERS THEN

Line 548: x_return_status := OKL_API.G_RET_STS_SUCCESS;

544: l_bill_to_site VARCHAR2(2000);
545:
546: BEGIN
547:
548: x_return_status := OKL_API.G_RET_STS_SUCCESS;
549:
550: -- Bug 3596651
551: -- **************************************************
552: -- Populate the account generator table with Contract Salesperson

Line 622: x_return_status := OKL_API.G_RET_STS_UNEXP_ERROR;

618: CLOSE chr_bill_to_site_csr;
619: END IF;
620:
621:
622: x_return_status := OKL_API.G_RET_STS_UNEXP_ERROR;
623: Okl_Api.SET_MESSAGE(p_app_name => g_app_name,
624: p_msg_name => g_unexpected_error,
625: p_token1 => g_sqlcode_token,
626: p_token1_value => SQLCODE,

Line 623: Okl_Api.SET_MESSAGE(p_app_name => g_app_name,

619: END IF;
620:
621:
622: x_return_status := OKL_API.G_RET_STS_UNEXP_ERROR;
623: Okl_Api.SET_MESSAGE(p_app_name => g_app_name,
624: p_msg_name => g_unexpected_error,
625: p_token1 => g_sqlcode_token,
626: p_token1_value => SQLCODE,
627: p_token2 => g_sqlerrm_token,

Line 671: x_return_status := Okl_Api.START_ACTIVITY(l_api_name

667:
668: BEGIN
669:
670: -- Set save point
671: x_return_status := Okl_Api.START_ACTIVITY(l_api_name
672: ,G_PKG_NAME
673: ,p_init_msg_list
674: ,l_api_version
675: ,p_api_version

Line 679: IF (x_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN

675: ,p_api_version
676: ,'_PVT'
677: ,x_return_status);
678:
679: IF (x_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
680: RAISE Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR;
681: ELSIF (x_return_Status = Okl_Api.G_RET_STS_ERROR) THEN
682: RAISE Okl_Api.G_EXCEPTION_ERROR;
683: END IF;

Line 680: RAISE Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR;

676: ,'_PVT'
677: ,x_return_status);
678:
679: IF (x_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
680: RAISE Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR;
681: ELSIF (x_return_Status = Okl_Api.G_RET_STS_ERROR) THEN
682: RAISE Okl_Api.G_EXCEPTION_ERROR;
683: END IF;
684:

Line 681: ELSIF (x_return_Status = Okl_Api.G_RET_STS_ERROR) THEN

677: ,x_return_status);
678:
679: IF (x_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
680: RAISE Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR;
681: ELSIF (x_return_Status = Okl_Api.G_RET_STS_ERROR) THEN
682: RAISE Okl_Api.G_EXCEPTION_ERROR;
683: END IF;
684:
685: -- Call Transaction Public API to insert transaction header and line records

Line 682: RAISE Okl_Api.G_EXCEPTION_ERROR;

678:
679: IF (x_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
680: RAISE Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR;
681: ELSIF (x_return_Status = Okl_Api.G_RET_STS_ERROR) THEN
682: RAISE Okl_Api.G_EXCEPTION_ERROR;
683: END IF;
684:
685: -- Call Transaction Public API to insert transaction header and line records
686: Okl_Trx_Contracts_Pub.create_trx_contracts

Line 697: IF (x_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN

693: ,p_tclv_tbl => p_tclv_tbl
694: ,x_tcnv_rec => x_tcnv_rec
695: ,x_tclv_tbl => x_tclv_tbl );
696: -- store the highest degree of error
697: IF (x_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN
698: IF (x_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
699: -- need to leave
700: Okl_Api.set_message(p_app_name => g_app_name,
701: p_msg_name => 'OKL_AGN_TRX_CRE_ERROR',

Line 698: IF (x_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN

694: ,x_tcnv_rec => x_tcnv_rec
695: ,x_tclv_tbl => x_tclv_tbl );
696: -- store the highest degree of error
697: IF (x_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN
698: IF (x_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
699: -- need to leave
700: Okl_Api.set_message(p_app_name => g_app_name,
701: p_msg_name => 'OKL_AGN_TRX_CRE_ERROR',
702: p_token1 => g_contract_number_token,

Line 700: Okl_Api.set_message(p_app_name => g_app_name,

696: -- store the highest degree of error
697: IF (x_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN
698: IF (x_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
699: -- need to leave
700: Okl_Api.set_message(p_app_name => g_app_name,
701: p_msg_name => 'OKL_AGN_TRX_CRE_ERROR',
702: p_token1 => g_contract_number_token,
703: p_token1_value => p_contract_number);
704: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

Line 704: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

700: Okl_Api.set_message(p_app_name => g_app_name,
701: p_msg_name => 'OKL_AGN_TRX_CRE_ERROR',
702: p_token1 => g_contract_number_token,
703: p_token1_value => p_contract_number);
704: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
705: ELSIF (x_return_Status = Okl_Api.G_RET_STS_ERROR) THEN
706: Okl_Api.set_message(p_app_name => g_app_name,
707: p_msg_name => 'OKL_AGN_TRX_CRE_ERROR',
708: p_token1 => g_contract_number_token,

Line 705: ELSIF (x_return_Status = Okl_Api.G_RET_STS_ERROR) THEN

701: p_msg_name => 'OKL_AGN_TRX_CRE_ERROR',
702: p_token1 => g_contract_number_token,
703: p_token1_value => p_contract_number);
704: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
705: ELSIF (x_return_Status = Okl_Api.G_RET_STS_ERROR) THEN
706: Okl_Api.set_message(p_app_name => g_app_name,
707: p_msg_name => 'OKL_AGN_TRX_CRE_ERROR',
708: p_token1 => g_contract_number_token,
709: p_token1_value => p_contract_number);

Line 706: Okl_Api.set_message(p_app_name => g_app_name,

702: p_token1 => g_contract_number_token,
703: p_token1_value => p_contract_number);
704: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
705: ELSIF (x_return_Status = Okl_Api.G_RET_STS_ERROR) THEN
706: Okl_Api.set_message(p_app_name => g_app_name,
707: p_msg_name => 'OKL_AGN_TRX_CRE_ERROR',
708: p_token1 => g_contract_number_token,
709: p_token1_value => p_contract_number);
710: RAISE OKL_API.G_EXCEPTION_ERROR;

Line 710: RAISE OKL_API.G_EXCEPTION_ERROR;

706: Okl_Api.set_message(p_app_name => g_app_name,
707: p_msg_name => 'OKL_AGN_TRX_CRE_ERROR',
708: p_token1 => g_contract_number_token,
709: p_token1_value => p_contract_number);
710: RAISE OKL_API.G_EXCEPTION_ERROR;
711: END IF;
712: END IF;
713:
714: --get acc gen sources and value. Bug 3596651

Line 720: IF (x_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN

716: p_contract_id => p_contract_id,
717: x_return_status => x_return_status,
718: x_acc_gen_primary_key_tbl => l_acc_gen_primary_key_tbl);
719: --check for error
720: IF (x_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN
721: Okl_Api.set_message(p_app_name => g_app_name,
722: p_msg_name => 'OKL_AGN_ACC_GEN_ERROR',
723: p_token1 => g_contract_number_token,
724: p_token1_value => p_contract_number);

Line 721: Okl_Api.set_message(p_app_name => g_app_name,

717: x_return_status => x_return_status,
718: x_acc_gen_primary_key_tbl => l_acc_gen_primary_key_tbl);
719: --check for error
720: IF (x_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN
721: Okl_Api.set_message(p_app_name => g_app_name,
722: p_msg_name => 'OKL_AGN_ACC_GEN_ERROR',
723: p_token1 => g_contract_number_token,
724: p_token1_value => p_contract_number);
725: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

Line 725: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

721: Okl_Api.set_message(p_app_name => g_app_name,
722: p_msg_name => 'OKL_AGN_ACC_GEN_ERROR',
723: p_token1 => g_contract_number_token,
724: p_token1_value => p_contract_number);
725: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
726: END IF;
727:
728: --START: Changes by nikshah 19-Feb-2007 for SLA Uptake, Bug #5707866
729: l_tcn_id := x_tcnv_rec.id;

Line 776: IF (x_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN

772: x_amount_tbl => l_amount_out_tbl,
773: p_trx_header_id => l_tcn_id);
774:
775: -- store the highest degree of error
776: IF (x_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN
777: IF (x_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
778: -- need to leave
779: Okl_Api.set_message(p_app_name => g_app_name,
780: p_msg_name => 'OKL_AGN_CRE_DIST_ERROR',

Line 777: IF (x_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN

773: p_trx_header_id => l_tcn_id);
774:
775: -- store the highest degree of error
776: IF (x_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN
777: IF (x_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
778: -- need to leave
779: Okl_Api.set_message(p_app_name => g_app_name,
780: p_msg_name => 'OKL_AGN_CRE_DIST_ERROR',
781: p_token1 => g_contract_number_token,

Line 779: Okl_Api.set_message(p_app_name => g_app_name,

775: -- store the highest degree of error
776: IF (x_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN
777: IF (x_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
778: -- need to leave
779: Okl_Api.set_message(p_app_name => g_app_name,
780: p_msg_name => 'OKL_AGN_CRE_DIST_ERROR',
781: p_token1 => g_contract_number_token,
782: p_token1_value => p_contract_number);
783: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

Line 783: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

779: Okl_Api.set_message(p_app_name => g_app_name,
780: p_msg_name => 'OKL_AGN_CRE_DIST_ERROR',
781: p_token1 => g_contract_number_token,
782: p_token1_value => p_contract_number);
783: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
784: ELSIF (x_return_status = Okl_Api.G_RET_STS_ERROR) THEN
785: -- record that there was an error
786: Okl_Api.set_message(p_app_name => g_app_name,
787: p_msg_name => 'OKL_AGN_CRE_DIST_ERROR',

Line 784: ELSIF (x_return_status = Okl_Api.G_RET_STS_ERROR) THEN

780: p_msg_name => 'OKL_AGN_CRE_DIST_ERROR',
781: p_token1 => g_contract_number_token,
782: p_token1_value => p_contract_number);
783: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
784: ELSIF (x_return_status = Okl_Api.G_RET_STS_ERROR) THEN
785: -- record that there was an error
786: Okl_Api.set_message(p_app_name => g_app_name,
787: p_msg_name => 'OKL_AGN_CRE_DIST_ERROR',
788: p_token1 => g_contract_number_token,

Line 786: Okl_Api.set_message(p_app_name => g_app_name,

782: p_token1_value => p_contract_number);
783: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
784: ELSIF (x_return_status = Okl_Api.G_RET_STS_ERROR) THEN
785: -- record that there was an error
786: Okl_Api.set_message(p_app_name => g_app_name,
787: p_msg_name => 'OKL_AGN_CRE_DIST_ERROR',
788: p_token1 => g_contract_number_token,
789: p_token1_value => p_contract_number);
790: RAISE OKL_API.G_EXCEPTION_ERROR;

Line 790: RAISE OKL_API.G_EXCEPTION_ERROR;

786: Okl_Api.set_message(p_app_name => g_app_name,
787: p_msg_name => 'OKL_AGN_CRE_DIST_ERROR',
788: p_token1 => g_contract_number_token,
789: p_token1_value => p_contract_number);
790: RAISE OKL_API.G_EXCEPTION_ERROR;
791: END IF;
792: END IF;
793: --END: Changes by nikshah 19-Feb-2007 for SLA Uptake, Bug #5707866
794:

Line 806: IF (x_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN

802: ,P_TCLV_TBL => x_tclv_tbl
803: ,p_ctxt_val_tbl => l_ctxt_tbl
804: ,p_acc_gen_primary_key_tbl => l_acc_gen_primary_key_tbl);
805:
806: IF (x_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
807: RAISE Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR;
808: ELSIF (x_return_status = Okl_Api.G_RET_STS_ERROR) THEN
809: RAISE Okl_Api.G_EXCEPTION_ERROR;
810: END IF;

Line 807: RAISE Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR;

803: ,p_ctxt_val_tbl => l_ctxt_tbl
804: ,p_acc_gen_primary_key_tbl => l_acc_gen_primary_key_tbl);
805:
806: IF (x_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
807: RAISE Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR;
808: ELSIF (x_return_status = Okl_Api.G_RET_STS_ERROR) THEN
809: RAISE Okl_Api.G_EXCEPTION_ERROR;
810: END IF;
811:

Line 808: ELSIF (x_return_status = Okl_Api.G_RET_STS_ERROR) THEN

804: ,p_acc_gen_primary_key_tbl => l_acc_gen_primary_key_tbl);
805:
806: IF (x_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
807: RAISE Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR;
808: ELSIF (x_return_status = Okl_Api.G_RET_STS_ERROR) THEN
809: RAISE Okl_Api.G_EXCEPTION_ERROR;
810: END IF;
811:
812: Okl_Api.END_ACTIVITY(x_msg_count, x_msg_data);

Line 809: RAISE Okl_Api.G_EXCEPTION_ERROR;

805:
806: IF (x_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
807: RAISE Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR;
808: ELSIF (x_return_status = Okl_Api.G_RET_STS_ERROR) THEN
809: RAISE Okl_Api.G_EXCEPTION_ERROR;
810: END IF;
811:
812: Okl_Api.END_ACTIVITY(x_msg_count, x_msg_data);
813: x_return_status := Okl_Api.G_RET_STS_SUCCESS;

Line 812: Okl_Api.END_ACTIVITY(x_msg_count, x_msg_data);

808: ELSIF (x_return_status = Okl_Api.G_RET_STS_ERROR) THEN
809: RAISE Okl_Api.G_EXCEPTION_ERROR;
810: END IF;
811:
812: Okl_Api.END_ACTIVITY(x_msg_count, x_msg_data);
813: x_return_status := Okl_Api.G_RET_STS_SUCCESS;
814:
815: EXCEPTION
816: WHEN Okl_Api.G_EXCEPTION_ERROR THEN

Line 813: x_return_status := Okl_Api.G_RET_STS_SUCCESS;

809: RAISE Okl_Api.G_EXCEPTION_ERROR;
810: END IF;
811:
812: Okl_Api.END_ACTIVITY(x_msg_count, x_msg_data);
813: x_return_status := Okl_Api.G_RET_STS_SUCCESS;
814:
815: EXCEPTION
816: WHEN Okl_Api.G_EXCEPTION_ERROR THEN
817: x_return_status := OKL_API.HANDLE_EXCEPTIONS(l_api_name

Line 816: WHEN Okl_Api.G_EXCEPTION_ERROR THEN

812: Okl_Api.END_ACTIVITY(x_msg_count, x_msg_data);
813: x_return_status := Okl_Api.G_RET_STS_SUCCESS;
814:
815: EXCEPTION
816: WHEN Okl_Api.G_EXCEPTION_ERROR THEN
817: x_return_status := OKL_API.HANDLE_EXCEPTIONS(l_api_name
818: ,g_pkg_name
819: ,'OKL_API.G_RET_STS_ERROR'
820: ,x_msg_count

Line 817: x_return_status := OKL_API.HANDLE_EXCEPTIONS(l_api_name

813: x_return_status := Okl_Api.G_RET_STS_SUCCESS;
814:
815: EXCEPTION
816: WHEN Okl_Api.G_EXCEPTION_ERROR THEN
817: x_return_status := OKL_API.HANDLE_EXCEPTIONS(l_api_name
818: ,g_pkg_name
819: ,'OKL_API.G_RET_STS_ERROR'
820: ,x_msg_count
821: ,x_msg_data

Line 819: ,'OKL_API.G_RET_STS_ERROR'

815: EXCEPTION
816: WHEN Okl_Api.G_EXCEPTION_ERROR THEN
817: x_return_status := OKL_API.HANDLE_EXCEPTIONS(l_api_name
818: ,g_pkg_name
819: ,'OKL_API.G_RET_STS_ERROR'
820: ,x_msg_count
821: ,x_msg_data
822: ,'_PVT');
823: WHEN Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR THEN

Line 823: WHEN Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR THEN

819: ,'OKL_API.G_RET_STS_ERROR'
820: ,x_msg_count
821: ,x_msg_data
822: ,'_PVT');
823: WHEN Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR THEN
824: x_return_status := OKL_API.HANDLE_EXCEPTIONS(l_api_name
825: ,g_pkg_name
826: ,'OKL_API.G_RET_STS_UNEXP_ERROR'
827: ,x_msg_count

Line 824: x_return_status := OKL_API.HANDLE_EXCEPTIONS(l_api_name

820: ,x_msg_count
821: ,x_msg_data
822: ,'_PVT');
823: WHEN Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR THEN
824: x_return_status := OKL_API.HANDLE_EXCEPTIONS(l_api_name
825: ,g_pkg_name
826: ,'OKL_API.G_RET_STS_UNEXP_ERROR'
827: ,x_msg_count
828: ,x_msg_data

Line 826: ,'OKL_API.G_RET_STS_UNEXP_ERROR'

822: ,'_PVT');
823: WHEN Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR THEN
824: x_return_status := OKL_API.HANDLE_EXCEPTIONS(l_api_name
825: ,g_pkg_name
826: ,'OKL_API.G_RET_STS_UNEXP_ERROR'
827: ,x_msg_count
828: ,x_msg_data
829: ,'_PVT');
830: WHEN OTHERS THEN

Line 831: x_return_status := OKL_API.HANDLE_EXCEPTIONS

827: ,x_msg_count
828: ,x_msg_data
829: ,'_PVT');
830: WHEN OTHERS THEN
831: x_return_status := OKL_API.HANDLE_EXCEPTIONS
832: (l_api_name,
833: G_PKG_NAME,
834: 'OTHERS',
835: x_msg_count,

Line 861: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;

857: l_entry_date VARCHAR2(2000);
858: l_tax_deductible_local VARCHAR2(2000);
859: l_tax_deductible_corporate VARCHAR2(2000);
860: l_description VARCHAR2(2000);
861: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
862: BEGIN
863:
864: l_return_status := OKL_API.START_ACTIVITY(l_api_name
865: ,G_PKG_NAME

Line 864: l_return_status := OKL_API.START_ACTIVITY(l_api_name

860: l_description VARCHAR2(2000);
861: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
862: BEGIN
863:
864: l_return_status := OKL_API.START_ACTIVITY(l_api_name
865: ,G_PKG_NAME
866: ,p_init_msg_list
867: ,l_api_version
868: ,p_api_version

Line 871: IF (l_return_status = okl_api.g_ret_sts_unexp_error) THEN

867: ,l_api_version
868: ,p_api_version
869: ,'_PVT'
870: ,l_return_status);
871: IF (l_return_status = okl_api.g_ret_sts_unexp_error) THEN
872: RAISE okl_api.g_exception_unexpected_error;
873: ELSIF (l_return_Status = okl_api.g_ret_sts_error) THEN
874: RAISE okl_api.g_exception_error;
875: END IF;

Line 872: RAISE okl_api.g_exception_unexpected_error;

868: ,p_api_version
869: ,'_PVT'
870: ,l_return_status);
871: IF (l_return_status = okl_api.g_ret_sts_unexp_error) THEN
872: RAISE okl_api.g_exception_unexpected_error;
873: ELSIF (l_return_Status = okl_api.g_ret_sts_error) THEN
874: RAISE okl_api.g_exception_error;
875: END IF;
876: -- validate input parameters

Line 873: ELSIF (l_return_Status = okl_api.g_ret_sts_error) THEN

869: ,'_PVT'
870: ,l_return_status);
871: IF (l_return_status = okl_api.g_ret_sts_unexp_error) THEN
872: RAISE okl_api.g_exception_unexpected_error;
873: ELSIF (l_return_Status = okl_api.g_ret_sts_error) THEN
874: RAISE okl_api.g_exception_error;
875: END IF;
876: -- validate input parameters
877: IF (p_glpv_rec.product_id = OKL_API.G_MISS_NUM OR

Line 874: RAISE okl_api.g_exception_error;

870: ,l_return_status);
871: IF (l_return_status = okl_api.g_ret_sts_unexp_error) THEN
872: RAISE okl_api.g_exception_unexpected_error;
873: ELSIF (l_return_Status = okl_api.g_ret_sts_error) THEN
874: RAISE okl_api.g_exception_error;
875: END IF;
876: -- validate input parameters
877: IF (p_glpv_rec.product_id = OKL_API.G_MISS_NUM OR
878: p_glpv_rec.product_id is NULL) THEN

Line 877: IF (p_glpv_rec.product_id = OKL_API.G_MISS_NUM OR

873: ELSIF (l_return_Status = okl_api.g_ret_sts_error) THEN
874: RAISE okl_api.g_exception_error;
875: END IF;
876: -- validate input parameters
877: IF (p_glpv_rec.product_id = OKL_API.G_MISS_NUM OR
878: p_glpv_rec.product_id is NULL) THEN
879: Okl_Api.set_message(p_app_name => g_app_name,
880: p_msg_name => 'OKL_GLP_PDT_ERROR');
881: RAISE OKL_API.G_EXCEPTION_ERROR;

Line 879: Okl_Api.set_message(p_app_name => g_app_name,

875: END IF;
876: -- validate input parameters
877: IF (p_glpv_rec.product_id = OKL_API.G_MISS_NUM OR
878: p_glpv_rec.product_id is NULL) THEN
879: Okl_Api.set_message(p_app_name => g_app_name,
880: p_msg_name => 'OKL_GLP_PDT_ERROR');
881: RAISE OKL_API.G_EXCEPTION_ERROR;
882: ELSE
883: l_product_id := to_char(p_glpv_rec.product_id);

Line 881: RAISE OKL_API.G_EXCEPTION_ERROR;

877: IF (p_glpv_rec.product_id = OKL_API.G_MISS_NUM OR
878: p_glpv_rec.product_id is NULL) THEN
879: Okl_Api.set_message(p_app_name => g_app_name,
880: p_msg_name => 'OKL_GLP_PDT_ERROR');
881: RAISE OKL_API.G_EXCEPTION_ERROR;
882: ELSE
883: l_product_id := to_char(p_glpv_rec.product_id);
884: END IF;
885:

Line 888: -- IF (p_glpv_rec.sty_id = OKL_API.G_MISS_NUM OR

884: END IF;
885:
886: -- Bug 4110239. sty_id is not supported from 11.5.10+ version
887: --
888: -- IF (p_glpv_rec.sty_id = OKL_API.G_MISS_NUM OR
889: -- p_glpv_rec.sty_id is NULL) THEN
890: -- Okl_Api.set_message(p_app_name => g_app_name,
891: -- p_msg_name => 'OKL_GLP_PVN_ERROR');
892: -- RAISE OKL_API.G_EXCEPTION_ERROR;

Line 890: -- Okl_Api.set_message(p_app_name => g_app_name,

886: -- Bug 4110239. sty_id is not supported from 11.5.10+ version
887: --
888: -- IF (p_glpv_rec.sty_id = OKL_API.G_MISS_NUM OR
889: -- p_glpv_rec.sty_id is NULL) THEN
890: -- Okl_Api.set_message(p_app_name => g_app_name,
891: -- p_msg_name => 'OKL_GLP_PVN_ERROR');
892: -- RAISE OKL_API.G_EXCEPTION_ERROR;
893: -- ELSE
894: -- l_sty_id := to_char(p_glpv_rec.sty_id);

Line 892: -- RAISE OKL_API.G_EXCEPTION_ERROR;

888: -- IF (p_glpv_rec.sty_id = OKL_API.G_MISS_NUM OR
889: -- p_glpv_rec.sty_id is NULL) THEN
890: -- Okl_Api.set_message(p_app_name => g_app_name,
891: -- p_msg_name => 'OKL_GLP_PVN_ERROR');
892: -- RAISE OKL_API.G_EXCEPTION_ERROR;
893: -- ELSE
894: -- l_sty_id := to_char(p_glpv_rec.sty_id);
895: -- END IF;
896:

Line 897: IF (p_glpv_rec.bucket_id = OKL_API.G_MISS_NUM OR

893: -- ELSE
894: -- l_sty_id := to_char(p_glpv_rec.sty_id);
895: -- END IF;
896:
897: IF (p_glpv_rec.bucket_id = OKL_API.G_MISS_NUM OR
898: p_glpv_rec.bucket_id is NULL) THEN
899: Okl_Api.set_message(p_app_name => g_app_name,
900: p_msg_name => 'OKL_GLP_BKT_ERROR');
901: RAISE OKL_API.G_EXCEPTION_ERROR;

Line 899: Okl_Api.set_message(p_app_name => g_app_name,

895: -- END IF;
896:
897: IF (p_glpv_rec.bucket_id = OKL_API.G_MISS_NUM OR
898: p_glpv_rec.bucket_id is NULL) THEN
899: Okl_Api.set_message(p_app_name => g_app_name,
900: p_msg_name => 'OKL_GLP_BKT_ERROR');
901: RAISE OKL_API.G_EXCEPTION_ERROR;
902: ELSE
903: l_bucket_id := to_char(p_glpv_rec.bucket_id);

Line 901: RAISE OKL_API.G_EXCEPTION_ERROR;

897: IF (p_glpv_rec.bucket_id = OKL_API.G_MISS_NUM OR
898: p_glpv_rec.bucket_id is NULL) THEN
899: Okl_Api.set_message(p_app_name => g_app_name,
900: p_msg_name => 'OKL_GLP_BKT_ERROR');
901: RAISE OKL_API.G_EXCEPTION_ERROR;
902: ELSE
903: l_bucket_id := to_char(p_glpv_rec.bucket_id);
904: END IF;
905:

Line 906: IF (p_glpv_rec.entry_date = OKL_API.G_MISS_DATE OR

902: ELSE
903: l_bucket_id := to_char(p_glpv_rec.bucket_id);
904: END IF;
905:
906: IF (p_glpv_rec.entry_date = OKL_API.G_MISS_DATE OR
907: p_glpv_rec.entry_date IS NULL) THEN
908: Okl_Api.set_message(p_app_name => g_app_name,
909: p_msg_name => 'OKL_GLP_DATE_ERROR');
910: RAISE OKL_API.G_EXCEPTION_ERROR;

Line 908: Okl_Api.set_message(p_app_name => g_app_name,

904: END IF;
905:
906: IF (p_glpv_rec.entry_date = OKL_API.G_MISS_DATE OR
907: p_glpv_rec.entry_date IS NULL) THEN
908: Okl_Api.set_message(p_app_name => g_app_name,
909: p_msg_name => 'OKL_GLP_DATE_ERROR');
910: RAISE OKL_API.G_EXCEPTION_ERROR;
911: ELSE
912: l_entry_date := FND_DATE.DATE_TO_CANONICAL(p_glpv_rec.entry_date);

Line 910: RAISE OKL_API.G_EXCEPTION_ERROR;

906: IF (p_glpv_rec.entry_date = OKL_API.G_MISS_DATE OR
907: p_glpv_rec.entry_date IS NULL) THEN
908: Okl_Api.set_message(p_app_name => g_app_name,
909: p_msg_name => 'OKL_GLP_DATE_ERROR');
910: RAISE OKL_API.G_EXCEPTION_ERROR;
911: ELSE
912: l_entry_date := FND_DATE.DATE_TO_CANONICAL(p_glpv_rec.entry_date);
913: END IF;
914:

Line 915: IF (p_glpv_rec.tax_deductible_local = OKL_API.G_MISS_CHAR OR

911: ELSE
912: l_entry_date := FND_DATE.DATE_TO_CANONICAL(p_glpv_rec.entry_date);
913: END IF;
914:
915: IF (p_glpv_rec.tax_deductible_local = OKL_API.G_MISS_CHAR OR
916: p_glpv_rec.tax_deductible_local is NULL) THEN
917: l_tax_deductible_local := 'N';
918: ELSE
919: l_tax_deductible_local := p_glpv_rec.tax_deductible_local;

Line 922: IF (p_glpv_rec.tax_deductible_corporate = OKL_API.G_MISS_CHAR OR

918: ELSE
919: l_tax_deductible_local := p_glpv_rec.tax_deductible_local;
920: END IF;
921:
922: IF (p_glpv_rec.tax_deductible_corporate = OKL_API.G_MISS_CHAR OR
923: p_glpv_rec.tax_deductible_corporate is NULL) THEN
924: l_tax_deductible_corporate := 'N';
925: ELSE
926: l_tax_deductible_corporate := p_glpv_rec.tax_deductible_corporate;

Line 949: Okl_Api.SET_MESSAGE(G_APP_NAME, 'OKL_ERROR_SUB_CONC_PROG', 'CONC_PROG', 'General Loss Provision');

945:
946: IF x_request_id = 0 THEN
947: -- Handle submission error
948: -- Raise Error if the request has not been submitted successfully.
949: Okl_Api.SET_MESSAGE(G_APP_NAME, 'OKL_ERROR_SUB_CONC_PROG', 'CONC_PROG', 'General Loss Provision');
950: RAISE Okl_Api.G_EXCEPTION_ERROR;
951: ELSE
952: --set return status
953: x_return_status := l_return_status;

Line 950: RAISE Okl_Api.G_EXCEPTION_ERROR;

946: IF x_request_id = 0 THEN
947: -- Handle submission error
948: -- Raise Error if the request has not been submitted successfully.
949: Okl_Api.SET_MESSAGE(G_APP_NAME, 'OKL_ERROR_SUB_CONC_PROG', 'CONC_PROG', 'General Loss Provision');
950: RAISE Okl_Api.G_EXCEPTION_ERROR;
951: ELSE
952: --set return status
953: x_return_status := l_return_status;
954: RETURN x_request_id;

Line 958: WHEN Okl_Api.G_EXCEPTION_ERROR THEN

954: RETURN x_request_id;
955: END IF;
956:
957: EXCEPTION
958: WHEN Okl_Api.G_EXCEPTION_ERROR THEN
959: x_return_status := OKL_API.HANDLE_EXCEPTIONS(l_api_name
960: ,g_pkg_name
961: ,'OKL_API.G_RET_STS_ERROR'
962: ,x_msg_count

Line 959: x_return_status := OKL_API.HANDLE_EXCEPTIONS(l_api_name

955: END IF;
956:
957: EXCEPTION
958: WHEN Okl_Api.G_EXCEPTION_ERROR THEN
959: x_return_status := OKL_API.HANDLE_EXCEPTIONS(l_api_name
960: ,g_pkg_name
961: ,'OKL_API.G_RET_STS_ERROR'
962: ,x_msg_count
963: ,x_msg_data

Line 961: ,'OKL_API.G_RET_STS_ERROR'

957: EXCEPTION
958: WHEN Okl_Api.G_EXCEPTION_ERROR THEN
959: x_return_status := OKL_API.HANDLE_EXCEPTIONS(l_api_name
960: ,g_pkg_name
961: ,'OKL_API.G_RET_STS_ERROR'
962: ,x_msg_count
963: ,x_msg_data
964: ,'_PVT');
965: RETURN x_request_id;

Line 967: WHEN Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR THEN

963: ,x_msg_data
964: ,'_PVT');
965: RETURN x_request_id;
966:
967: WHEN Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR THEN
968: x_return_status := OKL_API.HANDLE_EXCEPTIONS(l_api_name
969: ,g_pkg_name
970: ,'OKL_API.G_RET_STS_UNEXP_ERROR'
971: ,x_msg_count

Line 968: x_return_status := OKL_API.HANDLE_EXCEPTIONS(l_api_name

964: ,'_PVT');
965: RETURN x_request_id;
966:
967: WHEN Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR THEN
968: x_return_status := OKL_API.HANDLE_EXCEPTIONS(l_api_name
969: ,g_pkg_name
970: ,'OKL_API.G_RET_STS_UNEXP_ERROR'
971: ,x_msg_count
972: ,x_msg_data

Line 970: ,'OKL_API.G_RET_STS_UNEXP_ERROR'

966:
967: WHEN Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR THEN
968: x_return_status := OKL_API.HANDLE_EXCEPTIONS(l_api_name
969: ,g_pkg_name
970: ,'OKL_API.G_RET_STS_UNEXP_ERROR'
971: ,x_msg_count
972: ,x_msg_data
973: ,'_PVT');
974: RETURN x_request_id;

Line 976: x_return_status := OKL_API.HANDLE_EXCEPTIONS

972: ,x_msg_data
973: ,'_PVT');
974: RETURN x_request_id;
975: WHEN OTHERS THEN
976: x_return_status := OKL_API.HANDLE_EXCEPTIONS
977: (l_api_name,
978: G_PKG_NAME,
979: 'OTHERS',
980: x_msg_count,

Line 1012: l_init_msg_list VARCHAR2(2000) := OKL_API.G_FALSE;

1008: l_df_lease CONSTANT OKL_K_HEADERS_FULL_V.DEAL_TYPE%TYPE := 'LEASEDF';
1009: l_sales_lease CONSTANT OKL_K_HEADERS_FULL_V.DEAL_TYPE%TYPE := 'LEASEST';
1010: l_loan_lease CONSTANT OKL_K_HEADERS_FULL_V.DEAL_TYPE%TYPE := 'LOAN';
1011: l_sysdate DATE := SYSDATE;
1012: l_init_msg_list VARCHAR2(2000) := OKL_API.G_FALSE;
1013: l_sob_name VARCHAR2(2000);
1014: l_org_id NUMBER;
1015: l_org_name VARCHAR2(2000);
1016: l_product_id OKL_TRX_CONTRACTS.PDT_ID%TYPE := to_number(p_product_id);

Line 1035: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;

1031: l_error_cnt NUMBER :=1;
1032: l_period_start_date DATE;
1033: l_period_end_date DATE;
1034: l_period_name VARCHAR2(2000);
1035: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
1036: l_precision VARCHAR2(2000);
1037: l_period_status VARCHAR2(1);
1038: l_product_subclass VARCHAR2(2000);
1039: l_counter NUMBER := 1;

Line 1282: Okl_Api.set_message(p_app_name => g_app_name,

1278:
1279: -- get the set of books id
1280: l_set_of_books_id := OKL_ACCOUNTING_UTIL.GET_SET_OF_BOOKS_ID;
1281: IF (l_set_of_books_id IS NULL) THEN
1282: Okl_Api.set_message(p_app_name => g_app_name,
1283: p_msg_name => 'OKL_AGN_SOB_ID_ERROR');
1284: RAISE OKL_API.G_EXCEPTION_ERROR;
1285: END IF;
1286:

Line 1284: RAISE OKL_API.G_EXCEPTION_ERROR;

1280: l_set_of_books_id := OKL_ACCOUNTING_UTIL.GET_SET_OF_BOOKS_ID;
1281: IF (l_set_of_books_id IS NULL) THEN
1282: Okl_Api.set_message(p_app_name => g_app_name,
1283: p_msg_name => 'OKL_AGN_SOB_ID_ERROR');
1284: RAISE OKL_API.G_EXCEPTION_ERROR;
1285: END IF;
1286:
1287: -- Find set of books name for report
1288: l_sob_name := Okl_Accounting_Util.GET_SET_OF_BOOKS_NAME(l_set_of_books_id);

Line 1294: okl_api.set_message(p_app_name => G_APP_NAME,

1290: -- Find org name for report
1291: l_org_id := mo_global.get_current_org_id();
1292: IF l_org_id IS NULL THEN
1293: -- store SQL error message on message stack for caller
1294: okl_api.set_message(p_app_name => G_APP_NAME,
1295: p_msg_name => G_INVALID_VALUE,
1296: p_token1 => G_COL_NAME_TOKEN,
1297: p_token1_value => 'l_org_id');
1298: RAISE OKL_API.G_EXCEPTION_ERROR;

Line 1298: RAISE OKL_API.G_EXCEPTION_ERROR;

1294: okl_api.set_message(p_app_name => G_APP_NAME,
1295: p_msg_name => G_INVALID_VALUE,
1296: p_token1 => G_COL_NAME_TOKEN,
1297: p_token1_value => 'l_org_id');
1298: RAISE OKL_API.G_EXCEPTION_ERROR;
1299: END IF;
1300:
1301: OPEN org_name_csr(l_org_id);
1302: FETCH org_name_csr INTO l_org_name;

Line 1306: okl_api.set_message(p_app_name => G_APP_NAME,

1302: FETCH org_name_csr INTO l_org_name;
1303: CLOSE org_name_csr;
1304: IF l_org_name IS NULL THEN
1305: -- store SQL error message on message stack for caller
1306: okl_api.set_message(p_app_name => G_APP_NAME,
1307: p_msg_name => G_NO_MATCHING_RECORD,
1308: p_token1 => G_COL_NAME_TOKEN,
1309: p_token1_value => 'ORG_ID');
1310: RAISE OKL_API.G_EXCEPTION_ERROR;

Line 1310: RAISE OKL_API.G_EXCEPTION_ERROR;

1306: okl_api.set_message(p_app_name => G_APP_NAME,
1307: p_msg_name => G_NO_MATCHING_RECORD,
1308: p_token1 => G_COL_NAME_TOKEN,
1309: p_token1_value => 'ORG_ID');
1310: RAISE OKL_API.G_EXCEPTION_ERROR;
1311: END IF;
1312:
1313: -- Get Period info for PB
1314: Okl_Accounting_Util.GET_PERIOD_INFO(l_entry_date,l_period_name,l_period_start_date,l_period_end_date);

Line 1316: Okl_Api.set_message(p_app_name => g_app_name,

1312:
1313: -- Get Period info for PB
1314: Okl_Accounting_Util.GET_PERIOD_INFO(l_entry_date,l_period_name,l_period_start_date,l_period_end_date);
1315: IF l_period_name IS NULL THEN
1316: Okl_Api.set_message(p_app_name => g_app_name,
1317: p_msg_name => 'OKL_AGN_PERIOD_END_DATE');
1318: RAISE Okl_Api.G_EXCEPTION_ERROR;
1319: END IF;
1320:

Line 1318: RAISE Okl_Api.G_EXCEPTION_ERROR;

1314: Okl_Accounting_Util.GET_PERIOD_INFO(l_entry_date,l_period_name,l_period_start_date,l_period_end_date);
1315: IF l_period_name IS NULL THEN
1316: Okl_Api.set_message(p_app_name => g_app_name,
1317: p_msg_name => 'OKL_AGN_PERIOD_END_DATE');
1318: RAISE Okl_Api.G_EXCEPTION_ERROR;
1319: END IF;
1320:
1321: --Bug# 2781593
1322: -- check for open period

Line 1325: Okl_Api.set_message(p_app_name => g_app_name,

1321: --Bug# 2781593
1322: -- check for open period
1323: l_period_status := Okl_Accounting_Util.GET_OKL_PERIOD_STATUS(l_period_name);
1324: IF l_period_status IS NULL THEN
1325: Okl_Api.set_message(p_app_name => g_app_name,
1326: p_msg_name => 'OKL_AGN_PERIOD_STATUS_ERROR',
1327: p_token1 => 'PERIOD_NAME',
1328: p_token1_value => l_period_name);
1329: RAISE Okl_Api.G_EXCEPTION_ERROR;

Line 1329: RAISE Okl_Api.G_EXCEPTION_ERROR;

1325: Okl_Api.set_message(p_app_name => g_app_name,
1326: p_msg_name => 'OKL_AGN_PERIOD_STATUS_ERROR',
1327: p_token1 => 'PERIOD_NAME',
1328: p_token1_value => l_period_name);
1329: RAISE Okl_Api.G_EXCEPTION_ERROR;
1330: END IF;
1331:
1332: IF l_period_status NOT IN('O','F') THEN
1333: Okl_Api.set_message(p_app_name => g_app_name,

Line 1333: Okl_Api.set_message(p_app_name => g_app_name,

1329: RAISE Okl_Api.G_EXCEPTION_ERROR;
1330: END IF;
1331:
1332: IF l_period_status NOT IN('O','F') THEN
1333: Okl_Api.set_message(p_app_name => g_app_name,
1334: p_msg_name => 'OKL_AGN_OPEN_PERIOD_ERROR');
1335: RAISE Okl_Api.G_EXCEPTION_ERROR;
1336: END IF;
1337:

Line 1335: RAISE Okl_Api.G_EXCEPTION_ERROR;

1331:
1332: IF l_period_status NOT IN('O','F') THEN
1333: Okl_Api.set_message(p_app_name => g_app_name,
1334: p_msg_name => 'OKL_AGN_OPEN_PERIOD_ERROR');
1335: RAISE Okl_Api.G_EXCEPTION_ERROR;
1336: END IF;
1337:
1338: -- Find product details
1339: OPEN pdt_csr;

Line 1344: okl_api.set_message(p_app_name => G_APP_NAME,

1340: FETCH pdt_csr INTO l_product_name, l_product_subclass;
1341: CLOSE pdt_csr;
1342: IF l_product_name IS NULL THEN
1343: -- store SQL error message on message stack for caller
1344: okl_api.set_message(p_app_name => G_APP_NAME,
1345: p_msg_name => G_NO_MATCHING_RECORD,
1346: p_token1 => G_COL_NAME_TOKEN,
1347: p_token1_value => 'l_product_id');
1348: RAISE OKL_API.G_EXCEPTION_ERROR;

Line 1348: RAISE OKL_API.G_EXCEPTION_ERROR;

1344: okl_api.set_message(p_app_name => G_APP_NAME,
1345: p_msg_name => G_NO_MATCHING_RECORD,
1346: p_token1 => G_COL_NAME_TOKEN,
1347: p_token1_value => 'l_product_id');
1348: RAISE OKL_API.G_EXCEPTION_ERROR;
1349: END IF;
1350:
1351: IF l_product_subclass IS NULL THEN
1352: Okl_Api.set_message(p_app_name => g_app_name,

Line 1352: Okl_Api.set_message(p_app_name => g_app_name,

1348: RAISE OKL_API.G_EXCEPTION_ERROR;
1349: END IF;
1350:
1351: IF l_product_subclass IS NULL THEN
1352: Okl_Api.set_message(p_app_name => g_app_name,
1353: p_msg_name => 'OKL_GLP_PDT_SUBCLASS');
1354: RAISE Okl_Api.G_EXCEPTION_ERROR;
1355: END IF;
1356:

Line 1354: RAISE Okl_Api.G_EXCEPTION_ERROR;

1350:
1351: IF l_product_subclass IS NULL THEN
1352: Okl_Api.set_message(p_app_name => g_app_name,
1353: p_msg_name => 'OKL_GLP_PDT_SUBCLASS');
1354: RAISE Okl_Api.G_EXCEPTION_ERROR;
1355: END IF;
1356:
1357: -- Find currency code for the set of books id
1358: l_func_currency_code := Okl_Accounting_Util.GET_FUNC_CURR_CODE;

Line 1361: Okl_Api.set_message(p_app_name => g_app_name,

1357: -- Find currency code for the set of books id
1358: l_func_currency_code := Okl_Accounting_Util.GET_FUNC_CURR_CODE;
1359: IF (l_func_currency_code IS NULL) THEN
1360: -- store SQL error message on message stack for caller
1361: Okl_Api.set_message(p_app_name => g_app_name,
1362: p_msg_name => 'OKL_AGN_CURR_CODE_ERROR');
1363: RAISE OKL_API.G_EXCEPTION_ERROR;
1364: END IF;
1365:

Line 1363: RAISE OKL_API.G_EXCEPTION_ERROR;

1359: IF (l_func_currency_code IS NULL) THEN
1360: -- store SQL error message on message stack for caller
1361: Okl_Api.set_message(p_app_name => g_app_name,
1362: p_msg_name => 'OKL_AGN_CURR_CODE_ERROR');
1363: RAISE OKL_API.G_EXCEPTION_ERROR;
1364: END IF;
1365:
1366: -- retrieve the transaction type id
1367: OPEN trx_types_csr;

Line 1372: Okl_Api.set_message(p_app_name => g_app_name,

1368: FETCH trx_types_csr INTO l_try_id;
1369: CLOSE trx_types_csr;
1370: IF l_try_id IS NULL THEN
1371: -- store SQL error message on message stack for caller
1372: Okl_Api.set_message(p_app_name => g_app_name,
1373: p_msg_name => 'OKL_AGN_TRX_TYPE_ERROR',
1374: p_token1 => 'TRANSACTION_TYPE',
1375: p_token1_value => l_try_name);
1376: RAISE OKL_API.G_EXCEPTION_ERROR;

Line 1376: RAISE OKL_API.G_EXCEPTION_ERROR;

1372: Okl_Api.set_message(p_app_name => g_app_name,
1373: p_msg_name => 'OKL_AGN_TRX_TYPE_ERROR',
1374: p_token1 => 'TRANSACTION_TYPE',
1375: p_token1_value => l_try_name);
1376: RAISE OKL_API.G_EXCEPTION_ERROR;
1377: END IF;
1378:
1379: -- retrieve the bucket lines
1380: FOR i IN bucket_lines_csr(l_bucket_id)

Line 1393: Okl_Api.set_message(p_app_name => g_app_name,

1389: END LOOP;
1390:
1391: IF l_bktv_tbl.COUNT = 0 THEN
1392: -- store SQL error message on message stack for caller
1393: Okl_Api.set_message(p_app_name => g_app_name,
1394: p_msg_name => 'OKL_GLP_BKT_NULL_ERROR');
1395: RAISE OKL_API.G_EXCEPTION_ERROR;
1396: END IF;
1397:

Line 1395: RAISE OKL_API.G_EXCEPTION_ERROR;

1391: IF l_bktv_tbl.COUNT = 0 THEN
1392: -- store SQL error message on message stack for caller
1393: Okl_Api.set_message(p_app_name => g_app_name,
1394: p_msg_name => 'OKL_GLP_BKT_NULL_ERROR');
1395: RAISE OKL_API.G_EXCEPTION_ERROR;
1396: END IF;
1397:
1398: -- Bug 3557647. Invalid cursor error. Forgot to close cursor
1399: -- find the loss rate for the lowest bucket

Line 1405: Okl_Api.set_message(p_app_name => g_app_name,

1401: FETCH least_rate_csr INTO l_least_bucket_rate;
1402: CLOSE least_rate_csr;
1403: IF l_least_bucket_rate IS NULL THEN
1404: -- store SQL error message on message stack for caller
1405: Okl_Api.set_message(p_app_name => g_app_name,
1406: p_msg_name => 'OKL_GLP_LOSS_RATE_ERROR');
1407: RAISE OKL_API.G_EXCEPTION_ERROR;
1408: END IF;
1409:

Line 1407: RAISE OKL_API.G_EXCEPTION_ERROR;

1403: IF l_least_bucket_rate IS NULL THEN
1404: -- store SQL error message on message stack for caller
1405: Okl_Api.set_message(p_app_name => g_app_name,
1406: p_msg_name => 'OKL_GLP_LOSS_RATE_ERROR');
1407: RAISE OKL_API.G_EXCEPTION_ERROR;
1408: END IF;
1409:
1410: l_counter := 1;
1411: IF l_product_subclass = 'LEASE' THEN

Line 1443: Okl_Api.set_message(p_app_name => g_app_name,

1439: l_counter := l_counter + 1;
1440: END LOOP;
1441:
1442: ELSE
1443: Okl_Api.set_message(p_app_name => g_app_name,
1444: p_msg_name => 'OKL_GLP_INVALID_SUBCLASS');
1445: RAISE OKL_API.G_EXCEPTION_ERROR;
1446: END IF;
1447:

Line 1445: RAISE OKL_API.G_EXCEPTION_ERROR;

1441:
1442: ELSE
1443: Okl_Api.set_message(p_app_name => g_app_name,
1444: p_msg_name => 'OKL_GLP_INVALID_SUBCLASS');
1445: RAISE OKL_API.G_EXCEPTION_ERROR;
1446: END IF;
1447:
1448:
1449: -- Create report header

Line 1508: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;

1504: l_currency_conv_rate := l_pdt_contracts_tbl(x).currency_conversion_rate;
1505:
1506: DECLARE
1507: -- Declare local variables which need to be re-initialized to null for each contract
1508: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
1509: l_init_msg_list VARCHAR2(2000) := OKL_API.G_FALSE;
1510: x_msg_count NUMBER;
1511: x_msg_data VARCHAR2(2000);
1512: l_net_book_value NUMBER;

Line 1509: l_init_msg_list VARCHAR2(2000) := OKL_API.G_FALSE;

1505:
1506: DECLARE
1507: -- Declare local variables which need to be re-initialized to null for each contract
1508: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
1509: l_init_msg_list VARCHAR2(2000) := OKL_API.G_FALSE;
1510: x_msg_count NUMBER;
1511: x_msg_data VARCHAR2(2000);
1512: l_net_book_value NUMBER;
1513: l_net_invest_value NUMBER;

Line 1559: IF l_return_status <> OKL_API.G_RET_STS_SUCCESS THEN

1555: p_primary_sty_purpose => 'GENERAL_LOSS_PROVISION',
1556: x_return_status => l_return_status,
1557: x_primary_sty_id => l_sty_id);
1558:
1559: IF l_return_status <> OKL_API.G_RET_STS_SUCCESS THEN
1560: -- store SQL error message on message stack for caller and entry in log file
1561: Okl_Api.set_message(p_app_name => g_app_name,
1562: p_msg_name => 'OKL_AGN_STRM_TYPE_ERROR',
1563: p_token1 => g_stream_name_token,

Line 1561: Okl_Api.set_message(p_app_name => g_app_name,

1557: x_primary_sty_id => l_sty_id);
1558:
1559: IF l_return_status <> OKL_API.G_RET_STS_SUCCESS THEN
1560: -- store SQL error message on message stack for caller and entry in log file
1561: Okl_Api.set_message(p_app_name => g_app_name,
1562: p_msg_name => 'OKL_AGN_STRM_TYPE_ERROR',
1563: p_token1 => g_stream_name_token,
1564: p_token1_value => 'General Loss Provision');
1565: RAISE Okl_Api.G_EXCEPTION_ERROR;

Line 1565: RAISE Okl_Api.G_EXCEPTION_ERROR;

1561: Okl_Api.set_message(p_app_name => g_app_name,
1562: p_msg_name => 'OKL_AGN_STRM_TYPE_ERROR',
1563: p_token1 => g_stream_name_token,
1564: p_token1_value => 'General Loss Provision');
1565: RAISE Okl_Api.G_EXCEPTION_ERROR;
1566: END IF;
1567:
1568: -- Bug 4110239. No need for sty_name
1569: -- -- get the stream type name

Line 1575: -- okl_api.set_message(p_app_name => G_APP_NAME,

1571: -- FETCH sty_type_csr INTO l_sty_name;
1572: -- CLOSE sty_type_csr;
1573: -- IF l_sty_name IS NULL THEN
1574: -- -- store SQL error message on message stack for caller
1575: -- okl_api.set_message(p_app_name => G_APP_NAME,
1576: -- p_msg_name => G_NO_MATCHING_RECORD,
1577: -- p_token1 => G_COL_NAME_TOKEN,
1578: -- p_token1_value => 'l_sty_id');
1579: -- RAISE OKL_API.G_EXCEPTION_ERROR;

Line 1579: -- RAISE OKL_API.G_EXCEPTION_ERROR;

1575: -- okl_api.set_message(p_app_name => G_APP_NAME,
1576: -- p_msg_name => G_NO_MATCHING_RECORD,
1577: -- p_token1 => G_COL_NAME_TOKEN,
1578: -- p_token1_value => 'l_sty_id');
1579: -- RAISE OKL_API.G_EXCEPTION_ERROR;
1580: -- END IF;
1581:
1582: -- Check contract currency against functional currency
1583: IF l_func_currency_code <> l_khr_currency_code THEN

Line 1586: Okl_Api.set_message(p_app_name => g_app_name,

1582: -- Check contract currency against functional currency
1583: IF l_func_currency_code <> l_khr_currency_code THEN
1584: --validate data
1585: IF l_currency_conv_type IS NULL THEN
1586: Okl_Api.set_message(p_app_name => g_app_name,
1587: p_msg_name => 'OKL_AGN_CURR_TYPE_ERROR',
1588: p_token1 => g_contract_number_token,
1589: p_token1_value => l_cntrct_number);
1590: RAISE Okl_Api.G_EXCEPTION_ERROR;

Line 1590: RAISE Okl_Api.G_EXCEPTION_ERROR;

1586: Okl_Api.set_message(p_app_name => g_app_name,
1587: p_msg_name => 'OKL_AGN_CURR_TYPE_ERROR',
1588: p_token1 => g_contract_number_token,
1589: p_token1_value => l_cntrct_number);
1590: RAISE Okl_Api.G_EXCEPTION_ERROR;
1591: END IF;
1592: IF l_currency_conv_date IS NULL THEN
1593: Okl_Api.set_message(p_app_name => g_app_name,
1594: p_msg_name => 'OKL_AGN_CURR_DATE_ERROR',

Line 1593: Okl_Api.set_message(p_app_name => g_app_name,

1589: p_token1_value => l_cntrct_number);
1590: RAISE Okl_Api.G_EXCEPTION_ERROR;
1591: END IF;
1592: IF l_currency_conv_date IS NULL THEN
1593: Okl_Api.set_message(p_app_name => g_app_name,
1594: p_msg_name => 'OKL_AGN_CURR_DATE_ERROR',
1595: p_token1 => g_contract_number_token,
1596: p_token1_value => l_cntrct_number);
1597: RAISE Okl_Api.G_EXCEPTION_ERROR;

Line 1597: RAISE Okl_Api.G_EXCEPTION_ERROR;

1593: Okl_Api.set_message(p_app_name => g_app_name,
1594: p_msg_name => 'OKL_AGN_CURR_DATE_ERROR',
1595: p_token1 => g_contract_number_token,
1596: p_token1_value => l_cntrct_number);
1597: RAISE Okl_Api.G_EXCEPTION_ERROR;
1598: END IF;
1599: IF l_currency_conv_type = 'User' THEN
1600: IF l_currency_conv_rate IS NULL THEN
1601: Okl_Api.set_message(p_app_name => g_app_name,

Line 1601: Okl_Api.set_message(p_app_name => g_app_name,

1597: RAISE Okl_Api.G_EXCEPTION_ERROR;
1598: END IF;
1599: IF l_currency_conv_type = 'User' THEN
1600: IF l_currency_conv_rate IS NULL THEN
1601: Okl_Api.set_message(p_app_name => g_app_name,
1602: p_msg_name => 'OKL_AGN_CURR_USER_RATE_ERROR',
1603: p_token1 => g_contract_number_token,
1604: p_token1_value => l_cntrct_number);
1605: RAISE Okl_Api.G_EXCEPTION_ERROR;

Line 1605: RAISE Okl_Api.G_EXCEPTION_ERROR;

1601: Okl_Api.set_message(p_app_name => g_app_name,
1602: p_msg_name => 'OKL_AGN_CURR_USER_RATE_ERROR',
1603: p_token1 => g_contract_number_token,
1604: p_token1_value => l_cntrct_number);
1605: RAISE Okl_Api.G_EXCEPTION_ERROR;
1606: END IF;
1607: ELSE
1608: -- OPEN currency_conv_csr(l_currency_conv_type, l_khr_currency_code, l_func_currency_code, l_currency_conv_date);
1609: -- FETCH currency_conv_csr INTO l_currency_conv_rate;

Line 1612: -- Okl_Api.set_message(p_app_name => g_app_name,

1608: -- OPEN currency_conv_csr(l_currency_conv_type, l_khr_currency_code, l_func_currency_code, l_currency_conv_date);
1609: -- FETCH currency_conv_csr INTO l_currency_conv_rate;
1610: -- IF currency_conv_csr%NOTFOUND THEN
1611: -- CLOSE currency_conv_csr;
1612: -- Okl_Api.set_message(p_app_name => g_app_name,
1613: -- p_msg_name => 'OKL_AGN_CURR_RATE_ERROR',
1614: -- p_token1 => 'CONVERSION_TYPE',
1615: -- p_token1_value => l_currency_conv_type,
1616: -- p_token2 => 'FROM_CURRENCY',

Line 1621: -- RAISE Okl_Api.G_EXCEPTION_ERROR;

1617: -- p_token2_value => l_khr_currency_code,
1618: -- p_token3 => 'TO_CURRENCY',
1619: -- p_token3_value => l_func_currency_code
1620: -- );
1621: -- RAISE Okl_Api.G_EXCEPTION_ERROR;
1622: -- END IF;
1623: -- CLOSE currency_conv_csr;
1624: l_currency_conv_rate := OKL_ACCOUNTING_UTIL.get_curr_con_rate
1625: (p_from_curr_code => l_khr_currency_code,

Line 1630: Okl_Api.set_message(p_app_name => g_app_name,

1626: p_to_curr_code => l_func_currency_code,
1627: p_con_date => l_entry_date,--Bug 6970675
1628: p_con_type => l_currency_conv_type);
1629: IF l_currency_conv_rate IS NULL THEN
1630: Okl_Api.set_message(p_app_name => g_app_name,
1631: p_msg_name => 'OKL_AGN_CURR_RATE_ERROR',
1632: p_token1 => 'FROM_CURRENCY',
1633: p_token1_value => l_khr_currency_code,
1634: p_token2 => 'TO_CURRENCY',

Line 1639: RAISE Okl_Api.G_EXCEPTION_ERROR;

1635: p_token2_value => l_func_currency_code,
1636: p_token3 => 'CONVERSION_TYPE',
1637: p_token3_value => l_currency_conv_type
1638: );
1639: RAISE Okl_Api.G_EXCEPTION_ERROR;
1640: END IF;
1641: l_currency_conv_date := l_entry_date; -- Bug 6970675
1642: END IF;
1643: END IF;

Line 1652: Okl_Api.set_message(p_app_name => g_app_name,

1648: CLOSE precision_csr;
1649:
1650: IF l_precision IS NULL THEN
1651: -- store SQL error message on message stack for caller
1652: Okl_Api.set_message(p_app_name => g_app_name,
1653: p_msg_name => 'OKL_GLP_PRECISION_ERROR',
1654: p_token1 => 'CURRENCY_CODE',
1655: p_token1_value => l_khr_currency_code);
1656: RAISE OKL_API.G_EXCEPTION_ERROR;

Line 1656: RAISE OKL_API.G_EXCEPTION_ERROR;

1652: Okl_Api.set_message(p_app_name => g_app_name,
1653: p_msg_name => 'OKL_GLP_PRECISION_ERROR',
1654: p_token1 => 'CURRENCY_CODE',
1655: p_token1_value => l_khr_currency_code);
1656: RAISE OKL_API.G_EXCEPTION_ERROR;
1657: END IF;
1658:
1659:
1660: -- check if the contract id has a specific loss trx

Line 1672: Okl_Api.set_message(p_app_name => g_app_name,

1668: -- calculate the nbv loss if contract is an operating lease
1669: IF l_deal_type = l_oper_lease THEN
1670: l_net_book_value := calculate_cntrct_nbv (p_cntrct_id => l_cntrct_id);
1671: IF l_net_book_value IS NULL THEN
1672: Okl_Api.set_message(p_app_name => g_app_name,
1673: p_msg_name => 'OKL_NET_BOOK_VALUE_ERROR',
1674: p_token1 => g_contract_number_token,
1675: p_token1_value => l_cntrct_number);
1676: RAISE OKL_API.G_EXCEPTION_ERROR;

Line 1676: RAISE OKL_API.G_EXCEPTION_ERROR;

1672: Okl_Api.set_message(p_app_name => g_app_name,
1673: p_msg_name => 'OKL_NET_BOOK_VALUE_ERROR',
1674: p_token1 => g_contract_number_token,
1675: p_token1_value => l_cntrct_number);
1676: RAISE OKL_API.G_EXCEPTION_ERROR;
1677: END IF;
1678:
1679: -- convert NBV to contract currency. Bug 2712001
1680: IF l_net_book_value <> 0 THEN

Line 1694: Okl_Api.set_message(p_app_name => g_app_name,

1690: x_currency_conversion_date => x_currency_conversion_date,
1691: x_converted_amount => l_converted_net_book_value);
1692:
1693: IF l_converted_net_book_value IS NULL THEN
1694: Okl_Api.set_message(p_app_name => g_app_name,
1695: p_msg_name => 'OKL_AGN_CONV_ERROR',
1696: p_token1 => g_contract_number_token,
1697: p_token1_value => l_cntrct_number);
1698: RAISE Okl_Api.G_EXCEPTION_ERROR;

Line 1698: RAISE Okl_Api.G_EXCEPTION_ERROR;

1694: Okl_Api.set_message(p_app_name => g_app_name,
1695: p_msg_name => 'OKL_AGN_CONV_ERROR',
1696: p_token1 => g_contract_number_token,
1697: p_token1_value => l_cntrct_number);
1698: RAISE Okl_Api.G_EXCEPTION_ERROR;
1699: END IF;
1700: l_nbv_loss_amt := l_converted_net_book_value * l_least_bucket_rate/100;
1701: ELSE
1702: l_nbv_loss_amt := l_net_book_value * l_least_bucket_rate/100;

Line 1711: Okl_Api.set_message(p_app_name => g_app_name,

1707: ELSIF l_deal_type IN (l_df_lease,l_sales_lease) THEN
1708: l_net_invest_value := calculate_cntrct_niv (p_cntrct_id => l_cntrct_id
1709: ,p_loss_date => l_entry_date);
1710: IF l_net_invest_value IS NULL THEN
1711: Okl_Api.set_message(p_app_name => g_app_name,
1712: p_msg_name => 'OKL_NET_INVEST_VALUE_ERROR',
1713: p_token1 => g_contract_number_token,
1714: p_token1_value => l_cntrct_number);
1715: RAISE OKL_API.G_EXCEPTION_ERROR;

Line 1715: RAISE OKL_API.G_EXCEPTION_ERROR;

1711: Okl_Api.set_message(p_app_name => g_app_name,
1712: p_msg_name => 'OKL_NET_INVEST_VALUE_ERROR',
1713: p_token1 => g_contract_number_token,
1714: p_token1_value => l_cntrct_number);
1715: RAISE OKL_API.G_EXCEPTION_ERROR;
1716: END IF;
1717:
1718: IF l_net_invest_value <> 0 THEN
1719: l_niv_loss_amt := l_net_invest_value * l_least_bucket_rate/100;

Line 1748: Okl_Api.set_message(p_app_name => g_app_name,

1744: p_kle_id => NULL);
1745: END IF;
1746:
1747: IF l_principal_balance IS NULL THEN
1748: Okl_Api.set_message(p_app_name => g_app_name,
1749: p_msg_name => 'OKL_PRIN_BAL_VALUE_ERROR',
1750: p_token1 => g_contract_number_token,
1751: p_token1_value => l_cntrct_number);
1752: RAISE OKL_API.G_EXCEPTION_ERROR;

Line 1752: RAISE OKL_API.G_EXCEPTION_ERROR;

1748: Okl_Api.set_message(p_app_name => g_app_name,
1749: p_msg_name => 'OKL_PRIN_BAL_VALUE_ERROR',
1750: p_token1 => g_contract_number_token,
1751: p_token1_value => l_cntrct_number);
1752: RAISE OKL_API.G_EXCEPTION_ERROR;
1753: END IF;
1754:
1755: IF l_principal_balance <> 0 THEN
1756: l_pb_loss_amt := l_principal_balance * l_least_bucket_rate/100;

Line 1781: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN

1777: ,x_return_status => l_return_status
1778: ,x_msg_count => x_msg_count
1779: ,x_msg_data => x_msg_data
1780: ,p_lprv_rec => l_lprv_rec);
1781: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
1782: Okl_Api.set_message(p_app_name => g_app_name,
1783: p_msg_name => 'OKL_GLP_REV_ERROR',
1784: p_token1 => g_contract_number_token,
1785: p_token1_value => l_cntrct_number);

Line 1782: Okl_Api.set_message(p_app_name => g_app_name,

1778: ,x_msg_count => x_msg_count
1779: ,x_msg_data => x_msg_data
1780: ,p_lprv_rec => l_lprv_rec);
1781: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
1782: Okl_Api.set_message(p_app_name => g_app_name,
1783: p_msg_name => 'OKL_GLP_REV_ERROR',
1784: p_token1 => g_contract_number_token,
1785: p_token1_value => l_cntrct_number);
1786: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

Line 1786: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

1782: Okl_Api.set_message(p_app_name => g_app_name,
1783: p_msg_name => 'OKL_GLP_REV_ERROR',
1784: p_token1 => g_contract_number_token,
1785: p_token1_value => l_cntrct_number);
1786: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1787: ELSIF (l_return_Status = OKL_API.G_RET_STS_ERROR) THEN
1788: Okl_Api.set_message(p_app_name => g_app_name,
1789: p_msg_name => 'OKL_GLP_REV_ERROR',
1790: p_token1 => g_contract_number_token,

Line 1787: ELSIF (l_return_Status = OKL_API.G_RET_STS_ERROR) THEN

1783: p_msg_name => 'OKL_GLP_REV_ERROR',
1784: p_token1 => g_contract_number_token,
1785: p_token1_value => l_cntrct_number);
1786: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1787: ELSIF (l_return_Status = OKL_API.G_RET_STS_ERROR) THEN
1788: Okl_Api.set_message(p_app_name => g_app_name,
1789: p_msg_name => 'OKL_GLP_REV_ERROR',
1790: p_token1 => g_contract_number_token,
1791: p_token1_value => l_cntrct_number);

Line 1788: Okl_Api.set_message(p_app_name => g_app_name,

1784: p_token1 => g_contract_number_token,
1785: p_token1_value => l_cntrct_number);
1786: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1787: ELSIF (l_return_Status = OKL_API.G_RET_STS_ERROR) THEN
1788: Okl_Api.set_message(p_app_name => g_app_name,
1789: p_msg_name => 'OKL_GLP_REV_ERROR',
1790: p_token1 => g_contract_number_token,
1791: p_token1_value => l_cntrct_number);
1792: RAISE OKL_API.G_EXCEPTION_ERROR;

Line 1792: RAISE OKL_API.G_EXCEPTION_ERROR;

1788: Okl_Api.set_message(p_app_name => g_app_name,
1789: p_msg_name => 'OKL_GLP_REV_ERROR',
1790: p_token1 => g_contract_number_token,
1791: p_token1_value => l_cntrct_number);
1792: RAISE OKL_API.G_EXCEPTION_ERROR;
1793: END IF;
1794: END IF; -- IF l_gen_loss_fnd = 'Y'
1795:
1796: -- initialize

Line 1947: Okl_Api.set_message(p_app_name => g_app_name,

1943: l_legal_entity_id := OKL_LEGAL_ENTITY_UTIL.get_khr_le_id(l_cntrct_id) ;
1944: IF l_legal_entity_id IS NOT NULL THEN
1945: l_tcnv_rec.legal_entity_id := l_legal_entity_id;
1946: ELSE
1947: Okl_Api.set_message(p_app_name => g_app_name,
1948: p_msg_name => 'OKL_LE_NOT_EXIST_CNTRCT',
1949: p_token1 => 'CONTRACT_NUMBER',
1950: p_token1_value => l_cntrct_number);
1951: RAISE OKL_API.G_EXCEPTION_ERROR;

Line 1951: RAISE OKL_API.G_EXCEPTION_ERROR;

1947: Okl_Api.set_message(p_app_name => g_app_name,
1948: p_msg_name => 'OKL_LE_NOT_EXIST_CNTRCT',
1949: p_token1 => 'CONTRACT_NUMBER',
1950: p_token1_value => l_cntrct_number);
1951: RAISE OKL_API.G_EXCEPTION_ERROR;
1952: END IF;
1953:
1954: FOR x IN l_bktv_tbl.FIRST..l_bktv_tbl.LAST
1955: LOOP

Line 2021: IF (l_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN

2017: ,x_inv_acct_code => l_inv_acct_code
2018: );
2019:
2020: -- store the highest degree of error
2021: IF (l_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN
2022: IF (l_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
2023: -- need to leave
2024: Okl_Api.set_message(p_app_name => g_app_name,
2025: p_msg_name => 'OKL_ACC_SEC_PVT_ERROR');

Line 2022: IF (l_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN

2018: );
2019:
2020: -- store the highest degree of error
2021: IF (l_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN
2022: IF (l_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
2023: -- need to leave
2024: Okl_Api.set_message(p_app_name => g_app_name,
2025: p_msg_name => 'OKL_ACC_SEC_PVT_ERROR');
2026: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

Line 2024: Okl_Api.set_message(p_app_name => g_app_name,

2020: -- store the highest degree of error
2021: IF (l_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN
2022: IF (l_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
2023: -- need to leave
2024: Okl_Api.set_message(p_app_name => g_app_name,
2025: p_msg_name => 'OKL_ACC_SEC_PVT_ERROR');
2026: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2027: ELSIF (l_return_Status = Okl_Api.G_RET_STS_ERROR) THEN
2028: Okl_Api.set_message(p_app_name => g_app_name,

Line 2026: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

2022: IF (l_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
2023: -- need to leave
2024: Okl_Api.set_message(p_app_name => g_app_name,
2025: p_msg_name => 'OKL_ACC_SEC_PVT_ERROR');
2026: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2027: ELSIF (l_return_Status = Okl_Api.G_RET_STS_ERROR) THEN
2028: Okl_Api.set_message(p_app_name => g_app_name,
2029: p_msg_name => 'OKL_ACC_SEC_PVT_ERROR');
2030: RAISE OKL_API.G_EXCEPTION_ERROR;

Line 2027: ELSIF (l_return_Status = Okl_Api.G_RET_STS_ERROR) THEN

2023: -- need to leave
2024: Okl_Api.set_message(p_app_name => g_app_name,
2025: p_msg_name => 'OKL_ACC_SEC_PVT_ERROR');
2026: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2027: ELSIF (l_return_Status = Okl_Api.G_RET_STS_ERROR) THEN
2028: Okl_Api.set_message(p_app_name => g_app_name,
2029: p_msg_name => 'OKL_ACC_SEC_PVT_ERROR');
2030: RAISE OKL_API.G_EXCEPTION_ERROR;
2031: END IF;

Line 2028: Okl_Api.set_message(p_app_name => g_app_name,

2024: Okl_Api.set_message(p_app_name => g_app_name,
2025: p_msg_name => 'OKL_ACC_SEC_PVT_ERROR');
2026: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2027: ELSIF (l_return_Status = Okl_Api.G_RET_STS_ERROR) THEN
2028: Okl_Api.set_message(p_app_name => g_app_name,
2029: p_msg_name => 'OKL_ACC_SEC_PVT_ERROR');
2030: RAISE OKL_API.G_EXCEPTION_ERROR;
2031: END IF;
2032: END IF;

Line 2030: RAISE OKL_API.G_EXCEPTION_ERROR;

2026: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2027: ELSIF (l_return_Status = Okl_Api.G_RET_STS_ERROR) THEN
2028: Okl_Api.set_message(p_app_name => g_app_name,
2029: p_msg_name => 'OKL_ACC_SEC_PVT_ERROR');
2030: RAISE OKL_API.G_EXCEPTION_ERROR;
2031: END IF;
2032: END IF;
2033:
2034: ELSIF l_product_subclass = 'INVESTOR' THEN

Line 2060: IF (l_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN

2056: ,x_inv_acct_code => l_inv_acct_code
2057: );
2058:
2059: -- store the highest degree of error
2060: IF (l_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN
2061: IF (l_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
2062: -- need to leave
2063: Okl_Api.set_message(p_app_name => g_app_name,
2064: p_msg_name => 'OKL_ACC_SEC_PVT_ERROR');

Line 2061: IF (l_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN

2057: );
2058:
2059: -- store the highest degree of error
2060: IF (l_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN
2061: IF (l_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
2062: -- need to leave
2063: Okl_Api.set_message(p_app_name => g_app_name,
2064: p_msg_name => 'OKL_ACC_SEC_PVT_ERROR');
2065: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

Line 2063: Okl_Api.set_message(p_app_name => g_app_name,

2059: -- store the highest degree of error
2060: IF (l_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN
2061: IF (l_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
2062: -- need to leave
2063: Okl_Api.set_message(p_app_name => g_app_name,
2064: p_msg_name => 'OKL_ACC_SEC_PVT_ERROR');
2065: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2066: ELSIF (l_return_Status = Okl_Api.G_RET_STS_ERROR) THEN
2067: Okl_Api.set_message(p_app_name => g_app_name,

Line 2065: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

2061: IF (l_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
2062: -- need to leave
2063: Okl_Api.set_message(p_app_name => g_app_name,
2064: p_msg_name => 'OKL_ACC_SEC_PVT_ERROR');
2065: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2066: ELSIF (l_return_Status = Okl_Api.G_RET_STS_ERROR) THEN
2067: Okl_Api.set_message(p_app_name => g_app_name,
2068: p_msg_name => 'OKL_ACC_SEC_PVT_ERROR');
2069: RAISE OKL_API.G_EXCEPTION_ERROR;

Line 2066: ELSIF (l_return_Status = Okl_Api.G_RET_STS_ERROR) THEN

2062: -- need to leave
2063: Okl_Api.set_message(p_app_name => g_app_name,
2064: p_msg_name => 'OKL_ACC_SEC_PVT_ERROR');
2065: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2066: ELSIF (l_return_Status = Okl_Api.G_RET_STS_ERROR) THEN
2067: Okl_Api.set_message(p_app_name => g_app_name,
2068: p_msg_name => 'OKL_ACC_SEC_PVT_ERROR');
2069: RAISE OKL_API.G_EXCEPTION_ERROR;
2070: END IF;

Line 2067: Okl_Api.set_message(p_app_name => g_app_name,

2063: Okl_Api.set_message(p_app_name => g_app_name,
2064: p_msg_name => 'OKL_ACC_SEC_PVT_ERROR');
2065: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2066: ELSIF (l_return_Status = Okl_Api.G_RET_STS_ERROR) THEN
2067: Okl_Api.set_message(p_app_name => g_app_name,
2068: p_msg_name => 'OKL_ACC_SEC_PVT_ERROR');
2069: RAISE OKL_API.G_EXCEPTION_ERROR;
2070: END IF;
2071: END IF;

Line 2069: RAISE OKL_API.G_EXCEPTION_ERROR;

2065: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2066: ELSIF (l_return_Status = Okl_Api.G_RET_STS_ERROR) THEN
2067: Okl_Api.set_message(p_app_name => g_app_name,
2068: p_msg_name => 'OKL_ACC_SEC_PVT_ERROR');
2069: RAISE OKL_API.G_EXCEPTION_ERROR;
2070: END IF;
2071: END IF;
2072:
2073: END IF; -- IF l_product_subclass = 'LEASE'

Line 2092: IF l_return_status = OKL_API.G_RET_STS_ERROR THEN

2088: ,p_tclv_tbl => l_tclv_tbl
2089: ,x_tcnv_rec => x_tcnv_rec
2090: ,x_tclv_tbl => x_tclv_tbl);
2091:
2092: IF l_return_status = OKL_API.G_RET_STS_ERROR THEN
2093: Okl_Api.set_message(p_app_name => g_app_name,
2094: p_msg_name => 'OKL_GLP_TRX_CRE_ERROR',
2095: p_token1 => g_contract_number_token,
2096: p_token1_value => l_cntrct_number);

Line 2093: Okl_Api.set_message(p_app_name => g_app_name,

2089: ,x_tcnv_rec => x_tcnv_rec
2090: ,x_tclv_tbl => x_tclv_tbl);
2091:
2092: IF l_return_status = OKL_API.G_RET_STS_ERROR THEN
2093: Okl_Api.set_message(p_app_name => g_app_name,
2094: p_msg_name => 'OKL_GLP_TRX_CRE_ERROR',
2095: p_token1 => g_contract_number_token,
2096: p_token1_value => l_cntrct_number);
2097: RAISE OKL_API.G_EXCEPTION_ERROR;

Line 2097: RAISE OKL_API.G_EXCEPTION_ERROR;

2093: Okl_Api.set_message(p_app_name => g_app_name,
2094: p_msg_name => 'OKL_GLP_TRX_CRE_ERROR',
2095: p_token1 => g_contract_number_token,
2096: p_token1_value => l_cntrct_number);
2097: RAISE OKL_API.G_EXCEPTION_ERROR;
2098: ELSIF l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
2099: Okl_Api.set_message(p_app_name => g_app_name,
2100: p_msg_name => 'OKL_GLP_TRX_CRE_ERROR',
2101: p_token1 => g_contract_number_token,

Line 2098: ELSIF l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN

2094: p_msg_name => 'OKL_GLP_TRX_CRE_ERROR',
2095: p_token1 => g_contract_number_token,
2096: p_token1_value => l_cntrct_number);
2097: RAISE OKL_API.G_EXCEPTION_ERROR;
2098: ELSIF l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
2099: Okl_Api.set_message(p_app_name => g_app_name,
2100: p_msg_name => 'OKL_GLP_TRX_CRE_ERROR',
2101: p_token1 => g_contract_number_token,
2102: p_token1_value => l_cntrct_number);

Line 2099: Okl_Api.set_message(p_app_name => g_app_name,

2095: p_token1 => g_contract_number_token,
2096: p_token1_value => l_cntrct_number);
2097: RAISE OKL_API.G_EXCEPTION_ERROR;
2098: ELSIF l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
2099: Okl_Api.set_message(p_app_name => g_app_name,
2100: p_msg_name => 'OKL_GLP_TRX_CRE_ERROR',
2101: p_token1 => g_contract_number_token,
2102: p_token1_value => l_cntrct_number);
2103: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

Line 2103: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

2099: Okl_Api.set_message(p_app_name => g_app_name,
2100: p_msg_name => 'OKL_GLP_TRX_CRE_ERROR',
2101: p_token1 => g_contract_number_token,
2102: p_token1_value => l_cntrct_number);
2103: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2104: END IF;
2105:
2106: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,RPAD(l_cntrct_number,28)||
2107: RPAD(x_tcnv_rec.trx_number,22)||

Line 2118: WHEN Okl_Api.G_EXCEPTION_ERROR THEN

2114: END IF;
2115: END IF; -- end if for contract did not have a specific loss trx
2116: EXCEPTION
2117:
2118: WHEN Okl_Api.G_EXCEPTION_ERROR THEN
2119: l_return_status := Okl_Api.G_RET_STS_ERROR;
2120: -- Select the contract for error reporting
2121: FND_FILE.PUT_LINE(FND_FILE.LOG,l_cntrct_number||', '||'Error Status: '||l_return_status);
2122: l_contract_error_tbl(l_error_cnt) := l_cntrct_number;

Line 2119: l_return_status := Okl_Api.G_RET_STS_ERROR;

2115: END IF; -- end if for contract did not have a specific loss trx
2116: EXCEPTION
2117:
2118: WHEN Okl_Api.G_EXCEPTION_ERROR THEN
2119: l_return_status := Okl_Api.G_RET_STS_ERROR;
2120: -- Select the contract for error reporting
2121: FND_FILE.PUT_LINE(FND_FILE.LOG,l_cntrct_number||', '||'Error Status: '||l_return_status);
2122: l_contract_error_tbl(l_error_cnt) := l_cntrct_number;
2123: l_error_cnt := l_error_cnt + 1; Okl_Accounting_Util.GET_ERROR_MESSAGE(l_error_msg_tbl);

Line 2134: WHEN Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR THEN

2130: END LOOP;
2131: FND_FILE.PUT_LINE(FND_FILE.LOG,'');
2132: END IF;
2133:
2134: WHEN Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR THEN
2135: l_return_status := Okl_Api.G_RET_STS_UNEXP_ERROR;
2136: -- Select the contract for error reporting
2137: FND_FILE.PUT_LINE(FND_FILE.LOG,l_cntrct_number||', '||'Error Status: '||l_return_status);
2138: l_contract_error_tbl(l_error_cnt) := l_cntrct_number;

Line 2135: l_return_status := Okl_Api.G_RET_STS_UNEXP_ERROR;

2131: FND_FILE.PUT_LINE(FND_FILE.LOG,'');
2132: END IF;
2133:
2134: WHEN Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR THEN
2135: l_return_status := Okl_Api.G_RET_STS_UNEXP_ERROR;
2136: -- Select the contract for error reporting
2137: FND_FILE.PUT_LINE(FND_FILE.LOG,l_cntrct_number||', '||'Error Status: '||l_return_status);
2138: l_contract_error_tbl(l_error_cnt) := l_cntrct_number;
2139: l_error_cnt := l_error_cnt + 1;

Line 2152: l_return_status := Okl_Api.G_RET_STS_UNEXP_ERROR;

2148: FND_FILE.PUT_LINE(FND_FILE.LOG,'');
2149: END IF;
2150:
2151: WHEN OTHERS THEN
2152: l_return_status := Okl_Api.G_RET_STS_UNEXP_ERROR;
2153: -- IF currency_conv_csr%ISOPEN THEN
2154: -- CLOSE currency_conv_csr;
2155: -- END IF;
2156:

Line 2208: WHEN Okl_Api.G_EXCEPTION_ERROR THEN

2204: retcode := 0;
2205:
2206: EXCEPTION
2207:
2208: WHEN Okl_Api.G_EXCEPTION_ERROR THEN
2209: l_return_status := Okl_Api.G_RET_STS_ERROR;
2210:
2211: -- print the overall status in the log file
2212: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Overall Program Status = '||l_return_status);

Line 2209: l_return_status := Okl_Api.G_RET_STS_ERROR;

2205:
2206: EXCEPTION
2207:
2208: WHEN Okl_Api.G_EXCEPTION_ERROR THEN
2209: l_return_status := Okl_Api.G_RET_STS_ERROR;
2210:
2211: -- print the overall status in the log file
2212: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Overall Program Status = '||l_return_status);
2213: Okl_Accounting_Util.GET_ERROR_MESSAGE(l_outer_error_msg_tbl);

Line 2224: WHEN Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR THEN

2220: END LOOP;
2221: END IF;
2222: retcode := 2;
2223:
2224: WHEN Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR THEN
2225: l_return_status := Okl_Api.G_RET_STS_UNEXP_ERROR;
2226:
2227: -- print the overall status in the log file
2228: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Overall Program Status = '||l_return_status);

Line 2225: l_return_status := Okl_Api.G_RET_STS_UNEXP_ERROR;

2221: END IF;
2222: retcode := 2;
2223:
2224: WHEN Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR THEN
2225: l_return_status := Okl_Api.G_RET_STS_UNEXP_ERROR;
2226:
2227: -- print the overall status in the log file
2228: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Overall Program Status = '||l_return_status);
2229: Okl_Accounting_Util.GET_ERROR_MESSAGE(l_outer_error_msg_tbl);

Line 2261: l_return_status := Okl_Api.G_RET_STS_UNEXP_ERROR;

2257: IF least_rate_csr%ISOPEN THEN
2258: CLOSE least_rate_csr;
2259: END IF;
2260:
2261: l_return_status := Okl_Api.G_RET_STS_UNEXP_ERROR;
2262: errbuf := SQLERRM;
2263: retcode := 2;
2264: -- print the overall status in the log file
2265: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Overall Program Status = '||l_return_status);

Line 2281: ,p_init_msg_list IN VARCHAR2 DEFAULT OKL_API.G_FALSE

2277:
2278: -- this procedure is used create a transaction for specific loss provision
2279: PROCEDURE SPECIFIC_LOSS_PROVISION(
2280: p_api_version IN NUMBER
2281: ,p_init_msg_list IN VARCHAR2 DEFAULT OKL_API.G_FALSE
2282: ,x_msg_count OUT NOCOPY NUMBER
2283: ,x_msg_data OUT NOCOPY VARCHAR2
2284: ,x_return_status OUT NOCOPY VARCHAR2
2285: ,p_slpv_rec IN slpv_rec_type)

Line 2288: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;

2284: ,x_return_status OUT NOCOPY VARCHAR2
2285: ,p_slpv_rec IN slpv_rec_type)
2286:
2287: IS
2288: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
2289: l_try_id OKL_TRX_TYPES_V.ID%TYPE;
2290: l_dummy_var VARCHAR2(1) := '?';
2291: l_dummy2_var VARCHAR2(1) := '?';
2292: l_line_count NUMBER := 0;

Line 2427: l_return_status := OKL_API.START_ACTIVITY(l_api_name

2423: -- AND status_code = 'C';
2424:
2425: BEGIN
2426:
2427: l_return_status := OKL_API.START_ACTIVITY(l_api_name
2428: ,G_PKG_NAME
2429: ,p_init_msg_list
2430: ,l_api_version
2431: ,p_api_version

Line 2435: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN

2431: ,p_api_version
2432: ,'_PVT'
2433: ,l_return_status);
2434:
2435: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
2436: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2437: ELSIF (l_return_Status = OKL_API.G_RET_STS_ERROR) THEN
2438: RAISE OKL_API.G_EXCEPTION_ERROR;
2439: END IF;

Line 2436: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

2432: ,'_PVT'
2433: ,l_return_status);
2434:
2435: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
2436: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2437: ELSIF (l_return_Status = OKL_API.G_RET_STS_ERROR) THEN
2438: RAISE OKL_API.G_EXCEPTION_ERROR;
2439: END IF;
2440:

Line 2437: ELSIF (l_return_Status = OKL_API.G_RET_STS_ERROR) THEN

2433: ,l_return_status);
2434:
2435: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
2436: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2437: ELSIF (l_return_Status = OKL_API.G_RET_STS_ERROR) THEN
2438: RAISE OKL_API.G_EXCEPTION_ERROR;
2439: END IF;
2440:
2441: -- validate input parameters

Line 2438: RAISE OKL_API.G_EXCEPTION_ERROR;

2434:
2435: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
2436: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2437: ELSIF (l_return_Status = OKL_API.G_RET_STS_ERROR) THEN
2438: RAISE OKL_API.G_EXCEPTION_ERROR;
2439: END IF;
2440:
2441: -- validate input parameters
2442: IF (p_slpv_rec.sty_id IS NULL OR p_slpv_rec.sty_id = OKL_API.G_MISS_NUM) THEN

Line 2442: IF (p_slpv_rec.sty_id IS NULL OR p_slpv_rec.sty_id = OKL_API.G_MISS_NUM) THEN

2438: RAISE OKL_API.G_EXCEPTION_ERROR;
2439: END IF;
2440:
2441: -- validate input parameters
2442: IF (p_slpv_rec.sty_id IS NULL OR p_slpv_rec.sty_id = OKL_API.G_MISS_NUM) THEN
2443: Okl_Api.set_message(p_app_name => g_app_name,
2444: p_msg_name => 'OKL_GLP_PVN_ERROR');
2445: RAISE OKL_API.G_EXCEPTION_ERROR;
2446: END IF;

Line 2443: Okl_Api.set_message(p_app_name => g_app_name,

2439: END IF;
2440:
2441: -- validate input parameters
2442: IF (p_slpv_rec.sty_id IS NULL OR p_slpv_rec.sty_id = OKL_API.G_MISS_NUM) THEN
2443: Okl_Api.set_message(p_app_name => g_app_name,
2444: p_msg_name => 'OKL_GLP_PVN_ERROR');
2445: RAISE OKL_API.G_EXCEPTION_ERROR;
2446: END IF;
2447:

Line 2445: RAISE OKL_API.G_EXCEPTION_ERROR;

2441: -- validate input parameters
2442: IF (p_slpv_rec.sty_id IS NULL OR p_slpv_rec.sty_id = OKL_API.G_MISS_NUM) THEN
2443: Okl_Api.set_message(p_app_name => g_app_name,
2444: p_msg_name => 'OKL_GLP_PVN_ERROR');
2445: RAISE OKL_API.G_EXCEPTION_ERROR;
2446: END IF;
2447:
2448: IF (p_slpv_rec.khr_id IS NULL OR p_slpv_rec.khr_id = OKL_API.G_MISS_NUM) THEN
2449: Okl_Api.set_message(p_app_name => g_app_name,

Line 2448: IF (p_slpv_rec.khr_id IS NULL OR p_slpv_rec.khr_id = OKL_API.G_MISS_NUM) THEN

2444: p_msg_name => 'OKL_GLP_PVN_ERROR');
2445: RAISE OKL_API.G_EXCEPTION_ERROR;
2446: END IF;
2447:
2448: IF (p_slpv_rec.khr_id IS NULL OR p_slpv_rec.khr_id = OKL_API.G_MISS_NUM) THEN
2449: Okl_Api.set_message(p_app_name => g_app_name,
2450: p_msg_name => 'OKL_REV_LPV_CNTRCT_ERROR');
2451: RAISE OKL_API.G_EXCEPTION_ERROR;
2452: END IF;

Line 2449: Okl_Api.set_message(p_app_name => g_app_name,

2445: RAISE OKL_API.G_EXCEPTION_ERROR;
2446: END IF;
2447:
2448: IF (p_slpv_rec.khr_id IS NULL OR p_slpv_rec.khr_id = OKL_API.G_MISS_NUM) THEN
2449: Okl_Api.set_message(p_app_name => g_app_name,
2450: p_msg_name => 'OKL_REV_LPV_CNTRCT_ERROR');
2451: RAISE OKL_API.G_EXCEPTION_ERROR;
2452: END IF;
2453:

Line 2451: RAISE OKL_API.G_EXCEPTION_ERROR;

2447:
2448: IF (p_slpv_rec.khr_id IS NULL OR p_slpv_rec.khr_id = OKL_API.G_MISS_NUM) THEN
2449: Okl_Api.set_message(p_app_name => g_app_name,
2450: p_msg_name => 'OKL_REV_LPV_CNTRCT_ERROR');
2451: RAISE OKL_API.G_EXCEPTION_ERROR;
2452: END IF;
2453:
2454: IF (p_slpv_rec.amount IS NULL OR p_slpv_rec.amount = OKL_API.G_MISS_NUM) THEN
2455: Okl_Api.set_message(p_app_name => g_app_name,

Line 2454: IF (p_slpv_rec.amount IS NULL OR p_slpv_rec.amount = OKL_API.G_MISS_NUM) THEN

2450: p_msg_name => 'OKL_REV_LPV_CNTRCT_ERROR');
2451: RAISE OKL_API.G_EXCEPTION_ERROR;
2452: END IF;
2453:
2454: IF (p_slpv_rec.amount IS NULL OR p_slpv_rec.amount = OKL_API.G_MISS_NUM) THEN
2455: Okl_Api.set_message(p_app_name => g_app_name,
2456: p_msg_name => 'OKL_SLP_AMOUNT_ERROR');
2457: RAISE OKL_API.G_EXCEPTION_ERROR;
2458: END IF;

Line 2455: Okl_Api.set_message(p_app_name => g_app_name,

2451: RAISE OKL_API.G_EXCEPTION_ERROR;
2452: END IF;
2453:
2454: IF (p_slpv_rec.amount IS NULL OR p_slpv_rec.amount = OKL_API.G_MISS_NUM) THEN
2455: Okl_Api.set_message(p_app_name => g_app_name,
2456: p_msg_name => 'OKL_SLP_AMOUNT_ERROR');
2457: RAISE OKL_API.G_EXCEPTION_ERROR;
2458: END IF;
2459:

Line 2457: RAISE OKL_API.G_EXCEPTION_ERROR;

2453:
2454: IF (p_slpv_rec.amount IS NULL OR p_slpv_rec.amount = OKL_API.G_MISS_NUM) THEN
2455: Okl_Api.set_message(p_app_name => g_app_name,
2456: p_msg_name => 'OKL_SLP_AMOUNT_ERROR');
2457: RAISE OKL_API.G_EXCEPTION_ERROR;
2458: END IF;
2459:
2460: IF (p_slpv_rec.provision_date IS NULL OR p_slpv_rec.provision_date = OKL_API.G_MISS_DATE) THEN
2461: Okl_Api.set_message(p_app_name => g_app_name,

Line 2460: IF (p_slpv_rec.provision_date IS NULL OR p_slpv_rec.provision_date = OKL_API.G_MISS_DATE) THEN

2456: p_msg_name => 'OKL_SLP_AMOUNT_ERROR');
2457: RAISE OKL_API.G_EXCEPTION_ERROR;
2458: END IF;
2459:
2460: IF (p_slpv_rec.provision_date IS NULL OR p_slpv_rec.provision_date = OKL_API.G_MISS_DATE) THEN
2461: Okl_Api.set_message(p_app_name => g_app_name,
2462: p_msg_name => 'OKL_SLP_PROV_DATE_ERROR');
2463: RAISE OKL_API.G_EXCEPTION_ERROR;
2464: END IF;

Line 2461: Okl_Api.set_message(p_app_name => g_app_name,

2457: RAISE OKL_API.G_EXCEPTION_ERROR;
2458: END IF;
2459:
2460: IF (p_slpv_rec.provision_date IS NULL OR p_slpv_rec.provision_date = OKL_API.G_MISS_DATE) THEN
2461: Okl_Api.set_message(p_app_name => g_app_name,
2462: p_msg_name => 'OKL_SLP_PROV_DATE_ERROR');
2463: RAISE OKL_API.G_EXCEPTION_ERROR;
2464: END IF;
2465:

Line 2463: RAISE OKL_API.G_EXCEPTION_ERROR;

2459:
2460: IF (p_slpv_rec.provision_date IS NULL OR p_slpv_rec.provision_date = OKL_API.G_MISS_DATE) THEN
2461: Okl_Api.set_message(p_app_name => g_app_name,
2462: p_msg_name => 'OKL_SLP_PROV_DATE_ERROR');
2463: RAISE OKL_API.G_EXCEPTION_ERROR;
2464: END IF;
2465:
2466: -- get the contract number
2467: OPEN contract_num_csr(p_slpv_rec.khr_id);

Line 2471: Okl_Api.set_message(p_app_name => g_app_name,

2467: OPEN contract_num_csr(p_slpv_rec.khr_id);
2468: FETCH contract_num_csr INTO l_cntrct_number;
2469: CLOSE contract_num_csr;
2470: IF l_cntrct_number IS NULL THEN
2471: Okl_Api.set_message(p_app_name => g_app_name,
2472: p_msg_name => 'OKL_REV_LPV_CNTRCT_NUM_ERROR');
2473: RAISE OKL_API.G_EXCEPTION_ERROR;
2474: END IF;
2475:

Line 2473: RAISE OKL_API.G_EXCEPTION_ERROR;

2469: CLOSE contract_num_csr;
2470: IF l_cntrct_number IS NULL THEN
2471: Okl_Api.set_message(p_app_name => g_app_name,
2472: p_msg_name => 'OKL_REV_LPV_CNTRCT_NUM_ERROR');
2473: RAISE OKL_API.G_EXCEPTION_ERROR;
2474: END IF;
2475:
2476: -- 01-Apr-04. Discussed with Vikas.
2477: -- Removing validation. Product Management requires that SLP be created for

Line 2484: -- Okl_Api.set_message(p_app_name => g_app_name,

2480: -- -- validate sty_id to make sure provision used is same as this trx is an addition
2481: -- FOR x IN sty_id_csr(p_slpv_rec.khr_id)
2482: -- LOOP
2483: -- IF p_slpv_rec.sty_id <> x.id THEN
2484: -- Okl_Api.set_message(p_app_name => g_app_name,
2485: -- p_msg_name => 'OKL_SLP_PVN_TYPE_ERROR');
2486: -- RAISE OKL_API.G_EXCEPTION_ERROR;
2487: -- END IF;
2488: -- END LOOP;

Line 2486: -- RAISE OKL_API.G_EXCEPTION_ERROR;

2482: -- LOOP
2483: -- IF p_slpv_rec.sty_id <> x.id THEN
2484: -- Okl_Api.set_message(p_app_name => g_app_name,
2485: -- p_msg_name => 'OKL_SLP_PVN_TYPE_ERROR');
2486: -- RAISE OKL_API.G_EXCEPTION_ERROR;
2487: -- END IF;
2488: -- END LOOP;
2489: --END IF;
2490:

Line 2494: Okl_Api.set_message(p_app_name => g_app_name,

2490:
2491: -- get period info
2492: Okl_Accounting_Util.GET_PERIOD_INFO(p_slpv_rec.provision_date,l_period_name,l_period_start_date,l_period_end_date);
2493: IF l_period_name IS NULL THEN
2494: Okl_Api.set_message(p_app_name => g_app_name,
2495: p_msg_name => 'OKL_AGN_PERIOD_END_DATE');
2496: RAISE Okl_Api.G_EXCEPTION_ERROR;
2497: END IF;
2498:

Line 2496: RAISE Okl_Api.G_EXCEPTION_ERROR;

2492: Okl_Accounting_Util.GET_PERIOD_INFO(p_slpv_rec.provision_date,l_period_name,l_period_start_date,l_period_end_date);
2493: IF l_period_name IS NULL THEN
2494: Okl_Api.set_message(p_app_name => g_app_name,
2495: p_msg_name => 'OKL_AGN_PERIOD_END_DATE');
2496: RAISE Okl_Api.G_EXCEPTION_ERROR;
2497: END IF;
2498:
2499: -- check for open period
2500: l_period_status := Okl_Accounting_Util.GET_OKL_PERIOD_STATUS(l_period_name);

Line 2502: Okl_Api.set_message(p_app_name => g_app_name,

2498:
2499: -- check for open period
2500: l_period_status := Okl_Accounting_Util.GET_OKL_PERIOD_STATUS(l_period_name);
2501: IF l_period_status IS NULL THEN
2502: Okl_Api.set_message(p_app_name => g_app_name,
2503: p_msg_name => 'OKL_AGN_PERIOD_STATUS_ERROR',
2504: p_token1 => 'PERIOD_NAME',
2505: p_token1_value => l_period_name);
2506: RAISE Okl_Api.G_EXCEPTION_ERROR;

Line 2506: RAISE Okl_Api.G_EXCEPTION_ERROR;

2502: Okl_Api.set_message(p_app_name => g_app_name,
2503: p_msg_name => 'OKL_AGN_PERIOD_STATUS_ERROR',
2504: p_token1 => 'PERIOD_NAME',
2505: p_token1_value => l_period_name);
2506: RAISE Okl_Api.G_EXCEPTION_ERROR;
2507: END IF;
2508:
2509: IF l_period_status NOT IN('O','F') THEN
2510: Okl_Api.set_message(p_app_name => g_app_name,

Line 2510: Okl_Api.set_message(p_app_name => g_app_name,

2506: RAISE Okl_Api.G_EXCEPTION_ERROR;
2507: END IF;
2508:
2509: IF l_period_status NOT IN('O','F') THEN
2510: Okl_Api.set_message(p_app_name => g_app_name,
2511: p_msg_name => 'OKL_AGN_OPEN_PERIOD_ERROR');
2512: RAISE Okl_Api.G_EXCEPTION_ERROR;
2513: END IF;
2514:

Line 2512: RAISE Okl_Api.G_EXCEPTION_ERROR;

2508:
2509: IF l_period_status NOT IN('O','F') THEN
2510: Okl_Api.set_message(p_app_name => g_app_name,
2511: p_msg_name => 'OKL_AGN_OPEN_PERIOD_ERROR');
2512: RAISE Okl_Api.G_EXCEPTION_ERROR;
2513: END IF;
2514:
2515: -- get the set of books id
2516: l_set_of_books_id := OKL_ACCOUNTING_UTIL.GET_SET_OF_BOOKS_ID;

Line 2518: Okl_Api.set_message(p_app_name => g_app_name,

2514:
2515: -- get the set of books id
2516: l_set_of_books_id := OKL_ACCOUNTING_UTIL.GET_SET_OF_BOOKS_ID;
2517: IF l_set_of_books_id IS NULL THEN
2518: Okl_Api.set_message(p_app_name => g_app_name,
2519: p_msg_name => 'OKL_AGN_SOB_ID_ERROR');
2520: RAISE OKL_API.G_EXCEPTION_ERROR;
2521: END IF;
2522:

Line 2520: RAISE OKL_API.G_EXCEPTION_ERROR;

2516: l_set_of_books_id := OKL_ACCOUNTING_UTIL.GET_SET_OF_BOOKS_ID;
2517: IF l_set_of_books_id IS NULL THEN
2518: Okl_Api.set_message(p_app_name => g_app_name,
2519: p_msg_name => 'OKL_AGN_SOB_ID_ERROR');
2520: RAISE OKL_API.G_EXCEPTION_ERROR;
2521: END IF;
2522:
2523: -- get scs_code
2524: FOR x IN scs_code_csr

Line 2529: OKL_API.set_message(G_APP_NAME, G_INVALID_VALUE,G_COL_NAME_TOKEN,'SCS_CODE');

2525: LOOP
2526: l_scs_code := x.scs_code;
2527: END LOOP;
2528: IF l_scs_code IS NULL THEN
2529: OKL_API.set_message(G_APP_NAME, G_INVALID_VALUE,G_COL_NAME_TOKEN,'SCS_CODE');
2530: RAISE OKL_API.G_EXCEPTION_ERROR;
2531: END IF;
2532:
2533: -- retrieve the functional currency code

Line 2530: RAISE OKL_API.G_EXCEPTION_ERROR;

2526: l_scs_code := x.scs_code;
2527: END LOOP;
2528: IF l_scs_code IS NULL THEN
2529: OKL_API.set_message(G_APP_NAME, G_INVALID_VALUE,G_COL_NAME_TOKEN,'SCS_CODE');
2530: RAISE OKL_API.G_EXCEPTION_ERROR;
2531: END IF;
2532:
2533: -- retrieve the functional currency code
2534: l_func_currency_code := Okl_Accounting_Util.GET_FUNC_CURR_CODE;

Line 2536: Okl_Api.set_message(p_app_name => g_app_name,

2532:
2533: -- retrieve the functional currency code
2534: l_func_currency_code := Okl_Accounting_Util.GET_FUNC_CURR_CODE;
2535: IF l_func_currency_code IS NULL THEN
2536: Okl_Api.set_message(p_app_name => g_app_name,
2537: p_msg_name => 'OKL_AGN_CURR_CODE_ERROR');
2538: RAISE OKL_API.G_EXCEPTION_ERROR;
2539: END IF;
2540:

Line 2538: RAISE OKL_API.G_EXCEPTION_ERROR;

2534: l_func_currency_code := Okl_Accounting_Util.GET_FUNC_CURR_CODE;
2535: IF l_func_currency_code IS NULL THEN
2536: Okl_Api.set_message(p_app_name => g_app_name,
2537: p_msg_name => 'OKL_AGN_CURR_CODE_ERROR');
2538: RAISE OKL_API.G_EXCEPTION_ERROR;
2539: END IF;
2540:
2541: -- retrieve the currency code for the contract
2542: -- bug 2712001. Chneged from functional currency to contract currency.

Line 2547: Okl_Api.set_message(p_app_name => g_app_name,

2543: OPEN currency_info_csr(p_slpv_rec.khr_id);
2544: FETCH currency_info_csr INTO l_khr_currency_code,l_currency_conv_type,l_currency_conv_date,l_currency_conv_rate;
2545: CLOSE currency_info_csr;
2546: IF l_khr_currency_code IS NULL THEN
2547: Okl_Api.set_message(p_app_name => g_app_name,
2548: p_msg_name => 'OKL_SLP_CURR_CODE_ERROR',
2549: p_token1 => g_contract_number_token,
2550: p_token1_value => l_cntrct_number);
2551: RAISE OKL_API.G_EXCEPTION_ERROR;

Line 2551: RAISE OKL_API.G_EXCEPTION_ERROR;

2547: Okl_Api.set_message(p_app_name => g_app_name,
2548: p_msg_name => 'OKL_SLP_CURR_CODE_ERROR',
2549: p_token1 => g_contract_number_token,
2550: p_token1_value => l_cntrct_number);
2551: RAISE OKL_API.G_EXCEPTION_ERROR;
2552: END IF;
2553:
2554: -- bug 2712001. Enabled Multi Currency changes
2555: -- Check contract currency against functional currency

Line 2559: Okl_Api.set_message(p_app_name => g_app_name,

2555: -- Check contract currency against functional currency
2556: IF l_func_currency_code <> l_khr_currency_code THEN
2557: --validate data
2558: IF l_currency_conv_type IS NULL THEN
2559: Okl_Api.set_message(p_app_name => g_app_name,
2560: p_msg_name => 'OKL_AGN_CURR_TYPE_ERROR',
2561: p_token1 => g_contract_number_token,
2562: p_token1_value => l_cntrct_number);
2563: RAISE Okl_Api.G_EXCEPTION_ERROR;

Line 2563: RAISE Okl_Api.G_EXCEPTION_ERROR;

2559: Okl_Api.set_message(p_app_name => g_app_name,
2560: p_msg_name => 'OKL_AGN_CURR_TYPE_ERROR',
2561: p_token1 => g_contract_number_token,
2562: p_token1_value => l_cntrct_number);
2563: RAISE Okl_Api.G_EXCEPTION_ERROR;
2564: END IF;
2565: IF l_currency_conv_date IS NULL THEN
2566: Okl_Api.set_message(p_app_name => g_app_name,
2567: p_msg_name => 'OKL_AGN_CURR_DATE_ERROR',

Line 2566: Okl_Api.set_message(p_app_name => g_app_name,

2562: p_token1_value => l_cntrct_number);
2563: RAISE Okl_Api.G_EXCEPTION_ERROR;
2564: END IF;
2565: IF l_currency_conv_date IS NULL THEN
2566: Okl_Api.set_message(p_app_name => g_app_name,
2567: p_msg_name => 'OKL_AGN_CURR_DATE_ERROR',
2568: p_token1 => g_contract_number_token,
2569: p_token1_value => l_cntrct_number);
2570: RAISE Okl_Api.G_EXCEPTION_ERROR;

Line 2570: RAISE Okl_Api.G_EXCEPTION_ERROR;

2566: Okl_Api.set_message(p_app_name => g_app_name,
2567: p_msg_name => 'OKL_AGN_CURR_DATE_ERROR',
2568: p_token1 => g_contract_number_token,
2569: p_token1_value => l_cntrct_number);
2570: RAISE Okl_Api.G_EXCEPTION_ERROR;
2571: END IF;
2572: IF l_currency_conv_type = 'User' THEN
2573: IF l_currency_conv_rate IS NULL THEN
2574: Okl_Api.set_message(p_app_name => g_app_name,

Line 2574: Okl_Api.set_message(p_app_name => g_app_name,

2570: RAISE Okl_Api.G_EXCEPTION_ERROR;
2571: END IF;
2572: IF l_currency_conv_type = 'User' THEN
2573: IF l_currency_conv_rate IS NULL THEN
2574: Okl_Api.set_message(p_app_name => g_app_name,
2575: p_msg_name => 'OKL_AGN_CURR_USER_RATE_ERROR',
2576: p_token1 => g_contract_number_token,
2577: p_token1_value => l_cntrct_number);
2578: RAISE Okl_Api.G_EXCEPTION_ERROR;

Line 2578: RAISE Okl_Api.G_EXCEPTION_ERROR;

2574: Okl_Api.set_message(p_app_name => g_app_name,
2575: p_msg_name => 'OKL_AGN_CURR_USER_RATE_ERROR',
2576: p_token1 => g_contract_number_token,
2577: p_token1_value => l_cntrct_number);
2578: RAISE Okl_Api.G_EXCEPTION_ERROR;
2579: END IF;
2580: ELSE
2581: -- OPEN currency_conv_csr(l_currency_conv_type, l_khr_currency_code, l_func_currency_code, l_currency_conv_date);
2582: -- FETCH currency_conv_csr INTO l_currency_conv_rate;

Line 2585: -- Okl_Api.set_message(p_app_name => g_app_name,

2581: -- OPEN currency_conv_csr(l_currency_conv_type, l_khr_currency_code, l_func_currency_code, l_currency_conv_date);
2582: -- FETCH currency_conv_csr INTO l_currency_conv_rate;
2583: -- IF currency_conv_csr%NOTFOUND THEN
2584: -- CLOSE currency_conv_csr;
2585: -- Okl_Api.set_message(p_app_name => g_app_name,
2586: -- p_msg_name => 'OKL_AGN_CURR_RATE_ERROR',
2587: -- p_token1 => 'FROM_CURRENCY',
2588: -- p_token1_value => l_khr_currency_code,
2589: -- p_token2 => 'TO_CURRENCY',

Line 2594: -- RAISE Okl_Api.G_EXCEPTION_ERROR;

2590: -- p_token2_value => l_func_currency_code,
2591: -- p_token3 => 'CONVERSION_TYPE',
2592: -- p_token3_value => l_currency_conv_type
2593: -- );
2594: -- RAISE Okl_Api.G_EXCEPTION_ERROR;
2595: -- END IF;
2596: -- CLOSE currency_conv_csr;
2597: l_currency_conv_rate := OKL_ACCOUNTING_UTIL.get_curr_con_rate
2598: (p_from_curr_code => l_khr_currency_code,

Line 2604: Okl_Api.set_message(p_app_name => g_app_name,

2600: p_con_date => p_slpv_rec.provision_date, -- Bug 6970654
2601: p_con_type => l_currency_conv_type);
2602:
2603: IF l_currency_conv_rate IS NULL THEN
2604: Okl_Api.set_message(p_app_name => g_app_name,
2605: p_msg_name => 'OKL_AGN_CURR_RATE_ERROR',
2606: p_token1 => 'FROM_CURRENCY',
2607: p_token1_value => l_khr_currency_code,
2608: p_token2 => 'TO_CURRENCY',

Line 2613: RAISE Okl_Api.G_EXCEPTION_ERROR;

2609: p_token2_value => l_func_currency_code,
2610: p_token3 => 'CONVERSION_TYPE',
2611: p_token3_value => l_currency_conv_type
2612: );
2613: RAISE Okl_Api.G_EXCEPTION_ERROR;
2614: END IF;
2615: l_currency_conv_date := p_slpv_rec.provision_date;--Bug 6970654
2616: END IF;
2617: END IF;

Line 2625: Okl_Api.set_message(p_app_name => g_app_name,

2621: FETCH trx_types_csr INTO l_try_id;
2622: CLOSE trx_types_csr;
2623: IF l_try_id IS NULL THEN
2624: -- store SQL error message on message stack for caller
2625: Okl_Api.set_message(p_app_name => g_app_name,
2626: p_msg_name => 'OKL_AGN_TRX_TYPE_ERROR',
2627: p_token1 => 'TRANSACTION_TYPE',
2628: p_token1_value => l_try_name);
2629: RAISE OKL_API.G_EXCEPTION_ERROR;

Line 2629: RAISE OKL_API.G_EXCEPTION_ERROR;

2625: Okl_Api.set_message(p_app_name => g_app_name,
2626: p_msg_name => 'OKL_AGN_TRX_TYPE_ERROR',
2627: p_token1 => 'TRANSACTION_TYPE',
2628: p_token1_value => l_try_name);
2629: RAISE OKL_API.G_EXCEPTION_ERROR;
2630: END IF;
2631:
2632: -- get the product id for the contract
2633: OPEN pdt_id_csr(p_slpv_rec.khr_id);

Line 2637: Okl_Api.set_message(p_app_name => g_app_name,

2633: OPEN pdt_id_csr(p_slpv_rec.khr_id);
2634: FETCH pdt_id_csr INTO l_product_id;
2635: CLOSE pdt_id_csr;
2636: IF l_product_id IS NULL THEN
2637: Okl_Api.set_message(p_app_name => g_app_name,
2638: p_msg_name => 'OKL_SLP_PDT_ID_ERROR',
2639: p_token1 => g_contract_number_token,
2640: p_token1_value => l_cntrct_number);
2641: RAISE OKL_API.G_EXCEPTION_ERROR;

Line 2641: RAISE OKL_API.G_EXCEPTION_ERROR;

2637: Okl_Api.set_message(p_app_name => g_app_name,
2638: p_msg_name => 'OKL_SLP_PDT_ID_ERROR',
2639: p_token1 => g_contract_number_token,
2640: p_token1_value => l_cntrct_number);
2641: RAISE OKL_API.G_EXCEPTION_ERROR;
2642: END IF;
2643:
2644: -- check if the contract id has a general loss trx
2645: OPEN gen_loss_trx_csr(p_slpv_rec.khr_id);

Line 2664: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN

2660: ,x_msg_count => x_msg_count
2661: ,x_msg_data => x_msg_data
2662: ,p_lprv_rec => l_lprv_rec);
2663:
2664: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
2665: Okl_Api.set_message(p_app_name => g_app_name,
2666: p_msg_name => 'OKL_GLP_REV_ERROR',
2667: p_token1 => g_contract_number_token,
2668: p_token1_value => l_cntrct_number);

Line 2665: Okl_Api.set_message(p_app_name => g_app_name,

2661: ,x_msg_data => x_msg_data
2662: ,p_lprv_rec => l_lprv_rec);
2663:
2664: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
2665: Okl_Api.set_message(p_app_name => g_app_name,
2666: p_msg_name => 'OKL_GLP_REV_ERROR',
2667: p_token1 => g_contract_number_token,
2668: p_token1_value => l_cntrct_number);
2669: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

Line 2669: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

2665: Okl_Api.set_message(p_app_name => g_app_name,
2666: p_msg_name => 'OKL_GLP_REV_ERROR',
2667: p_token1 => g_contract_number_token,
2668: p_token1_value => l_cntrct_number);
2669: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2670: ELSIF (l_return_Status = OKL_API.G_RET_STS_ERROR) THEN
2671: Okl_Api.set_message(p_app_name => g_app_name,
2672: p_msg_name => 'OKL_GLP_REV_ERROR',
2673: p_token1 => g_contract_number_token,

Line 2670: ELSIF (l_return_Status = OKL_API.G_RET_STS_ERROR) THEN

2666: p_msg_name => 'OKL_GLP_REV_ERROR',
2667: p_token1 => g_contract_number_token,
2668: p_token1_value => l_cntrct_number);
2669: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2670: ELSIF (l_return_Status = OKL_API.G_RET_STS_ERROR) THEN
2671: Okl_Api.set_message(p_app_name => g_app_name,
2672: p_msg_name => 'OKL_GLP_REV_ERROR',
2673: p_token1 => g_contract_number_token,
2674: p_token1_value => l_cntrct_number);

Line 2671: Okl_Api.set_message(p_app_name => g_app_name,

2667: p_token1 => g_contract_number_token,
2668: p_token1_value => l_cntrct_number);
2669: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2670: ELSIF (l_return_Status = OKL_API.G_RET_STS_ERROR) THEN
2671: Okl_Api.set_message(p_app_name => g_app_name,
2672: p_msg_name => 'OKL_GLP_REV_ERROR',
2673: p_token1 => g_contract_number_token,
2674: p_token1_value => l_cntrct_number);
2675: RAISE OKL_API.G_EXCEPTION_ERROR;

Line 2675: RAISE OKL_API.G_EXCEPTION_ERROR;

2671: Okl_Api.set_message(p_app_name => g_app_name,
2672: p_msg_name => 'OKL_GLP_REV_ERROR',
2673: p_token1 => g_contract_number_token,
2674: p_token1_value => l_cntrct_number);
2675: RAISE OKL_API.G_EXCEPTION_ERROR;
2676: END IF;
2677: END IF;
2678:
2679: -- reverse all previous specific loss transactions as this is a new trx with new provision type

Line 2701: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN

2697: ,x_msg_count => x_msg_count
2698: ,x_msg_data => x_msg_data
2699: ,p_lprv_rec => l_lprv_rec);
2700:
2701: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
2702: Okl_Api.set_message(p_app_name => g_app_name,
2703: p_msg_name => 'OKL_SLP_REV_ERROR',
2704: p_token1 => g_contract_number_token,
2705: p_token1_value => l_cntrct_number);

Line 2702: Okl_Api.set_message(p_app_name => g_app_name,

2698: ,x_msg_data => x_msg_data
2699: ,p_lprv_rec => l_lprv_rec);
2700:
2701: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
2702: Okl_Api.set_message(p_app_name => g_app_name,
2703: p_msg_name => 'OKL_SLP_REV_ERROR',
2704: p_token1 => g_contract_number_token,
2705: p_token1_value => l_cntrct_number);
2706: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

Line 2706: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

2702: Okl_Api.set_message(p_app_name => g_app_name,
2703: p_msg_name => 'OKL_SLP_REV_ERROR',
2704: p_token1 => g_contract_number_token,
2705: p_token1_value => l_cntrct_number);
2706: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2707: ELSIF (l_return_Status = OKL_API.G_RET_STS_ERROR) THEN
2708: Okl_Api.set_message(p_app_name => g_app_name,
2709: p_msg_name => 'OKL_SLP_REV_ERROR',
2710: p_token1 => g_contract_number_token,

Line 2707: ELSIF (l_return_Status = OKL_API.G_RET_STS_ERROR) THEN

2703: p_msg_name => 'OKL_SLP_REV_ERROR',
2704: p_token1 => g_contract_number_token,
2705: p_token1_value => l_cntrct_number);
2706: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2707: ELSIF (l_return_Status = OKL_API.G_RET_STS_ERROR) THEN
2708: Okl_Api.set_message(p_app_name => g_app_name,
2709: p_msg_name => 'OKL_SLP_REV_ERROR',
2710: p_token1 => g_contract_number_token,
2711: p_token1_value => l_cntrct_number);

Line 2708: Okl_Api.set_message(p_app_name => g_app_name,

2704: p_token1 => g_contract_number_token,
2705: p_token1_value => l_cntrct_number);
2706: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2707: ELSIF (l_return_Status = OKL_API.G_RET_STS_ERROR) THEN
2708: Okl_Api.set_message(p_app_name => g_app_name,
2709: p_msg_name => 'OKL_SLP_REV_ERROR',
2710: p_token1 => g_contract_number_token,
2711: p_token1_value => l_cntrct_number);
2712: RAISE OKL_API.G_EXCEPTION_ERROR;

Line 2712: RAISE OKL_API.G_EXCEPTION_ERROR;

2708: Okl_Api.set_message(p_app_name => g_app_name,
2709: p_msg_name => 'OKL_SLP_REV_ERROR',
2710: p_token1 => g_contract_number_token,
2711: p_token1_value => l_cntrct_number);
2712: RAISE OKL_API.G_EXCEPTION_ERROR;
2713: END IF;
2714: END IF; -- for l_dummy2_var
2715: END IF;
2716:

Line 2722: Okl_Api.set_message(p_app_name => g_app_name,

2718: l_legal_entity_id := OKL_LEGAL_ENTITY_UTIL.get_khr_le_id(p_slpv_rec.khr_id) ;
2719: IF l_legal_entity_id IS NOT NULL THEN
2720: l_tcnv_rec.legal_entity_id := l_legal_entity_id;
2721: ELSE
2722: Okl_Api.set_message(p_app_name => g_app_name,
2723: p_msg_name => 'OKL_LE_NOT_EXIST_CNTRCT',
2724: p_token1 => 'CONTRACT_NUMBER',
2725: p_token1_value => l_cntrct_number);
2726: RAISE OKL_API.G_EXCEPTION_ERROR;

Line 2726: RAISE OKL_API.G_EXCEPTION_ERROR;

2722: Okl_Api.set_message(p_app_name => g_app_name,
2723: p_msg_name => 'OKL_LE_NOT_EXIST_CNTRCT',
2724: p_token1 => 'CONTRACT_NUMBER',
2725: p_token1_value => l_cntrct_number);
2726: RAISE OKL_API.G_EXCEPTION_ERROR;
2727: END IF;
2728:
2729: -- populate the transaction structure
2730: l_tcnv_rec.tcn_type := l_tcn_type;

Line 2785: IF l_return_status = OKL_API.G_RET_STS_ERROR THEN

2781: ,p_tcnv_rec => l_tcnv_rec
2782: ,p_tclv_tbl => l_tclv_tbl
2783: ,x_tcnv_rec => x_tcnv_rec
2784: ,x_tclv_tbl => x_tclv_tbl);
2785: IF l_return_status = OKL_API.G_RET_STS_ERROR THEN
2786: Okl_Api.set_message(p_app_name => g_app_name,
2787: p_msg_name => 'OKL_AGN_TRX_CRE_ERROR',
2788: p_token1 => g_contract_number_token,
2789: p_token1_value => l_cntrct_number);

Line 2786: Okl_Api.set_message(p_app_name => g_app_name,

2782: ,p_tclv_tbl => l_tclv_tbl
2783: ,x_tcnv_rec => x_tcnv_rec
2784: ,x_tclv_tbl => x_tclv_tbl);
2785: IF l_return_status = OKL_API.G_RET_STS_ERROR THEN
2786: Okl_Api.set_message(p_app_name => g_app_name,
2787: p_msg_name => 'OKL_AGN_TRX_CRE_ERROR',
2788: p_token1 => g_contract_number_token,
2789: p_token1_value => l_cntrct_number);
2790: RAISE OKL_API.G_EXCEPTION_ERROR;

Line 2790: RAISE OKL_API.G_EXCEPTION_ERROR;

2786: Okl_Api.set_message(p_app_name => g_app_name,
2787: p_msg_name => 'OKL_AGN_TRX_CRE_ERROR',
2788: p_token1 => g_contract_number_token,
2789: p_token1_value => l_cntrct_number);
2790: RAISE OKL_API.G_EXCEPTION_ERROR;
2791: ELSIF l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
2792: Okl_Api.set_message(p_app_name => g_app_name,
2793: p_msg_name => 'OKL_AGN_TRX_CRE_ERROR',
2794: p_token1 => g_contract_number_token,

Line 2791: ELSIF l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN

2787: p_msg_name => 'OKL_AGN_TRX_CRE_ERROR',
2788: p_token1 => g_contract_number_token,
2789: p_token1_value => l_cntrct_number);
2790: RAISE OKL_API.G_EXCEPTION_ERROR;
2791: ELSIF l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
2792: Okl_Api.set_message(p_app_name => g_app_name,
2793: p_msg_name => 'OKL_AGN_TRX_CRE_ERROR',
2794: p_token1 => g_contract_number_token,
2795: p_token1_value => l_cntrct_number);

Line 2792: Okl_Api.set_message(p_app_name => g_app_name,

2788: p_token1 => g_contract_number_token,
2789: p_token1_value => l_cntrct_number);
2790: RAISE OKL_API.G_EXCEPTION_ERROR;
2791: ELSIF l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
2792: Okl_Api.set_message(p_app_name => g_app_name,
2793: p_msg_name => 'OKL_AGN_TRX_CRE_ERROR',
2794: p_token1 => g_contract_number_token,
2795: p_token1_value => l_cntrct_number);
2796: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

Line 2796: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

2792: Okl_Api.set_message(p_app_name => g_app_name,
2793: p_msg_name => 'OKL_AGN_TRX_CRE_ERROR',
2794: p_token1 => g_contract_number_token,
2795: p_token1_value => l_cntrct_number);
2796: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2797: END IF;
2798:
2799: --get acc gen sources and value. Bug 3596651
2800: GET_ACCOUNT_GEN_DETAILS(

Line 2805: IF (l_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN

2801: p_contract_id => p_slpv_rec.khr_id,
2802: x_return_status => l_return_status,
2803: x_acc_gen_primary_key_tbl => l_acc_gen_primary_key_tbl);
2804: --check for error
2805: IF (l_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN
2806: Okl_Api.set_message(p_app_name => g_app_name,
2807: p_msg_name => 'OKL_AGN_ACC_GEN_ERROR',
2808: p_token1 => g_contract_number_token,
2809: p_token1_value => l_cntrct_number);

Line 2806: Okl_Api.set_message(p_app_name => g_app_name,

2802: x_return_status => l_return_status,
2803: x_acc_gen_primary_key_tbl => l_acc_gen_primary_key_tbl);
2804: --check for error
2805: IF (l_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN
2806: Okl_Api.set_message(p_app_name => g_app_name,
2807: p_msg_name => 'OKL_AGN_ACC_GEN_ERROR',
2808: p_token1 => g_contract_number_token,
2809: p_token1_value => l_cntrct_number);
2810: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

Line 2810: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

2806: Okl_Api.set_message(p_app_name => g_app_name,
2807: p_msg_name => 'OKL_AGN_ACC_GEN_ERROR',
2808: p_token1 => g_contract_number_token,
2809: p_token1_value => l_cntrct_number);
2810: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2811: END IF;
2812:
2813:
2814: --Bug 4622198.

Line 2829: IF (x_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN

2825: ,x_inv_acct_code => l_inv_acct_code
2826: );
2827:
2828: -- store the highest degree of error
2829: IF (x_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN
2830: IF (x_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
2831: -- need to leave
2832: Okl_Api.set_message(p_app_name => g_app_name,
2833: p_msg_name => 'OKL_ACC_SEC_PVT_ERROR');

Line 2830: IF (x_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN

2826: );
2827:
2828: -- store the highest degree of error
2829: IF (x_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN
2830: IF (x_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
2831: -- need to leave
2832: Okl_Api.set_message(p_app_name => g_app_name,
2833: p_msg_name => 'OKL_ACC_SEC_PVT_ERROR');
2834: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

Line 2832: Okl_Api.set_message(p_app_name => g_app_name,

2828: -- store the highest degree of error
2829: IF (x_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN
2830: IF (x_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
2831: -- need to leave
2832: Okl_Api.set_message(p_app_name => g_app_name,
2833: p_msg_name => 'OKL_ACC_SEC_PVT_ERROR');
2834: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2835: ELSIF (x_return_Status = Okl_Api.G_RET_STS_ERROR) THEN
2836: Okl_Api.set_message(p_app_name => g_app_name,

Line 2834: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

2830: IF (x_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
2831: -- need to leave
2832: Okl_Api.set_message(p_app_name => g_app_name,
2833: p_msg_name => 'OKL_ACC_SEC_PVT_ERROR');
2834: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2835: ELSIF (x_return_Status = Okl_Api.G_RET_STS_ERROR) THEN
2836: Okl_Api.set_message(p_app_name => g_app_name,
2837: p_msg_name => 'OKL_ACC_SEC_PVT_ERROR');
2838: RAISE OKL_API.G_EXCEPTION_ERROR;

Line 2835: ELSIF (x_return_Status = Okl_Api.G_RET_STS_ERROR) THEN

2831: -- need to leave
2832: Okl_Api.set_message(p_app_name => g_app_name,
2833: p_msg_name => 'OKL_ACC_SEC_PVT_ERROR');
2834: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2835: ELSIF (x_return_Status = Okl_Api.G_RET_STS_ERROR) THEN
2836: Okl_Api.set_message(p_app_name => g_app_name,
2837: p_msg_name => 'OKL_ACC_SEC_PVT_ERROR');
2838: RAISE OKL_API.G_EXCEPTION_ERROR;
2839: END IF;

Line 2836: Okl_Api.set_message(p_app_name => g_app_name,

2832: Okl_Api.set_message(p_app_name => g_app_name,
2833: p_msg_name => 'OKL_ACC_SEC_PVT_ERROR');
2834: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2835: ELSIF (x_return_Status = Okl_Api.G_RET_STS_ERROR) THEN
2836: Okl_Api.set_message(p_app_name => g_app_name,
2837: p_msg_name => 'OKL_ACC_SEC_PVT_ERROR');
2838: RAISE OKL_API.G_EXCEPTION_ERROR;
2839: END IF;
2840: END IF;

Line 2838: RAISE OKL_API.G_EXCEPTION_ERROR;

2834: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2835: ELSIF (x_return_Status = Okl_Api.G_RET_STS_ERROR) THEN
2836: Okl_Api.set_message(p_app_name => g_app_name,
2837: p_msg_name => 'OKL_ACC_SEC_PVT_ERROR');
2838: RAISE OKL_API.G_EXCEPTION_ERROR;
2839: END IF;
2840: END IF;
2841:
2842: --Added by kthiruva for SLA Uptake

Line 2889: IF (l_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN

2885: x_amount_tbl => l_amount_out_tbl,
2886: p_trx_header_id => l_tcn_id);
2887:
2888: -- store the highest degree of error
2889: IF (l_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN
2890: IF (l_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
2891: -- need to leave
2892: Okl_Api.set_message(p_app_name => g_app_name,
2893: p_msg_name => 'OKL_AGN_CRE_DIST_ERROR',

Line 2890: IF (l_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN

2886: p_trx_header_id => l_tcn_id);
2887:
2888: -- store the highest degree of error
2889: IF (l_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN
2890: IF (l_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
2891: -- need to leave
2892: Okl_Api.set_message(p_app_name => g_app_name,
2893: p_msg_name => 'OKL_AGN_CRE_DIST_ERROR',
2894: p_token1 => g_contract_number_token,

Line 2892: Okl_Api.set_message(p_app_name => g_app_name,

2888: -- store the highest degree of error
2889: IF (l_return_status <> Okl_Api.G_RET_STS_SUCCESS) THEN
2890: IF (l_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
2891: -- need to leave
2892: Okl_Api.set_message(p_app_name => g_app_name,
2893: p_msg_name => 'OKL_AGN_CRE_DIST_ERROR',
2894: p_token1 => g_contract_number_token,
2895: p_token1_value => l_cntrct_number);
2896: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

Line 2896: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

2892: Okl_Api.set_message(p_app_name => g_app_name,
2893: p_msg_name => 'OKL_AGN_CRE_DIST_ERROR',
2894: p_token1 => g_contract_number_token,
2895: p_token1_value => l_cntrct_number);
2896: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2897: ELSE
2898: -- record that there was an error
2899: Okl_Api.set_message(p_app_name => g_app_name,
2900: p_msg_name => 'OKL_AGN_CRE_DIST_ERROR',

Line 2899: Okl_Api.set_message(p_app_name => g_app_name,

2895: p_token1_value => l_cntrct_number);
2896: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2897: ELSE
2898: -- record that there was an error
2899: Okl_Api.set_message(p_app_name => g_app_name,
2900: p_msg_name => 'OKL_AGN_CRE_DIST_ERROR',
2901: p_token1 => g_contract_number_token,
2902: p_token1_value => l_cntrct_number);
2903: RAISE OKL_API.G_EXCEPTION_ERROR;

Line 2903: RAISE OKL_API.G_EXCEPTION_ERROR;

2899: Okl_Api.set_message(p_app_name => g_app_name,
2900: p_msg_name => 'OKL_AGN_CRE_DIST_ERROR',
2901: p_token1 => g_contract_number_token,
2902: p_token1_value => l_cntrct_number);
2903: RAISE OKL_API.G_EXCEPTION_ERROR;
2904: END IF;
2905: END IF;
2906: --Bug 5707866 - End of Changes
2907:

Line 2920: IF (x_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN

2916: ,P_TCLV_TBL => x_tclv_tbl
2917: ,p_ctxt_val_tbl => l_ctxt_tbl
2918: ,p_acc_gen_primary_key_tbl => l_acc_gen_primary_key_tbl);
2919:
2920: IF (x_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
2921: RAISE Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2922: ELSIF (x_return_status = Okl_Api.G_RET_STS_ERROR) THEN
2923: RAISE Okl_Api.G_EXCEPTION_ERROR;
2924: END IF;

Line 2921: RAISE Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR;

2917: ,p_ctxt_val_tbl => l_ctxt_tbl
2918: ,p_acc_gen_primary_key_tbl => l_acc_gen_primary_key_tbl);
2919:
2920: IF (x_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
2921: RAISE Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2922: ELSIF (x_return_status = Okl_Api.G_RET_STS_ERROR) THEN
2923: RAISE Okl_Api.G_EXCEPTION_ERROR;
2924: END IF;
2925:

Line 2922: ELSIF (x_return_status = Okl_Api.G_RET_STS_ERROR) THEN

2918: ,p_acc_gen_primary_key_tbl => l_acc_gen_primary_key_tbl);
2919:
2920: IF (x_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
2921: RAISE Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2922: ELSIF (x_return_status = Okl_Api.G_RET_STS_ERROR) THEN
2923: RAISE Okl_Api.G_EXCEPTION_ERROR;
2924: END IF;
2925:
2926: -- set the return status

Line 2923: RAISE Okl_Api.G_EXCEPTION_ERROR;

2919:
2920: IF (x_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
2921: RAISE Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2922: ELSIF (x_return_status = Okl_Api.G_RET_STS_ERROR) THEN
2923: RAISE Okl_Api.G_EXCEPTION_ERROR;
2924: END IF;
2925:
2926: -- set the return status
2927: x_return_status := l_return_status;

Line 2929: OKL_API.END_ACTIVITY(x_msg_count, x_msg_data);

2925:
2926: -- set the return status
2927: x_return_status := l_return_status;
2928:
2929: OKL_API.END_ACTIVITY(x_msg_count, x_msg_data);
2930:
2931: EXCEPTION
2932: WHEN Okl_Api.G_EXCEPTION_ERROR THEN
2933: x_return_status := OKL_API.HANDLE_EXCEPTIONS(l_api_name

Line 2932: WHEN Okl_Api.G_EXCEPTION_ERROR THEN

2928:
2929: OKL_API.END_ACTIVITY(x_msg_count, x_msg_data);
2930:
2931: EXCEPTION
2932: WHEN Okl_Api.G_EXCEPTION_ERROR THEN
2933: x_return_status := OKL_API.HANDLE_EXCEPTIONS(l_api_name
2934: ,g_pkg_name
2935: ,'OKL_API.G_RET_STS_ERROR'
2936: ,x_msg_count

Line 2933: x_return_status := OKL_API.HANDLE_EXCEPTIONS(l_api_name

2929: OKL_API.END_ACTIVITY(x_msg_count, x_msg_data);
2930:
2931: EXCEPTION
2932: WHEN Okl_Api.G_EXCEPTION_ERROR THEN
2933: x_return_status := OKL_API.HANDLE_EXCEPTIONS(l_api_name
2934: ,g_pkg_name
2935: ,'OKL_API.G_RET_STS_ERROR'
2936: ,x_msg_count
2937: ,x_msg_data

Line 2935: ,'OKL_API.G_RET_STS_ERROR'

2931: EXCEPTION
2932: WHEN Okl_Api.G_EXCEPTION_ERROR THEN
2933: x_return_status := OKL_API.HANDLE_EXCEPTIONS(l_api_name
2934: ,g_pkg_name
2935: ,'OKL_API.G_RET_STS_ERROR'
2936: ,x_msg_count
2937: ,x_msg_data
2938: ,'_PVT');
2939:

Line 2940: WHEN Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR THEN

2936: ,x_msg_count
2937: ,x_msg_data
2938: ,'_PVT');
2939:
2940: WHEN Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR THEN
2941: x_return_status := OKL_API.HANDLE_EXCEPTIONS(l_api_name
2942: ,g_pkg_name
2943: ,'OKL_API.G_RET_STS_UNEXP_ERROR'
2944: ,x_msg_count

Line 2941: x_return_status := OKL_API.HANDLE_EXCEPTIONS(l_api_name

2937: ,x_msg_data
2938: ,'_PVT');
2939:
2940: WHEN Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR THEN
2941: x_return_status := OKL_API.HANDLE_EXCEPTIONS(l_api_name
2942: ,g_pkg_name
2943: ,'OKL_API.G_RET_STS_UNEXP_ERROR'
2944: ,x_msg_count
2945: ,x_msg_data

Line 2943: ,'OKL_API.G_RET_STS_UNEXP_ERROR'

2939:
2940: WHEN Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR THEN
2941: x_return_status := OKL_API.HANDLE_EXCEPTIONS(l_api_name
2942: ,g_pkg_name
2943: ,'OKL_API.G_RET_STS_UNEXP_ERROR'
2944: ,x_msg_count
2945: ,x_msg_data
2946: ,'_PVT');
2947:

Line 2974: Okl_Api.SET_MESSAGE(p_app_name => g_app_name,

2970: CLOSE spec_loss_trx_csr;
2971: END IF;
2972:
2973: -- store SQL error message on message stack for caller
2974: Okl_Api.SET_MESSAGE(p_app_name => g_app_name,
2975: p_msg_name => g_unexpected_error,
2976: p_token1 => g_sqlcode_token,
2977: p_token1_value => SQLCODE,
2978: p_token2 => g_sqlerrm_token,

Line 2981: x_return_status := OKL_API.HANDLE_EXCEPTIONS

2977: p_token1_value => SQLCODE,
2978: p_token2 => g_sqlerrm_token,
2979: p_token2_value => SQLERRM);
2980:
2981: x_return_status := OKL_API.HANDLE_EXCEPTIONS
2982: (l_api_name,
2983: G_PKG_NAME,
2984: 'OTHERS',
2985: x_msg_count,