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 1971: l_return_status := OKL_API.START_ACTIVITY(l_api_name,

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

Line 1990: AND p_quote_eff_date <> OKL_API.G_MISS_DATE THEN

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

Line 2002: AND p_quote_accpt_date <> OKL_API.G_MISS_DATE THEN

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

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

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

Line 2013: x_return_status := OKL_API.G_RET_STS_ERROR;

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

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

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

Line 2038: x_return_status := OKL_API.G_RET_STS_ERROR;

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

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

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

Line 2057: x_return_status := OKL_API.G_RET_STS_ERROR;

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

Line 2072: x_return_status := OKL_API.G_RET_STS_ERROR;

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

Line 2086: x_return_status := OKL_API.G_RET_STS_ERROR;

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

Line 2097: x_return_status := OKL_API.G_RET_STS_ERROR;

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

Line 2111: x_return_status := OKL_API.G_RET_STS_ERROR;

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

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

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

Line 2143: x_return_status := OKL_API.G_RET_STS_ERROR;

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

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

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

Line 2162: x_return_status := OKL_API.G_RET_STS_ERROR;

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

Line 2200: x_return_status := OKL_API.G_RET_STS_ERROR;

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

Line 2241: x_return_status := OKL_API.G_RET_STS_ERROR;

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

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

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

Line 2269: x_return_status := OKL_API.G_RET_STS_ERROR;

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

Line 2293: OKL_API.set_message(

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

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

2321: -- Can nor retire asset ASSET_NUMBER as the asset was added to the book
2322: -- in the current open period. Please retire the asset manually.
2323: x_return_status := OKC_API.G_RET_STS_ERROR;
2324:
2325: OKL_API.set_message( p_app_name => 'OKL',
2326: p_msg_name => 'OKL_AM_RETIRE_MANUALLY',
2327: p_token1 => 'ASSET_NUMBER',
2328: p_token1_value => l_okxassetlines_rec.asset_number,
2329: p_token2 => 'BOOK_CLASS',

Line 2342: x_return_status := OKL_API.G_RET_STS_ERROR;

2338:
2339: /* ansethur for bug 5664106 -- start
2340: -- SECHAWLA 03-JUN-03 Bug 2999419: Added the following validation
2341: IF l_okxassetlines_rec.prorate_convention_code IS NULL THEN
2342: x_return_status := OKL_API.G_RET_STS_ERROR;
2343: -- Unable to find retirement prorate convention for asset ASSET_NUMBER and book BOOK_TYPE_CODE.
2344: OKC_API.set_message( p_app_name => 'OKL',
2345: p_msg_name => 'OKL_AM_NO_PRORATE_CONVENTION',
2346: p_token1 => 'ASSET_NUMBER',

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

2357:
2358: ---------- SECHAWLA 05-FEB-03 Bug # 2781557 : end moved code ----------------
2359:
2360:
2361: IF p_quantity IS NULL OR p_quantity = OKL_API.G_MISS_NUM OR p_quantity = l_okxassetlines_rec.current_units THEN
2362: -- user sent request for full retirement
2363:
2364: -- check if asset has already been fully/partially retired .
2365: l_retired_quantity := 0;

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

2466: -- assigned to all the distributions.
2467:
2468:
2469: IF l_dist_quantity > 0 THEN -- quantity to be retired (for non-retired distributions)
2470: -- x_return_status := OKL_API.G_RET_STS_ERROR;
2471: -- Sold quantity is more than the total quantity assigned to asset distributions.
2472: OKC_API.set_message( p_app_name => 'OKL',
2473: p_msg_name => 'OKL_AM_INVALID_DIST_QTY');
2474: --RAISE okc_api.G_EXCEPTION_ERROR;

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

2581: END IF;
2582:
2583: l_units_retired := l_units_to_be_retired;
2584: ELSIF l_retired_quantity > l_okxassetlines_rec.current_units AND l_non_retired_quantity = 0 THEN
2585: -- x_return_status := OKL_API.G_RET_STS_ERROR;
2586: -- Asset ASSET_NUMBER is already retired with invalid retired quantity which is more than the original quantity.
2587: OKC_API.set_message( p_app_name => 'OKL',
2588: p_msg_name => 'OKL_AM_INVALID_RETIRED_QTY',
2589: p_token1 => 'ASSET_NUMBER',

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

2633: -- assigned to non-retired distributions.
2634:
2635: IF l_dist_quantity > 0 THEN
2636: IF l_retired_quantity < l_dist_quantity THEN
2637: -- x_return_status := OKL_API.G_RET_STS_ERROR;
2638: -- Sold quantity is more than the total quantity assigned to asset distributions.
2639: OKC_API.set_message( p_app_name => 'OKL',
2640: p_msg_name => 'OKL_AM_INVALID_DIST_QTY');
2641: -- RAISE okc_api.G_EXCEPTION_ERROR;

Line 2940: IF x_return_status <> OKL_API.G_RET_STS_SUCCESS THEN

2936: okl_am_util_pvt.get_transaction_id(p_try_name => l_trx_type,
2937: x_return_status => x_return_status,
2938: x_try_id => l_try_id);
2939:
2940: IF x_return_status <> OKL_API.G_RET_STS_SUCCESS THEN
2941: -- Unable to find a transaction type for this transaction.
2942: OKL_API.set_message(p_app_name => 'OKL',
2943: p_msg_name => 'OKL_AM_NO_TRX_TYPE_FOUND',
2944: p_token1 => 'TRY_NAME',

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

2938: x_try_id => l_try_id);
2939:
2940: IF x_return_status <> OKL_API.G_RET_STS_SUCCESS THEN
2941: -- Unable to find a transaction type for this transaction.
2942: OKL_API.set_message(p_app_name => 'OKL',
2943: p_msg_name => 'OKL_AM_NO_TRX_TYPE_FOUND',
2944: p_token1 => 'TRY_NAME',
2945: p_token1_value => 'Asset Disposition');
2946: RAISE OKC_API.G_EXCEPTION_ERROR;

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

3130:
3131: --- Expire item in Installed Base
3132: -- commented call to expire_item djanaswa bug 6736148 start
3133: /*
3134: IF p_quantity IS NULL OR p_quantity = OKL_API.G_MISS_NUM THEN
3135: -- Retire all existing instances
3136: FOR l_itemlocation_rec in l_itemlocation_csr LOOP
3137:
3138: IF l_itemlocation_rec.instance_end_date IS NULL THEN-- Instance is not already expired.

Line 3292: RAISE okl_api.g_exception_unexpected_error;

3288: x_msg_data => x_msg_data);
3289:
3290: IF (x_return_status = okc_api.g_ret_sts_unexp_error)
3291: THEN
3292: RAISE okl_api.g_exception_unexpected_error;
3293: ELSIF (x_return_status = okc_api.g_ret_sts_error)
3294: THEN
3295: RAISE okl_api.g_exception_error;
3296: END IF;

Line 3295: RAISE okl_api.g_exception_error;

3291: THEN
3292: RAISE okl_api.g_exception_unexpected_error;
3293: ELSIF (x_return_status = okc_api.g_ret_sts_error)
3294: THEN
3295: RAISE okl_api.g_exception_error;
3296: END IF;
3297: END LOOP;
3298: END IF;
3299: --akrangan added for sla populate sources cr end

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

3772: --akrangan sla populate sources cr end
3773:
3774: BEGIN
3775:
3776: l_return_status := OKL_API.START_ACTIVITY(l_api_name,
3777: G_PKG_NAME,
3778: p_init_msg_list,
3779: l_api_version,
3780: p_api_version,

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

3790: -- Get the sysdate
3791: SELECT SYSDATE INTO l_sys_date FROM DUAL;
3792:
3793: -- SECHAWLA 21-OCT-04 3924244
3794: IF p_order_line_Id IS NULL OR p_order_line_Id = OKL_API.G_MISS_NUM THEN
3795: x_return_status := OKL_API.G_RET_STS_ERROR;
3796: -- Order Line ID is required
3797: OKL_API.set_message( p_app_name => 'OKC',
3798: p_msg_name => G_REQUIRED_VALUE,

Line 3795: x_return_status := OKL_API.G_RET_STS_ERROR;

3791: SELECT SYSDATE INTO l_sys_date FROM DUAL;
3792:
3793: -- SECHAWLA 21-OCT-04 3924244
3794: IF p_order_line_Id IS NULL OR p_order_line_Id = OKL_API.G_MISS_NUM THEN
3795: x_return_status := OKL_API.G_RET_STS_ERROR;
3796: -- Order Line ID is required
3797: OKL_API.set_message( p_app_name => 'OKC',
3798: p_msg_name => G_REQUIRED_VALUE,
3799: p_token1 => G_COL_NAME_TOKEN,

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

3793: -- SECHAWLA 21-OCT-04 3924244
3794: IF p_order_line_Id IS NULL OR p_order_line_Id = OKL_API.G_MISS_NUM THEN
3795: x_return_status := OKL_API.G_RET_STS_ERROR;
3796: -- Order Line ID is required
3797: OKL_API.set_message( p_app_name => 'OKC',
3798: p_msg_name => G_REQUIRED_VALUE,
3799: p_token1 => G_COL_NAME_TOKEN,
3800: p_token1_value => 'ORDER_LINE_ID');
3801: RAISE okc_api.G_EXCEPTION_ERROR;

Line 3808: x_return_status := OKL_API.G_RET_STS_ERROR;

3804: /* -- SECHAWLA 21-OCT-04 3924244
3805: OPEN l_orderheaders_csr(p_order_header_Id);
3806: FETCH l_orderheaders_csr INTO l_order_number;
3807: IF l_orderheaders_csr%NOTFOUND THEN
3808: x_return_status := OKL_API.G_RET_STS_ERROR;
3809: -- Order Header ID is invalid
3810: OKL_API.set_message( p_app_name => 'OKC',
3811: p_msg_name => G_INVALID_VALUE,
3812: p_token1 => G_COL_NAME_TOKEN,

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

3806: FETCH l_orderheaders_csr INTO l_order_number;
3807: IF l_orderheaders_csr%NOTFOUND THEN
3808: x_return_status := OKL_API.G_RET_STS_ERROR;
3809: -- Order Header ID is invalid
3810: OKL_API.set_message( p_app_name => 'OKC',
3811: p_msg_name => G_INVALID_VALUE,
3812: p_token1 => G_COL_NAME_TOKEN,
3813: p_token1_value => 'ORDER_HEADER_ID');
3814: RAISE okc_api.G_EXCEPTION_ERROR;

Line 3824: x_return_status := OKL_API.G_RET_STS_ERROR;

3820: OPEN l_orderlines_csr(p_order_line_Id);
3821: FETCH l_orderlines_csr INTO l_header_id, l_inventory_item_id, l_ordered_quantity,
3822: l_ship_from_org_id, l_unit_selling_price;
3823: IF l_orderlines_csr%NOTFOUND THEN
3824: x_return_status := OKL_API.G_RET_STS_ERROR;
3825: -- Order Line ID is invalid
3826: OKL_API.set_message( p_app_name => 'OKC',
3827: p_msg_name => G_INVALID_VALUE,
3828: p_token1 => G_COL_NAME_TOKEN,

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

3822: l_ship_from_org_id, l_unit_selling_price;
3823: IF l_orderlines_csr%NOTFOUND THEN
3824: x_return_status := OKL_API.G_RET_STS_ERROR;
3825: -- Order Line ID is invalid
3826: OKL_API.set_message( p_app_name => 'OKC',
3827: p_msg_name => G_INVALID_VALUE,
3828: p_token1 => G_COL_NAME_TOKEN,
3829: p_token1_value => 'ORDER_LINE_ID');
3830: RAISE okc_api.G_EXCEPTION_ERROR;

Line 3847: x_return_status := OKL_API.G_RET_STS_ERROR;

3843:
3844:
3845:
3846: IF l_ordered_quantity < 0 THEN -- SECHAWLA 21-OCT-04 3924244
3847: x_return_status := OKL_API.G_RET_STS_ERROR;
3848: -- ordered quantity is invalid
3849: OKC_API.set_message( p_app_name => 'OKC',
3850: p_msg_name => G_INVALID_VALUE,
3851: p_token1 => G_COL_NAME_TOKEN,

Line 3859: x_return_status := OKL_API.G_RET_STS_ERROR;

3855: RAISE OKC_API.G_EXCEPTION_ERROR;
3856: END IF;
3857:
3858: IF trunc(l_ordered_quantity) <> l_ordered_quantity THEN -- SECHAWLA 21-OCT-04 3924244
3859: x_return_status := OKL_API.G_RET_STS_ERROR;
3860: -- Ordered quantity should be a whole number.
3861: OKC_API.set_message( p_app_name => 'OKL',
3862: p_msg_name => 'OKL_AM_WHOLE_QTY_ERR');
3863: RAISE OKC_API.G_EXCEPTION_ERROR;

Line 3873: x_return_status := OKL_API.G_RET_STS_ERROR;

3869: FETCH l_assetreturn_csr INTO l_kle_id, l_quantity, l_legal_entity_id; -- RRAVIKIR legal_entity_id added to the Fetch cursor
3870:
3871:
3872: IF l_assetreturn_csr%NOTFOUND THEN
3873: x_return_status := OKL_API.G_RET_STS_ERROR;
3874: -- Inventory Item for the order ORDER_NUMBER is not defined in Asset Returns.
3875: OKL_API.set_message( p_app_name => 'OKL',
3876: p_msg_name => 'OKL_AM_NO_ASSET_RETURN',
3877: p_token1 => 'ORDER_NUMBER',

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

3871:
3872: IF l_assetreturn_csr%NOTFOUND THEN
3873: x_return_status := OKL_API.G_RET_STS_ERROR;
3874: -- Inventory Item for the order ORDER_NUMBER is not defined in Asset Returns.
3875: OKL_API.set_message( p_app_name => 'OKL',
3876: p_msg_name => 'OKL_AM_NO_ASSET_RETURN',
3877: p_token1 => 'ORDER_NUMBER',
3878: p_token1_value => l_order_number);
3879: RAISE okc_api.G_EXCEPTION_ERROR;

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

3878: p_token1_value => l_order_number);
3879: RAISE okc_api.G_EXCEPTION_ERROR;
3880: END IF;
3881:
3882: IF l_quantity IS NULL OR l_quantity = OKL_API.G_MISS_NUM THEN
3883: x_return_status := OKL_API.G_RET_STS_ERROR;
3884: -- Quantity is required
3885: OKL_API.set_message( p_app_name => 'OKC',
3886: p_msg_name => G_REQUIRED_VALUE,

Line 3883: x_return_status := OKL_API.G_RET_STS_ERROR;

3879: RAISE okc_api.G_EXCEPTION_ERROR;
3880: END IF;
3881:
3882: IF l_quantity IS NULL OR l_quantity = OKL_API.G_MISS_NUM THEN
3883: x_return_status := OKL_API.G_RET_STS_ERROR;
3884: -- Quantity is required
3885: OKL_API.set_message( p_app_name => 'OKC',
3886: p_msg_name => G_REQUIRED_VALUE,
3887: p_token1 => G_COL_NAME_TOKEN,

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

3881:
3882: IF l_quantity IS NULL OR l_quantity = OKL_API.G_MISS_NUM THEN
3883: x_return_status := OKL_API.G_RET_STS_ERROR;
3884: -- Quantity is required
3885: OKL_API.set_message( p_app_name => 'OKC',
3886: p_msg_name => G_REQUIRED_VALUE,
3887: p_token1 => G_COL_NAME_TOKEN,
3888: p_token1_value => 'ASSET_RETURN_QUANTITY');
3889: RAISE okc_api.G_EXCEPTION_ERROR;

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

3890: END IF;
3891:
3892: -- RRAVIKIR Legal Entity Changes
3893: IF (l_legal_entity_id is null or l_legal_entity_id = OKC_API.G_MISS_NUM) THEN
3894: OKL_API.SET_MESSAGE(p_app_name => g_app_name,
3895: p_msg_name => g_required_value,
3896: p_token1 => g_col_name_token,
3897: p_token1_value => 'legal_entity_id');
3898: RAISE OKC_API.G_EXCEPTION_ERROR;

Line 3903: x_return_status := OKL_API.G_RET_STS_ERROR;

3899: END IF;
3900: -- Legal Entity Changes End
3901:
3902: IF l_quantity < 0 THEN
3903: x_return_status := OKL_API.G_RET_STS_ERROR;
3904: -- Quantity is invalid
3905: OKL_API.set_message( p_app_name => 'OKC',
3906: p_msg_name => G_INVALID_VALUE,
3907: p_token1 => G_COL_NAME_TOKEN,

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

3901:
3902: IF l_quantity < 0 THEN
3903: x_return_status := OKL_API.G_RET_STS_ERROR;
3904: -- Quantity is invalid
3905: OKL_API.set_message( p_app_name => 'OKC',
3906: p_msg_name => G_INVALID_VALUE,
3907: p_token1 => G_COL_NAME_TOKEN,
3908: p_token1_value => 'ASSET_RETURN_QUANTITY');
3909: RAISE okc_api.G_EXCEPTION_ERROR;

Line 3923: x_return_status := OKL_API.G_RET_STS_ERROR;

3919: -- get the deal type from the contract
3920: OPEN l_dealtype_csr(l_kle_id);
3921: FETCH l_dealtype_csr INTO l_chr_id, l_deal_type, l_contract_number;
3922: IF l_dealtype_csr%NOTFOUND THEN
3923: x_return_status := OKL_API.G_RET_STS_ERROR;
3924: -- chr id is invalid
3925: OKC_API.set_message( p_app_name => 'OKC',
3926: p_msg_name => G_INVALID_VALUE,
3927: p_token1 => G_COL_NAME_TOKEN,

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

3949: RAISE OKC_API.G_EXCEPTION_ERROR;
3950: END IF;
3951:
3952: -- check if tax owner is defined
3953: IF l_rulv_rec.rule_information1 IS NULL OR l_rulv_rec.rule_information1 = OKL_API.G_MISS_CHAR THEN
3954:
3955: x_return_status := OKL_API.G_RET_STS_ERROR;
3956: -- tax owner is not defined for contract CONTRACT_NUMBER.
3957: OKL_API.set_message( p_app_name => 'OKL',

Line 3955: x_return_status := OKL_API.G_RET_STS_ERROR;

3951:
3952: -- check if tax owner is defined
3953: IF l_rulv_rec.rule_information1 IS NULL OR l_rulv_rec.rule_information1 = OKL_API.G_MISS_CHAR THEN
3954:
3955: x_return_status := OKL_API.G_RET_STS_ERROR;
3956: -- tax owner is not defined for contract CONTRACT_NUMBER.
3957: OKL_API.set_message( p_app_name => 'OKL',
3958: p_msg_name => 'OKL_AM_NO_TAX_OWNER',
3959: p_token1 => 'CONTRACT_NUMBER',

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

3953: IF l_rulv_rec.rule_information1 IS NULL OR l_rulv_rec.rule_information1 = OKL_API.G_MISS_CHAR THEN
3954:
3955: x_return_status := OKL_API.G_RET_STS_ERROR;
3956: -- tax owner is not defined for contract CONTRACT_NUMBER.
3957: OKL_API.set_message( p_app_name => 'OKL',
3958: p_msg_name => 'OKL_AM_NO_TAX_OWNER',
3959: p_token1 => 'CONTRACT_NUMBER',
3960: p_token1_value => l_contract_number);
3961: RAISE OKC_API.G_EXCEPTION_ERROR;

Line 3974: x_return_status := OKL_API.G_RET_STS_ERROR;

3970: FETCH l_linesfullv_csr INTO l_name, l_residual_value;
3971: CLOSE l_linesfullv_csr;
3972:
3973: IF l_residual_value IS NULL THEN
3974: x_return_status := OKL_API.G_RET_STS_ERROR;
3975: -- Residual value is not defined for the asset
3976: OKC_API.set_message( p_app_name => 'OKL',
3977: p_msg_name => 'OKL_AM_NO_RESIDUAL_VALUE',
3978: p_token1 => 'ASSET_NUMBER',

Line 3986: x_return_status := OKL_API.G_RET_STS_ERROR;

3982: RAISE OKC_API.G_EXCEPTION_ERROR;
3983: END IF;
3984:
3985: IF l_residual_value < 0 THEN
3986: x_return_status := OKL_API.G_RET_STS_ERROR;
3987: -- Residual value is negative for the asset
3988: OKC_API.set_message( p_app_name => 'OKL',
3989: p_msg_name => 'OKL_AM_INVALID_RESIDUAL',
3990: p_token1 => 'ASSET_NUMBER',

Line 4030: x_return_status := OKL_API.G_RET_STS_ERROR;

4026: l_delta_cost := l_residual_value - l_okxassetlines_rec.cost;
4027:
4028: --SECHAWLA 10-FEB-06 5016156 begin
4029: ELSIF l_trx_status IN ('ENTERED','ERROR') THEN -- if any trx has this status
4030: x_return_status := OKL_API.G_RET_STS_ERROR;
4031: OKL_API.set_message( p_app_name => 'OKL',
4032: p_msg_name => 'OKL_AM_PENDING_OFFLEASE',
4033: p_token1 => 'ASSET_NUMBER',
4034: p_token1_value => l_name);

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

4027:
4028: --SECHAWLA 10-FEB-06 5016156 begin
4029: ELSIF l_trx_status IN ('ENTERED','ERROR') THEN -- if any trx has this status
4030: x_return_status := OKL_API.G_RET_STS_ERROR;
4031: OKL_API.set_message( p_app_name => 'OKL',
4032: p_msg_name => 'OKL_AM_PENDING_OFFLEASE',
4033: p_token1 => 'ASSET_NUMBER',
4034: p_token1_value => l_name);
4035: RAISE OKC_API.G_EXCEPTION_ERROR;

Line 4054: x_return_status := OKL_API.G_RET_STS_ERROR;

4050: -- IF fa_cache_pkg.fazcbc_record.fiscal_year_name IS NULL THEN
4051: OPEN l_bookcontrols_csr(l_okxassetlines_rec.book_type_code);
4052: FETCH l_bookcontrols_csr INTO l_fiscal_year_name;
4053: IF l_bookcontrols_csr%NOTFOUND OR l_fiscal_year_name IS NULL THEN
4054: x_return_status := OKL_API.G_RET_STS_ERROR;
4055: -- Fiscal Year Name is required
4056: OKC_API.set_message( p_app_name => 'OKC',
4057: p_msg_name => G_REQUIRED_VALUE,
4058: p_token1 => G_COL_NAME_TOKEN,

Line 4078: OKL_API.set_message(

4074: ) THEN
4075:
4076: x_return_status := OKC_API.G_RET_STS_ERROR;
4077: --Error getting current open period for the book BOOK_TYPE_CODE.
4078: OKL_API.set_message(
4079: p_app_name => 'OKL',
4080: p_msg_name => 'OKL_AM_OPEN_PERIOD_ERR',
4081: p_token1 => 'BOOK_CLASS',
4082: p_token1_value => lower(l_okxassetlines_rec.book_class),

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

4106: -- Can nor retire asset ASSET_NUMBER as the asset was added to the book
4107: -- in the current open period. Please retire the asset manually.
4108: x_return_status := OKC_API.G_RET_STS_ERROR;
4109:
4110: OKL_API.set_message( p_app_name => 'OKL',
4111: p_msg_name => 'OKL_AM_RETIRE_MANUALLY',
4112: p_token1 => 'ASSET_NUMBER',
4113: p_token1_value => l_okxassetlines_rec.asset_number,
4114: p_token2 => 'BOOK_CLASS',

Line 4129: x_return_status := OKL_API.G_RET_STS_ERROR;

4125:
4126: /* -- ansethur for Bug:5664106 Start
4127: -- SECHAWLA 03-JUN-03 Bug 2999419 : Added the following validation
4128: IF l_okxassetlines_rec.prorate_convention_code IS NULL THEN
4129: x_return_status := OKL_API.G_RET_STS_ERROR;
4130: -- Unable to find retirement prorate convention for asset ASSET_NUMBER and book BOOK_TYPE_CODE.
4131: OKC_API.set_message( p_app_name => 'OKL',
4132: p_msg_name => 'OKL_AM_NO_PRORATE_CONVENTION',
4133: p_token1 => 'ASSET_NUMBER',

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

4244: -- assigned to all the distributions.
4245:
4246:
4247: IF l_dist_quantity > 0 THEN -- quantity to be retired (for non-retired distributions)
4248: -- x_return_status := OKL_API.G_RET_STS_ERROR;
4249: -- Sold quantity is more than the total quantity assigned to asset distributions.
4250: OKC_API.set_message( p_app_name => 'OKL',
4251: p_msg_name => 'OKL_AM_INVALID_DIST_QTY');
4252: --RAISE okc_api.G_EXCEPTION_ERROR;

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

4352:
4353: l_units_retired := l_units_to_be_retired;
4354:
4355: ELSIF l_retired_quantity > l_quantity AND l_non_retired_quantity = 0 THEN
4356: -- x_return_status := OKL_API.G_RET_STS_ERROR;
4357: -- Asset ASSET_NUMBER is already retired with invalid retired quantity which is more than the original quantity.
4358: OKC_API.set_message( p_app_name => 'OKL',
4359: p_msg_name => 'OKL_AM_INVALID_RETIRED_QTY',
4360: p_token1 => 'ASSET_NUMBER',

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

4408: -- assigned to all the distributions.
4409:
4410: IF l_dist_quantity > 0 THEN
4411: IF l_retired_quantity < l_dist_quantity THEN
4412: -- x_return_status := OKL_API.G_RET_STS_ERROR;
4413: -- Sold quantity is more than the total quantity assigned to asset distributions.
4414: OKC_API.set_message( p_app_name => 'OKL',
4415: p_msg_name => 'OKL_AM_INVALID_DIST_QTY');
4416: -- RAISE okc_api.G_EXCEPTION_ERROR;

Line 4702: IF x_return_status <> OKL_API.G_RET_STS_SUCCESS THEN

4698: p_try_name => l_trx_type,
4699: x_return_status => x_return_status,
4700: x_try_id => l_try_id);
4701:
4702: IF x_return_status <> OKL_API.G_RET_STS_SUCCESS THEN
4703: -- Unable to find a transaction type for this transaction.
4704: OKL_API.set_message(p_app_name => 'OKL',
4705: p_msg_name => 'OKL_AM_NO_TRX_TYPE_FOUND',
4706: p_token1 => 'TRY_NAME',

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

4700: x_try_id => l_try_id);
4701:
4702: IF x_return_status <> OKL_API.G_RET_STS_SUCCESS THEN
4703: -- Unable to find a transaction type for this transaction.
4704: OKL_API.set_message(p_app_name => 'OKL',
4705: p_msg_name => 'OKL_AM_NO_TRX_TYPE_FOUND',
4706: p_token1 => 'TRY_NAME',
4707: p_token1_value => 'Asset Disposition');
4708: RAISE OKC_API.G_EXCEPTION_ERROR;

Line 5005: RAISE okl_api.g_exception_unexpected_error;

5001: x_msg_data => x_msg_data);
5002:
5003: IF (x_return_status = okc_api.g_ret_sts_unexp_error)
5004: THEN
5005: RAISE okl_api.g_exception_unexpected_error;
5006: ELSIF (x_return_status = okc_api.g_ret_sts_error)
5007: THEN
5008: RAISE okl_api.g_exception_error;
5009: END IF;

Line 5008: RAISE okl_api.g_exception_error;

5004: THEN
5005: RAISE okl_api.g_exception_unexpected_error;
5006: ELSIF (x_return_status = okc_api.g_ret_sts_error)
5007: THEN
5008: RAISE okl_api.g_exception_error;
5009: END IF;
5010: END LOOP;
5011: END IF;
5012: --akrangan added for sla populate sources cr end

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

5238: FROM fa_retirements
5239: WHERE retirement_id = p_retirement_id;
5240:
5241: BEGIN
5242: l_return_status := OKL_API.START_ACTIVITY(l_api_name,
5243: G_PKG_NAME,
5244: p_init_msg_list,
5245: l_api_version,
5246: p_api_version,

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

5252: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
5253: RAISE OKC_API.G_EXCEPTION_ERROR;
5254: END IF;
5255:
5256: IF p_retirement_id IS NULL OR p_retirement_id = OKL_API.G_MISS_NUM THEN
5257: x_return_status := OKL_API.G_RET_STS_ERROR;
5258: -- retirement id is required
5259: OKC_API.set_message( p_app_name => 'OKC',
5260: p_msg_name => G_REQUIRED_VALUE,

Line 5257: x_return_status := OKL_API.G_RET_STS_ERROR;

5253: RAISE OKC_API.G_EXCEPTION_ERROR;
5254: END IF;
5255:
5256: IF p_retirement_id IS NULL OR p_retirement_id = OKL_API.G_MISS_NUM THEN
5257: x_return_status := OKL_API.G_RET_STS_ERROR;
5258: -- retirement id is required
5259: OKC_API.set_message( p_app_name => 'OKC',
5260: p_msg_name => G_REQUIRED_VALUE,
5261: p_token1 => G_COL_NAME_TOKEN,

Line 5271: x_return_status := OKL_API.G_RET_STS_ERROR;

5267:
5268: OPEN l_faretirement_csr(p_retirement_id);
5269: FETCH l_faretirement_csr INTO l_dummy;
5270: IF l_faretirement_csr%NOTFOUND THEN
5271: x_return_status := OKL_API.G_RET_STS_ERROR;
5272: -- retirement id is invalid
5273: OKC_API.set_message( p_app_name => 'OKC',
5274: p_msg_name => G_INVALID_VALUE,
5275: p_token1 => G_COL_NAME_TOKEN,

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

5416: l_instance_rec instance_rec;
5417: l_txn_rec transaction_rec;
5418: l_instance_id_lst id_tbl;
5419:
5420: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
5421: l_overall_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
5422:
5423: l_api_name CONSTANT VARCHAR2(30) := 'expire_item';
5424: l_api_version CONSTANT NUMBER := 1;

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

5417: l_txn_rec transaction_rec;
5418: l_instance_id_lst id_tbl;
5419:
5420: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
5421: l_overall_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
5422:
5423: l_api_name CONSTANT VARCHAR2(30) := 'expire_item';
5424: l_api_version CONSTANT NUMBER := 1;
5425: l_msg_count NUMBER := FND_API.G_MISS_NUM;

Line 5434: l_return_status := OKL_API.START_ACTIVITY (

5430: -- ***************************************************************
5431: -- Check API version, initialize message list and create savepoint
5432: -- ***************************************************************
5433:
5434: l_return_status := OKL_API.START_ACTIVITY (
5435: l_api_name,
5436: G_PKG_NAME,
5437: p_init_msg_list,
5438: l_api_version,

Line 5443: IF l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN

5439: p_api_version,
5440: '_PVT',
5441: x_return_status);
5442:
5443: IF l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5444: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5445: ELSIF l_return_status = OKL_API.G_RET_STS_ERROR THEN
5446: RAISE OKL_API.G_EXCEPTION_ERROR;
5447: END IF;

Line 5444: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

5440: '_PVT',
5441: x_return_status);
5442:
5443: IF l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5444: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5445: ELSIF l_return_status = OKL_API.G_RET_STS_ERROR THEN
5446: RAISE OKL_API.G_EXCEPTION_ERROR;
5447: END IF;
5448:

Line 5445: ELSIF l_return_status = OKL_API.G_RET_STS_ERROR THEN

5441: x_return_status);
5442:
5443: IF l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5444: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5445: ELSIF l_return_status = OKL_API.G_RET_STS_ERROR THEN
5446: RAISE OKL_API.G_EXCEPTION_ERROR;
5447: END IF;
5448:
5449: -- ************************

Line 5446: RAISE OKL_API.G_EXCEPTION_ERROR;

5442:
5443: IF l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5444: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5445: ELSIF l_return_status = OKL_API.G_RET_STS_ERROR THEN
5446: RAISE OKL_API.G_EXCEPTION_ERROR;
5447: END IF;
5448:
5449: -- ************************
5450: -- Get Item Instance record

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

5467: x_return_status => l_return_status,
5468: x_msg_count => l_msg_count,
5469: x_msg_data => l_msg_data);
5470:
5471: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
5472: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5473: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
5474: RAISE OKL_API.G_EXCEPTION_ERROR;
5475: ELSIF (NVL (l_instance_header_tbl.COUNT, 0) <> 1) THEN

Line 5472: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

5468: x_msg_count => l_msg_count,
5469: x_msg_data => l_msg_data);
5470:
5471: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
5472: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5473: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
5474: RAISE OKL_API.G_EXCEPTION_ERROR;
5475: ELSIF (NVL (l_instance_header_tbl.COUNT, 0) <> 1) THEN
5476: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

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

5469: x_msg_data => l_msg_data);
5470:
5471: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
5472: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5473: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
5474: RAISE OKL_API.G_EXCEPTION_ERROR;
5475: ELSIF (NVL (l_instance_header_tbl.COUNT, 0) <> 1) THEN
5476: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5477: END IF;

Line 5474: RAISE OKL_API.G_EXCEPTION_ERROR;

5470:
5471: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
5472: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5473: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
5474: RAISE OKL_API.G_EXCEPTION_ERROR;
5475: ELSIF (NVL (l_instance_header_tbl.COUNT, 0) <> 1) THEN
5476: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5477: END IF;
5478:

Line 5476: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

5472: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5473: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
5474: RAISE OKL_API.G_EXCEPTION_ERROR;
5475: ELSIF (NVL (l_instance_header_tbl.COUNT, 0) <> 1) THEN
5476: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5477: END IF;
5478:
5479: -- *************************************
5480: -- Initialize parameters to be passed in

Line 5509: IF l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN

5505: x_return_status => l_return_status,
5506: x_msg_count => l_msg_count,
5507: x_msg_data => l_msg_data);
5508:
5509: IF l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5510: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5511: ELSIF l_return_status = OKL_API.G_RET_STS_ERROR THEN
5512: RAISE OKL_API.G_EXCEPTION_ERROR;
5513: END IF;

Line 5510: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;

5506: x_msg_count => l_msg_count,
5507: x_msg_data => l_msg_data);
5508:
5509: IF l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5510: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5511: ELSIF l_return_status = OKL_API.G_RET_STS_ERROR THEN
5512: RAISE OKL_API.G_EXCEPTION_ERROR;
5513: END IF;
5514:

Line 5511: ELSIF l_return_status = OKL_API.G_RET_STS_ERROR THEN

5507: x_msg_data => l_msg_data);
5508:
5509: IF l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5510: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5511: ELSIF l_return_status = OKL_API.G_RET_STS_ERROR THEN
5512: RAISE OKL_API.G_EXCEPTION_ERROR;
5513: END IF;
5514:
5515: -- **************

Line 5512: RAISE OKL_API.G_EXCEPTION_ERROR;

5508:
5509: IF l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR THEN
5510: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
5511: ELSIF l_return_status = OKL_API.G_RET_STS_ERROR THEN
5512: RAISE OKL_API.G_EXCEPTION_ERROR;
5513: END IF;
5514:
5515: -- **************
5516: -- Return results

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

5517: -- **************
5518:
5519: x_return_status := l_overall_status;
5520:
5521: OKL_API.END_ACTIVITY (x_msg_count, x_msg_data);
5522:
5523: EXCEPTION
5524:
5525: WHEN OKL_API.G_EXCEPTION_ERROR THEN

Line 5525: WHEN OKL_API.G_EXCEPTION_ERROR THEN

5521: OKL_API.END_ACTIVITY (x_msg_count, x_msg_data);
5522:
5523: EXCEPTION
5524:
5525: WHEN OKL_API.G_EXCEPTION_ERROR THEN
5526: x_return_status := OKL_API.HANDLE_EXCEPTIONS
5527: (
5528: l_api_name,
5529: G_PKG_NAME,

Line 5526: x_return_status := OKL_API.HANDLE_EXCEPTIONS

5522:
5523: EXCEPTION
5524:
5525: WHEN OKL_API.G_EXCEPTION_ERROR THEN
5526: x_return_status := OKL_API.HANDLE_EXCEPTIONS
5527: (
5528: l_api_name,
5529: G_PKG_NAME,
5530: 'OKL_API.G_RET_STS_ERROR',

Line 5530: 'OKL_API.G_RET_STS_ERROR',

5526: x_return_status := OKL_API.HANDLE_EXCEPTIONS
5527: (
5528: l_api_name,
5529: G_PKG_NAME,
5530: 'OKL_API.G_RET_STS_ERROR',
5531: x_msg_count,
5532: x_msg_data,
5533: '_PVT'
5534: );

Line 5536: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN

5532: x_msg_data,
5533: '_PVT'
5534: );
5535:
5536: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
5537: x_return_status :=OKL_API.HANDLE_EXCEPTIONS
5538: (
5539: l_api_name,
5540: G_PKG_NAME,

Line 5537: x_return_status :=OKL_API.HANDLE_EXCEPTIONS

5533: '_PVT'
5534: );
5535:
5536: WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
5537: x_return_status :=OKL_API.HANDLE_EXCEPTIONS
5538: (
5539: l_api_name,
5540: G_PKG_NAME,
5541: 'OKL_API.G_RET_STS_UNEXP_ERROR',

Line 5541: 'OKL_API.G_RET_STS_UNEXP_ERROR',

5537: x_return_status :=OKL_API.HANDLE_EXCEPTIONS
5538: (
5539: l_api_name,
5540: G_PKG_NAME,
5541: 'OKL_API.G_RET_STS_UNEXP_ERROR',
5542: x_msg_count,
5543: x_msg_data,
5544: '_PVT'
5545: );

Line 5549: x_return_status :=OKL_API.HANDLE_EXCEPTIONS

5545: );
5546:
5547: WHEN OTHERS THEN
5548:
5549: x_return_status :=OKL_API.HANDLE_EXCEPTIONS
5550: (
5551: l_api_name,
5552: G_PKG_NAME,
5553: 'OTHERS',