DBA Data[Home] [Help]

APPS.OKL_AM_ASSET_DISPOSE_PVT dependencies on OKL_API

Line 139: l_return_status VARCHAR2(1) := okl_api.g_ret_sts_success;

135: lp_acc_gen_primary_key_tbl okl_account_dist_pub.acc_gen_primary_key;
136: lx_template_tbl okl_account_dist_pub.avlv_tbl_type;
137: lx_amount_tbl okl_account_dist_pub.amount_tbl_type;
138:
139: l_return_status VARCHAR2(1) := okl_api.g_ret_sts_success;
140: l_api_name VARCHAR2(30) := 'process_accounting_entries';
141: l_pdt_id NUMBER := 0;
142: l_contract_number VARCHAR2(120);
143: l_khr_id NUMBER;

Line 224: okl_api.set_message(p_app_name => 'OKL',

220: IF l_pdt_id IS NULL OR l_pdt_id = 0
221: THEN
222: -- Error: Unable to create accounting entries because of a missing
223: -- Product Type for the contract CONTRACT_NUMBER.
224: okl_api.set_message(p_app_name => 'OKL',
225: p_msg_name => 'OKL_AM_PRODUCT_ID_ERROR',
226: p_token1 => 'CONTRACT_NUMBER',
227: p_token1_value => l_contract_number);
228:

Line 233: p_init_msg_list => okl_api.g_false,

229: END IF;
230:
231: -- rmunjulu 4622198 SPECIAL_ACCNT Get special accounting details
232: okl_securitization_pvt.check_khr_ia_associated(p_api_version => p_api_version,
233: p_init_msg_list => okl_api.g_false,
234: x_return_status => l_return_status,
235: x_msg_count => x_msg_count,
236: x_msg_data => x_msg_data,
237: p_khr_id => l_khr_id,

Line 243: IF l_return_status <> okl_api.g_ret_sts_success

239: p_trx_date => p_sys_date,
240: x_fact_synd_code => l_fact_synd_code,
241: x_inv_acct_code => l_inv_acct_code);
242:
243: IF l_return_status <> okl_api.g_ret_sts_success
244: THEN
245: -- Error occurred when creating accounting entries for transaction TRX_TYPE.
246: okl_api.set_message(p_app_name => g_app_name,
247: p_msg_name => 'OKL_AM_ERR_ACC_ENT',

Line 246: okl_api.set_message(p_app_name => g_app_name,

242:
243: IF l_return_status <> okl_api.g_ret_sts_success
244: THEN
245: -- Error occurred when creating accounting entries for transaction TRX_TYPE.
246: okl_api.set_message(p_app_name => g_app_name,
247: p_msg_name => 'OKL_AM_ERR_ACC_ENT',
248: p_token1 => 'TRX_TYPE',
249: p_token1_value => l_trans_meaning);
250:

Line 254: IF (l_return_status = okl_api.g_ret_sts_unexp_error)

250:
251: END IF;
252:
253: -- Raise exception to rollback to savepoint for this block
254: IF (l_return_status = okl_api.g_ret_sts_unexp_error)
255: THEN
256: RAISE okl_api.g_exception_unexpected_error;
257: ELSIF (l_return_status = okl_api.g_ret_sts_error)
258: THEN

Line 256: RAISE okl_api.g_exception_unexpected_error;

252:
253: -- Raise exception to rollback to savepoint for this block
254: IF (l_return_status = okl_api.g_ret_sts_unexp_error)
255: THEN
256: RAISE okl_api.g_exception_unexpected_error;
257: ELSIF (l_return_status = okl_api.g_ret_sts_error)
258: THEN
259: RAISE okl_api.g_exception_error;
260: END IF;

Line 257: ELSIF (l_return_status = okl_api.g_ret_sts_error)

253: -- Raise exception to rollback to savepoint for this block
254: IF (l_return_status = okl_api.g_ret_sts_unexp_error)
255: THEN
256: RAISE okl_api.g_exception_unexpected_error;
257: ELSIF (l_return_status = okl_api.g_ret_sts_error)
258: THEN
259: RAISE okl_api.g_exception_error;
260: END IF;
261: -- rmunjulu 4622198 SPECIAL_ACCNT set the special accounting parameters

Line 259: RAISE okl_api.g_exception_error;

255: THEN
256: RAISE okl_api.g_exception_unexpected_error;
257: ELSIF (l_return_status = okl_api.g_ret_sts_error)
258: THEN
259: RAISE okl_api.g_exception_error;
260: END IF;
261: -- rmunjulu 4622198 SPECIAL_ACCNT set the special accounting parameters
262: lp_tmpl_identify_rec.factoring_synd_flag := l_fact_synd_code;
263: lp_tmpl_identify_rec.investor_code := l_inv_acct_code;

Line 287: IF l_return_status <> okl_api.g_ret_sts_success

283: l_tcnv_rec.currency_conversion_rate := l_currency_conversion_rate;
284: l_tcnv_rec.currency_conversion_date := l_currency_conversion_date;
285: --trap the conversion exception
286: --if conv rate is not found GL API returns negative
287: IF l_return_status <> okl_api.g_ret_sts_success
288: THEN
289: -- Error occurred when creating accounting entries for transaction TRX_TYPE.
290: --currency conversion rate was not found in Oracle GL
291: okc_api.set_message(p_app_name => 'OKL',

Line 306: IF (l_return_status = okl_api.g_ret_sts_unexp_error)

302:
303: END IF;
304:
305: -- Raise exception to rollback to savepoint for this block
306: IF (l_return_status = okl_api.g_ret_sts_unexp_error)
307: THEN
308: RAISE okl_api.g_exception_unexpected_error;
309: ELSIF (l_return_status = okl_api.g_ret_sts_error)
310: THEN

Line 308: RAISE okl_api.g_exception_unexpected_error;

304:
305: -- Raise exception to rollback to savepoint for this block
306: IF (l_return_status = okl_api.g_ret_sts_unexp_error)
307: THEN
308: RAISE okl_api.g_exception_unexpected_error;
309: ELSIF (l_return_status = okl_api.g_ret_sts_error)
310: THEN
311: RAISE okl_api.g_exception_error;
312: END IF;

Line 309: ELSIF (l_return_status = okl_api.g_ret_sts_error)

305: -- Raise exception to rollback to savepoint for this block
306: IF (l_return_status = okl_api.g_ret_sts_unexp_error)
307: THEN
308: RAISE okl_api.g_exception_unexpected_error;
309: ELSIF (l_return_status = okl_api.g_ret_sts_error)
310: THEN
311: RAISE okl_api.g_exception_error;
312: END IF;
313: END IF;

Line 311: RAISE okl_api.g_exception_error;

307: THEN
308: RAISE okl_api.g_exception_unexpected_error;
309: ELSIF (l_return_status = okl_api.g_ret_sts_error)
310: THEN
311: RAISE okl_api.g_exception_error;
312: END IF;
313: END IF;
314:
315: -- *********************************************

Line 350: p_init_msg_list => okl_api.g_false,

346:
347: --call trx contracts to populate the hdr record
348: okl_trx_contracts_pub.create_trx_contracts(
349: p_api_version => p_api_version,
350: p_init_msg_list => okl_api.g_false,
351: x_return_status => l_return_status,
352: x_msg_count => x_msg_count,
353: x_msg_data => x_msg_data,
354: p_tcnv_rec => l_tcnv_rec,

Line 358: IF l_return_status <> okl_api.g_ret_sts_success

354: p_tcnv_rec => l_tcnv_rec,
355: x_tcnv_rec => lx_tcnv_rec
356: );
357:
358: IF l_return_status <> okl_api.g_ret_sts_success
359: THEN
360: -- Error occurred when creating accounting entries for transaction TRX_TYPE.
361: okl_api.set_message(p_app_name => g_app_name,
362: p_msg_name => 'OKL_AM_ERR_ACC_ENT',

Line 361: okl_api.set_message(p_app_name => g_app_name,

357:
358: IF l_return_status <> okl_api.g_ret_sts_success
359: THEN
360: -- Error occurred when creating accounting entries for transaction TRX_TYPE.
361: okl_api.set_message(p_app_name => g_app_name,
362: p_msg_name => 'OKL_AM_ERR_ACC_ENT',
363: p_token1 => 'TRX_TYPE',
364: p_token1_value => l_trans_meaning);
365:

Line 369: IF (l_return_status = okl_api.g_ret_sts_unexp_error)

365:
366: END IF;
367:
368: -- Raise exception to rollback to savepoint for this block
369: IF (l_return_status = okl_api.g_ret_sts_unexp_error)
370: THEN
371: RAISE okl_api.g_exception_unexpected_error;
372: ELSIF (l_return_status = okl_api.g_ret_sts_error)
373: THEN

Line 371: RAISE okl_api.g_exception_unexpected_error;

367:
368: -- Raise exception to rollback to savepoint for this block
369: IF (l_return_status = okl_api.g_ret_sts_unexp_error)
370: THEN
371: RAISE okl_api.g_exception_unexpected_error;
372: ELSIF (l_return_status = okl_api.g_ret_sts_error)
373: THEN
374: RAISE okl_api.g_exception_error;
375: END IF;

Line 372: ELSIF (l_return_status = okl_api.g_ret_sts_error)

368: -- Raise exception to rollback to savepoint for this block
369: IF (l_return_status = okl_api.g_ret_sts_unexp_error)
370: THEN
371: RAISE okl_api.g_exception_unexpected_error;
372: ELSIF (l_return_status = okl_api.g_ret_sts_error)
373: THEN
374: RAISE okl_api.g_exception_error;
375: END IF;
376: --assigning the ourput record type value to the record type sent as input

Line 374: RAISE okl_api.g_exception_error;

370: THEN
371: RAISE okl_api.g_exception_unexpected_error;
372: ELSIF (l_return_status = okl_api.g_ret_sts_error)
373: THEN
374: RAISE okl_api.g_exception_error;
375: END IF;
376: --assigning the ourput record type value to the record type sent as input
377: l_tcnv_rec := lx_tcnv_rec;
378:

Line 392: p_init_msg_list => okl_api.g_false,

388: l_validity_date := okl_accounting_util.get_valid_gl_date(p_sys_date);
389: --get template info from accounting distributions API
390: okl_account_dist_pub.get_template_info(
391: p_api_version => p_api_version,
392: p_init_msg_list => okl_api.g_false,
393: x_return_status => l_return_status,
394: x_msg_count => x_msg_count,
395: x_msg_data => x_msg_data,
396: p_tmpl_identify_rec => lp_tmpl_identify_rec,

Line 403: l_return_status := okl_api.g_ret_sts_error;

399: );
400: --set error message No Accounting Templates
401: IF l_template_tbl.COUNT = 0
402: THEN
403: l_return_status := okl_api.g_ret_sts_error;
404: END IF;
405:
406: IF l_return_status <> okl_api.g_ret_sts_success
407: THEN

Line 406: IF l_return_status <> okl_api.g_ret_sts_success

402: THEN
403: l_return_status := okl_api.g_ret_sts_error;
404: END IF;
405:
406: IF l_return_status <> okl_api.g_ret_sts_success
407: THEN
408: -- Error occurred No Accounting Templates.
409: okl_api.set_message(p_app_name => 'OKL',
410: p_msg_name => 'OKL_AM_NO_ACC_TEMPLATES',

Line 409: okl_api.set_message(p_app_name => 'OKL',

405:
406: IF l_return_status <> okl_api.g_ret_sts_success
407: THEN
408: -- Error occurred No Accounting Templates.
409: okl_api.set_message(p_app_name => 'OKL',
410: p_msg_name => 'OKL_AM_NO_ACC_TEMPLATES',
411: p_token1 => 'PRODUCT',
412: p_token1_value => l_pdt_id);
413:

Line 417: IF (l_return_status = okl_api.g_ret_sts_unexp_error)

413:
414: END IF;
415:
416: -- Raise exception to rollback to savepoint for this block
417: IF (l_return_status = okl_api.g_ret_sts_unexp_error)
418: THEN
419: RAISE okl_api.g_exception_unexpected_error;
420: ELSIF (l_return_status = okl_api.g_ret_sts_error)
421: THEN

Line 419: RAISE okl_api.g_exception_unexpected_error;

415:
416: -- Raise exception to rollback to savepoint for this block
417: IF (l_return_status = okl_api.g_ret_sts_unexp_error)
418: THEN
419: RAISE okl_api.g_exception_unexpected_error;
420: ELSIF (l_return_status = okl_api.g_ret_sts_error)
421: THEN
422: RAISE okl_api.g_exception_error;
423: END IF;

Line 420: ELSIF (l_return_status = okl_api.g_ret_sts_error)

416: -- Raise exception to rollback to savepoint for this block
417: IF (l_return_status = okl_api.g_ret_sts_unexp_error)
418: THEN
419: RAISE okl_api.g_exception_unexpected_error;
420: ELSIF (l_return_status = okl_api.g_ret_sts_error)
421: THEN
422: RAISE okl_api.g_exception_error;
423: END IF;
424:

Line 422: RAISE okl_api.g_exception_error;

418: THEN
419: RAISE okl_api.g_exception_unexpected_error;
420: ELSIF (l_return_status = okl_api.g_ret_sts_error)
421: THEN
422: RAISE okl_api.g_exception_error;
423: END IF;
424:
425: -- *********************************************
426: -- Populate Txl Contracts Lines Record

Line 491: p_init_msg_list => okl_api.g_false,

487: END LOOP;
488: END IF;
489: --create trx contract lines table
490: okl_trx_contracts_pub.create_trx_cntrct_lines(p_api_version => p_api_version,
491: p_init_msg_list => okl_api.g_false,
492: x_return_status => l_return_status,
493: x_msg_count => x_msg_count,
494: x_msg_data => x_msg_data,
495: p_tclv_tbl => l_tclv_tbl,

Line 498: IF l_return_status <> okl_api.g_ret_sts_success

494: x_msg_data => x_msg_data,
495: p_tclv_tbl => l_tclv_tbl,
496: x_tclv_tbl => lx_tclv_tbl);
497:
498: IF l_return_status <> okl_api.g_ret_sts_success
499: THEN
500: -- Error occurred when creating accounting entries for transaction TRX_TYPE.
501: okl_api.set_message(p_app_name => g_app_name,
502: p_msg_name => 'OKL_AM_ERR_ACC_ENT',

Line 501: okl_api.set_message(p_app_name => g_app_name,

497:
498: IF l_return_status <> okl_api.g_ret_sts_success
499: THEN
500: -- Error occurred when creating accounting entries for transaction TRX_TYPE.
501: okl_api.set_message(p_app_name => g_app_name,
502: p_msg_name => 'OKL_AM_ERR_ACC_ENT',
503: p_token1 => 'TRX_TYPE',
504: p_token1_value => l_trans_meaning);
505:

Line 508: IF (l_return_status = okl_api.g_ret_sts_unexp_error)

504: p_token1_value => l_trans_meaning);
505:
506: END IF;
507: -- Raise exception to rollback to savepoint for this block
508: IF (l_return_status = okl_api.g_ret_sts_unexp_error)
509: THEN
510: RAISE okl_api.g_exception_unexpected_error;
511: ELSIF (l_return_status = okl_api.g_ret_sts_error)
512: THEN

Line 510: RAISE okl_api.g_exception_unexpected_error;

506: END IF;
507: -- Raise exception to rollback to savepoint for this block
508: IF (l_return_status = okl_api.g_ret_sts_unexp_error)
509: THEN
510: RAISE okl_api.g_exception_unexpected_error;
511: ELSIF (l_return_status = okl_api.g_ret_sts_error)
512: THEN
513: RAISE okl_api.g_exception_error;
514: END IF;

Line 511: ELSIF (l_return_status = okl_api.g_ret_sts_error)

507: -- Raise exception to rollback to savepoint for this block
508: IF (l_return_status = okl_api.g_ret_sts_unexp_error)
509: THEN
510: RAISE okl_api.g_exception_unexpected_error;
511: ELSIF (l_return_status = okl_api.g_ret_sts_error)
512: THEN
513: RAISE okl_api.g_exception_error;
514: END IF;
515: --setting the input table type to the obtained outout table type

Line 513: RAISE okl_api.g_exception_error;

509: THEN
510: RAISE okl_api.g_exception_unexpected_error;
511: ELSIF (l_return_status = okl_api.g_ret_sts_error)
512: THEN
513: RAISE okl_api.g_exception_error;
514: END IF;
515: --setting the input table type to the obtained outout table type
516: l_tclv_tbl := lx_tclv_tbl;
517:

Line 532: IF l_return_status <> okl_api.g_ret_sts_success

528: x_acc_gen_tbl => lp_acc_gen_primary_key_tbl,
529: x_return_status => l_return_status
530: );
531:
532: IF l_return_status <> okl_api.g_ret_sts_success
533: THEN
534: -- Error occurred when creating accounting entries for transaction TRX_TYPE.
535: okl_api.set_message(p_app_name => g_app_name,
536: p_msg_name => 'OKL_AM_ERR_ACC_ENT',

Line 535: okl_api.set_message(p_app_name => g_app_name,

531:
532: IF l_return_status <> okl_api.g_ret_sts_success
533: THEN
534: -- Error occurred when creating accounting entries for transaction TRX_TYPE.
535: okl_api.set_message(p_app_name => g_app_name,
536: p_msg_name => 'OKL_AM_ERR_ACC_ENT',
537: p_token1 => 'TRX_TYPE',
538: p_token1_value => l_trans_meaning);
539:

Line 543: IF (l_return_status = okl_api.g_ret_sts_unexp_error)

539:
540: END IF;
541:
542: -- Raise exception to rollback to savepoint for this block
543: IF (l_return_status = okl_api.g_ret_sts_unexp_error)
544: THEN
545: RAISE okl_api.g_exception_unexpected_error;
546: ELSIF (l_return_status = okl_api.g_ret_sts_error)
547: THEN

Line 545: RAISE okl_api.g_exception_unexpected_error;

541:
542: -- Raise exception to rollback to savepoint for this block
543: IF (l_return_status = okl_api.g_ret_sts_unexp_error)
544: THEN
545: RAISE okl_api.g_exception_unexpected_error;
546: ELSIF (l_return_status = okl_api.g_ret_sts_error)
547: THEN
548: RAISE okl_api.g_exception_error;
549: END IF;

Line 546: ELSIF (l_return_status = okl_api.g_ret_sts_error)

542: -- Raise exception to rollback to savepoint for this block
543: IF (l_return_status = okl_api.g_ret_sts_unexp_error)
544: THEN
545: RAISE okl_api.g_exception_unexpected_error;
546: ELSIF (l_return_status = okl_api.g_ret_sts_error)
547: THEN
548: RAISE okl_api.g_exception_error;
549: END IF;
550:

Line 548: RAISE okl_api.g_exception_error;

544: THEN
545: RAISE okl_api.g_exception_unexpected_error;
546: ELSIF (l_return_status = okl_api.g_ret_sts_error)
547: THEN
548: RAISE okl_api.g_exception_error;
549: END IF;
550:
551: -- *********************************************
552: -- Accounting Engine Call

Line 587: p_init_msg_list => okl_api.g_false,

583: -- call accounting engine
584: -- This will calculate the amount and generate accounting entries
585: okl_account_dist_pvt.create_accounting_dist(
586: p_api_version => p_api_version,
587: p_init_msg_list => okl_api.g_false,
588: x_return_status => l_return_status,
589: x_msg_count => x_msg_count,
590: x_msg_data => x_msg_data,
591: p_tmpl_identify_tbl => l_tmpl_identify_tbl,

Line 601: l_return_status := okl_api.g_ret_sts_error;

597: p_trx_header_id => l_tcn_id
598: );
599: IF l_amount_out_tbl.COUNT = 0
600: THEN
601: l_return_status := okl_api.g_ret_sts_error;
602: END IF;
603:
604: IF l_return_status <> okl_api.g_ret_sts_success
605: THEN

Line 604: IF l_return_status <> okl_api.g_ret_sts_success

600: THEN
601: l_return_status := okl_api.g_ret_sts_error;
602: END IF;
603:
604: IF l_return_status <> okl_api.g_ret_sts_success
605: THEN
606: -- Error occurred when creating accounting entries for transaction TRX_TYPE.
607: okl_api.set_message(p_app_name => g_app_name,
608: p_msg_name => 'OKL_AM_ERR_ACC_ENT',

Line 607: okl_api.set_message(p_app_name => g_app_name,

603:
604: IF l_return_status <> okl_api.g_ret_sts_success
605: THEN
606: -- Error occurred when creating accounting entries for transaction TRX_TYPE.
607: okl_api.set_message(p_app_name => g_app_name,
608: p_msg_name => 'OKL_AM_ERR_ACC_ENT',
609: p_token1 => 'TRX_TYPE',
610: p_token1_value => l_trans_meaning);
611:

Line 615: IF (l_return_status = okl_api.g_ret_sts_unexp_error)

611:
612: END IF;
613:
614: -- Raise exception to rollback to savepoint for this block
615: IF (l_return_status = okl_api.g_ret_sts_unexp_error)
616: THEN
617: RAISE okl_api.g_exception_unexpected_error;
618: ELSIF (l_return_status = okl_api.g_ret_sts_error)
619: THEN

Line 617: RAISE okl_api.g_exception_unexpected_error;

613:
614: -- Raise exception to rollback to savepoint for this block
615: IF (l_return_status = okl_api.g_ret_sts_unexp_error)
616: THEN
617: RAISE okl_api.g_exception_unexpected_error;
618: ELSIF (l_return_status = okl_api.g_ret_sts_error)
619: THEN
620: RAISE okl_api.g_exception_error;
621: END IF;

Line 618: ELSIF (l_return_status = okl_api.g_ret_sts_error)

614: -- Raise exception to rollback to savepoint for this block
615: IF (l_return_status = okl_api.g_ret_sts_unexp_error)
616: THEN
617: RAISE okl_api.g_exception_unexpected_error;
618: ELSIF (l_return_status = okl_api.g_ret_sts_error)
619: THEN
620: RAISE okl_api.g_exception_error;
621: END IF;
622:

Line 620: RAISE okl_api.g_exception_error;

616: THEN
617: RAISE okl_api.g_exception_unexpected_error;
618: ELSIF (l_return_status = okl_api.g_ret_sts_error)
619: THEN
620: RAISE okl_api.g_exception_error;
621: END IF;
622:
623: -- ******************************************************
624: -- Update Trx Contracts with Header and Line Amounts

Line 672: IF l_return_status <> okl_api.g_ret_sts_success

668: x_tcnv_rec => lx_tcnv_rec,
669: x_tclv_tbl => lx_tclv_tbl
670: );
671: --handle exception
672: IF l_return_status <> okl_api.g_ret_sts_success
673: THEN
674: -- Error occurred when creating accounting entries for transaction TRX_TYPE.
675: okl_api.set_message(p_app_name => g_app_name,
676: p_msg_name => 'OKL_AM_ERR_ACC_ENT',

Line 675: okl_api.set_message(p_app_name => g_app_name,

671: --handle exception
672: IF l_return_status <> okl_api.g_ret_sts_success
673: THEN
674: -- Error occurred when creating accounting entries for transaction TRX_TYPE.
675: okl_api.set_message(p_app_name => g_app_name,
676: p_msg_name => 'OKL_AM_ERR_ACC_ENT',
677: p_token1 => 'TRX_TYPE',
678: p_token1_value => l_trans_meaning);
679:

Line 683: IF (l_return_status = okl_api.g_ret_sts_unexp_error)

679:
680: END IF;
681:
682: -- Raise exception to rollback to savepoint for this block
683: IF (l_return_status = okl_api.g_ret_sts_unexp_error)
684: THEN
685: RAISE okl_api.g_exception_unexpected_error;
686: ELSIF (l_return_status = okl_api.g_ret_sts_error)
687: THEN

Line 685: RAISE okl_api.g_exception_unexpected_error;

681:
682: -- Raise exception to rollback to savepoint for this block
683: IF (l_return_status = okl_api.g_ret_sts_unexp_error)
684: THEN
685: RAISE okl_api.g_exception_unexpected_error;
686: ELSIF (l_return_status = okl_api.g_ret_sts_error)
687: THEN
688: RAISE okl_api.g_exception_error;
689: END IF;

Line 686: ELSIF (l_return_status = okl_api.g_ret_sts_error)

682: -- Raise exception to rollback to savepoint for this block
683: IF (l_return_status = okl_api.g_ret_sts_unexp_error)
684: THEN
685: RAISE okl_api.g_exception_unexpected_error;
686: ELSIF (l_return_status = okl_api.g_ret_sts_error)
687: THEN
688: RAISE okl_api.g_exception_error;
689: END IF;
690: --set output parameters of the api.

Line 688: RAISE okl_api.g_exception_error;

684: THEN
685: RAISE okl_api.g_exception_unexpected_error;
686: ELSIF (l_return_status = okl_api.g_ret_sts_error)
687: THEN
688: RAISE okl_api.g_exception_error;
689: END IF;
690: --set output parameters of the api.
691: x_total_amount := l_tcnv_rec.amount;
692:

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

700: ,P_TCLV_TBL => lx_tclv_tbl
701: ,p_ctxt_val_tbl => l_ctxt_tbl
702: ,p_acc_gen_primary_key_tbl => lp_acc_gen_primary_key_tbl);
703:
704: IF (l_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
705: RAISE Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR;
706: ELSIF (l_return_status = Okl_Api.G_RET_STS_ERROR) THEN
707: RAISE Okl_Api.G_EXCEPTION_ERROR;
708: END IF;

Line 705: RAISE Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR;

701: ,p_ctxt_val_tbl => l_ctxt_tbl
702: ,p_acc_gen_primary_key_tbl => lp_acc_gen_primary_key_tbl);
703:
704: IF (l_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
705: RAISE Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR;
706: ELSIF (l_return_status = Okl_Api.G_RET_STS_ERROR) THEN
707: RAISE Okl_Api.G_EXCEPTION_ERROR;
708: END IF;
709:

Line 706: ELSIF (l_return_status = Okl_Api.G_RET_STS_ERROR) THEN

702: ,p_acc_gen_primary_key_tbl => lp_acc_gen_primary_key_tbl);
703:
704: IF (l_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
705: RAISE Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR;
706: ELSIF (l_return_status = Okl_Api.G_RET_STS_ERROR) THEN
707: RAISE Okl_Api.G_EXCEPTION_ERROR;
708: END IF;
709:
710:

Line 707: RAISE Okl_Api.G_EXCEPTION_ERROR;

703:
704: IF (l_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
705: RAISE Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR;
706: ELSIF (l_return_status = Okl_Api.G_RET_STS_ERROR) THEN
707: RAISE Okl_Api.G_EXCEPTION_ERROR;
708: END IF;
709:
710:
711: x_return_status := l_return_status;

Line 713: IF l_return_status = okl_api.g_ret_sts_success

709:
710:
711: x_return_status := l_return_status;
712:
713: IF l_return_status = okl_api.g_ret_sts_success
714: THEN
715: -- Accounting entries created for transaction type TRX_TYPE.
716: okl_api.set_message(p_app_name => 'OKL',
717: p_msg_name => 'OKL_AM_ACC_ENT_CREATED',

Line 716: okl_api.set_message(p_app_name => 'OKL',

712:
713: IF l_return_status = okl_api.g_ret_sts_success
714: THEN
715: -- Accounting entries created for transaction type TRX_TYPE.
716: okl_api.set_message(p_app_name => 'OKL',
717: p_msg_name => 'OKL_AM_ACC_ENT_CREATED',
718: p_token1 => 'TRX_TYPE',
719: p_token1_value => l_trans_meaning);
720: END IF;

Line 724: WHEN okl_api.g_exception_error THEN

720: END IF;
721:
722: EXCEPTION
723: -- RMUNJULU 3596626 Added exception
724: WHEN okl_api.g_exception_error THEN
725: IF prod_id_csr%ISOPEN
726: THEN
727: CLOSE prod_id_csr;
728: END IF;

Line 742: x_return_status := okl_api.g_ret_sts_error;

738: THEN
739: CLOSE product_name_csr;
740: END IF;
741:
742: x_return_status := okl_api.g_ret_sts_error;
743:
744: -- RMUNJULU 3596626 Added exception
745: WHEN okl_api.g_exception_unexpected_error THEN
746: IF prod_id_csr%ISOPEN

Line 745: WHEN okl_api.g_exception_unexpected_error THEN

741:
742: x_return_status := okl_api.g_ret_sts_error;
743:
744: -- RMUNJULU 3596626 Added exception
745: WHEN okl_api.g_exception_unexpected_error THEN
746: IF prod_id_csr%ISOPEN
747: THEN
748: CLOSE prod_id_csr;
749: END IF;

Line 763: x_return_status := okl_api.g_ret_sts_unexp_error;

759: THEN
760: CLOSE product_name_csr;
761: END IF;
762:
763: x_return_status := okl_api.g_ret_sts_unexp_error;
764:
765: WHEN OTHERS THEN
766: IF prod_id_csr%ISOPEN
767: THEN

Line 784: okl_api.set_message(p_app_name => 'OKL',

780: CLOSE product_name_csr;
781: END IF;
782:
783: -- store SQL error message on message stack for caller
784: okl_api.set_message(p_app_name => 'OKL',
785: p_msg_name => g_unexpected_error,
786: p_token1 => g_sqlcode_token,
787: p_token1_value => SQLCODE,
788: p_token2 => g_sqlerrm_token,

Line 791: x_return_status := okl_api.g_ret_sts_error;

787: p_token1_value => SQLCODE,
788: p_token2 => g_sqlerrm_token,
789: p_token2_value => SQLERRM);
790:
791: x_return_status := okl_api.g_ret_sts_error;
792: END process_accounting_entries;
793:
794:
795: -- Start of comments

Line 879: x_return_status := okl_api.G_RET_STS_SUCCESS;

875:
876: -- All the input parameterd to this procedure will definitely have not-null values, as these are required
877: -- columns of okx_asset_liens_v
878:
879: x_return_status := okl_api.G_RET_STS_SUCCESS;
880:
881: --sechawla 13-FEB-08 6765119
882: l_current_fa_cost := p_cost;
883:

Line 1072: OKL_API.set_message(

1068: WHEN OTHERS THEN
1069:
1070: -- unexpected error
1071: -- SECHAWLA 16-JAN-03 Bug # 2754280 : Changed the app name from OKL to OKC
1072: OKL_API.set_message(
1073: p_app_name => 'OKC',
1074: p_msg_name => g_unexpected_error,
1075: p_token1 => g_sqlcode_token,
1076: p_token1_value => sqlcode,

Line 1079: x_return_status := OKL_API.G_RET_STS_UNEXP_ERROR;

1075: p_token1 => g_sqlcode_token,
1076: p_token1_value => sqlcode,
1077: p_token2 => g_sqlerrm_token,
1078: p_token2_value => sqlerrm);
1079: x_return_status := OKL_API.G_RET_STS_UNEXP_ERROR;
1080:
1081: END do_cost_retirement;
1082:
1083:

Line 1170: x_return_status := okl_api.G_RET_STS_SUCCESS;

1166:
1167: -- All the input parameterd to this procedure will definitely have not-null values, as these are required
1168: -- columns of okx_asset_liens_v
1169:
1170: x_return_status := okl_api.G_RET_STS_SUCCESS;
1171:
1172: -- SECHAWLA 21-NOV-03 3262519 : update the corporate book with residual value as asset cost
1173: --------------------------------------- Adjustments begin-------------------------------------------
1174:

Line 1353: OKL_API.set_message(

1349: WHEN OTHERS THEN
1350:
1351: -- unexpected error
1352: -- SECHAWLA 16-JAN-03 Bug # 2754280 : Changed the app name from OKL to OKC
1353: OKL_API.set_message(
1354: p_app_name => 'OKC',
1355: p_msg_name => g_unexpected_error,
1356: p_token1 => g_sqlcode_token,
1357: p_token1_value => sqlcode,

Line 1360: x_return_status := OKL_API.G_RET_STS_UNEXP_ERROR;

1356: p_token1 => g_sqlcode_token,
1357: p_token1_value => sqlcode,
1358: p_token2 => g_sqlerrm_token,
1359: p_token2_value => sqlerrm);
1360: x_return_status := OKL_API.G_RET_STS_UNEXP_ERROR;
1361:
1362: END do_full_units_retirement;
1363:
1364: -- Start of comments

Line 1452: x_return_status := okl_api.G_RET_STS_SUCCESS;

1448:
1449: -- All the input parameterd to this procedure will definitely have not-null values, as these are required
1450: -- columns of okx_asset_liens_v
1451:
1452: x_return_status := okl_api.G_RET_STS_SUCCESS;
1453:
1454: -- SECHAWLA 21-NOV-03 3262519 : update the corporate book with residual value as asset cost
1455: --------------------------------------- Adjustments begin-------------------------------------------
1456:

Line 1651: OKL_API.set_message(

1647: WHEN OTHERS THEN
1648:
1649: -- unexpected error
1650: -- SECHAWLA 16-JAN-03 Bug # 2754280 : Changed the app name from OKL to OKC
1651: OKL_API.set_message(
1652: p_app_name => 'OKC',
1653: p_msg_name => g_unexpected_error,
1654: p_token1 => g_sqlcode_token,
1655: p_token1_value => sqlcode,

Line 1658: x_return_status := OKL_API.G_RET_STS_UNEXP_ERROR;

1654: p_token1 => g_sqlcode_token,
1655: p_token1_value => sqlcode,
1656: p_token2 => g_sqlerrm_token,
1657: p_token2_value => sqlerrm);
1658: x_return_status := OKL_API.G_RET_STS_UNEXP_ERROR;
1659:
1660: END do_partial_units_retirement;
1661:
1662:

Line 1969: l_return_status := OKL_API.START_ACTIVITY(l_api_name,

1965:
1966:
1967: BEGIN
1968:
1969: l_return_status := OKL_API.START_ACTIVITY(l_api_name,
1970: G_PKG_NAME,
1971: p_init_msg_list,
1972: l_api_version,
1973: p_api_version,

Line 1988: AND p_quote_eff_date <> OKL_API.G_MISS_DATE THEN

1984: SELECT SYSDATE INTO l_sys_date FROM DUAL;
1985:
1986: -- rmunjulu EDAT Added condition to default
1987: IF p_quote_eff_date IS NOT NULL
1988: AND p_quote_eff_date <> OKL_API.G_MISS_DATE THEN
1989:
1990: l_quote_eff_date := p_quote_eff_date;
1991:
1992: ELSE

Line 2000: AND p_quote_accpt_date <> OKL_API.G_MISS_DATE THEN

1996: END IF;
1997:
1998: -- rmunjulu EDAT Added condition to default
1999: IF p_quote_accpt_date IS NOT NULL
2000: AND p_quote_accpt_date <> OKL_API.G_MISS_DATE THEN
2001:
2002: l_quote_accpt_date := p_quote_accpt_date;
2003:
2004: ELSE

Line 2010: IF p_financial_asset_id IS NULL OR p_financial_asset_id = OKL_API.G_MISS_NUM THEN

2006: l_quote_accpt_date := l_sys_date;
2007:
2008: END IF;
2009:
2010: IF p_financial_asset_id IS NULL OR p_financial_asset_id = OKL_API.G_MISS_NUM THEN
2011: x_return_status := OKL_API.G_RET_STS_ERROR;
2012: -- Finacial Asset id is a required parameter
2013: OKC_API.set_message( p_app_name => 'OKC',
2014: p_msg_name => G_REQUIRED_VALUE,

Line 2011: x_return_status := OKL_API.G_RET_STS_ERROR;

2007:
2008: END IF;
2009:
2010: IF p_financial_asset_id IS NULL OR p_financial_asset_id = OKL_API.G_MISS_NUM THEN
2011: x_return_status := OKL_API.G_RET_STS_ERROR;
2012: -- Finacial Asset id is a required parameter
2013: OKC_API.set_message( p_app_name => 'OKC',
2014: p_msg_name => G_REQUIRED_VALUE,
2015: p_token1 => G_COL_NAME_TOKEN,

Line 2024: OKL_API.SET_MESSAGE(p_app_name => g_app_name,

2020: END IF;
2021:
2022: -- RRAVIKIR Legal Entity Changes
2023: IF (p_legal_entity_id is null or p_legal_entity_id = OKC_API.G_MISS_NUM) THEN
2024: OKL_API.SET_MESSAGE(p_app_name => g_app_name,
2025: p_msg_name => g_required_value,
2026: p_token1 => g_col_name_token,
2027: p_token1_value => 'legal_entity_id');
2028: RAISE OKC_API.G_EXCEPTION_ERROR;

Line 2036: x_return_status := OKL_API.G_RET_STS_ERROR;

2032: --SECHAWLA 21-NOV-2003 3262519 : Added the following validation
2033: OPEN l_okclines_csr(p_financial_asset_id );
2034: FETCH l_okclines_csr INTO l_dummy;
2035: IF l_okclines_csr%NOTFOUND THEN
2036: x_return_status := OKL_API.G_RET_STS_ERROR;
2037: -- Finacial Asset id is invalid
2038: OKC_API.set_message( p_app_name => 'OKC',
2039: p_msg_name => G_INVALID_VALUE,
2040: p_token1 => G_COL_NAME_TOKEN,

Line 2052: IF l_proceeds_of_sale IS NULL OR l_proceeds_of_sale = OKL_API.G_MISS_NUM THEN

2048:
2049: -- SECHAWLA 11-MAR-03 : assign 0 to l_proceeds_of_sale if NULL
2050: l_proceeds_of_sale := p_proceeds_of_sale ;
2051:
2052: IF l_proceeds_of_sale IS NULL OR l_proceeds_of_sale = OKL_API.G_MISS_NUM THEN
2053: l_proceeds_of_sale := 0;
2054: /*
2055: x_return_status := OKL_API.G_RET_STS_ERROR;
2056: -- proceeds_of_sale is required

Line 2055: x_return_status := OKL_API.G_RET_STS_ERROR;

2051:
2052: IF l_proceeds_of_sale IS NULL OR l_proceeds_of_sale = OKL_API.G_MISS_NUM THEN
2053: l_proceeds_of_sale := 0;
2054: /*
2055: x_return_status := OKL_API.G_RET_STS_ERROR;
2056: -- proceeds_of_sale is required
2057: OKC_API.set_message( p_app_name => 'OKC',
2058: p_msg_name => G_REQUIRED_VALUE,
2059: p_token1 => G_COL_NAME_TOKEN,

Line 2070: x_return_status := OKL_API.G_RET_STS_ERROR;

2066:
2067: -- SECHAWLA 11-MAR-03 : Allow negative amount
2068: /*
2069: IF p_proceeds_of_sale < 0 THEN
2070: x_return_status := OKL_API.G_RET_STS_ERROR;
2071: -- proceeds_of_sale is invalid
2072: OKC_API.set_message( p_app_name => 'OKC',
2073: p_msg_name => G_INVALID_VALUE,
2074: p_token1 => G_COL_NAME_TOKEN,

Line 2084: x_return_status := OKL_API.G_RET_STS_ERROR;

2080: */
2081:
2082: IF p_quantity IS NOT NULL THEN
2083: IF p_quantity < 0 THEN
2084: x_return_status := OKL_API.G_RET_STS_ERROR;
2085: -- Quantity is invalid
2086: OKC_API.set_message( p_app_name => 'OKC',
2087: p_msg_name => G_INVALID_VALUE,
2088: p_token1 => G_COL_NAME_TOKEN,

Line 2095: x_return_status := OKL_API.G_RET_STS_ERROR;

2091:
2092: RAISE OKC_API.G_EXCEPTION_ERROR;
2093: END IF;
2094: IF trunc(p_quantity) <> p_quantity THEN
2095: x_return_status := OKL_API.G_RET_STS_ERROR;
2096: -- Units retired should be a whole number.
2097: OKC_API.set_message( p_app_name => 'OKL',
2098: p_msg_name => 'OKL_AM_WHOLE_UNITS_ERR');
2099: RAISE OKC_API.G_EXCEPTION_ERROR;

Line 2109: x_return_status := OKL_API.G_RET_STS_ERROR;

2105: -- get the deal type from the contract
2106: OPEN l_dealtype_csr(p_financial_asset_id);
2107: FETCH l_dealtype_csr INTO l_chr_id, l_deal_type, l_contract_number;
2108: IF l_dealtype_csr%NOTFOUND THEN
2109: x_return_status := OKL_API.G_RET_STS_ERROR;
2110: -- chr id is invalid
2111: OKC_API.set_message( p_app_name => 'OKC',
2112: p_msg_name => G_INVALID_VALUE,
2113: p_token1 => G_COL_NAME_TOKEN,

Line 2139: IF l_rulv_rec.rule_information1 IS NULL OR l_rulv_rec.rule_information1 = OKL_API.G_MISS_CHAR THEN

2135: RAISE OKC_API.G_EXCEPTION_ERROR;
2136: END IF;
2137:
2138: -- check if tax owner is defined
2139: IF l_rulv_rec.rule_information1 IS NULL OR l_rulv_rec.rule_information1 = OKL_API.G_MISS_CHAR THEN
2140:
2141: x_return_status := OKL_API.G_RET_STS_ERROR;
2142: -- tax owner is not defined for contract CONTRACT_NUMBER.
2143: OKL_API.set_message( p_app_name => 'OKL',

Line 2141: x_return_status := OKL_API.G_RET_STS_ERROR;

2137:
2138: -- check if tax owner is defined
2139: IF l_rulv_rec.rule_information1 IS NULL OR l_rulv_rec.rule_information1 = OKL_API.G_MISS_CHAR THEN
2140:
2141: x_return_status := OKL_API.G_RET_STS_ERROR;
2142: -- tax owner is not defined for contract CONTRACT_NUMBER.
2143: OKL_API.set_message( p_app_name => 'OKL',
2144: p_msg_name => 'OKL_AM_NO_TAX_OWNER',
2145: p_token1 => 'CONTRACT_NUMBER',

Line 2143: OKL_API.set_message( p_app_name => 'OKL',

2139: IF l_rulv_rec.rule_information1 IS NULL OR l_rulv_rec.rule_information1 = OKL_API.G_MISS_CHAR THEN
2140:
2141: x_return_status := OKL_API.G_RET_STS_ERROR;
2142: -- tax owner is not defined for contract CONTRACT_NUMBER.
2143: OKL_API.set_message( p_app_name => 'OKL',
2144: p_msg_name => 'OKL_AM_NO_TAX_OWNER',
2145: p_token1 => 'CONTRACT_NUMBER',
2146: p_token1_value => l_contract_number);
2147: RAISE OKC_API.G_EXCEPTION_ERROR;

Line 2160: x_return_status := OKL_API.G_RET_STS_ERROR;

2156: FETCH l_linesfullv_csr INTO l_name, l_residual_value;
2157: CLOSE l_linesfullv_csr;
2158:
2159: IF l_residual_value IS NULL THEN
2160: x_return_status := OKL_API.G_RET_STS_ERROR;
2161: -- Residual value is not defined for the asset
2162: OKC_API.set_message( p_app_name => 'OKL',
2163: p_msg_name => 'OKL_AM_NO_RESIDUAL_VALUE',
2164: p_token1 => 'ASSET_NUMBER',

Line 2198: x_return_status := OKL_API.G_RET_STS_ERROR;

2194: --rbruno 5436987 -- End
2195:
2196:
2197: IF l_residual_value < 0 THEN
2198: x_return_status := OKL_API.G_RET_STS_ERROR;
2199: -- Residual value is negative for the asset
2200: OKC_API.set_message( p_app_name => 'OKL',
2201: p_msg_name => 'OKL_AM_INVALID_RESIDUAL',
2202: p_token1 => 'ASSET_NUMBER',

Line 2238: x_return_status := OKL_API.G_RET_STS_ERROR;

2234: --SECHAWLA 10-FEB-06 5016156: end
2235: l_delta_cost := l_residual_value - l_okxassetlines_rec.cost;
2236: --SECHAWLA 10-FEB-06 5016156 : begin
2237: ELSIF l_trx_status IN ('ENTERED','ERROR') THEN -- if any trx has this status
2238: x_return_status := OKL_API.G_RET_STS_ERROR;
2239: OKL_API.set_message( p_app_name => 'OKL',
2240: p_msg_name => 'OKL_AM_PENDING_OFFLEASE',
2241: p_token1 => 'ASSET_NUMBER',
2242: p_token1_value => l_name);

Line 2239: OKL_API.set_message( p_app_name => 'OKL',

2235: l_delta_cost := l_residual_value - l_okxassetlines_rec.cost;
2236: --SECHAWLA 10-FEB-06 5016156 : begin
2237: ELSIF l_trx_status IN ('ENTERED','ERROR') THEN -- if any trx has this status
2238: x_return_status := OKL_API.G_RET_STS_ERROR;
2239: OKL_API.set_message( p_app_name => 'OKL',
2240: p_msg_name => 'OKL_AM_PENDING_OFFLEASE',
2241: p_token1 => 'ASSET_NUMBER',
2242: p_token1_value => l_name);
2243:

Line 2266: x_return_status := OKL_API.G_RET_STS_ERROR;

2262: -- IF fa_cache_pkg.fazcbc_record.fiscal_year_name IS NULL THEN
2263: OPEN l_bookcontrols_csr(l_okxassetlines_rec.book_type_code);
2264: FETCH l_bookcontrols_csr INTO l_fiscal_year_name;
2265: IF l_bookcontrols_csr%NOTFOUND OR l_fiscal_year_name IS NULL THEN
2266: x_return_status := OKL_API.G_RET_STS_ERROR;
2267: -- Fiscal Year Name is required
2268: OKC_API.set_message( p_app_name => 'OKC',
2269: p_msg_name => G_REQUIRED_VALUE,
2270: p_token1 => G_COL_NAME_TOKEN,

Line 2290: OKL_API.set_message(

2286: ) THEN
2287:
2288: x_return_status := OKC_API.G_RET_STS_ERROR;
2289: --Error getting current open period for the book BOOK_TYPE_CODE.
2290: OKL_API.set_message(
2291: p_app_name => 'OKL',
2292: p_msg_name => 'OKL_AM_OPEN_PERIOD_ERR',
2293: p_token1 => 'BOOK_CLASS',
2294: p_token1_value => lower(l_okxassetlines_rec.book_class),

Line 2319: OKL_API.set_message( p_app_name => 'OKL',

2315: -- Can nor retire asset ASSET_NUMBER as the asset was added to the book
2316: -- in the current open period. Please retire the asset manually.
2317: x_return_status := OKC_API.G_RET_STS_ERROR;
2318:
2319: OKL_API.set_message( p_app_name => 'OKL',
2320: p_msg_name => 'OKL_AM_RETIRE_MANUALLY',
2321: p_token1 => 'ASSET_NUMBER',
2322: p_token1_value => l_okxassetlines_rec.asset_number,
2323: p_token2 => 'BOOK_CLASS',

Line 2334: x_return_status := OKL_API.G_RET_STS_ERROR;

2330: END IF;
2331: /* ansethur for bug 5664106 -- start
2332: -- SECHAWLA 03-JUN-03 Bug 2999419: Added the following validation
2333: IF l_okxassetlines_rec.prorate_convention_code IS NULL THEN
2334: x_return_status := OKL_API.G_RET_STS_ERROR;
2335: -- Unable to find retirement prorate convention for asset ASSET_NUMBER and book BOOK_TYPE_CODE.
2336: OKC_API.set_message( p_app_name => 'OKL',
2337: p_msg_name => 'OKL_AM_NO_PRORATE_CONVENTION',
2338: p_token1 => 'ASSET_NUMBER',

Line 2353: IF p_quantity IS NULL OR p_quantity = OKL_API.G_MISS_NUM OR p_quantity = l_okxassetlines_rec.current_units THEN

2349:
2350: ---------- SECHAWLA 05-FEB-03 Bug # 2781557 : end moved code ----------------
2351:
2352:
2353: IF p_quantity IS NULL OR p_quantity = OKL_API.G_MISS_NUM OR p_quantity = l_okxassetlines_rec.current_units THEN
2354: -- user sent request for full retirement
2355:
2356: -- check if asset has already been fully/partially retired .
2357: l_retired_quantity := 0;

Line 2462: -- x_return_status := OKL_API.G_RET_STS_ERROR;

2458: -- assigned to all the distributions.
2459:
2460:
2461: IF l_dist_quantity > 0 THEN -- quantity to be retired (for non-retired distributions)
2462: -- x_return_status := OKL_API.G_RET_STS_ERROR;
2463: -- Sold quantity is more than the total quantity assigned to asset distributions.
2464: OKC_API.set_message( p_app_name => 'OKL',
2465: p_msg_name => 'OKL_AM_INVALID_DIST_QTY');
2466: --RAISE okc_api.G_EXCEPTION_ERROR;

Line 2577: -- x_return_status := OKL_API.G_RET_STS_ERROR;

2573: END IF;
2574:
2575: l_units_retired := l_units_to_be_retired;
2576: ELSIF l_retired_quantity > l_okxassetlines_rec.current_units AND l_non_retired_quantity = 0 THEN
2577: -- x_return_status := OKL_API.G_RET_STS_ERROR;
2578: -- Asset ASSET_NUMBER is already retired with invalid retired quantity which is more than the original quantity.
2579: OKC_API.set_message( p_app_name => 'OKL',
2580: p_msg_name => 'OKL_AM_INVALID_RETIRED_QTY',
2581: p_token1 => 'ASSET_NUMBER',

Line 2629: -- x_return_status := OKL_API.G_RET_STS_ERROR;

2625: -- assigned to non-retired distributions.
2626:
2627: IF l_dist_quantity > 0 THEN
2628: IF l_retired_quantity < l_dist_quantity THEN
2629: -- x_return_status := OKL_API.G_RET_STS_ERROR;
2630: -- Sold quantity is more than the total quantity assigned to asset distributions.
2631: OKC_API.set_message( p_app_name => 'OKL',
2632: p_msg_name => 'OKL_AM_INVALID_DIST_QTY');
2633: -- RAISE okc_api.G_EXCEPTION_ERROR;

Line 2932: IF x_return_status <> OKL_API.G_RET_STS_SUCCESS THEN

2928: okl_am_util_pvt.get_transaction_id(p_try_name => l_trx_type,
2929: x_return_status => x_return_status,
2930: x_try_id => l_try_id);
2931:
2932: IF x_return_status <> OKL_API.G_RET_STS_SUCCESS THEN
2933: -- Unable to find a transaction type for this transaction.
2934: OKL_API.set_message(p_app_name => 'OKL',
2935: p_msg_name => 'OKL_AM_NO_TRX_TYPE_FOUND',
2936: p_token1 => 'TRY_NAME',

Line 2934: OKL_API.set_message(p_app_name => 'OKL',

2930: x_try_id => l_try_id);
2931:
2932: IF x_return_status <> OKL_API.G_RET_STS_SUCCESS THEN
2933: -- Unable to find a transaction type for this transaction.
2934: OKL_API.set_message(p_app_name => 'OKL',
2935: p_msg_name => 'OKL_AM_NO_TRX_TYPE_FOUND',
2936: p_token1 => 'TRY_NAME',
2937: p_token1_value => 'Asset Disposition');
2938: RAISE OKC_API.G_EXCEPTION_ERROR;

Line 3126: IF p_quantity IS NULL OR p_quantity = OKL_API.G_MISS_NUM THEN

3122:
3123: --- Expire item in Installed Base
3124: -- commented call to expire_item djanaswa bug 6736148 start
3125: /*
3126: IF p_quantity IS NULL OR p_quantity = OKL_API.G_MISS_NUM THEN
3127: -- Retire all existing instances
3128: FOR l_itemlocation_rec in l_itemlocation_csr LOOP
3129:
3130: IF l_itemlocation_rec.instance_end_date IS NULL THEN-- Instance is not already expired.

Line 3284: RAISE okl_api.g_exception_unexpected_error;

3280: x_msg_data => x_msg_data);
3281:
3282: IF (x_return_status = okc_api.g_ret_sts_unexp_error)
3283: THEN
3284: RAISE okl_api.g_exception_unexpected_error;
3285: ELSIF (x_return_status = okc_api.g_ret_sts_error)
3286: THEN
3287: RAISE okl_api.g_exception_error;
3288: END IF;

Line 3287: RAISE okl_api.g_exception_error;

3283: THEN
3284: RAISE okl_api.g_exception_unexpected_error;
3285: ELSIF (x_return_status = okc_api.g_ret_sts_error)
3286: THEN
3287: RAISE okl_api.g_exception_error;
3288: END IF;
3289: END LOOP;
3290: END IF;
3291: --akrangan added for sla populate sources cr end

Line 3766: l_return_status := OKL_API.START_ACTIVITY(l_api_name,

3762: --akrangan sla populate sources cr end
3763:
3764: BEGIN
3765:
3766: l_return_status := OKL_API.START_ACTIVITY(l_api_name,
3767: G_PKG_NAME,
3768: p_init_msg_list,
3769: l_api_version,
3770: p_api_version,

Line 3784: IF p_order_line_Id IS NULL OR p_order_line_Id = OKL_API.G_MISS_NUM THEN

3780: -- Get the sysdate
3781: SELECT SYSDATE INTO l_sys_date FROM DUAL;
3782:
3783: -- SECHAWLA 21-OCT-04 3924244
3784: IF p_order_line_Id IS NULL OR p_order_line_Id = OKL_API.G_MISS_NUM THEN
3785: x_return_status := OKL_API.G_RET_STS_ERROR;
3786: -- Order Line ID is required
3787: OKL_API.set_message( p_app_name => 'OKC',
3788: p_msg_name => G_REQUIRED_VALUE,

Line 3785: x_return_status := OKL_API.G_RET_STS_ERROR;

3781: SELECT SYSDATE INTO l_sys_date FROM DUAL;
3782:
3783: -- SECHAWLA 21-OCT-04 3924244
3784: IF p_order_line_Id IS NULL OR p_order_line_Id = OKL_API.G_MISS_NUM THEN
3785: x_return_status := OKL_API.G_RET_STS_ERROR;
3786: -- Order Line ID is required
3787: OKL_API.set_message( p_app_name => 'OKC',
3788: p_msg_name => G_REQUIRED_VALUE,
3789: p_token1 => G_COL_NAME_TOKEN,

Line 3787: OKL_API.set_message( p_app_name => 'OKC',

3783: -- SECHAWLA 21-OCT-04 3924244
3784: IF p_order_line_Id IS NULL OR p_order_line_Id = OKL_API.G_MISS_NUM THEN
3785: x_return_status := OKL_API.G_RET_STS_ERROR;
3786: -- Order Line ID is required
3787: OKL_API.set_message( p_app_name => 'OKC',
3788: p_msg_name => G_REQUIRED_VALUE,
3789: p_token1 => G_COL_NAME_TOKEN,
3790: p_token1_value => 'ORDER_LINE_ID');
3791: RAISE okc_api.G_EXCEPTION_ERROR;

Line 3798: x_return_status := OKL_API.G_RET_STS_ERROR;

3794: /* -- SECHAWLA 21-OCT-04 3924244
3795: OPEN l_orderheaders_csr(p_order_header_Id);
3796: FETCH l_orderheaders_csr INTO l_order_number;
3797: IF l_orderheaders_csr%NOTFOUND THEN
3798: x_return_status := OKL_API.G_RET_STS_ERROR;
3799: -- Order Header ID is invalid
3800: OKL_API.set_message( p_app_name => 'OKC',
3801: p_msg_name => G_INVALID_VALUE,
3802: p_token1 => G_COL_NAME_TOKEN,

Line 3800: OKL_API.set_message( p_app_name => 'OKC',

3796: FETCH l_orderheaders_csr INTO l_order_number;
3797: IF l_orderheaders_csr%NOTFOUND THEN
3798: x_return_status := OKL_API.G_RET_STS_ERROR;
3799: -- Order Header ID is invalid
3800: OKL_API.set_message( p_app_name => 'OKC',
3801: p_msg_name => G_INVALID_VALUE,
3802: p_token1 => G_COL_NAME_TOKEN,
3803: p_token1_value => 'ORDER_HEADER_ID');
3804: RAISE okc_api.G_EXCEPTION_ERROR;

Line 3814: x_return_status := OKL_API.G_RET_STS_ERROR;

3810: OPEN l_orderlines_csr(p_order_line_Id);
3811: FETCH l_orderlines_csr INTO l_header_id, l_inventory_item_id, l_ordered_quantity,
3812: l_ship_from_org_id, l_unit_selling_price;
3813: IF l_orderlines_csr%NOTFOUND THEN
3814: x_return_status := OKL_API.G_RET_STS_ERROR;
3815: -- Order Line ID is invalid
3816: OKL_API.set_message( p_app_name => 'OKC',
3817: p_msg_name => G_INVALID_VALUE,
3818: p_token1 => G_COL_NAME_TOKEN,

Line 3816: OKL_API.set_message( p_app_name => 'OKC',

3812: l_ship_from_org_id, l_unit_selling_price;
3813: IF l_orderlines_csr%NOTFOUND THEN
3814: x_return_status := OKL_API.G_RET_STS_ERROR;
3815: -- Order Line ID is invalid
3816: OKL_API.set_message( p_app_name => 'OKC',
3817: p_msg_name => G_INVALID_VALUE,
3818: p_token1 => G_COL_NAME_TOKEN,
3819: p_token1_value => 'ORDER_LINE_ID');
3820: RAISE okc_api.G_EXCEPTION_ERROR;

Line 3837: x_return_status := OKL_API.G_RET_STS_ERROR;

3833:
3834:
3835:
3836: IF l_ordered_quantity < 0 THEN -- SECHAWLA 21-OCT-04 3924244
3837: x_return_status := OKL_API.G_RET_STS_ERROR;
3838: -- ordered quantity is invalid
3839: OKC_API.set_message( p_app_name => 'OKC',
3840: p_msg_name => G_INVALID_VALUE,
3841: p_token1 => G_COL_NAME_TOKEN,

Line 3849: x_return_status := OKL_API.G_RET_STS_ERROR;

3845: RAISE OKC_API.G_EXCEPTION_ERROR;
3846: END IF;
3847:
3848: IF trunc(l_ordered_quantity) <> l_ordered_quantity THEN -- SECHAWLA 21-OCT-04 3924244
3849: x_return_status := OKL_API.G_RET_STS_ERROR;
3850: -- Ordered quantity should be a whole number.
3851: OKC_API.set_message( p_app_name => 'OKL',
3852: p_msg_name => 'OKL_AM_WHOLE_QTY_ERR');
3853: RAISE OKC_API.G_EXCEPTION_ERROR;

Line 3863: x_return_status := OKL_API.G_RET_STS_ERROR;

3859: FETCH l_assetreturn_csr INTO l_kle_id, l_quantity, l_legal_entity_id; -- RRAVIKIR legal_entity_id added to the Fetch cursor
3860:
3861:
3862: IF l_assetreturn_csr%NOTFOUND THEN
3863: x_return_status := OKL_API.G_RET_STS_ERROR;
3864: -- Inventory Item for the order ORDER_NUMBER is not defined in Asset Returns.
3865: OKL_API.set_message( p_app_name => 'OKL',
3866: p_msg_name => 'OKL_AM_NO_ASSET_RETURN',
3867: p_token1 => 'ORDER_NUMBER',

Line 3865: OKL_API.set_message( p_app_name => 'OKL',

3861:
3862: IF l_assetreturn_csr%NOTFOUND THEN
3863: x_return_status := OKL_API.G_RET_STS_ERROR;
3864: -- Inventory Item for the order ORDER_NUMBER is not defined in Asset Returns.
3865: OKL_API.set_message( p_app_name => 'OKL',
3866: p_msg_name => 'OKL_AM_NO_ASSET_RETURN',
3867: p_token1 => 'ORDER_NUMBER',
3868: p_token1_value => l_order_number);
3869: RAISE okc_api.G_EXCEPTION_ERROR;

Line 3872: IF l_quantity IS NULL OR l_quantity = OKL_API.G_MISS_NUM THEN

3868: p_token1_value => l_order_number);
3869: RAISE okc_api.G_EXCEPTION_ERROR;
3870: END IF;
3871:
3872: IF l_quantity IS NULL OR l_quantity = OKL_API.G_MISS_NUM THEN
3873: x_return_status := OKL_API.G_RET_STS_ERROR;
3874: -- Quantity is required
3875: OKL_API.set_message( p_app_name => 'OKC',
3876: p_msg_name => G_REQUIRED_VALUE,

Line 3873: x_return_status := OKL_API.G_RET_STS_ERROR;

3869: RAISE okc_api.G_EXCEPTION_ERROR;
3870: END IF;
3871:
3872: IF l_quantity IS NULL OR l_quantity = OKL_API.G_MISS_NUM THEN
3873: x_return_status := OKL_API.G_RET_STS_ERROR;
3874: -- Quantity is required
3875: OKL_API.set_message( p_app_name => 'OKC',
3876: p_msg_name => G_REQUIRED_VALUE,
3877: p_token1 => G_COL_NAME_TOKEN,

Line 3875: OKL_API.set_message( p_app_name => 'OKC',

3871:
3872: IF l_quantity IS NULL OR l_quantity = OKL_API.G_MISS_NUM THEN
3873: x_return_status := OKL_API.G_RET_STS_ERROR;
3874: -- Quantity is required
3875: OKL_API.set_message( p_app_name => 'OKC',
3876: p_msg_name => G_REQUIRED_VALUE,
3877: p_token1 => G_COL_NAME_TOKEN,
3878: p_token1_value => 'ASSET_RETURN_QUANTITY');
3879: RAISE okc_api.G_EXCEPTION_ERROR;

Line 3884: OKL_API.SET_MESSAGE(p_app_name => g_app_name,

3880: END IF;
3881:
3882: -- RRAVIKIR Legal Entity Changes
3883: IF (l_legal_entity_id is null or l_legal_entity_id = OKC_API.G_MISS_NUM) THEN
3884: OKL_API.SET_MESSAGE(p_app_name => g_app_name,
3885: p_msg_name => g_required_value,
3886: p_token1 => g_col_name_token,
3887: p_token1_value => 'legal_entity_id');
3888: RAISE OKC_API.G_EXCEPTION_ERROR;

Line 3893: x_return_status := OKL_API.G_RET_STS_ERROR;

3889: END IF;
3890: -- Legal Entity Changes End
3891:
3892: IF l_quantity < 0 THEN
3893: x_return_status := OKL_API.G_RET_STS_ERROR;
3894: -- Quantity is invalid
3895: OKL_API.set_message( p_app_name => 'OKC',
3896: p_msg_name => G_INVALID_VALUE,
3897: p_token1 => G_COL_NAME_TOKEN,

Line 3895: OKL_API.set_message( p_app_name => 'OKC',

3891:
3892: IF l_quantity < 0 THEN
3893: x_return_status := OKL_API.G_RET_STS_ERROR;
3894: -- Quantity is invalid
3895: OKL_API.set_message( p_app_name => 'OKC',
3896: p_msg_name => G_INVALID_VALUE,
3897: p_token1 => G_COL_NAME_TOKEN,
3898: p_token1_value => 'ASSET_RETURN_QUANTITY');
3899: RAISE okc_api.G_EXCEPTION_ERROR;

Line 3913: x_return_status := OKL_API.G_RET_STS_ERROR;

3909: -- get the deal type from the contract
3910: OPEN l_dealtype_csr(l_kle_id);
3911: FETCH l_dealtype_csr INTO l_chr_id, l_deal_type, l_contract_number;
3912: IF l_dealtype_csr%NOTFOUND THEN
3913: x_return_status := OKL_API.G_RET_STS_ERROR;
3914: -- chr id is invalid
3915: OKC_API.set_message( p_app_name => 'OKC',
3916: p_msg_name => G_INVALID_VALUE,
3917: p_token1 => G_COL_NAME_TOKEN,

Line 3943: IF l_rulv_rec.rule_information1 IS NULL OR l_rulv_rec.rule_information1 = OKL_API.G_MISS_CHAR THEN

3939: RAISE OKC_API.G_EXCEPTION_ERROR;
3940: END IF;
3941:
3942: -- check if tax owner is defined
3943: IF l_rulv_rec.rule_information1 IS NULL OR l_rulv_rec.rule_information1 = OKL_API.G_MISS_CHAR THEN
3944:
3945: x_return_status := OKL_API.G_RET_STS_ERROR;
3946: -- tax owner is not defined for contract CONTRACT_NUMBER.
3947: OKL_API.set_message( p_app_name => 'OKL',

Line 3945: x_return_status := OKL_API.G_RET_STS_ERROR;

3941:
3942: -- check if tax owner is defined
3943: IF l_rulv_rec.rule_information1 IS NULL OR l_rulv_rec.rule_information1 = OKL_API.G_MISS_CHAR THEN
3944:
3945: x_return_status := OKL_API.G_RET_STS_ERROR;
3946: -- tax owner is not defined for contract CONTRACT_NUMBER.
3947: OKL_API.set_message( p_app_name => 'OKL',
3948: p_msg_name => 'OKL_AM_NO_TAX_OWNER',
3949: p_token1 => 'CONTRACT_NUMBER',

Line 3947: OKL_API.set_message( p_app_name => 'OKL',

3943: IF l_rulv_rec.rule_information1 IS NULL OR l_rulv_rec.rule_information1 = OKL_API.G_MISS_CHAR THEN
3944:
3945: x_return_status := OKL_API.G_RET_STS_ERROR;
3946: -- tax owner is not defined for contract CONTRACT_NUMBER.
3947: OKL_API.set_message( p_app_name => 'OKL',
3948: p_msg_name => 'OKL_AM_NO_TAX_OWNER',
3949: p_token1 => 'CONTRACT_NUMBER',
3950: p_token1_value => l_contract_number);
3951: RAISE OKC_API.G_EXCEPTION_ERROR;

Line 3964: x_return_status := OKL_API.G_RET_STS_ERROR;

3960: FETCH l_linesfullv_csr INTO l_name, l_residual_value;
3961: CLOSE l_linesfullv_csr;
3962:
3963: IF l_residual_value IS NULL THEN
3964: x_return_status := OKL_API.G_RET_STS_ERROR;
3965: -- Residual value is not defined for the asset
3966: OKC_API.set_message( p_app_name => 'OKL',
3967: p_msg_name => 'OKL_AM_NO_RESIDUAL_VALUE',
3968: p_token1 => 'ASSET_NUMBER',

Line 3976: x_return_status := OKL_API.G_RET_STS_ERROR;

3972: RAISE OKC_API.G_EXCEPTION_ERROR;
3973: END IF;
3974:
3975: IF l_residual_value < 0 THEN
3976: x_return_status := OKL_API.G_RET_STS_ERROR;
3977: -- Residual value is negative for the asset
3978: OKC_API.set_message( p_app_name => 'OKL',
3979: p_msg_name => 'OKL_AM_INVALID_RESIDUAL',
3980: p_token1 => 'ASSET_NUMBER',

Line 4019: x_return_status := OKL_API.G_RET_STS_ERROR;

4015: l_delta_cost := l_residual_value - l_okxassetlines_rec.cost;
4016:
4017: --SECHAWLA 10-FEB-06 5016156 begin
4018: ELSIF l_trx_status IN ('ENTERED','ERROR') THEN -- if any trx has this status
4019: x_return_status := OKL_API.G_RET_STS_ERROR;
4020: OKL_API.set_message( p_app_name => 'OKL',
4021: p_msg_name => 'OKL_AM_PENDING_OFFLEASE',
4022: p_token1 => 'ASSET_NUMBER',
4023: p_token1_value => l_name);

Line 4020: OKL_API.set_message( p_app_name => 'OKL',

4016:
4017: --SECHAWLA 10-FEB-06 5016156 begin
4018: ELSIF l_trx_status IN ('ENTERED','ERROR') THEN -- if any trx has this status
4019: x_return_status := OKL_API.G_RET_STS_ERROR;
4020: OKL_API.set_message( p_app_name => 'OKL',
4021: p_msg_name => 'OKL_AM_PENDING_OFFLEASE',
4022: p_token1 => 'ASSET_NUMBER',
4023: p_token1_value => l_name);
4024: RAISE OKC_API.G_EXCEPTION_ERROR;

Line 4043: x_return_status := OKL_API.G_RET_STS_ERROR;

4039: -- IF fa_cache_pkg.fazcbc_record.fiscal_year_name IS NULL THEN
4040: OPEN l_bookcontrols_csr(l_okxassetlines_rec.book_type_code);
4041: FETCH l_bookcontrols_csr INTO l_fiscal_year_name;
4042: IF l_bookcontrols_csr%NOTFOUND OR l_fiscal_year_name IS NULL THEN
4043: x_return_status := OKL_API.G_RET_STS_ERROR;
4044: -- Fiscal Year Name is required
4045: OKC_API.set_message( p_app_name => 'OKC',
4046: p_msg_name => G_REQUIRED_VALUE,
4047: p_token1 => G_COL_NAME_TOKEN,

Line 4067: OKL_API.set_message(

4063: ) THEN
4064:
4065: x_return_status := OKC_API.G_RET_STS_ERROR;
4066: --Error getting current open period for the book BOOK_TYPE_CODE.
4067: OKL_API.set_message(
4068: p_app_name => 'OKL',
4069: p_msg_name => 'OKL_AM_OPEN_PERIOD_ERR',
4070: p_token1 => 'BOOK_CLASS',
4071: p_token1_value => lower(l_okxassetlines_rec.book_class),

Line 4096: OKL_API.set_message( p_app_name => 'OKL',

4092: -- Can nor retire asset ASSET_NUMBER as the asset was added to the book
4093: -- in the current open period. Please retire the asset manually.
4094: x_return_status := OKC_API.G_RET_STS_ERROR;
4095:
4096: OKL_API.set_message( p_app_name => 'OKL',
4097: p_msg_name => 'OKL_AM_RETIRE_MANUALLY',
4098: p_token1 => 'ASSET_NUMBER',
4099: p_token1_value => l_okxassetlines_rec.asset_number,
4100: p_token2 => 'BOOK_CLASS',

Line 4114: x_return_status := OKL_API.G_RET_STS_ERROR;

4110:
4111: /* -- ansethur for Bug:5664106 Start
4112: -- SECHAWLA 03-JUN-03 Bug 2999419 : Added the following validation
4113: IF l_okxassetlines_rec.prorate_convention_code IS NULL THEN
4114: x_return_status := OKL_API.G_RET_STS_ERROR;
4115: -- Unable to find retirement prorate convention for asset ASSET_NUMBER and book BOOK_TYPE_CODE.
4116: OKC_API.set_message( p_app_name => 'OKL',
4117: p_msg_name => 'OKL_AM_NO_PRORATE_CONVENTION',
4118: p_token1 => 'ASSET_NUMBER',

Line 4233: -- x_return_status := OKL_API.G_RET_STS_ERROR;

4229: -- assigned to all the distributions.
4230:
4231:
4232: IF l_dist_quantity > 0 THEN -- quantity to be retired (for non-retired distributions)
4233: -- x_return_status := OKL_API.G_RET_STS_ERROR;
4234: -- Sold quantity is more than the total quantity assigned to asset distributions.
4235: OKC_API.set_message( p_app_name => 'OKL',
4236: p_msg_name => 'OKL_AM_INVALID_DIST_QTY');
4237: --RAISE okc_api.G_EXCEPTION_ERROR;

Line 4341: -- x_return_status := OKL_API.G_RET_STS_ERROR;

4337:
4338: l_units_retired := l_units_to_be_retired;
4339:
4340: ELSIF l_retired_quantity > l_quantity AND l_non_retired_quantity = 0 THEN
4341: -- x_return_status := OKL_API.G_RET_STS_ERROR;
4342: -- Asset ASSET_NUMBER is already retired with invalid retired quantity which is more than the original quantity.
4343: OKC_API.set_message( p_app_name => 'OKL',
4344: p_msg_name => 'OKL_AM_INVALID_RETIRED_QTY',
4345: p_token1 => 'ASSET_NUMBER',

Line 4397: -- x_return_status := OKL_API.G_RET_STS_ERROR;

4393: -- assigned to all the distributions.
4394:
4395: IF l_dist_quantity > 0 THEN
4396: IF l_retired_quantity < l_dist_quantity THEN
4397: -- x_return_status := OKL_API.G_RET_STS_ERROR;
4398: -- Sold quantity is more than the total quantity assigned to asset distributions.
4399: OKC_API.set_message( p_app_name => 'OKL',
4400: p_msg_name => 'OKL_AM_INVALID_DIST_QTY');
4401: -- RAISE okc_api.G_EXCEPTION_ERROR;

Line 4687: IF x_return_status <> OKL_API.G_RET_STS_SUCCESS THEN

4683: p_try_name => l_trx_type,
4684: x_return_status => x_return_status,
4685: x_try_id => l_try_id);
4686:
4687: IF x_return_status <> OKL_API.G_RET_STS_SUCCESS THEN
4688: -- Unable to find a transaction type for this transaction.
4689: OKL_API.set_message(p_app_name => 'OKL',
4690: p_msg_name => 'OKL_AM_NO_TRX_TYPE_FOUND',
4691: p_token1 => 'TRY_NAME',

Line 4689: OKL_API.set_message(p_app_name => 'OKL',

4685: x_try_id => l_try_id);
4686:
4687: IF x_return_status <> OKL_API.G_RET_STS_SUCCESS THEN
4688: -- Unable to find a transaction type for this transaction.
4689: OKL_API.set_message(p_app_name => 'OKL',
4690: p_msg_name => 'OKL_AM_NO_TRX_TYPE_FOUND',
4691: p_token1 => 'TRY_NAME',
4692: p_token1_value => 'Asset Disposition');
4693: RAISE OKC_API.G_EXCEPTION_ERROR;

Line 4990: RAISE okl_api.g_exception_unexpected_error;

4986: x_msg_data => x_msg_data);
4987:
4988: IF (x_return_status = okc_api.g_ret_sts_unexp_error)
4989: THEN
4990: RAISE okl_api.g_exception_unexpected_error;
4991: ELSIF (x_return_status = okc_api.g_ret_sts_error)
4992: THEN
4993: RAISE okl_api.g_exception_error;
4994: END IF;

Line 4993: RAISE okl_api.g_exception_error;

4989: THEN
4990: RAISE okl_api.g_exception_unexpected_error;
4991: ELSIF (x_return_status = okc_api.g_ret_sts_error)
4992: THEN
4993: RAISE okl_api.g_exception_error;
4994: END IF;
4995: END LOOP;
4996: END IF;
4997: --akrangan added for sla populate sources cr end

Line 5227: l_return_status := OKL_API.START_ACTIVITY(l_api_name,

5223: FROM fa_retirements
5224: WHERE retirement_id = p_retirement_id;
5225:
5226: BEGIN
5227: l_return_status := OKL_API.START_ACTIVITY(l_api_name,
5228: G_PKG_NAME,
5229: p_init_msg_list,
5230: l_api_version,
5231: p_api_version,

Line 5241: IF p_retirement_id IS NULL OR p_retirement_id = OKL_API.G_MISS_NUM THEN

5237: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
5238: RAISE OKC_API.G_EXCEPTION_ERROR;
5239: END IF;
5240:
5241: IF p_retirement_id IS NULL OR p_retirement_id = OKL_API.G_MISS_NUM THEN
5242: x_return_status := OKL_API.G_RET_STS_ERROR;
5243: -- retirement id is required
5244: OKC_API.set_message( p_app_name => 'OKC',
5245: p_msg_name => G_REQUIRED_VALUE,

Line 5242: x_return_status := OKL_API.G_RET_STS_ERROR;

5238: RAISE OKC_API.G_EXCEPTION_ERROR;
5239: END IF;
5240:
5241: IF p_retirement_id IS NULL OR p_retirement_id = OKL_API.G_MISS_NUM THEN
5242: x_return_status := OKL_API.G_RET_STS_ERROR;
5243: -- retirement id is required
5244: OKC_API.set_message( p_app_name => 'OKC',
5245: p_msg_name => G_REQUIRED_VALUE,
5246: p_token1 => G_COL_NAME_TOKEN,

Line 5256: x_return_status := OKL_API.G_RET_STS_ERROR;

5252:
5253: OPEN l_faretirement_csr(p_retirement_id);
5254: FETCH l_faretirement_csr INTO l_dummy;
5255: IF l_faretirement_csr%NOTFOUND THEN
5256: x_return_status := OKL_API.G_RET_STS_ERROR;
5257: -- retirement id is invalid
5258: OKC_API.set_message( p_app_name => 'OKC',
5259: p_msg_name => G_INVALID_VALUE,
5260: p_token1 => G_COL_NAME_TOKEN,

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

5401: l_instance_rec instance_rec;
5402: l_txn_rec transaction_rec;
5403: l_instance_id_lst id_tbl;
5404:
5405: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
5406: l_overall_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
5407:
5408: l_api_name CONSTANT VARCHAR2(30) := 'expire_item';
5409: l_api_version CONSTANT NUMBER := 1;

Line 5406: l_overall_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;

5402: l_txn_rec transaction_rec;
5403: l_instance_id_lst id_tbl;
5404:
5405: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
5406: l_overall_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
5407:
5408: l_api_name CONSTANT VARCHAR2(30) := 'expire_item';
5409: l_api_version CONSTANT NUMBER := 1;
5410: l_msg_count NUMBER := FND_API.G_MISS_NUM;

Line 5419: l_return_status := OKL_API.START_ACTIVITY (

5415: -- ***************************************************************
5416: -- Check API version, initialize message list and create savepoint
5417: -- ***************************************************************
5418:
5419: l_return_status := OKL_API.START_ACTIVITY (
5420: l_api_name,
5421: G_PKG_NAME,
5422: p_init_msg_list,
5423: l_api_version,

Line 5428: IF l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN

5424: p_api_version,
5425: '_PVT',
5426: x_return_status);
5427:
5428: IF l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5429: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5430: ELSIF l_return_status = OKL_API.G_RET_STS_ERROR THEN
5431: RAISE OKL_API.G_EXCEPTION_ERROR;
5432: END IF;

Line 5429: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

5425: '_PVT',
5426: x_return_status);
5427:
5428: IF l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5429: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5430: ELSIF l_return_status = OKL_API.G_RET_STS_ERROR THEN
5431: RAISE OKL_API.G_EXCEPTION_ERROR;
5432: END IF;
5433:

Line 5430: ELSIF l_return_status = OKL_API.G_RET_STS_ERROR THEN

5426: x_return_status);
5427:
5428: IF l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5429: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5430: ELSIF l_return_status = OKL_API.G_RET_STS_ERROR THEN
5431: RAISE OKL_API.G_EXCEPTION_ERROR;
5432: END IF;
5433:
5434: -- ************************

Line 5431: RAISE OKL_API.G_EXCEPTION_ERROR;

5427:
5428: IF l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5429: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5430: ELSIF l_return_status = OKL_API.G_RET_STS_ERROR THEN
5431: RAISE OKL_API.G_EXCEPTION_ERROR;
5432: END IF;
5433:
5434: -- ************************
5435: -- Get Item Instance record

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

5452: x_return_status => l_return_status,
5453: x_msg_count => l_msg_count,
5454: x_msg_data => l_msg_data);
5455:
5456: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
5457: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5458: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
5459: RAISE OKL_API.G_EXCEPTION_ERROR;
5460: ELSIF (NVL (l_instance_header_tbl.COUNT, 0) <> 1) THEN

Line 5457: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

5453: x_msg_count => l_msg_count,
5454: x_msg_data => l_msg_data);
5455:
5456: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
5457: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5458: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
5459: RAISE OKL_API.G_EXCEPTION_ERROR;
5460: ELSIF (NVL (l_instance_header_tbl.COUNT, 0) <> 1) THEN
5461: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

Line 5458: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN

5454: x_msg_data => l_msg_data);
5455:
5456: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
5457: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5458: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
5459: RAISE OKL_API.G_EXCEPTION_ERROR;
5460: ELSIF (NVL (l_instance_header_tbl.COUNT, 0) <> 1) THEN
5461: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5462: END IF;

Line 5459: RAISE OKL_API.G_EXCEPTION_ERROR;

5455:
5456: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
5457: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5458: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
5459: RAISE OKL_API.G_EXCEPTION_ERROR;
5460: ELSIF (NVL (l_instance_header_tbl.COUNT, 0) <> 1) THEN
5461: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5462: END IF;
5463:

Line 5461: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

5457: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5458: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
5459: RAISE OKL_API.G_EXCEPTION_ERROR;
5460: ELSIF (NVL (l_instance_header_tbl.COUNT, 0) <> 1) THEN
5461: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5462: END IF;
5463:
5464: -- *************************************
5465: -- Initialize parameters to be passed in

Line 5494: IF l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN

5490: x_return_status => l_return_status,
5491: x_msg_count => l_msg_count,
5492: x_msg_data => l_msg_data);
5493:
5494: IF l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5495: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5496: ELSIF l_return_status = OKL_API.G_RET_STS_ERROR THEN
5497: RAISE OKL_API.G_EXCEPTION_ERROR;
5498: END IF;

Line 5495: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

5491: x_msg_count => l_msg_count,
5492: x_msg_data => l_msg_data);
5493:
5494: IF l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5495: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5496: ELSIF l_return_status = OKL_API.G_RET_STS_ERROR THEN
5497: RAISE OKL_API.G_EXCEPTION_ERROR;
5498: END IF;
5499:

Line 5496: ELSIF l_return_status = OKL_API.G_RET_STS_ERROR THEN

5492: x_msg_data => l_msg_data);
5493:
5494: IF l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5495: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5496: ELSIF l_return_status = OKL_API.G_RET_STS_ERROR THEN
5497: RAISE OKL_API.G_EXCEPTION_ERROR;
5498: END IF;
5499:
5500: -- **************

Line 5497: RAISE OKL_API.G_EXCEPTION_ERROR;

5493:
5494: IF l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5495: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5496: ELSIF l_return_status = OKL_API.G_RET_STS_ERROR THEN
5497: RAISE OKL_API.G_EXCEPTION_ERROR;
5498: END IF;
5499:
5500: -- **************
5501: -- Return results

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

5502: -- **************
5503:
5504: x_return_status := l_overall_status;
5505:
5506: OKL_API.END_ACTIVITY (x_msg_count, x_msg_data);
5507:
5508: EXCEPTION
5509:
5510: WHEN OKL_API.G_EXCEPTION_ERROR THEN

Line 5510: WHEN OKL_API.G_EXCEPTION_ERROR THEN

5506: OKL_API.END_ACTIVITY (x_msg_count, x_msg_data);
5507:
5508: EXCEPTION
5509:
5510: WHEN OKL_API.G_EXCEPTION_ERROR THEN
5511: x_return_status := OKL_API.HANDLE_EXCEPTIONS
5512: (
5513: l_api_name,
5514: G_PKG_NAME,

Line 5511: x_return_status := OKL_API.HANDLE_EXCEPTIONS

5507:
5508: EXCEPTION
5509:
5510: WHEN OKL_API.G_EXCEPTION_ERROR THEN
5511: x_return_status := OKL_API.HANDLE_EXCEPTIONS
5512: (
5513: l_api_name,
5514: G_PKG_NAME,
5515: 'OKL_API.G_RET_STS_ERROR',

Line 5515: 'OKL_API.G_RET_STS_ERROR',

5511: x_return_status := OKL_API.HANDLE_EXCEPTIONS
5512: (
5513: l_api_name,
5514: G_PKG_NAME,
5515: 'OKL_API.G_RET_STS_ERROR',
5516: x_msg_count,
5517: x_msg_data,
5518: '_PVT'
5519: );

Line 5521: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN

5517: x_msg_data,
5518: '_PVT'
5519: );
5520:
5521: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
5522: x_return_status :=OKL_API.HANDLE_EXCEPTIONS
5523: (
5524: l_api_name,
5525: G_PKG_NAME,

Line 5522: x_return_status :=OKL_API.HANDLE_EXCEPTIONS

5518: '_PVT'
5519: );
5520:
5521: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
5522: x_return_status :=OKL_API.HANDLE_EXCEPTIONS
5523: (
5524: l_api_name,
5525: G_PKG_NAME,
5526: 'OKL_API.G_RET_STS_UNEXP_ERROR',

Line 5526: 'OKL_API.G_RET_STS_UNEXP_ERROR',

5522: x_return_status :=OKL_API.HANDLE_EXCEPTIONS
5523: (
5524: l_api_name,
5525: G_PKG_NAME,
5526: 'OKL_API.G_RET_STS_UNEXP_ERROR',
5527: x_msg_count,
5528: x_msg_data,
5529: '_PVT'
5530: );

Line 5534: x_return_status :=OKL_API.HANDLE_EXCEPTIONS

5530: );
5531:
5532: WHEN OTHERS THEN
5533:
5534: x_return_status :=OKL_API.HANDLE_EXCEPTIONS
5535: (
5536: l_api_name,
5537: G_PKG_NAME,
5538: 'OTHERS',