DBA Data[Home] [Help]

APPS.FA_RETIREMENT_PUB dependencies on FA_DEBUG_PKG

Line 292: fa_debug_pkg.initialize;

288: -- initialize error message stack.
289: fa_srvr_msg.init_server_message;
290:
291: -- initialize debug message stack.
292: fa_debug_pkg.initialize;
293: end if;
294:
295: -- override FA:PRINT_DEBUG profile option.
296: -- if (p_debug_flag = 'YES') then

Line 297: -- fa_debug_pkg.set_debug_flag;

293: end if;
294:
295: -- override FA:PRINT_DEBUG profile option.
296: -- if (p_debug_flag = 'YES') then
297: -- fa_debug_pkg.set_debug_flag;
298: -- end if;
299:
300: -- ****************************************************
301: -- ** Assign input parameters to local rec/tbl types

Line 322: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'call trx approval pkg - faxcat', '', g_log_level_rec); end if;

318: -- common for all types
319: -- bug 1230315... adding FA_TRX_APPROVAL_PKG for all retirement
320: -- transactions
321:
322: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'call trx approval pkg - faxcat', '', g_log_level_rec); end if;
323: l_ins_status := FA_TRX_APPROVAL_PKG.faxcat
324: (x_book => l_asset_hdr_rec.book_type_code
325: ,x_asset_id => l_asset_hdr_rec.asset_id
326: ,x_trx_type => 'PARTIAL UNIT RETIREMENT'

Line 331: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'failed in FA_TRX_APPROVAL_PKG.faxcat', '', g_log_level_rec); end if;

327: ,x_trx_date => l_asset_retire_rec.date_retired
328: ,x_init_message_flag => 'NO'
329: ,p_log_level_rec => g_log_level_rec);
330: if not l_ins_status then
331: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'failed in FA_TRX_APPROVAL_PKG.faxcat', '', g_log_level_rec); end if;
332: -- g_msg_name := 'error msg name-after trx_app';
333: raise FND_API.G_EXC_ERROR;
334: end if;
335:

Line 336: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'ret_id1 ', l_retirement_id, g_log_level_rec); end if;

332: -- g_msg_name := 'error msg name-after trx_app';
333: raise FND_API.G_EXC_ERROR;
334: end if;
335:
336: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'ret_id1 ', l_retirement_id, g_log_level_rec); end if;
337: -- ***********************************
338: -- ** Call the cache for book
339: -- ** and do initial MRC validation
340: -- ***********************************

Line 395: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_desc_rec', '', g_log_level_rec); end if;

391: fnd_profile.get ('GL_SET_OF_BKS_ID',l_orig_set_of_books_id);
392: l_orig_currency_context := SUBSTRB(USERENV('CLIENT_INFO'),45,10);
393:
394: -- pop asset_desc_rec
395: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_desc_rec', '', g_log_level_rec); end if;
396: if not FA_UTIL_PVT.get_asset_desc_rec
397: (p_asset_hdr_rec => l_asset_hdr_rec
398: ,px_asset_desc_rec => l_asset_desc_rec
399: ,p_log_level_rec => g_log_level_rec) then

Line 404: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_type_rec', '', g_log_level_rec); end if;

400: raise FND_API.G_EXC_UNEXPECTED_ERROR;
401: end if;
402:
403: -- pop asset_type_rec
404: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_type_rec', '', g_log_level_rec); end if;
405: if not FA_UTIL_PVT.get_asset_type_rec
406: (p_asset_hdr_rec => l_asset_hdr_rec
407: ,px_asset_type_rec => l_asset_type_rec
408: ,p_date_effective => NULL

Line 415: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_fin_rec', '', g_log_level_rec); end if;

411: end if;
412:
413: -- pop asset_fin_rec
414: -- get fa_books row where transaction_header_id_out is null
415: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_fin_rec', '', g_log_level_rec); end if;
416: if not FA_UTIL_PVT.get_asset_fin_rec
417: (p_asset_hdr_rec => l_asset_hdr_rec
418: ,px_asset_fin_rec => l_asset_fin_rec
419: ,p_transaction_header_id => NULL

Line 426: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop period_rec', '', g_log_level_rec); end if;

422: raise FND_API.G_EXC_UNEXPECTED_ERROR;
423: end if;
424:
425: -- pop current period_rec info
426: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop period_rec', '', g_log_level_rec); end if;
427: if not FA_UTIL_PVT.get_period_rec
428: (p_book => l_asset_hdr_rec.book_type_code
429: ,x_period_rec => l_period_rec
430: ,p_log_level_rec => g_log_level_rec) then

Line 453: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'set default values unless provided', '', g_log_level_rec); end if;

449: -- *********************************************
450: -- ** Set default values unless provided
451: -- *********************************************
452: -- set default values unless provided
453: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'set default values unless provided', '', g_log_level_rec); end if;
454:
455: -- default date_retired to the current period if it is null
456: if l_asset_retire_rec.date_retired is null then
457:

Line 530: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'l_inv_tbl.last: ', to_char(l_inv_tbl.last), g_log_level_rec); end if;

526: /*
527: * Call Invoice API to populate cost_retired in case of
528: * source line retirement.
529: */
530: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'l_inv_tbl.last: ', to_char(l_inv_tbl.last), g_log_level_rec); end if;
531:
532: if (nvl(l_inv_tbl.last, 0) > 0) then
533:
534: -- Populate asset_cat_rec

Line 535: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_cat_rec', '', g_log_level_rec); end if;

531:
532: if (nvl(l_inv_tbl.last, 0) > 0) then
533:
534: -- Populate asset_cat_rec
535: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_cat_rec', '', g_log_level_rec); end if;
536: if not FA_UTIL_PVT.get_asset_cat_rec (
537: p_asset_hdr_rec => l_asset_hdr_rec,
538: px_asset_cat_rec => l_asset_cat_rec,
539: p_date_effective => NULL,

Line 548: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Before calling FA_INVOICE_PVT.INVOICE_ENGINE', '', g_log_level_rec); end if;

544: -- Initialize g_inv_trans_rec global variable
545: g_inv_trans_rec.invoice_transaction_id := to_number(null);
546: g_inv_trans_rec.transaction_type := 'RETIREMENT';
547:
548: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Before calling FA_INVOICE_PVT.INVOICE_ENGINE', '', g_log_level_rec); end if;
549: if not FA_INVOICE_PVT.INVOICE_ENGINE (
550: px_trans_rec => l_trans_rec,
551: px_asset_hdr_rec => l_asset_hdr_rec,
552: p_asset_desc_rec => l_asset_desc_rec,

Line 565: fa_debug_pkg.add(l_calling_fn, 'Error Calling FA_INVOICE_PVT.INVOICE_ENGINE', '', g_log_level_rec);

561: x_asset_deprn_mrc_tbl_new => l_asset_deprn_mrc_tbl_new,
562: p_calling_fn => l_calling_fn,
563: p_log_level_rec => g_log_level_rec) then
564: if g_log_level_rec.statement_level then
565: fa_debug_pkg.add(l_calling_fn, 'Error Calling FA_INVOICE_PVT.INVOICE_ENGINE', '', g_log_level_rec);
566: fa_debug_pkg.add(l_calling_fn, 'SQLERRM: ', SQLERRM, g_log_level_rec);
567: end if;
568: raise FND_API.G_EXC_UNEXPECTED_ERROR;
569: end if;

Line 566: fa_debug_pkg.add(l_calling_fn, 'SQLERRM: ', SQLERRM, g_log_level_rec);

562: p_calling_fn => l_calling_fn,
563: p_log_level_rec => g_log_level_rec) then
564: if g_log_level_rec.statement_level then
565: fa_debug_pkg.add(l_calling_fn, 'Error Calling FA_INVOICE_PVT.INVOICE_ENGINE', '', g_log_level_rec);
566: fa_debug_pkg.add(l_calling_fn, 'SQLERRM: ', SQLERRM, g_log_level_rec);
567: end if;
568: raise FND_API.G_EXC_UNEXPECTED_ERROR;
569: end if;
570:

Line 572: FA_DEBUG_PKG.ADD (fname=>'FAPRETB.pls',

568: raise FND_API.G_EXC_UNEXPECTED_ERROR;
569: end if;
570:
571: if (g_log_level_rec.statement_level) then
572: FA_DEBUG_PKG.ADD (fname=>'FAPRETB.pls',
573: element=>'cost_retired',
574: value=> l_asset_retire_rec.cost_retired
575: ,p_log_level_rec => g_log_level_rec);
576: FA_DEBUG_PKG.ADD (fname=>'do_all_book_retirement',

Line 576: FA_DEBUG_PKG.ADD (fname=>'do_all_book_retirement',

572: FA_DEBUG_PKG.ADD (fname=>'FAPRETB.pls',
573: element=>'cost_retired',
574: value=> l_asset_retire_rec.cost_retired
575: ,p_log_level_rec => g_log_level_rec);
576: FA_DEBUG_PKG.ADD (fname=>'do_all_book_retirement',
577: element=>'cost',
578: value=> l_asset_fin_rec.cost
579: ,p_log_level_rec => g_log_level_rec);
580: end if;

Line 610: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Before calling do_validation', '', g_log_level_rec); end if;

606: -- *********************************************
607: -- ** Do validation
608: -- *********************************************
609: -- validate that all user-entered input parameters are valid
610: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Before calling do_validation', '', g_log_level_rec); end if;
611: if not do_validation
612: (p_validation_type => g_retirement
613: ,p_trans_rec => l_trans_rec
614: ,p_asset_hdr_rec => l_asset_hdr_rec

Line 636: fa_debug_pkg.add(l_calling_fn, 'begin asset-level validation on transaction', '', g_log_level_rec);

632: -- begin asset-level validation on transaction
633:
634: -- check if trx is partial retirement on CIP asset
635: if g_log_level_rec.statement_level then
636: fa_debug_pkg.add(l_calling_fn, 'begin asset-level validation on transaction', '', g_log_level_rec);
637: fa_debug_pkg.add(l_calling_fn, 'check if trx is partial retirement on CIP asset', '', g_log_level_rec);
638: end if;
639: if l_asset_retire_rec.units_retired is not null then
640:

Line 637: fa_debug_pkg.add(l_calling_fn, 'check if trx is partial retirement on CIP asset', '', g_log_level_rec);

633:
634: -- check if trx is partial retirement on CIP asset
635: if g_log_level_rec.statement_level then
636: fa_debug_pkg.add(l_calling_fn, 'begin asset-level validation on transaction', '', g_log_level_rec);
637: fa_debug_pkg.add(l_calling_fn, 'check if trx is partial retirement on CIP asset', '', g_log_level_rec);
638: end if;
639: if l_asset_retire_rec.units_retired is not null then
640:
641: -- can only fully retire CIP assets unless source line retirement

Line 687: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'begin calculation', '', g_log_level_rec); end if;

683: -- ***************************
684: -- ** Do basic calculation
685: -- ***************************
686: -- begin retirement-specific calculation
687: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'begin calculation', '', g_log_level_rec); end if;
688:
689: if l_asset_retire_rec.units_retired is not null then
690:
691: -- derive cost_retired from units_retired

Line 705: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'derived cost_retired: ', l_asset_retire_rec.cost_retired, g_log_level_rec); end if;

701: ,p_log_level_rec => g_log_level_rec) then
702: raise FND_API.G_EXC_UNEXPECTED_ERROR;
703: end if;
704:
705: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'derived cost_retired: ', l_asset_retire_rec.cost_retired, g_log_level_rec); end if;
706:
707: if l_asset_retire_rec.units_retired = l_asset_desc_rec.current_units then
708: l_transaction_type := 'FULL RETIREMENT';
709: else

Line 746: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'end calculation', '', g_log_level_rec); end if;

742:
743: l_asset_retire_rec.status := 'PENDING';
744:
745: -- end retirement-specific calculation
746: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'end calculation', '', g_log_level_rec); end if;
747:
748: -- Fix for Bug #3187975. Do Polish rule validations.
749: -- Need to do this after transaction_type_code is derived.
750: if not FA_ASSET_VAL_PVT.validate_polish (

Line 770: fa_debug_pkg.add

766: -- ***************************
767: -- ** Main
768: -- ***************************
769: if g_log_level_rec.statement_level then
770: fa_debug_pkg.add
771: (fname => l_calling_fn,
772: element => 'Entering corporate book',
773: value => ''
774: ,p_log_level_rec => g_log_level_rec);

Line 796: fa_debug_pkg.add

792:
793: l_retirement_id := l_asset_retire_rec.retirement_id;
794:
795: if g_log_level_rec.statement_level then
796: fa_debug_pkg.add
797: (fname => l_calling_fn,
798: element => 'Finished corporate book',
799: value => ''
800: ,p_log_level_rec => g_log_level_rec);

Line 824: fa_debug_pkg.add

820: if (l_asset_type_rec.asset_type = 'CIP'
821: or l_asset_type_rec.asset_type = 'CAPITALIZED') then
822:
823: if g_log_level_rec.statement_level then
824: fa_debug_pkg.add
825: (fname => l_calling_fn,
826: element => 'Asset type',
827: value => l_asset_type_rec.asset_type
828: ,p_log_level_rec => g_log_level_rec);

Line 842: fa_debug_pkg.add(l_calling_fn, 'entered loop for tax books', '', g_log_level_rec);

838:
839: for l_tax_index in 1..l_tax_book_tbl.count loop
840:
841: if g_log_level_rec.statement_level then
842: fa_debug_pkg.add(l_calling_fn, 'entered loop for tax books', '', g_log_level_rec);
843: fa_debug_pkg.add(l_calling_fn, 'selected tax book: ', l_tax_book_tbl(l_tax_index), g_log_level_rec);
844: end if;
845:
846: if not FA_ASSET_VAL_PVT.validate_asset_book

Line 843: fa_debug_pkg.add(l_calling_fn, 'selected tax book: ', l_tax_book_tbl(l_tax_index), g_log_level_rec);

839: for l_tax_index in 1..l_tax_book_tbl.count loop
840:
841: if g_log_level_rec.statement_level then
842: fa_debug_pkg.add(l_calling_fn, 'entered loop for tax books', '', g_log_level_rec);
843: fa_debug_pkg.add(l_calling_fn, 'selected tax book: ', l_tax_book_tbl(l_tax_index), g_log_level_rec);
844: end if;
845:
846: if not FA_ASSET_VAL_PVT.validate_asset_book
847: (p_transaction_type_code => px_trans_rec.transaction_type_code

Line 870: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'calling do_all_books_retirement for tax book', '', g_log_level_rec); end if;

866: lv_asset_hdr_rec.book_type_code := l_tax_book_tbl(l_tax_index);
867: lv_trans_rec.source_transaction_header_id := l_trans_rec.transaction_header_id;
868: lv_trans_rec.transaction_header_id := null;
869:
870: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'calling do_all_books_retirement for tax book', '', g_log_level_rec); end if;
871:
872: if g_log_level_rec.statement_level then
873: fa_debug_pkg.add
874: (fname => l_calling_fn,

Line 873: fa_debug_pkg.add

869:
870: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'calling do_all_books_retirement for tax book', '', g_log_level_rec); end if;
871:
872: if g_log_level_rec.statement_level then
873: fa_debug_pkg.add
874: (fname => l_calling_fn,
875: element => 'l_tax_book_tbl.count',
876: value => l_tax_book_tbl.count);
877: end if;

Line 910: fa_debug_pkg.add

906:
907: end if; -- book_class
908:
909: if g_log_level_rec.statement_level then
910: fa_debug_pkg.add
911: (fname => l_calling_fn,
912: element => 'Check to see if calculate gain/loss has to be submitted',
913: value => ''
914: ,p_log_level_rec => g_log_level_rec);

Line 918: fa_debug_pkg.add(l_calling_fn, 'before calc gain/loss', '', g_log_level_rec);

914: ,p_log_level_rec => g_log_level_rec);
915: end if;
916:
917: if g_log_level_rec.statement_level then
918: fa_debug_pkg.add(l_calling_fn, 'before calc gain/loss', '', g_log_level_rec);
919: end if;
920:
921: -- submit calculate_gain_loss programs if flag is set
922:

Line 926: fa_debug_pkg.add

922:
923: if l_calculate_gain_loss_flag = FND_API.G_TRUE then
924:
925: if g_log_level_rec.statement_level then
926: fa_debug_pkg.add
927: (fname => l_calling_fn,
928: element => 'Running calculate gain/loss...',
929: value => ''
930: ,p_log_level_rec => g_log_level_rec);

Line 934: fa_debug_pkg.add(l_calling_fn, 'ret_id:', l_retirement_id, g_log_level_rec);

930: ,p_log_level_rec => g_log_level_rec);
931: end if;
932:
933: if g_log_level_rec.statement_level then
934: fa_debug_pkg.add(l_calling_fn, 'ret_id:', l_retirement_id, g_log_level_rec);
935: fa_debug_pkg.add(l_calling_fn, 'submit calculate gain/loss program', '', g_log_level_rec);
936: end if;
937: if not calculate_gain_loss
938: (p_retirement_id => l_retirement_id

Line 935: fa_debug_pkg.add(l_calling_fn, 'submit calculate gain/loss program', '', g_log_level_rec);

931: end if;
932:
933: if g_log_level_rec.statement_level then
934: fa_debug_pkg.add(l_calling_fn, 'ret_id:', l_retirement_id, g_log_level_rec);
935: fa_debug_pkg.add(l_calling_fn, 'submit calculate gain/loss program', '', g_log_level_rec);
936: end if;
937: if not calculate_gain_loss
938: (p_retirement_id => l_retirement_id
939: ,p_mrc_sob_type_code => 'P'

Line 943: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'right after calc gain/loss', '', g_log_level_rec); end if;

939: ,p_mrc_sob_type_code => 'P'
940: ,p_log_level_rec => g_log_level_rec) then
941: raise FND_API.G_EXC_UNEXPECTED_ERROR;
942: end if;
943: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'right after calc gain/loss', '', g_log_level_rec); end if;
944:
945: end if;
946:
947: -- call to workflow business event

Line 1142: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_fin_rec', '', p_log_level_rec); end if;

1138: fnd_client_info.set_currency_context(to_char(l_asset_hdr_rec.set_of_books_id));
1139:
1140: -- pop asset_fin_rec
1141: -- get fa_books row where transaction_header_id_out is null
1142: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_fin_rec', '', p_log_level_rec); end if;
1143: if not FA_UTIL_PVT.get_asset_fin_rec
1144: (p_asset_hdr_rec => l_asset_hdr_rec
1145: ,px_asset_fin_rec => l_asset_fin_rec
1146: ,p_transaction_header_id => NULL

Line 1153: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop period_rec', '', p_log_level_rec); end if;

1149: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1150: end if;
1151:
1152: -- pop current period_rec info
1153: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop period_rec', '', p_log_level_rec); end if;
1154: if not FA_UTIL_PVT.get_period_rec
1155: (p_book => l_asset_hdr_rec.book_type_code
1156: ,p_effective_date => NULL
1157: ,x_period_rec => l_period_rec

Line 1167: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'begin asset/book-level validation on transaction', '', p_log_level_rec); end if;

1163: -- ** Do asset/book-level validation on transaction
1164: -- ***************************************************
1165: -- begin asset/book-level validation on transaction
1166:
1167: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'begin asset/book-level validation on transaction', '', p_log_level_rec); end if;
1168:
1169: -- check if the asset is in period of addition
1170: -- used CAPITALIZED as mode since the current FAXASSET form uses this logic
1171: -- We allow users to retire CIP assets. But we don't allow retirements

Line 1177: fa_debug_pkg.add(l_calling_fn, 'check if the asset is in period of addition', '', p_log_level_rec);

1173: -- The following mode 'CAPITALIZED' makes sure that the asset
1174: -- is neither in the period of addition nor in the period of capitalization.
1175:
1176: if g_log_level_rec.statement_level then
1177: fa_debug_pkg.add(l_calling_fn, 'check if the asset is in period of addition', '', p_log_level_rec);
1178: fa_debug_pkg.add(l_calling_fn, 'asset_id: ', l_asset_hdr_rec.asset_id, p_log_level_rec);
1179: fa_debug_pkg.add(l_calling_fn, 'book: ', l_asset_hdr_rec.book_type_code, p_log_level_rec);
1180: end if;
1181:

Line 1178: fa_debug_pkg.add(l_calling_fn, 'asset_id: ', l_asset_hdr_rec.asset_id, p_log_level_rec);

1174: -- is neither in the period of addition nor in the period of capitalization.
1175:
1176: if g_log_level_rec.statement_level then
1177: fa_debug_pkg.add(l_calling_fn, 'check if the asset is in period of addition', '', p_log_level_rec);
1178: fa_debug_pkg.add(l_calling_fn, 'asset_id: ', l_asset_hdr_rec.asset_id, p_log_level_rec);
1179: fa_debug_pkg.add(l_calling_fn, 'book: ', l_asset_hdr_rec.book_type_code, p_log_level_rec);
1180: end if;
1181:
1182: -- BUG# 4053626

Line 1179: fa_debug_pkg.add(l_calling_fn, 'book: ', l_asset_hdr_rec.book_type_code, p_log_level_rec);

1175:
1176: if g_log_level_rec.statement_level then
1177: fa_debug_pkg.add(l_calling_fn, 'check if the asset is in period of addition', '', p_log_level_rec);
1178: fa_debug_pkg.add(l_calling_fn, 'asset_id: ', l_asset_hdr_rec.asset_id, p_log_level_rec);
1179: fa_debug_pkg.add(l_calling_fn, 'book: ', l_asset_hdr_rec.book_type_code, p_log_level_rec);
1180: end if;
1181:
1182: -- BUG# 4053626
1183: -- the above was incorrect interpretation - need to use absolute

Line 1194: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'perid_of_addition_flag: ', l_asset_hdr_rec.period_of_addition, p_log_level_rec); end if;

1190: ,p_book => l_asset_hdr_rec.book_type_code
1191: ,p_mode => 'ABSOLUTE'
1192: ,px_period_of_addition => l_asset_hdr_rec.period_of_addition
1193: ,p_log_level_rec => p_log_level_rec) then
1194: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'perid_of_addition_flag: ', l_asset_hdr_rec.period_of_addition, p_log_level_rec); end if;
1195:
1196: null;
1197: /*
1198: if l_asset_hdr_rec.period_of_addition='Y' then

Line 1207: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'perid_of_addition_flag: ', l_asset_hdr_rec.period_of_addition, p_log_level_rec); end if;

1203: */
1204: else
1205: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1206: end if;
1207: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'perid_of_addition_flag: ', l_asset_hdr_rec.period_of_addition, p_log_level_rec); end if;
1208:
1209: -- check if there is an add-to-asset transaction pending
1210: -- Users must post their mass additions before they can retire the asset
1211: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if there is an add-to-asset transaction pending', '', p_log_level_rec); end if;

Line 1211: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if there is an add-to-asset transaction pending', '', p_log_level_rec); end if;

1207: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'perid_of_addition_flag: ', l_asset_hdr_rec.period_of_addition, p_log_level_rec); end if;
1208:
1209: -- check if there is an add-to-asset transaction pending
1210: -- Users must post their mass additions before they can retire the asset
1211: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if there is an add-to-asset transaction pending', '', p_log_level_rec); end if;
1212: if FA_ASSET_VAL_PVT.validate_add_to_asset_pending
1213: (p_asset_id => l_asset_hdr_rec.asset_id
1214: ,p_book => l_asset_hdr_rec.book_type_code
1215: ,p_log_level_rec => p_log_level_rec) then

Line 1222: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if another retirement/reinstatement already pending', '', p_log_level_rec); end if;

1218: raise FND_API.G_EXC_ERROR;
1219: end if;
1220:
1221: -- check if another retirement/reinstatement already pending
1222: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if another retirement/reinstatement already pending', '', p_log_level_rec); end if;
1223: if FA_ASSET_VAL_PVT.validate_ret_rst_pending
1224: (p_asset_id => l_asset_hdr_rec.asset_id
1225: ,p_book => l_asset_hdr_rec.book_type_code
1226: ,p_log_level_rec => p_log_level_rec) then

Line 1232: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if the asset is already fully retired', '', p_log_level_rec); end if;

1228: raise FND_API.G_EXC_ERROR;
1229: end if;
1230:
1231: -- check if the asset has already been fully retired
1232: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if the asset is already fully retired', '', p_log_level_rec); end if;
1233: if FA_ASSET_VAL_PVT.validate_fully_retired
1234: (p_asset_id => l_asset_hdr_rec.asset_id
1235: ,p_book => l_asset_hdr_rec.book_type_code
1236: ,p_log_level_rec => p_log_level_rec) then

Line 1242: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if date_retired is valid in terms of trx date', '', p_log_level_rec); end if;

1238: raise FND_API.G_EXC_ERROR;
1239: end if;
1240:
1241: -- check if date_retired is valid in terms of trx date
1242: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if date_retired is valid in terms of trx date', '', p_log_level_rec); end if;
1243: if l_asset_retire_rec.date_retired is not null then
1244:
1245: -- no transactions except Retirements and Reinstatements may be
1246: -- dated after the latest trx date

Line 1269: fa_debug_pkg.add

1265: l_prorate_calendar := fa_cache_pkg.fazcbc_record.prorate_calendar;
1266: l_fiscal_year_name := fa_cache_pkg.fazcbc_record.fiscal_year_name;
1267:
1268: if g_log_level_rec.statement_level then
1269: fa_debug_pkg.add
1270: (fname => l_calling_fn,
1271: element => 'fa_cache_pkg.fazcbc_record.prorate_calendar',
1272: value => fa_cache_pkg.fazcbc_record.prorate_calendar);
1273: fa_debug_pkg.add

Line 1273: fa_debug_pkg.add

1269: fa_debug_pkg.add
1270: (fname => l_calling_fn,
1271: element => 'fa_cache_pkg.fazcbc_record.prorate_calendar',
1272: value => fa_cache_pkg.fazcbc_record.prorate_calendar);
1273: fa_debug_pkg.add
1274: (fname => l_calling_fn,
1275: element => 'l_asset_retire_rec.retirement_prorate_convention',
1276: value => l_asset_retire_rec.retirement_prorate_convention);
1277: end if;

Line 1280: fa_debug_pkg.add(l_calling_fn, 'Get book-specific ret convention info and etc', '', p_log_level_rec);

1276: value => l_asset_retire_rec.retirement_prorate_convention);
1277: end if;
1278:
1279: if g_log_level_rec.statement_level then
1280: fa_debug_pkg.add(l_calling_fn, 'Get book-specific ret convention info and etc', '', p_log_level_rec);
1281: end if;
1282:
1283: /* Bug#4663092: Moved Book-specific validation/calculation to do_all_retirement function. */
1284: if l_asset_retire_rec.retirement_prorate_convention is null then

Line 1336: fa_debug_pkg.add(l_calling_fn, 'Get ret prorate_date...', '', p_log_level_rec);

1332: raise FND_API.G_EXC_ERROR;
1333: end if;
1334:
1335: if g_log_level_rec.statement_level then
1336: fa_debug_pkg.add(l_calling_fn, 'Get ret prorate_date...', '', p_log_level_rec);
1337: end if;
1338:
1339: select prorate_date
1340: into l_ret_prorate_date

Line 1373: fa_debug_pkg.add(l_calling_fn, 'Error calling', 'fa_cache_pkg.fazccmt'

1369: if (not fa_cache_pkg.fazccmt(l_asset_fin_rec.deprn_method_code,
1370: l_asset_fin_rec.life_in_months
1371: ,p_log_level_rec => p_log_level_rec)) then
1372: if (p_log_level_rec.statement_level) then
1373: fa_debug_pkg.add(l_calling_fn, 'Error calling', 'fa_cache_pkg.fazccmt'
1374: ,p_log_level_rec => p_log_level_rec);
1375: end if;
1376:
1377: raise FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1409: FA_DEBUG_PKG.ADD (fname=>'do_all_book_retirement',

1405: if abs(l_asset_retire_rec.cost_retired) > abs(l_asset_fin_rec.cost)
1406: or sign(l_asset_retire_rec.cost_retired) <> sign(l_asset_fin_rec.cost) then
1407:
1408: if (p_log_level_rec.statement_level) then
1409: FA_DEBUG_PKG.ADD (fname=>'do_all_book_retirement',
1410: element=>'In error: cost_retired',
1411: value=> l_asset_retire_rec.cost_retired
1412: ,p_log_level_rec => p_log_level_rec);
1413: FA_DEBUG_PKG.ADD (fname=>'do_all_book_retirement',

Line 1413: FA_DEBUG_PKG.ADD (fname=>'do_all_book_retirement',

1409: FA_DEBUG_PKG.ADD (fname=>'do_all_book_retirement',
1410: element=>'In error: cost_retired',
1411: value=> l_asset_retire_rec.cost_retired
1412: ,p_log_level_rec => p_log_level_rec);
1413: FA_DEBUG_PKG.ADD (fname=>'do_all_book_retirement',
1414: element=>'In error: cost',
1415: value=> l_asset_fin_rec.cost
1416: ,p_log_level_rec => p_log_level_rec);
1417: end if;

Line 1486: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'calling do_sub_retirement for each book/sob', '', p_log_level_rec); end if;

1482: -- ***************************
1483: -- ** Main
1484: -- ***************************
1485:
1486: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'calling do_sub_retirement for each book/sob', '', p_log_level_rec); end if;
1487:
1488: if not do_sub_retirement
1489: (px_trans_rec => l_trans_rec
1490: ,px_dist_trans_rec => l_dist_trans_rec

Line 1506: fa_debug_pkg.add(l_calling_fn, 'do_all_books_retirement: retirement_id: ', l_asset_retire_rec.retirement_id, p_log_level_rec);

1502: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1503: end if;
1504:
1505: if g_log_level_rec.statement_level then
1506: fa_debug_pkg.add(l_calling_fn, 'do_all_books_retirement: retirement_id: ', l_asset_retire_rec.retirement_id, p_log_level_rec);
1507: fa_debug_pkg.add(l_calling_fn, 'do_all_books_retirement: transaction_header_id: ', l_trans_rec.transaction_header_id, p_log_level_rec);
1508: end if;
1509:
1510: if not fa_cache_pkg.fazcbc(x_book => l_asset_hdr_rec.book_type_code

Line 1507: fa_debug_pkg.add(l_calling_fn, 'do_all_books_retirement: transaction_header_id: ', l_trans_rec.transaction_header_id, p_log_level_rec);

1503: end if;
1504:
1505: if g_log_level_rec.statement_level then
1506: fa_debug_pkg.add(l_calling_fn, 'do_all_books_retirement: retirement_id: ', l_asset_retire_rec.retirement_id, p_log_level_rec);
1507: fa_debug_pkg.add(l_calling_fn, 'do_all_books_retirement: transaction_header_id: ', l_trans_rec.transaction_header_id, p_log_level_rec);
1508: end if;
1509:
1510: if not fa_cache_pkg.fazcbc(x_book => l_asset_hdr_rec.book_type_code
1511: ,p_log_level_rec => p_log_level_rec) then

Line 1535: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'in sob_id loop', '', p_log_level_rec); end if;

1531: -- loop through each book starting with the primary and
1532: -- call sub routine for each
1533: for l_sob_index in 1..l_sob_tbl.count loop
1534:
1535: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'in sob_id loop', '', p_log_level_rec); end if;
1536:
1537: -- set the sob_id and currency context for reporting book(sob)
1538: fnd_profile.put('GL_SET_OF_BKS_ID', l_sob_tbl(l_sob_index));
1539: fnd_client_info.set_currency_context(to_char(l_sob_tbl(l_sob_index)));

Line 1573: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'do_all_books_retirement: retirement_id: ', l_asset_retire_rec.retirement_id, p_log_level_rec); end if;

1569: end loop;
1570:
1571: end if;
1572:
1573: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'do_all_books_retirement: retirement_id: ', l_asset_retire_rec.retirement_id, p_log_level_rec); end if;
1574: -- px_asset_retire_rec := l_asset_retire_rec;
1575: px_asset_retire_rec.retirement_id := l_asset_retire_rec.retirement_id;
1576: px_trans_rec := l_trans_rec;
1577: px_dist_trans_rec := l_dist_trans_rec;

Line 1654: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'begin ', l_calling_fn, p_log_level_rec); end if;

1650:
1651: BEGIN
1652:
1653:
1654: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'begin ', l_calling_fn, p_log_level_rec); end if;
1655: -- ****************************************************
1656: -- ** Assign input parameters to local rec/tbl types
1657: -- ****************************************************
1658: l_trans_rec := px_trans_rec;

Line 1681: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_fin_rec', '', p_log_level_rec); end if;

1677: fnd_client_info.set_currency_context(to_char(l_asset_hdr_rec.set_of_books_id));
1678:
1679: -- pop asset_fin_rec
1680: -- get fa_books row where transaction_header_id_out is null
1681: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_fin_rec', '', p_log_level_rec); end if;
1682: if not FA_UTIL_PVT.get_asset_fin_rec
1683: (p_asset_hdr_rec => l_asset_hdr_rec
1684: ,px_asset_fin_rec => l_asset_fin_mrc_rec
1685: ,p_transaction_header_id => NULL

Line 1693: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_cat_rec', '', p_log_level_rec); end if;

1689: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1690: end if;
1691:
1692: -- pop asset_cat_rec
1693: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_cat_rec', '', p_log_level_rec); end if;
1694: if not FA_UTIL_PVT.get_asset_cat_rec
1695: (p_asset_hdr_rec => l_asset_hdr_rec
1696: ,px_asset_cat_rec => l_asset_cat_rec
1697: ,p_date_effective => NULL

Line 1819: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'treat this trx as regular', '', p_log_level_rec); end if;

1815: if l_asset_retire_rec.units_retired = l_asset_desc_rec.current_units
1816: or l_asset_retire_rec.units_retired is null then
1817: -- if full unit retirement or cost (both full and partial) retirement
1818:
1819: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'treat this trx as regular', '', p_log_level_rec); end if;
1820: null;
1821:
1822: elsif l_asset_retire_rec.units_retired
1823: < l_asset_desc_rec.current_units then -- if partial unit retirement

Line 1859: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'treat this trx as partial unit retirement', '', p_log_level_rec); end if;

1855: -- else
1856: -- l_dist_trans_rec.transaction_header_id := NULL;
1857: end if; --group_asset_id <> null
1858:
1859: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'treat this trx as partial unit retirement', '', p_log_level_rec); end if;
1860:
1861: -- make a local copy of trans_rec and change trx_type_code
1862: -- this local copy of trans_rec will be used
1863: -- for distribution api and fautfr

Line 1909: fa_debug_pkg.add(l_calling_fn, 'trx_type_code:', l_dist_trans_rec.transaction_type_code, p_log_level_rec);

1905: -- asset_hdr_rec: asset_id, book_type_code(only CORPORATE)
1906: -- asset_dist_tbl: distribution_id, trx_units
1907:
1908: if g_log_level_rec.statement_level then
1909: fa_debug_pkg.add(l_calling_fn, 'trx_type_code:', l_dist_trans_rec.transaction_type_code, p_log_level_rec);
1910: fa_debug_pkg.add(l_calling_fn, 'trx_date_entered:', l_dist_trans_rec.transaction_date_entered, p_log_level_rec);
1911: fa_debug_pkg.add(l_calling_fn, 'asset_id:', l_asset_hdr_rec.asset_id, p_log_level_rec);
1912: fa_debug_pkg.add(l_calling_fn, 'book_type_code:', l_asset_hdr_rec.book_type_code, p_log_level_rec);
1913: end if;

Line 1910: fa_debug_pkg.add(l_calling_fn, 'trx_date_entered:', l_dist_trans_rec.transaction_date_entered, p_log_level_rec);

1906: -- asset_dist_tbl: distribution_id, trx_units
1907:
1908: if g_log_level_rec.statement_level then
1909: fa_debug_pkg.add(l_calling_fn, 'trx_type_code:', l_dist_trans_rec.transaction_type_code, p_log_level_rec);
1910: fa_debug_pkg.add(l_calling_fn, 'trx_date_entered:', l_dist_trans_rec.transaction_date_entered, p_log_level_rec);
1911: fa_debug_pkg.add(l_calling_fn, 'asset_id:', l_asset_hdr_rec.asset_id, p_log_level_rec);
1912: fa_debug_pkg.add(l_calling_fn, 'book_type_code:', l_asset_hdr_rec.book_type_code, p_log_level_rec);
1913: end if;
1914:

Line 1911: fa_debug_pkg.add(l_calling_fn, 'asset_id:', l_asset_hdr_rec.asset_id, p_log_level_rec);

1907:
1908: if g_log_level_rec.statement_level then
1909: fa_debug_pkg.add(l_calling_fn, 'trx_type_code:', l_dist_trans_rec.transaction_type_code, p_log_level_rec);
1910: fa_debug_pkg.add(l_calling_fn, 'trx_date_entered:', l_dist_trans_rec.transaction_date_entered, p_log_level_rec);
1911: fa_debug_pkg.add(l_calling_fn, 'asset_id:', l_asset_hdr_rec.asset_id, p_log_level_rec);
1912: fa_debug_pkg.add(l_calling_fn, 'book_type_code:', l_asset_hdr_rec.book_type_code, p_log_level_rec);
1913: end if;
1914:
1915: /************* routine for debug

Line 1912: fa_debug_pkg.add(l_calling_fn, 'book_type_code:', l_asset_hdr_rec.book_type_code, p_log_level_rec);

1908: if g_log_level_rec.statement_level then
1909: fa_debug_pkg.add(l_calling_fn, 'trx_type_code:', l_dist_trans_rec.transaction_type_code, p_log_level_rec);
1910: fa_debug_pkg.add(l_calling_fn, 'trx_date_entered:', l_dist_trans_rec.transaction_date_entered, p_log_level_rec);
1911: fa_debug_pkg.add(l_calling_fn, 'asset_id:', l_asset_hdr_rec.asset_id, p_log_level_rec);
1912: fa_debug_pkg.add(l_calling_fn, 'book_type_code:', l_asset_hdr_rec.book_type_code, p_log_level_rec);
1913: end if;
1914:
1915: /************* routine for debug
1916: for i in 1..l_asset_dist_tbl.count loop

Line 1918: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'dist_id:', l_asset_dist_tbl(1).distribution_id, p_log_level_rec); end if;

1914:
1915: /************* routine for debug
1916: for i in 1..l_asset_dist_tbl.count loop
1917:
1918: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'dist_id:', l_asset_dist_tbl(1).distribution_id, p_log_level_rec); end if;
1919: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'trx_units:', l_asset_dist_tbl(1).transaction_units, p_log_level_rec); end if;
1920:
1921: end loop;
1922: *************/

Line 1919: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'trx_units:', l_asset_dist_tbl(1).transaction_units, p_log_level_rec); end if;

1915: /************* routine for debug
1916: for i in 1..l_asset_dist_tbl.count loop
1917:
1918: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'dist_id:', l_asset_dist_tbl(1).distribution_id, p_log_level_rec); end if;
1919: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'trx_units:', l_asset_dist_tbl(1).transaction_units, p_log_level_rec); end if;
1920:
1921: end loop;
1922: *************/
1923:

Line 1975: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'do_sub_retirement: retirement_id: ', l_asset_retire_rec.retirement_id, p_log_level_rec); end if;

1971:
1972: end if;
1973:
1974:
1975: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'do_sub_retirement: retirement_id: ', l_asset_retire_rec.retirement_id, p_log_level_rec); end if;
1976:
1977: l_asset_retire_rec.retirement_id := l_asset_retire_mrc_rec.retirement_id;
1978: px_asset_retire_rec := l_asset_retire_rec;
1979: px_trans_rec := l_trans_rec;

Line 2181: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'begin ', l_calling_fn, p_log_level_rec); end if;

2177: l_calling_fn varchar2(80) := 'FA_RETIREMENT_PUB.do_sub_regular_retirement';
2178:
2179: BEGIN
2180:
2181: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'begin ', l_calling_fn, p_log_level_rec); end if;
2182:
2183: -- ****************************************************
2184: -- ** Assign input parameters to local rec/tbl types
2185: -- ****************************************************

Line 2207: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'set_of_books_id: ', l_asset_hdr_rec.set_of_books_id, p_log_level_rec); end if;

2203:
2204: -- cost retirements on 0 cost assets are in fact
2205: -- treated as full retirements. (bug1565792)
2206:
2207: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'set_of_books_id: ', l_asset_hdr_rec.set_of_books_id, p_log_level_rec); end if;
2208:
2209: -- pop asset_fin_rec
2210: -- get fa_books row where transaction_header_id_out is null
2211: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_fin_rec', '', p_log_level_rec); end if;

Line 2211: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_fin_rec', '', p_log_level_rec); end if;

2207: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'set_of_books_id: ', l_asset_hdr_rec.set_of_books_id, p_log_level_rec); end if;
2208:
2209: -- pop asset_fin_rec
2210: -- get fa_books row where transaction_header_id_out is null
2211: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_fin_rec', '', p_log_level_rec); end if;
2212: if not FA_UTIL_PVT.get_asset_fin_rec
2213: (p_asset_hdr_rec => l_asset_hdr_rec,
2214: px_asset_fin_rec => l_asset_fin_rec,
2215: p_transaction_header_id => NULL,

Line 2282: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'do fa_transaction_headers_pkg.insert_row', '', p_log_level_rec); end if;

2278: g_token1 := null;
2279: raise FND_API.G_EXC_ERROR;
2280: end if;
2281:
2282: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'do fa_transaction_headers_pkg.insert_row', '', p_log_level_rec); end if;
2283: fa_transaction_headers_pkg.insert_row
2284: (x_rowid => l_th_rowid,
2285: x_transaction_header_id => l_trans_rec.transaction_header_id,
2286: x_book_type_code => l_asset_hdr_rec.book_type_code,

Line 2518: fa_debug_pkg.add(l_calling_fn, 'l_asset_deprn_rec.deprn_reserve',

2514:
2515: l_asset_retire_rec.detail_info.gain_loss_amount := 0;
2516:
2517: if (p_log_level_rec.statement_level) then
2518: fa_debug_pkg.add(l_calling_fn, 'l_asset_deprn_rec.deprn_reserve',
2519: l_asset_deprn_rec.deprn_reserve
2520: ,p_log_level_rec => p_log_level_rec);
2521: fa_debug_pkg.add(l_calling_fn, 'l_asset_fin_rec.tracking_method',
2522: l_asset_fin_rec.tracking_method

Line 2521: fa_debug_pkg.add(l_calling_fn, 'l_asset_fin_rec.tracking_method',

2517: if (p_log_level_rec.statement_level) then
2518: fa_debug_pkg.add(l_calling_fn, 'l_asset_deprn_rec.deprn_reserve',
2519: l_asset_deprn_rec.deprn_reserve
2520: ,p_log_level_rec => p_log_level_rec);
2521: fa_debug_pkg.add(l_calling_fn, 'l_asset_fin_rec.tracking_method',
2522: l_asset_fin_rec.tracking_method
2523: ,p_log_level_rec => p_log_level_rec);
2524: fa_debug_pkg.add(l_calling_fn, 'fa_cache_pkg.fazcdrd_record.rule_name',
2525: fa_cache_pkg.fazcdrd_record.rule_name

Line 2524: fa_debug_pkg.add(l_calling_fn, 'fa_cache_pkg.fazcdrd_record.rule_name',

2520: ,p_log_level_rec => p_log_level_rec);
2521: fa_debug_pkg.add(l_calling_fn, 'l_asset_fin_rec.tracking_method',
2522: l_asset_fin_rec.tracking_method
2523: ,p_log_level_rec => p_log_level_rec);
2524: fa_debug_pkg.add(l_calling_fn, 'fa_cache_pkg.fazcdrd_record.rule_name',
2525: fa_cache_pkg.fazcdrd_record.rule_name
2526: ,p_log_level_rec => p_log_level_rec);
2527: fa_debug_pkg.add(l_calling_fn, 'l_asset_fin_rec.group_asset_id',
2528: l_asset_fin_rec.group_asset_id

Line 2527: fa_debug_pkg.add(l_calling_fn, 'l_asset_fin_rec.group_asset_id',

2523: ,p_log_level_rec => p_log_level_rec);
2524: fa_debug_pkg.add(l_calling_fn, 'fa_cache_pkg.fazcdrd_record.rule_name',
2525: fa_cache_pkg.fazcdrd_record.rule_name
2526: ,p_log_level_rec => p_log_level_rec);
2527: fa_debug_pkg.add(l_calling_fn, 'l_asset_fin_rec.group_asset_id',
2528: l_asset_fin_rec.group_asset_id
2529: ,p_log_level_rec => p_log_level_rec);
2530: end if;
2531:

Line 2537: fa_debug_pkg.add(l_calling_fn, 'l_group_db_rule_name',

2533: FETCH c_get_group_method_info INTO l_group_db_rule_name;
2534: CLOSE c_get_group_method_info;
2535:
2536: if (p_log_level_rec.statement_level) then
2537: fa_debug_pkg.add(l_calling_fn, 'l_group_db_rule_name',
2538: l_group_db_rule_name
2539: ,p_log_level_rec => p_log_level_rec);
2540: end if;
2541:

Line 2564: fa_debug_pkg.add(l_calling_fn, 'l_asset_retire_rec.reserve_retired', -- ENERGY

2560: -- ENERGY
2561: l_asset_retire_rec.reserve_retired := l_reserve_retired; -- ENERGY
2562:
2563: if (p_log_level_rec.statement_level) then -- ENERGY
2564: fa_debug_pkg.add(l_calling_fn, 'l_asset_retire_rec.reserve_retired', -- ENERGY
2565: l_asset_retire_rec.reserve_retired
2566: ,p_log_level_rec => p_log_level_rec); -- ENERGY
2567: end if; -- ENERGY
2568:

Line 2591: fa_debug_pkg.add(l_calling_fn, 'l_eofy_reserve_new', l_eofy_reserve_new

2587: end if;
2588:
2589: -- Subtract Prior Year Reserve Retired from eofy_reserve
2590: if p_log_level_rec.statement_level then
2591: fa_debug_pkg.add(l_calling_fn, 'l_eofy_reserve_new', l_eofy_reserve_new
2592: ,p_log_level_rec => p_log_level_rec);
2593: fa_debug_pkg.add(l_calling_fn, 'l_asset_fin_rec.eofy_reserve', l_asset_fin_rec.eofy_reserve
2594: ,p_log_level_rec => p_log_level_rec);
2595: fa_debug_pkg.add(l_calling_fn, 'l_asset_retire_rec.eofy_reserve', l_asset_retire_rec.eofy_reserve

Line 2593: fa_debug_pkg.add(l_calling_fn, 'l_asset_fin_rec.eofy_reserve', l_asset_fin_rec.eofy_reserve

2589: -- Subtract Prior Year Reserve Retired from eofy_reserve
2590: if p_log_level_rec.statement_level then
2591: fa_debug_pkg.add(l_calling_fn, 'l_eofy_reserve_new', l_eofy_reserve_new
2592: ,p_log_level_rec => p_log_level_rec);
2593: fa_debug_pkg.add(l_calling_fn, 'l_asset_fin_rec.eofy_reserve', l_asset_fin_rec.eofy_reserve
2594: ,p_log_level_rec => p_log_level_rec);
2595: fa_debug_pkg.add(l_calling_fn, 'l_asset_retire_rec.eofy_reserve', l_asset_retire_rec.eofy_reserve
2596: ,p_log_level_rec => p_log_level_rec);
2597: end if;

Line 2595: fa_debug_pkg.add(l_calling_fn, 'l_asset_retire_rec.eofy_reserve', l_asset_retire_rec.eofy_reserve

2591: fa_debug_pkg.add(l_calling_fn, 'l_eofy_reserve_new', l_eofy_reserve_new
2592: ,p_log_level_rec => p_log_level_rec);
2593: fa_debug_pkg.add(l_calling_fn, 'l_asset_fin_rec.eofy_reserve', l_asset_fin_rec.eofy_reserve
2594: ,p_log_level_rec => p_log_level_rec);
2595: fa_debug_pkg.add(l_calling_fn, 'l_asset_retire_rec.eofy_reserve', l_asset_retire_rec.eofy_reserve
2596: ,p_log_level_rec => p_log_level_rec);
2597: end if;
2598:
2599: if (l_asset_retire_rec.eofy_reserve is null) then

Line 2660: fa_debug_pkg.add(l_calling_fn, 'l_adjusted_cost_new', l_adjusted_cost_new

2656: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2657: end if;
2658:
2659: if p_log_level_rec.statement_level then
2660: fa_debug_pkg.add(l_calling_fn, 'l_adjusted_cost_new', l_adjusted_cost_new
2661: ,p_log_level_rec => p_log_level_rec);
2662: end if;
2663:
2664: if g_log_level_rec.statement_level then

Line 2665: fa_debug_pkg.add(l_calling_fn, 'do fa_retirements_pkg.insert_row', '', p_log_level_rec);

2661: ,p_log_level_rec => p_log_level_rec);
2662: end if;
2663:
2664: if g_log_level_rec.statement_level then
2665: fa_debug_pkg.add(l_calling_fn, 'do fa_retirements_pkg.insert_row', '', p_log_level_rec);
2666: fa_debug_pkg.add(l_calling_fn, 'retirement_id: ', l_asset_retire_rec.retirement_id, p_log_level_rec);
2667: fa_debug_pkg.add(l_calling_fn, 'asset_id: ', l_asset_hdr_rec.asset_id, p_log_level_rec);
2668: fa_debug_pkg.add(l_calling_fn, 'book: ', l_asset_hdr_rec.book_type_code, p_log_level_rec);
2669: fa_debug_pkg.add(l_calling_fn, 'cost_retired: ', l_asset_retire_rec.cost_retired, p_log_level_rec);

Line 2666: fa_debug_pkg.add(l_calling_fn, 'retirement_id: ', l_asset_retire_rec.retirement_id, p_log_level_rec);

2662: end if;
2663:
2664: if g_log_level_rec.statement_level then
2665: fa_debug_pkg.add(l_calling_fn, 'do fa_retirements_pkg.insert_row', '', p_log_level_rec);
2666: fa_debug_pkg.add(l_calling_fn, 'retirement_id: ', l_asset_retire_rec.retirement_id, p_log_level_rec);
2667: fa_debug_pkg.add(l_calling_fn, 'asset_id: ', l_asset_hdr_rec.asset_id, p_log_level_rec);
2668: fa_debug_pkg.add(l_calling_fn, 'book: ', l_asset_hdr_rec.book_type_code, p_log_level_rec);
2669: fa_debug_pkg.add(l_calling_fn, 'cost_retired: ', l_asset_retire_rec.cost_retired, p_log_level_rec);
2670: end if;

Line 2667: fa_debug_pkg.add(l_calling_fn, 'asset_id: ', l_asset_hdr_rec.asset_id, p_log_level_rec);

2663:
2664: if g_log_level_rec.statement_level then
2665: fa_debug_pkg.add(l_calling_fn, 'do fa_retirements_pkg.insert_row', '', p_log_level_rec);
2666: fa_debug_pkg.add(l_calling_fn, 'retirement_id: ', l_asset_retire_rec.retirement_id, p_log_level_rec);
2667: fa_debug_pkg.add(l_calling_fn, 'asset_id: ', l_asset_hdr_rec.asset_id, p_log_level_rec);
2668: fa_debug_pkg.add(l_calling_fn, 'book: ', l_asset_hdr_rec.book_type_code, p_log_level_rec);
2669: fa_debug_pkg.add(l_calling_fn, 'cost_retired: ', l_asset_retire_rec.cost_retired, p_log_level_rec);
2670: end if;
2671:

Line 2668: fa_debug_pkg.add(l_calling_fn, 'book: ', l_asset_hdr_rec.book_type_code, p_log_level_rec);

2664: if g_log_level_rec.statement_level then
2665: fa_debug_pkg.add(l_calling_fn, 'do fa_retirements_pkg.insert_row', '', p_log_level_rec);
2666: fa_debug_pkg.add(l_calling_fn, 'retirement_id: ', l_asset_retire_rec.retirement_id, p_log_level_rec);
2667: fa_debug_pkg.add(l_calling_fn, 'asset_id: ', l_asset_hdr_rec.asset_id, p_log_level_rec);
2668: fa_debug_pkg.add(l_calling_fn, 'book: ', l_asset_hdr_rec.book_type_code, p_log_level_rec);
2669: fa_debug_pkg.add(l_calling_fn, 'cost_retired: ', l_asset_retire_rec.cost_retired, p_log_level_rec);
2670: end if;
2671:
2672: fa_retirements_pkg.insert_row

Line 2669: fa_debug_pkg.add(l_calling_fn, 'cost_retired: ', l_asset_retire_rec.cost_retired, p_log_level_rec);

2665: fa_debug_pkg.add(l_calling_fn, 'do fa_retirements_pkg.insert_row', '', p_log_level_rec);
2666: fa_debug_pkg.add(l_calling_fn, 'retirement_id: ', l_asset_retire_rec.retirement_id, p_log_level_rec);
2667: fa_debug_pkg.add(l_calling_fn, 'asset_id: ', l_asset_hdr_rec.asset_id, p_log_level_rec);
2668: fa_debug_pkg.add(l_calling_fn, 'book: ', l_asset_hdr_rec.book_type_code, p_log_level_rec);
2669: fa_debug_pkg.add(l_calling_fn, 'cost_retired: ', l_asset_retire_rec.cost_retired, p_log_level_rec);
2670: end if;
2671:
2672: fa_retirements_pkg.insert_row
2673: (x_rowid => l_asset_retire_rec.detail_info.row_id,

Line 2736: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'retirement_id: ', l_asset_retire_rec.retirement_id, p_log_level_rec); end if;

2732: ,p_log_level_rec => p_log_level_rec);
2733:
2734: -- return retirement_id if book is primary
2735: -- The retirement_ids of all reporting books will be same.
2736: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'retirement_id: ', l_asset_retire_rec.retirement_id, p_log_level_rec); end if;
2737: px_asset_retire_rec := l_asset_retire_rec;
2738:
2739: -- Bug 6665510: FP: Japan Tax Reform Project (Start)
2740: if nvl(fa_cache_pkg.fazccmt_record.GUARANTEE_RATE_METHOD_FLAG,'NO') = 'YES' then

Line 2749: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Fetching rate_in_use ', l_rate_in_use, p_log_level_rec); end if;

2745: WHERE asset_id = l_asset_hdr_rec.asset_id
2746: AND book_type_code = l_asset_hdr_rec.Book_Type_Code
2747: AND transaction_header_id_out is null;
2748:
2749: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Fetching rate_in_use ', l_rate_in_use, p_log_level_rec); end if;
2750:
2751: end if;
2752:
2753: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'l_rate_in_use: ', l_rate_in_use, p_log_level_rec); end if;

Line 2753: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'l_rate_in_use: ', l_rate_in_use, p_log_level_rec); end if;

2749: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Fetching rate_in_use ', l_rate_in_use, p_log_level_rec); end if;
2750:
2751: end if;
2752:
2753: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'l_rate_in_use: ', l_rate_in_use, p_log_level_rec); end if;
2754: -- Bug 6665510: FP: Japan Tax Reform Project (End)
2755:
2756: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'do fa_books_pkg.update_row', '', p_log_level_rec); end if;
2757: -- terminate current fa_books row

Line 2756: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'do fa_books_pkg.update_row', '', p_log_level_rec); end if;

2752:
2753: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'l_rate_in_use: ', l_rate_in_use, p_log_level_rec); end if;
2754: -- Bug 6665510: FP: Japan Tax Reform Project (End)
2755:
2756: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'do fa_books_pkg.update_row', '', p_log_level_rec); end if;
2757: -- terminate current fa_books row
2758: fa_books_pkg.update_row (
2759: X_Rowid => NULL,
2760: X_Book_Type_Code => l_asset_hdr_rec.Book_Type_Code,

Line 2837: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'do fa_books_pkg.insert_row', '', p_log_level_rec); end if;

2833: X_mrc_sob_type_code => p_mrc_sob_type_code,
2834: X_Calling_Fn => l_calling_fn
2835: ,p_log_level_rec => p_log_level_rec);
2836:
2837: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'do fa_books_pkg.insert_row', '', p_log_level_rec); end if;
2838: -- insert into fa books
2839: fa_books_pkg.insert_row
2840: (X_Rowid => l_bk_rowid,
2841: X_Book_Type_Code => l_asset_hdr_rec.book_type_code,

Line 2982: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'do fa_distribution_history_pkg.update_row', '', p_log_level_rec); end if;

2978: l_asset_hdr_rec.book_type_code) loop
2979:
2980: dh_rec.transaction_units := -1 * dh_rec.units_assigned;
2981:
2982: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'do fa_distribution_history_pkg.update_row', '', p_log_level_rec); end if;
2983:
2984: fa_distribution_history_pkg.update_row
2985: (null,
2986: dh_rec.distribution_id,

Line 3008: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'end ', l_calling_fn, p_log_level_rec); end if;

3004: end loop;
3005:
3006: end if;
3007:
3008: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'end ', l_calling_fn, p_log_level_rec); end if;
3009:
3010: return TRUE;
3011:
3012: EXCEPTION

Line 3056: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'begin ', l_calling_fn, p_log_level_rec); end if;

3052:
3053: BEGIN
3054:
3055:
3056: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'begin ', l_calling_fn, p_log_level_rec); end if;
3057:
3058: if (p_mrc_sob_type_code = 'P') then
3059: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'calling Do_Calc_GainLoss_Asset... ', '', p_log_level_rec); end if;
3060: FA_GAINLOSS_PKG.Do_Calc_GainLoss_Asset

Line 3059: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'calling Do_Calc_GainLoss_Asset... ', '', p_log_level_rec); end if;

3055:
3056: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'begin ', l_calling_fn, p_log_level_rec); end if;
3057:
3058: if (p_mrc_sob_type_code = 'P') then
3059: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'calling Do_Calc_GainLoss_Asset... ', '', p_log_level_rec); end if;
3060: FA_GAINLOSS_PKG.Do_Calc_GainLoss_Asset
3061: (p_retirement_id => p_retirement_id
3062: ,x_return_status => l_return_status
3063: ,p_log_level_rec => p_log_level_rec);

Line 3160: fa_debug_pkg.initialize;

3156: -- initialize error message stack.
3157: fa_srvr_msg.init_server_message;
3158:
3159: -- initialize debug message stack.
3160: fa_debug_pkg.initialize;
3161: end if;
3162:
3163: -- override FA:PRINT_DEBUG profile option.
3164: -- if (p_debug_flag = 'YES') then

Line 3165: -- fa_debug_pkg.set_debug_flag;

3161: end if;
3162:
3163: -- override FA:PRINT_DEBUG profile option.
3164: -- if (p_debug_flag = 'YES') then
3165: -- fa_debug_pkg.set_debug_flag;
3166: -- end if;
3167:
3168:
3169: -- ****************************************************

Line 3249: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'before do_validation', '', g_log_level_rec); end if;

3245: -- *********************************************
3246: -- ** Do basic validation on input parameters
3247: -- *********************************************
3248:
3249: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'before do_validation', '', g_log_level_rec); end if;
3250:
3251: -- validate that all user-entered input parameters are valid
3252: if not do_validation
3253: (p_validation_type => g_undo_retirement

Line 3270: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'after do_validation', '', g_log_level_rec); end if;

3266: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3267: end if;
3268:
3269:
3270: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'after do_validation', '', g_log_level_rec); end if;
3271:
3272: l_trans_rec.transaction_type_code := null;
3273:
3274:

Line 3521: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop period_rec', '', p_log_level_rec); end if;

3517: fnd_profile.put('GL_SET_OF_BKS_ID', l_asset_hdr_rec.set_of_books_id);
3518: fnd_client_info.set_currency_context(to_char(l_asset_hdr_rec.set_of_books_id));
3519:
3520: -- pop current period_rec info
3521: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop period_rec', '', p_log_level_rec); end if;
3522: if not FA_UTIL_PVT.get_period_rec
3523: (p_book => l_asset_hdr_rec.book_type_code
3524: ,p_effective_date => NULL
3525: ,x_period_rec => l_period_rec

Line 3536: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'begin asset/book-level validation on transaction', '', p_log_level_rec); end if;

3532: -- ***************************************************
3533: -- begin asset/book-level validation on transaction
3534:
3535: -- nothing to do here
3536: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'begin asset/book-level validation on transaction', '', p_log_level_rec); end if;
3537:
3538: -- ***************************
3539: -- ** Transaction approval
3540: -- ***************************

Line 3557: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'calling do_sub_retirement for each book/sob', '', p_log_level_rec); end if;

3553: -- ***************************
3554: -- ** Main
3555: -- ***************************
3556:
3557: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'calling do_sub_retirement for each book/sob', '', p_log_level_rec); end if;
3558:
3559: l_rate := 1;
3560: if not undo_sub_retirement
3561: (p_trans_rec => l_trans_rec

Line 3584: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'in sob_id loop', '', p_log_level_rec); end if;

3580: -- loop thourgh reporting set of books
3581: for sob_rec in sob_cursor(l_asset_hdr_rec.book_type_code
3582: ,l_asset_hdr_rec.set_of_books_id) loop
3583:
3584: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'in sob_id loop', '', p_log_level_rec); end if;
3585:
3586: -- set the sob_id and currency context for reporting book(sob)
3587: fnd_profile.put('GL_SET_OF_BKS_ID', sob_rec.sob_id);
3588: fnd_client_info.set_currency_context(to_char(sob_rec.sob_id));

Line 3733: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_desc_rec', '', p_log_level_rec); end if;

3729: l_asset_hdr_rec.asset_id := l_asset_retire_rec.detail_info.asset_id;
3730: l_asset_hdr_rec.book_type_code := l_asset_retire_rec.detail_info.book_type_code;
3731:
3732: -- pop asset_desc_rec
3733: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_desc_rec', '', p_log_level_rec); end if;
3734: if not FA_UTIL_PVT.get_asset_desc_rec
3735: (p_asset_hdr_rec => l_asset_hdr_rec
3736: ,px_asset_desc_rec => l_asset_desc_rec
3737: ,p_log_level_rec => p_log_level_rec) then

Line 3743: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_fin_rec', '', p_log_level_rec); end if;

3739: end if;
3740:
3741: -- pop asset_fin_rec
3742: -- get fa_books row where transaction_header_id_out is null
3743: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_fin_rec', '', p_log_level_rec); end if;
3744: if not FA_UTIL_PVT.get_asset_fin_rec
3745: (p_asset_hdr_rec => l_asset_hdr_rec
3746: ,px_asset_fin_rec => l_asset_fin_rec
3747: ,p_transaction_header_id => NULL

Line 3754: fa_debug_pkg.add(l_calling_fn, 'after pop asset_fin_rec', '', p_log_level_rec);

3750: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3751: end if;
3752:
3753: if g_log_level_rec.statement_level then
3754: fa_debug_pkg.add(l_calling_fn, 'after pop asset_fin_rec', '', p_log_level_rec);
3755: fa_debug_pkg.add(l_calling_fn, 'asset_hdr: set_of_books_id: ', l_asset_hdr_rec.set_of_books_id, p_log_level_rec);
3756: end if;
3757:
3758: /*

Line 3755: fa_debug_pkg.add(l_calling_fn, 'asset_hdr: set_of_books_id: ', l_asset_hdr_rec.set_of_books_id, p_log_level_rec);

3751: end if;
3752:
3753: if g_log_level_rec.statement_level then
3754: fa_debug_pkg.add(l_calling_fn, 'after pop asset_fin_rec', '', p_log_level_rec);
3755: fa_debug_pkg.add(l_calling_fn, 'asset_hdr: set_of_books_id: ', l_asset_hdr_rec.set_of_books_id, p_log_level_rec);
3756: end if;
3757:
3758: /*
3759: * Take care source line

Line 3848: fa_debug_pkg.add(l_calling_fn, 'Asset_Id:', l_asset_hdr_rec.Asset_Id, p_log_level_rec);

3844: FETCH get_units_before_ret into l_old_units;
3845: CLOSE get_units_before_ret;
3846:
3847: if g_log_level_rec.statement_level then
3848: fa_debug_pkg.add(l_calling_fn, 'Asset_Id:', l_asset_hdr_rec.Asset_Id, p_log_level_rec);
3849: fa_debug_pkg.add(l_calling_fn, 'p_mrc_sob_type_code:', p_mrc_sob_type_code, p_log_level_rec);
3850: fa_debug_pkg.add(l_calling_fn, 'Cost before ret:', l_old_cost, p_log_level_rec);
3851: fa_debug_pkg.add(l_calling_fn, 'l_asset_retire_rec.cost_retired:', l_asset_retire_rec.cost_retired, p_log_level_rec);
3852: fa_debug_pkg.add(l_calling_fn, 'l_asset_retire_rec.units_retired:', l_asset_retire_rec.units_retired, p_log_level_rec);

Line 3849: fa_debug_pkg.add(l_calling_fn, 'p_mrc_sob_type_code:', p_mrc_sob_type_code, p_log_level_rec);

3845: CLOSE get_units_before_ret;
3846:
3847: if g_log_level_rec.statement_level then
3848: fa_debug_pkg.add(l_calling_fn, 'Asset_Id:', l_asset_hdr_rec.Asset_Id, p_log_level_rec);
3849: fa_debug_pkg.add(l_calling_fn, 'p_mrc_sob_type_code:', p_mrc_sob_type_code, p_log_level_rec);
3850: fa_debug_pkg.add(l_calling_fn, 'Cost before ret:', l_old_cost, p_log_level_rec);
3851: fa_debug_pkg.add(l_calling_fn, 'l_asset_retire_rec.cost_retired:', l_asset_retire_rec.cost_retired, p_log_level_rec);
3852: fa_debug_pkg.add(l_calling_fn, 'l_asset_retire_rec.units_retired:', l_asset_retire_rec.units_retired, p_log_level_rec);
3853: fa_debug_pkg.add(l_calling_fn, 'l_old_units:', l_old_units, p_log_level_rec);

Line 3850: fa_debug_pkg.add(l_calling_fn, 'Cost before ret:', l_old_cost, p_log_level_rec);

3846:
3847: if g_log_level_rec.statement_level then
3848: fa_debug_pkg.add(l_calling_fn, 'Asset_Id:', l_asset_hdr_rec.Asset_Id, p_log_level_rec);
3849: fa_debug_pkg.add(l_calling_fn, 'p_mrc_sob_type_code:', p_mrc_sob_type_code, p_log_level_rec);
3850: fa_debug_pkg.add(l_calling_fn, 'Cost before ret:', l_old_cost, p_log_level_rec);
3851: fa_debug_pkg.add(l_calling_fn, 'l_asset_retire_rec.cost_retired:', l_asset_retire_rec.cost_retired, p_log_level_rec);
3852: fa_debug_pkg.add(l_calling_fn, 'l_asset_retire_rec.units_retired:', l_asset_retire_rec.units_retired, p_log_level_rec);
3853: fa_debug_pkg.add(l_calling_fn, 'l_old_units:', l_old_units, p_log_level_rec);
3854: fa_debug_pkg.add(l_calling_fn, 'l_asset_desc_rec.current_units:', l_asset_desc_rec.current_units, p_log_level_rec);

Line 3851: fa_debug_pkg.add(l_calling_fn, 'l_asset_retire_rec.cost_retired:', l_asset_retire_rec.cost_retired, p_log_level_rec);

3847: if g_log_level_rec.statement_level then
3848: fa_debug_pkg.add(l_calling_fn, 'Asset_Id:', l_asset_hdr_rec.Asset_Id, p_log_level_rec);
3849: fa_debug_pkg.add(l_calling_fn, 'p_mrc_sob_type_code:', p_mrc_sob_type_code, p_log_level_rec);
3850: fa_debug_pkg.add(l_calling_fn, 'Cost before ret:', l_old_cost, p_log_level_rec);
3851: fa_debug_pkg.add(l_calling_fn, 'l_asset_retire_rec.cost_retired:', l_asset_retire_rec.cost_retired, p_log_level_rec);
3852: fa_debug_pkg.add(l_calling_fn, 'l_asset_retire_rec.units_retired:', l_asset_retire_rec.units_retired, p_log_level_rec);
3853: fa_debug_pkg.add(l_calling_fn, 'l_old_units:', l_old_units, p_log_level_rec);
3854: fa_debug_pkg.add(l_calling_fn, 'l_asset_desc_rec.current_units:', l_asset_desc_rec.current_units, p_log_level_rec);
3855:

Line 3852: fa_debug_pkg.add(l_calling_fn, 'l_asset_retire_rec.units_retired:', l_asset_retire_rec.units_retired, p_log_level_rec);

3848: fa_debug_pkg.add(l_calling_fn, 'Asset_Id:', l_asset_hdr_rec.Asset_Id, p_log_level_rec);
3849: fa_debug_pkg.add(l_calling_fn, 'p_mrc_sob_type_code:', p_mrc_sob_type_code, p_log_level_rec);
3850: fa_debug_pkg.add(l_calling_fn, 'Cost before ret:', l_old_cost, p_log_level_rec);
3851: fa_debug_pkg.add(l_calling_fn, 'l_asset_retire_rec.cost_retired:', l_asset_retire_rec.cost_retired, p_log_level_rec);
3852: fa_debug_pkg.add(l_calling_fn, 'l_asset_retire_rec.units_retired:', l_asset_retire_rec.units_retired, p_log_level_rec);
3853: fa_debug_pkg.add(l_calling_fn, 'l_old_units:', l_old_units, p_log_level_rec);
3854: fa_debug_pkg.add(l_calling_fn, 'l_asset_desc_rec.current_units:', l_asset_desc_rec.current_units, p_log_level_rec);
3855:
3856: end if;

Line 3853: fa_debug_pkg.add(l_calling_fn, 'l_old_units:', l_old_units, p_log_level_rec);

3849: fa_debug_pkg.add(l_calling_fn, 'p_mrc_sob_type_code:', p_mrc_sob_type_code, p_log_level_rec);
3850: fa_debug_pkg.add(l_calling_fn, 'Cost before ret:', l_old_cost, p_log_level_rec);
3851: fa_debug_pkg.add(l_calling_fn, 'l_asset_retire_rec.cost_retired:', l_asset_retire_rec.cost_retired, p_log_level_rec);
3852: fa_debug_pkg.add(l_calling_fn, 'l_asset_retire_rec.units_retired:', l_asset_retire_rec.units_retired, p_log_level_rec);
3853: fa_debug_pkg.add(l_calling_fn, 'l_old_units:', l_old_units, p_log_level_rec);
3854: fa_debug_pkg.add(l_calling_fn, 'l_asset_desc_rec.current_units:', l_asset_desc_rec.current_units, p_log_level_rec);
3855:
3856: end if;
3857: -- Bug#2306068: Fixed wrong check of partial unit retirement

Line 3854: fa_debug_pkg.add(l_calling_fn, 'l_asset_desc_rec.current_units:', l_asset_desc_rec.current_units, p_log_level_rec);

3850: fa_debug_pkg.add(l_calling_fn, 'Cost before ret:', l_old_cost, p_log_level_rec);
3851: fa_debug_pkg.add(l_calling_fn, 'l_asset_retire_rec.cost_retired:', l_asset_retire_rec.cost_retired, p_log_level_rec);
3852: fa_debug_pkg.add(l_calling_fn, 'l_asset_retire_rec.units_retired:', l_asset_retire_rec.units_retired, p_log_level_rec);
3853: fa_debug_pkg.add(l_calling_fn, 'l_old_units:', l_old_units, p_log_level_rec);
3854: fa_debug_pkg.add(l_calling_fn, 'l_asset_desc_rec.current_units:', l_asset_desc_rec.current_units, p_log_level_rec);
3855:
3856: end if;
3857: -- Bug#2306068: Fixed wrong check of partial unit retirement
3858: -- 0 cost condition added to allow for partial unit retirements/reinstatements

Line 3878: fa_debug_pkg.add(l_calling_fn, 'deleting a partial unit retirement', '', p_log_level_rec);

3874: -- l_trans_rec.transaction_header_id should be trx_header_id
3875: -- of PARTIAL RETIREMENT row in TH table
3876:
3877: if g_log_level_rec.statement_level then
3878: fa_debug_pkg.add(l_calling_fn, 'deleting a partial unit retirement', '', p_log_level_rec);
3879:
3880: fa_debug_pkg.add(l_calling_fn, 'FA_BOOKS_PKG.DELETE_ROW', '', p_log_level_rec);
3881: fa_debug_pkg.add(l_calling_fn, 'trx_id: ', l_asset_retire_rec.detail_info.transaction_header_id_in, p_log_level_rec);
3882: end if;

Line 3880: fa_debug_pkg.add(l_calling_fn, 'FA_BOOKS_PKG.DELETE_ROW', '', p_log_level_rec);

3876:
3877: if g_log_level_rec.statement_level then
3878: fa_debug_pkg.add(l_calling_fn, 'deleting a partial unit retirement', '', p_log_level_rec);
3879:
3880: fa_debug_pkg.add(l_calling_fn, 'FA_BOOKS_PKG.DELETE_ROW', '', p_log_level_rec);
3881: fa_debug_pkg.add(l_calling_fn, 'trx_id: ', l_asset_retire_rec.detail_info.transaction_header_id_in, p_log_level_rec);
3882: end if;
3883:
3884: FA_BOOKS_PKG.DELETE_ROW

Line 3881: fa_debug_pkg.add(l_calling_fn, 'trx_id: ', l_asset_retire_rec.detail_info.transaction_header_id_in, p_log_level_rec);

3877: if g_log_level_rec.statement_level then
3878: fa_debug_pkg.add(l_calling_fn, 'deleting a partial unit retirement', '', p_log_level_rec);
3879:
3880: fa_debug_pkg.add(l_calling_fn, 'FA_BOOKS_PKG.DELETE_ROW', '', p_log_level_rec);
3881: fa_debug_pkg.add(l_calling_fn, 'trx_id: ', l_asset_retire_rec.detail_info.transaction_header_id_in, p_log_level_rec);
3882: end if;
3883:
3884: FA_BOOKS_PKG.DELETE_ROW
3885: (X_Transaction_Header_Id_In =>

Line 3892: fa_debug_pkg.add(l_calling_fn, 'FA_BOOKS_PKG.REACTIVATE_ROW', '', p_log_level_rec);

3888: X_Calling_Fn => l_calling_fn
3889: ,p_log_level_rec => p_log_level_rec);
3890:
3891: if g_log_level_rec.statement_level then
3892: fa_debug_pkg.add(l_calling_fn, 'FA_BOOKS_PKG.REACTIVATE_ROW', '', p_log_level_rec);
3893: fa_debug_pkg.add(l_calling_fn, 'trx_id: ', l_asset_retire_rec.detail_info.transaction_header_id_in, p_log_level_rec);
3894: end if;
3895:
3896: FA_BOOKS_PKG.REACTIVATE_ROW

Line 3893: fa_debug_pkg.add(l_calling_fn, 'trx_id: ', l_asset_retire_rec.detail_info.transaction_header_id_in, p_log_level_rec);

3889: ,p_log_level_rec => p_log_level_rec);
3890:
3891: if g_log_level_rec.statement_level then
3892: fa_debug_pkg.add(l_calling_fn, 'FA_BOOKS_PKG.REACTIVATE_ROW', '', p_log_level_rec);
3893: fa_debug_pkg.add(l_calling_fn, 'trx_id: ', l_asset_retire_rec.detail_info.transaction_header_id_in, p_log_level_rec);
3894: end if;
3895:
3896: FA_BOOKS_PKG.REACTIVATE_ROW
3897: (X_Transaction_Header_Id_Out =>

Line 3904: fa_debug_pkg.add(l_calling_fn, 'FA_BOOKS_PKG.DELETE_ROW', '', p_log_level_rec);

3900: X_Calling_Fn => l_calling_fn
3901: ,p_log_level_rec => p_log_level_rec);
3902:
3903: if g_log_level_rec.statement_level then
3904: fa_debug_pkg.add(l_calling_fn, 'FA_BOOKS_PKG.DELETE_ROW', '', p_log_level_rec);
3905: fa_debug_pkg.add(l_calling_fn, 'ROW: ', l_asset_retire_rec.detail_info.row_id, p_log_level_rec);
3906: end if;
3907:
3908: FA_RETIREMENTS_PKG.DELETE_ROW

Line 3905: fa_debug_pkg.add(l_calling_fn, 'ROW: ', l_asset_retire_rec.detail_info.row_id, p_log_level_rec);

3901: ,p_log_level_rec => p_log_level_rec);
3902:
3903: if g_log_level_rec.statement_level then
3904: fa_debug_pkg.add(l_calling_fn, 'FA_BOOKS_PKG.DELETE_ROW', '', p_log_level_rec);
3905: fa_debug_pkg.add(l_calling_fn, 'ROW: ', l_asset_retire_rec.detail_info.row_id, p_log_level_rec);
3906: end if;
3907:
3908: FA_RETIREMENTS_PKG.DELETE_ROW
3909: (X_Rowid => l_asset_retire_rec.detail_info.row_id,

Line 3915: fa_debug_pkg.add(l_calling_fn, 'Asset_Id:', l_asset_hdr_rec.Asset_Id, p_log_level_rec);

3911: X_Calling_Fn => l_calling_fn
3912: ,p_log_level_rec => p_log_level_rec);
3913:
3914: if g_log_level_rec.statement_level then
3915: fa_debug_pkg.add(l_calling_fn, 'Asset_Id:', l_asset_hdr_rec.Asset_Id, p_log_level_rec);
3916: fa_debug_pkg.add(l_calling_fn, 'Book_Type_Code:', l_asset_hdr_rec.Book_Type_Code, p_log_level_rec);
3917: fa_debug_pkg.add(l_calling_fn, 'p_mrc_sob_type_code:', p_mrc_sob_type_code, p_log_level_rec);
3918: fa_debug_pkg.add(l_calling_fn, 'book class:', fa_cache_pkg.fazcbc_record.book_class, p_log_level_rec);
3919: end if;

Line 3916: fa_debug_pkg.add(l_calling_fn, 'Book_Type_Code:', l_asset_hdr_rec.Book_Type_Code, p_log_level_rec);

3912: ,p_log_level_rec => p_log_level_rec);
3913:
3914: if g_log_level_rec.statement_level then
3915: fa_debug_pkg.add(l_calling_fn, 'Asset_Id:', l_asset_hdr_rec.Asset_Id, p_log_level_rec);
3916: fa_debug_pkg.add(l_calling_fn, 'Book_Type_Code:', l_asset_hdr_rec.Book_Type_Code, p_log_level_rec);
3917: fa_debug_pkg.add(l_calling_fn, 'p_mrc_sob_type_code:', p_mrc_sob_type_code, p_log_level_rec);
3918: fa_debug_pkg.add(l_calling_fn, 'book class:', fa_cache_pkg.fazcbc_record.book_class, p_log_level_rec);
3919: end if;
3920:

Line 3917: fa_debug_pkg.add(l_calling_fn, 'p_mrc_sob_type_code:', p_mrc_sob_type_code, p_log_level_rec);

3913:
3914: if g_log_level_rec.statement_level then
3915: fa_debug_pkg.add(l_calling_fn, 'Asset_Id:', l_asset_hdr_rec.Asset_Id, p_log_level_rec);
3916: fa_debug_pkg.add(l_calling_fn, 'Book_Type_Code:', l_asset_hdr_rec.Book_Type_Code, p_log_level_rec);
3917: fa_debug_pkg.add(l_calling_fn, 'p_mrc_sob_type_code:', p_mrc_sob_type_code, p_log_level_rec);
3918: fa_debug_pkg.add(l_calling_fn, 'book class:', fa_cache_pkg.fazcbc_record.book_class, p_log_level_rec);
3919: end if;
3920:
3921: if (p_mrc_sob_type_code <> 'R') then

Line 3918: fa_debug_pkg.add(l_calling_fn, 'book class:', fa_cache_pkg.fazcbc_record.book_class, p_log_level_rec);

3914: if g_log_level_rec.statement_level then
3915: fa_debug_pkg.add(l_calling_fn, 'Asset_Id:', l_asset_hdr_rec.Asset_Id, p_log_level_rec);
3916: fa_debug_pkg.add(l_calling_fn, 'Book_Type_Code:', l_asset_hdr_rec.Book_Type_Code, p_log_level_rec);
3917: fa_debug_pkg.add(l_calling_fn, 'p_mrc_sob_type_code:', p_mrc_sob_type_code, p_log_level_rec);
3918: fa_debug_pkg.add(l_calling_fn, 'book class:', fa_cache_pkg.fazcbc_record.book_class, p_log_level_rec);
3919: end if;
3920:
3921: if (p_mrc_sob_type_code <> 'R') then
3922:

Line 3924: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'before get_transfer_id', '', p_log_level_rec); end if;

3920:
3921: if (p_mrc_sob_type_code <> 'R') then
3922:
3923: if (fa_cache_pkg.fazcbc_record.book_class = 'CORPORATE') then
3924: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'before get_transfer_id', '', p_log_level_rec); end if;
3925:
3926: l_partial_unit_ret_flag := 'N';
3927:
3928: open get_transfer_id;

Line 3950: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'after get_transfer_id', '', p_log_level_rec); end if;

3946:
3947: close get_transfer_id;
3948:
3949:
3950: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'after get_transfer_id', '', p_log_level_rec); end if;
3951:
3952: if (l_partial_unit_ret_flag='Y') then
3953:
3954: --delete a row only if a distribution is partially retired

Line 3955: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'FA_DISTRIBUTION_HISTORY_PKG.DELETE_ROW', '', p_log_level_rec); end if;

3951:
3952: if (l_partial_unit_ret_flag='Y') then
3953:
3954: --delete a row only if a distribution is partially retired
3955: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'FA_DISTRIBUTION_HISTORY_PKG.DELETE_ROW', '', p_log_level_rec); end if;
3956: FA_DISTRIBUTION_HISTORY_PKG.DELETE_ROW
3957: (X_Asset_Id => l_asset_hdr_rec.Asset_Id,
3958: X_Book_Type_Code=> l_asset_hdr_rec.Book_Type_Code,
3959: X_Transaction_Header_Id => transfer_id,

Line 3965: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'FA_DISTRIBUTION_HISTORY_PKG.REACTIVATE_ROW', '', p_log_level_rec); end if;

3961: ,p_log_level_rec => p_log_level_rec);
3962:
3963: end if;
3964:
3965: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'FA_DISTRIBUTION_HISTORY_PKG.REACTIVATE_ROW', '', p_log_level_rec); end if;
3966: FA_DISTRIBUTION_HISTORY_PKG.REACTIVATE_ROW
3967: (X_Transaction_Header_Id_Out =>
3968: transfer_id,
3969: X_Asset_Id => l_asset_hdr_rec.Asset_Id,

Line 3974: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'FA_ASSET_HISTORY_PKG.DELETE_ROW', '', p_log_level_rec); end if;

3970: X_Book_Type_Code=> l_asset_hdr_rec.Book_Type_Code,
3971: X_Calling_Fn => l_calling_fn
3972: ,p_log_level_rec => p_log_level_rec);
3973:
3974: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'FA_ASSET_HISTORY_PKG.DELETE_ROW', '', p_log_level_rec); end if;
3975: FA_ASSET_HISTORY_PKG.DELETE_ROW
3976: (X_Transaction_Header_Id_In =>
3977: l_asset_retire_rec.detail_info.transaction_header_id_in,
3978: X_Asset_Id => l_asset_hdr_rec.Asset_Id,

Line 3982: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'FA_ASSET_HISTORY_PKG.REACTIVATE_ROW', '', p_log_level_rec); end if;

3978: X_Asset_Id => l_asset_hdr_rec.Asset_Id,
3979: X_Calling_Fn => l_calling_fn
3980: ,p_log_level_rec => p_log_level_rec);
3981:
3982: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'FA_ASSET_HISTORY_PKG.REACTIVATE_ROW', '', p_log_level_rec); end if;
3983: FA_ASSET_HISTORY_PKG.REACTIVATE_ROW
3984: (X_Transaction_Header_Id_Out =>
3985: l_asset_retire_rec.detail_info.transaction_header_id_in,
3986: X_Asset_Id => l_asset_hdr_rec.Asset_Id,

Line 3990: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'FA_ADDITIONS_PKG.UPDATE_UNITS', '', p_log_level_rec); end if;

3986: X_Asset_Id => l_asset_hdr_rec.Asset_Id,
3987: X_Calling_Fn => l_calling_fn
3988: ,p_log_level_rec => p_log_level_rec);
3989:
3990: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'FA_ADDITIONS_PKG.UPDATE_UNITS', '', p_log_level_rec); end if;
3991: FA_ADDITIONS_PKG.UPDATE_UNITS
3992: (X_Asset_Id => l_asset_hdr_rec.Asset_Id,
3993:
3994: X_Calling_Fn => l_calling_fn

Line 3996: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'FA_TRANSFER_DETAILS_PKG.DELETE_ROW', '', p_log_level_rec); end if;

3992: (X_Asset_Id => l_asset_hdr_rec.Asset_Id,
3993:
3994: X_Calling_Fn => l_calling_fn
3995: ,p_log_level_rec => p_log_level_rec);
3996: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'FA_TRANSFER_DETAILS_PKG.DELETE_ROW', '', p_log_level_rec); end if;
3997: FA_TRANSFER_DETAILS_PKG.DELETE_ROW
3998: (X_Transfer_Header_Id => transfer_id,
3999: X_Calling_Fn => l_calling_fn
4000: ,p_log_level_rec => p_log_level_rec);

Line 4004: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'FA_TRANSACTION_HEADERS_PKG.DELETE_ROW', '', p_log_level_rec); end if;

4000: ,p_log_level_rec => p_log_level_rec);
4001:
4002: end if; -- if corporate
4003:
4004: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'FA_TRANSACTION_HEADERS_PKG.DELETE_ROW', '', p_log_level_rec); end if;
4005: FA_TRANSACTION_HEADERS_PKG.DELETE_ROW -- delete PARTIAL RETIREMENT row
4006: (X_Transaction_Header_Id =>
4007: l_asset_retire_rec.detail_info.transaction_header_id_in,
4008: X_Calling_Fn => l_calling_fn);

Line 4010: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'FA_TRANSACTION_HEADERS_PKG.DELETE_ROW -- delete TRANSFER OUT row', '', p_log_level_rec); end if;

4006: (X_Transaction_Header_Id =>
4007: l_asset_retire_rec.detail_info.transaction_header_id_in,
4008: X_Calling_Fn => l_calling_fn);
4009:
4010: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'FA_TRANSACTION_HEADERS_PKG.DELETE_ROW -- delete TRANSFER OUT row', '', p_log_level_rec); end if;
4011: FA_TRANSACTION_HEADERS_PKG.DELETE_ROW -- delete TRANSFER OUT row
4012: (X_Transaction_Header_Id =>
4013: transfer_id,
4014: X_Calling_Fn => l_calling_fn);

Line 4021: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'begin - deleting fa_adjustments', '', p_log_level_rec); end if;

4017:
4018: -- Remove any cost and reserve adjustment rows
4019: -- if UNDOing PARTIAL UNIT RETIREMENT
4020:
4021: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'begin - deleting fa_adjustments', '', p_log_level_rec); end if;
4022:
4023: open adj_def;
4024:
4025: begin

Line 4032: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'FA_ADJUSTMENTS_PKG.delete_row', '', p_log_level_rec); end if;

4028: fetch adj_def into l_adj_rowid;
4029:
4030: exit when adj_def%NOTFOUND;
4031:
4032: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'FA_ADJUSTMENTS_PKG.delete_row', '', p_log_level_rec); end if;
4033: FA_ADJUSTMENTS_PKG.delete_row(
4034: X_Rowid => l_adj_rowid,
4035: X_Asset_Id => l_asset_hdr_rec.asset_id,
4036: X_Calling_Fn => l_calling_fn,

Line 4048: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'done - deleting fa_adjustments', '', p_log_level_rec); end if;

4044: end;
4045:
4046: close adj_def;
4047:
4048: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'done - deleting fa_adjustments', '', p_log_level_rec); end if;
4049:
4050:
4051: else -- if not partial unit retirement
4052:

Line 4054: fa_debug_pkg.add(l_calling_fn, 'not a partial unit retirement', '', p_log_level_rec);

4050:
4051: else -- if not partial unit retirement
4052:
4053: if g_log_level_rec.statement_level then
4054: fa_debug_pkg.add(l_calling_fn, 'not a partial unit retirement', '', p_log_level_rec);
4055: fa_debug_pkg.add(l_calling_fn, 'FA_BOOKS_PKG.DELETE_ROW', '', p_log_level_rec);
4056: end if;
4057: FA_BOOKS_PKG.DELETE_ROW
4058: (X_Transaction_Header_Id_In =>

Line 4055: fa_debug_pkg.add(l_calling_fn, 'FA_BOOKS_PKG.DELETE_ROW', '', p_log_level_rec);

4051: else -- if not partial unit retirement
4052:
4053: if g_log_level_rec.statement_level then
4054: fa_debug_pkg.add(l_calling_fn, 'not a partial unit retirement', '', p_log_level_rec);
4055: fa_debug_pkg.add(l_calling_fn, 'FA_BOOKS_PKG.DELETE_ROW', '', p_log_level_rec);
4056: end if;
4057: FA_BOOKS_PKG.DELETE_ROW
4058: (X_Transaction_Header_Id_In =>
4059: l_asset_retire_rec.detail_info.transaction_header_id_in,

Line 4063: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'FA_BOOKS_PKG.REACTIVATE_ROW', '', p_log_level_rec); end if;

4059: l_asset_retire_rec.detail_info.transaction_header_id_in,
4060: X_mrc_sob_type_code => p_mrc_sob_type_code,
4061: X_Calling_Fn => l_calling_fn
4062: ,p_log_level_rec => p_log_level_rec);
4063: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'FA_BOOKS_PKG.REACTIVATE_ROW', '', p_log_level_rec); end if;
4064: FA_BOOKS_PKG.REACTIVATE_ROW
4065: (X_Transaction_Header_Id_Out =>
4066: l_asset_retire_rec.detail_info.transaction_header_id_in,
4067: X_mrc_sob_type_code => p_mrc_sob_type_code,

Line 4072: fa_debug_pkg.add(l_calling_fn, 'FA_RETIREMENTS_PKG.DELETE_ROW', '', p_log_level_rec);

4068: X_Calling_Fn => l_calling_fn
4069: ,p_log_level_rec => p_log_level_rec);
4070:
4071: if g_log_level_rec.statement_level then
4072: fa_debug_pkg.add(l_calling_fn, 'FA_RETIREMENTS_PKG.DELETE_ROW', '', p_log_level_rec);
4073: fa_debug_pkg.add(l_calling_fn, 'ROW: ', l_asset_retire_rec.detail_info.row_id, p_log_level_rec);
4074: fa_debug_pkg.add(l_calling_fn, 'retirement_id: ', l_asset_retire_rec.retirement_id, p_log_level_rec);
4075: end if;
4076: FA_RETIREMENTS_PKG.DELETE_ROW

Line 4073: fa_debug_pkg.add(l_calling_fn, 'ROW: ', l_asset_retire_rec.detail_info.row_id, p_log_level_rec);

4069: ,p_log_level_rec => p_log_level_rec);
4070:
4071: if g_log_level_rec.statement_level then
4072: fa_debug_pkg.add(l_calling_fn, 'FA_RETIREMENTS_PKG.DELETE_ROW', '', p_log_level_rec);
4073: fa_debug_pkg.add(l_calling_fn, 'ROW: ', l_asset_retire_rec.detail_info.row_id, p_log_level_rec);
4074: fa_debug_pkg.add(l_calling_fn, 'retirement_id: ', l_asset_retire_rec.retirement_id, p_log_level_rec);
4075: end if;
4076: FA_RETIREMENTS_PKG.DELETE_ROW
4077: (X_Rowid => l_asset_retire_rec.detail_info.row_id,

Line 4074: fa_debug_pkg.add(l_calling_fn, 'retirement_id: ', l_asset_retire_rec.retirement_id, p_log_level_rec);

4070:
4071: if g_log_level_rec.statement_level then
4072: fa_debug_pkg.add(l_calling_fn, 'FA_RETIREMENTS_PKG.DELETE_ROW', '', p_log_level_rec);
4073: fa_debug_pkg.add(l_calling_fn, 'ROW: ', l_asset_retire_rec.detail_info.row_id, p_log_level_rec);
4074: fa_debug_pkg.add(l_calling_fn, 'retirement_id: ', l_asset_retire_rec.retirement_id, p_log_level_rec);
4075: end if;
4076: FA_RETIREMENTS_PKG.DELETE_ROW
4077: (X_Rowid => l_asset_retire_rec.detail_info.row_id,
4078: X_mrc_sob_type_code => p_mrc_sob_type_code,

Line 4085: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'FA_DISTRIBUTION_HISTORY_PKG.REACTIVATE_ROW', '', p_log_level_rec); end if;

4081:
4082: if (p_mrc_sob_type_code <> 'R') then
4083:
4084: if (fa_cache_pkg.fazcbc_record.book_class = 'CORPORATE') then
4085: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'FA_DISTRIBUTION_HISTORY_PKG.REACTIVATE_ROW', '', p_log_level_rec); end if;
4086: FA_DISTRIBUTION_HISTORY_PKG.REACTIVATE_ROW
4087: (X_Asset_Id => l_asset_hdr_rec.asset_id,
4088: X_Book_Type_Code=> l_asset_hdr_rec.book_type_code,
4089: X_Calling_Fn => l_calling_fn

Line 4093: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'FA_TRANSACTION_HEADERS_PKG.DELETE_ROW', '', p_log_level_rec); end if;

4089: X_Calling_Fn => l_calling_fn
4090: ,p_log_level_rec => p_log_level_rec);
4091: end if; -- if corporate
4092:
4093: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'FA_TRANSACTION_HEADERS_PKG.DELETE_ROW', '', p_log_level_rec); end if;
4094: FA_TRANSACTION_HEADERS_PKG.DELETE_ROW
4095: (X_Transaction_Header_Id =>
4096: l_asset_retire_rec.detail_info.transaction_header_id_in,
4097: X_Calling_Fn => l_calling_fn

Line 4239: fa_debug_pkg.initialize;

4235: -- initialize error message stack.
4236: fa_srvr_msg.init_server_message;
4237:
4238: -- initialize debug message stack.
4239: fa_debug_pkg.initialize;
4240: end if;
4241:
4242: -- ****************************************************
4243: -- ** Assign input parameters to local rec/tbl types

Line 4260: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_retire_rec', '', g_log_level_rec); end if;

4256: -- ** Populate local record types
4257: -- *********************************
4258:
4259: -- pop asset_retire_rec to get the rowid of retirement
4260: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_retire_rec', '', g_log_level_rec); end if;
4261: if not FA_UTIL_PVT.get_asset_retire_rec
4262: (px_asset_retire_rec => l_asset_retire_rec,
4263: p_mrc_sob_type_code => 'P'
4264: ,p_log_level_rec => g_log_level_rec) then

Line 4272: fa_debug_pkg.add(l_calling_fn, 'asset_id:', l_asset_hdr_rec.asset_id, g_log_level_rec);

4268: l_asset_hdr_rec.asset_id := l_asset_retire_rec.detail_info.asset_id;
4269: l_asset_hdr_rec.book_type_code := l_asset_retire_rec.detail_info.book_type_code;
4270:
4271: if g_log_level_rec.statement_level then
4272: fa_debug_pkg.add(l_calling_fn, 'asset_id:', l_asset_hdr_rec.asset_id, g_log_level_rec);
4273: fa_debug_pkg.add(l_calling_fn, 'book_type_code:', l_asset_hdr_rec.book_type_code, g_log_level_rec);
4274: fa_debug_pkg.add(l_calling_fn, 'fa_ret retirement_id:', l_asset_retire_rec.retirement_id, g_log_level_rec);
4275: end if;
4276:

Line 4273: fa_debug_pkg.add(l_calling_fn, 'book_type_code:', l_asset_hdr_rec.book_type_code, g_log_level_rec);

4269: l_asset_hdr_rec.book_type_code := l_asset_retire_rec.detail_info.book_type_code;
4270:
4271: if g_log_level_rec.statement_level then
4272: fa_debug_pkg.add(l_calling_fn, 'asset_id:', l_asset_hdr_rec.asset_id, g_log_level_rec);
4273: fa_debug_pkg.add(l_calling_fn, 'book_type_code:', l_asset_hdr_rec.book_type_code, g_log_level_rec);
4274: fa_debug_pkg.add(l_calling_fn, 'fa_ret retirement_id:', l_asset_retire_rec.retirement_id, g_log_level_rec);
4275: end if;
4276:
4277: -- ***************************

Line 4274: fa_debug_pkg.add(l_calling_fn, 'fa_ret retirement_id:', l_asset_retire_rec.retirement_id, g_log_level_rec);

4270:
4271: if g_log_level_rec.statement_level then
4272: fa_debug_pkg.add(l_calling_fn, 'asset_id:', l_asset_hdr_rec.asset_id, g_log_level_rec);
4273: fa_debug_pkg.add(l_calling_fn, 'book_type_code:', l_asset_hdr_rec.book_type_code, g_log_level_rec);
4274: fa_debug_pkg.add(l_calling_fn, 'fa_ret retirement_id:', l_asset_retire_rec.retirement_id, g_log_level_rec);
4275: end if;
4276:
4277: -- ***************************
4278: -- ** Transaction approval

Line 4284: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'call trx approval pkg - faxcat', '', g_log_level_rec); end if;

4280: -- common for all types
4281: -- bug 1230315... adding FA_TRX_APPROVAL_PKG for all retirement
4282: -- transactions
4283:
4284: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'call trx approval pkg - faxcat', '', g_log_level_rec); end if;
4285: l_ins_status := FA_TRX_APPROVAL_PKG.faxcat
4286: (x_book => l_asset_hdr_rec.book_type_code
4287: ,x_asset_id => l_asset_hdr_rec.asset_id
4288: ,x_trx_type => 'REINSTATEMENT'

Line 4293: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'failed in FA_TRX_APPROVAL_PKG.faxcat', '', g_log_level_rec); end if;

4289: ,x_trx_date => l_asset_retire_rec.date_retired
4290: ,x_init_message_flag => 'NO'
4291: ,p_log_level_rec => g_log_level_rec);
4292: if not l_ins_status then
4293: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'failed in FA_TRX_APPROVAL_PKG.faxcat', '', g_log_level_rec); end if;
4294: -- g_msg_name := 'error msg name-after trx_app';
4295: raise FND_API.G_EXC_ERROR;
4296: end if;
4297: -- ***********************************

Line 4351: fa_debug_pkg.add(l_calling_fn, 'pop period_rec', '', g_log_level_rec);

4347: end if; -- book_type_code
4348:
4349: -- pop current period_rec info
4350: if g_log_level_rec.statement_level then
4351: fa_debug_pkg.add(l_calling_fn, 'pop period_rec', '', g_log_level_rec);
4352: fa_debug_pkg.add(l_calling_fn, 'book:', l_asset_retire_rec.detail_info.book_type_code, g_log_level_rec);
4353: end if;
4354: if not FA_UTIL_PVT.get_period_rec
4355: (p_book => l_asset_hdr_rec.book_type_code

Line 4352: fa_debug_pkg.add(l_calling_fn, 'book:', l_asset_retire_rec.detail_info.book_type_code, g_log_level_rec);

4348:
4349: -- pop current period_rec info
4350: if g_log_level_rec.statement_level then
4351: fa_debug_pkg.add(l_calling_fn, 'pop period_rec', '', g_log_level_rec);
4352: fa_debug_pkg.add(l_calling_fn, 'book:', l_asset_retire_rec.detail_info.book_type_code, g_log_level_rec);
4353: end if;
4354: if not FA_UTIL_PVT.get_period_rec
4355: (p_book => l_asset_hdr_rec.book_type_code
4356: ,p_effective_date => NULL

Line 4362: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'passed pop period_rec', '', g_log_level_rec); end if;

4358: ,p_log_level_rec => g_log_level_rec) then
4359: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4360: end if;
4361:
4362: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'passed pop period_rec', '', g_log_level_rec); end if;
4363:
4364: -- pop asset_type_rec
4365: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_type_rec', '', g_log_level_rec); end if;
4366: if not FA_UTIL_PVT.get_asset_type_rec

Line 4365: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_type_rec', '', g_log_level_rec); end if;

4361:
4362: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'passed pop period_rec', '', g_log_level_rec); end if;
4363:
4364: -- pop asset_type_rec
4365: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_type_rec', '', g_log_level_rec); end if;
4366: if not FA_UTIL_PVT.get_asset_type_rec
4367: (p_asset_hdr_rec => l_asset_hdr_rec
4368: ,px_asset_type_rec => l_asset_type_rec
4369: ,p_date_effective => NULL

Line 4385: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'passed tde_cursor', '', g_log_level_rec); end if;

4381: fetch tde_cursor
4382: into l_trans_rec.transaction_date_entered;
4383: close tde_cursor;
4384:
4385: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'passed tde_cursor', '', g_log_level_rec); end if;
4386:
4387: -- default transaction_date_entered to the current period if it is null
4388: if l_trans_rec.transaction_date_entered is null then
4389:

Line 4398: fa_debug_pkg.add(l_calling_fn, 'passed transaction_date_entered', '', g_log_level_rec);

4394: );
4395: end if;
4396:
4397: if g_log_level_rec.statement_level then
4398: fa_debug_pkg.add(l_calling_fn, 'passed transaction_date_entered', '', g_log_level_rec);
4399: fa_debug_pkg.add(l_calling_fn, 'Transaction Date: ', l_trans_rec.transaction_date_entered , g_log_level_rec);
4400: end if;
4401:
4402: -- *********************************************

Line 4399: fa_debug_pkg.add(l_calling_fn, 'Transaction Date: ', l_trans_rec.transaction_date_entered , g_log_level_rec);

4395: end if;
4396:
4397: if g_log_level_rec.statement_level then
4398: fa_debug_pkg.add(l_calling_fn, 'passed transaction_date_entered', '', g_log_level_rec);
4399: fa_debug_pkg.add(l_calling_fn, 'Transaction Date: ', l_trans_rec.transaction_date_entered , g_log_level_rec);
4400: end if;
4401:
4402: -- *********************************************
4403: -- ** Do validation

Line 4405: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'before validation', '', g_log_level_rec); end if;

4401:
4402: -- *********************************************
4403: -- ** Do validation
4404: -- *********************************************
4405: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'before validation', '', g_log_level_rec); end if;
4406: -- validate that all user-entered input parameters are valid
4407: if not do_validation
4408: (p_validation_type => g_reinstatement
4409: ,p_trans_rec => l_trans_rec

Line 4424: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'after validation', '', g_log_level_rec); end if;

4420: ,p_log_level_rec => g_log_level_rec) then
4421: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4422: end if;
4423:
4424: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'after validation', '', g_log_level_rec); end if;
4425:
4426: -- ***************************
4427: -- ** Main
4428: -- ***************************

Line 4445: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'after do_all_books_reinstatement', '', g_log_level_rec); end if;

4441: ,p_log_level_rec => g_log_level_rec) then
4442: raise FND_API.G_EXC_ERROR;
4443: end if;
4444:
4445: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'after do_all_books_reinstatement', '', g_log_level_rec); end if;
4446:
4447:
4448: -- BUG# 2376085, 2487707
4449: -- reset GL sob id to original value before moving to next book

Line 4466: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Asset type: ', l_asset_type_rec.asset_type, g_log_level_rec); end if;

4462:
4463: if (l_asset_type_rec.asset_type = 'CIP'
4464: or l_asset_type_rec.asset_type = 'CAPITALIZED') then
4465:
4466: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Asset type: ', l_asset_type_rec.asset_type, g_log_level_rec); end if;
4467:
4468: if not fa_cache_pkg.fazctbk
4469: (x_corp_book => l_asset_hdr_rec.book_type_code
4470: ,x_asset_type => l_asset_type_rec.asset_type

Line 4479: fa_debug_pkg.add(l_calling_fn, 'entered loop for tax books', '', g_log_level_rec);

4475:
4476: for l_tax_index in 1..l_tax_book_tbl.count loop
4477:
4478: if g_log_level_rec.statement_level then
4479: fa_debug_pkg.add(l_calling_fn, 'entered loop for tax books', '', g_log_level_rec);
4480: fa_debug_pkg.add(l_calling_fn, 'selected tax book: ', l_tax_book_tbl(l_tax_index), g_log_level_rec);
4481: end if;
4482:
4483: if not FA_ASSET_VAL_PVT.validate_asset_book

Line 4480: fa_debug_pkg.add(l_calling_fn, 'selected tax book: ', l_tax_book_tbl(l_tax_index), g_log_level_rec);

4476: for l_tax_index in 1..l_tax_book_tbl.count loop
4477:
4478: if g_log_level_rec.statement_level then
4479: fa_debug_pkg.add(l_calling_fn, 'entered loop for tax books', '', g_log_level_rec);
4480: fa_debug_pkg.add(l_calling_fn, 'selected tax book: ', l_tax_book_tbl(l_tax_index), g_log_level_rec);
4481: end if;
4482:
4483: if not FA_ASSET_VAL_PVT.validate_asset_book
4484: (p_transaction_type_code => l_trans_rec.transaction_type_code

Line 4490: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'failed in validate_asset_book ', '', g_log_level_rec); end if;

4486: ,p_asset_id => l_asset_hdr_rec.asset_id
4487: ,p_calling_fn => l_calling_fn) then
4488:
4489: null; -- just to ignore the error
4490: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'failed in validate_asset_book ', '', g_log_level_rec); end if;
4491:
4492: else
4493:
4494: -- cache the book information for the tax book

Line 4514: fa_debug_pkg.add(l_calling_fn, 'calling do_all_books_reinstatement for tax book', '', g_log_level_rec);

4510: where asset_id=l_asset_hdr_rec.asset_id
4511: and book_type_code=lv_asset_hdr_rec.book_type_code;
4512:
4513: if g_log_level_rec.statement_level then
4514: fa_debug_pkg.add(l_calling_fn, 'calling do_all_books_reinstatement for tax book', '', g_log_level_rec);
4515: fa_debug_pkg.add(l_calling_fn, 'retirement_id for TAX:', lv_asset_retire_rec.retirement_id, g_log_level_rec);
4516: end if;
4517:
4518: if not do_all_books_reinstatement

Line 4515: fa_debug_pkg.add(l_calling_fn, 'retirement_id for TAX:', lv_asset_retire_rec.retirement_id, g_log_level_rec);

4511: and book_type_code=lv_asset_hdr_rec.book_type_code;
4512:
4513: if g_log_level_rec.statement_level then
4514: fa_debug_pkg.add(l_calling_fn, 'calling do_all_books_reinstatement for tax book', '', g_log_level_rec);
4515: fa_debug_pkg.add(l_calling_fn, 'retirement_id for TAX:', lv_asset_retire_rec.retirement_id, g_log_level_rec);
4516: end if;
4517:
4518: if not do_all_books_reinstatement
4519: (px_trans_rec => lv_trans_rec -- tax

Line 4539: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'passed do_all_books_reinstatement for tax book', '', g_log_level_rec); end if;

4535: -- reset GL sob id to original value before moving to next book
4536: fnd_profile.put('GL_SET_OF_BKS_ID', l_orig_set_of_books_id);
4537: fnd_client_info.set_currency_context (l_orig_currency_context);
4538:
4539: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'passed do_all_books_reinstatement for tax book', '', g_log_level_rec); end if;
4540: end if;
4541:
4542: end loop;
4543:

Line 4553: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'submit calculate gain/loss program', '', g_log_level_rec); end if;

4549: -- submit calculate_gain_loss programs if flag is set
4550:
4551: if l_calculate_gain_loss_flag = FND_API.G_TRUE then
4552:
4553: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'submit calculate gain/loss program', '', g_log_level_rec); end if;
4554: if not calculate_gain_loss
4555: (p_retirement_id => l_retirement_id
4556: ,p_mrc_sob_type_code => 'P'
4557: ,p_log_level_rec => g_log_level_rec) then

Line 4729: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop period_rec', '', p_log_level_rec); end if;

4725: fnd_profile.put('GL_SET_OF_BKS_ID', l_asset_hdr_rec.set_of_books_id);
4726: fnd_client_info.set_currency_context(to_char(l_asset_hdr_rec.set_of_books_id));
4727:
4728: -- pop current period_rec info
4729: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop period_rec', '', p_log_level_rec); end if;
4730: if not FA_UTIL_PVT.get_period_rec
4731: (p_book => l_asset_hdr_rec.book_type_code
4732: ,p_effective_date => NULL
4733: ,x_period_rec => l_period_rec

Line 4743: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'begin asset/book-level validation on transaction', '', p_log_level_rec); end if;

4739: -- ** Do asset/book-level validation on transaction
4740: -- ***************************************************
4741: -- begin asset/book-level validation on transaction
4742:
4743: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'begin asset/book-level validation on transaction', '', p_log_level_rec); end if;
4744:
4745: -- check if there is an add-to-asset transaction pending
4746: -- Users must post their mass additions before they can retire the asset
4747: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if there is an add-to-asset transaction pending', '', p_log_level_rec); end if;

Line 4747: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if there is an add-to-asset transaction pending', '', p_log_level_rec); end if;

4743: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'begin asset/book-level validation on transaction', '', p_log_level_rec); end if;
4744:
4745: -- check if there is an add-to-asset transaction pending
4746: -- Users must post their mass additions before they can retire the asset
4747: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if there is an add-to-asset transaction pending', '', p_log_level_rec); end if;
4748: if FA_ASSET_VAL_PVT.validate_add_to_asset_pending
4749: (p_asset_id => l_asset_hdr_rec.asset_id
4750: ,p_book => l_asset_hdr_rec.book_type_code
4751: ,p_log_level_rec => p_log_level_rec) then

Line 4758: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if another retirement/reinstatement already pending', '', p_log_level_rec); end if;

4754: raise FND_API.G_EXC_ERROR;
4755: end if;
4756:
4757: -- check if another retirement/reinstatement already pending
4758: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if another retirement/reinstatement already pending', '', p_log_level_rec); end if;
4759: if FA_ASSET_VAL_PVT.validate_ret_rst_pending
4760: (p_asset_id => l_asset_hdr_rec.asset_id
4761: ,p_book => l_asset_hdr_rec.book_type_code
4762: ,p_log_level_rec => p_log_level_rec) then

Line 4768: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if date_retired is valid in terms of trx date', '', p_log_level_rec); end if;

4764: raise FND_API.G_EXC_ERROR;
4765: end if;
4766:
4767: -- check if date_retired is valid in terms of trx date
4768: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if date_retired is valid in terms of trx date', '', p_log_level_rec); end if;
4769: if l_asset_retire_rec.date_retired is not null then
4770:
4771: -- no transactions except Retirements and Reinstatements may be
4772: -- dated after the latest trx date

Line 4805: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'calling do_sub_retirement for each book/sob', '', p_log_level_rec); end if;

4801: -- ***************************
4802: -- ** Main
4803: -- ***************************
4804:
4805: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'calling do_sub_retirement for each book/sob', '', p_log_level_rec); end if;
4806:
4807: l_rate := 1;
4808: if not do_sub_reinstatement
4809: (px_trans_rec => l_trans_rec

Line 4841: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'in sob_id loop', '', p_log_level_rec); end if;

4837: -- loop thourgh reporting set of books
4838: for sob_rec in sob_cursor(l_asset_hdr_rec.book_type_code
4839: ,l_asset_hdr_rec.set_of_books_id) loop
4840:
4841: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'in sob_id loop', '', p_log_level_rec); end if;
4842:
4843: -- set the sob_id and currency context for reporting book(sob)
4844: fnd_profile.put('GL_SET_OF_BKS_ID', sob_rec.sob_id);
4845: fnd_client_info.set_currency_context(to_char(sob_rec.sob_id));

Line 4858: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'get currency conversion rates', '', p_log_level_rec); end if;

4854: end if;
4855:
4856: -- ? code for conversion rate when invoice trx is involved will be
4857: -- discussed later
4858: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'get currency conversion rates', '', p_log_level_rec); end if;
4859: -- if l_inv_trans_rec.transaction_type is null then
4860:
4861: /******* routine to get existing rates when invoice trx is involved
4862: -- if (l_inv_rec.source_transaction_header_id is not null)

Line 4865: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'calling get_existing_rate', '', p_log_level_rec); end if;

4861: /******* routine to get existing rates when invoice trx is involved
4862: -- if (l_inv_rec.source_transaction_header_id is not null)
4863: and (fa_cache_pkg.fazcbc_record.book_class = 'TAX') then
4864:
4865: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'calling get_existing_rate', '', p_log_level_rec); end if;
4866:
4867: -- get the exchange rate from the corporate transaction
4868: if not FA_MC_UTIL_PVT.get_existing_rate
4869: (p_set_of_books_id => sob_rec.sob_id,

Line 4881: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'calling get_trx_rate', '', p_log_level_rec); end if;

4877: if TRUE then
4878:
4879: l_exchange_date := l_trans_rec.transaction_date_entered;
4880:
4881: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'calling get_trx_rate', '', p_log_level_rec); end if;
4882:
4883: if not FA_MC_UTIL_PVT.get_trx_rate
4884: (p_prim_set_of_books_id => fa_cache_pkg.fazcbc_record.set_of_books_id,
4885: p_reporting_set_of_books_id => sob_rec.sob_id,

Line 4897: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'NOTE: Invoice trx can not be handled in mrc for now', '', p_log_level_rec); end if;

4893:
4894: -- else
4895: -- ? code for conversion rate when invoice trx is involved will be
4896: -- discussed later
4897: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'NOTE: Invoice trx can not be handled in mrc for now', '', p_log_level_rec); end if;
4898:
4899: -- end if; -- if invoice trx is not involved
4900:
4901:

Line 4994: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'begin ', l_calling_fn, p_log_level_rec); end if;

4990:
4991: BEGIN
4992:
4993:
4994: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'begin ', l_calling_fn, p_log_level_rec); end if;
4995: -- ****************************************************
4996: -- ** Assign input parameters to local rec/tbl types
4997: -- ****************************************************
4998: l_trans_rec := px_trans_rec;

Line 5019: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_fin_rec', '', p_log_level_rec); end if;

5015: fnd_client_info.set_currency_context(to_char(l_asset_hdr_rec.set_of_books_id));
5016:
5017: -- pop asset_fin_rec
5018: -- get fa_books row where transaction_header_id_out is null
5019: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_fin_rec', '', p_log_level_rec); end if;
5020: if not FA_UTIL_PVT.get_asset_fin_rec
5021: (p_asset_hdr_rec => l_asset_hdr_rec
5022: ,px_asset_fin_rec => l_asset_fin_rec
5023: ,p_transaction_header_id => NULL

Line 5030: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_retire_rec', '', p_log_level_rec); end if;

5026: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5027: end if;
5028:
5029: -- pop asset_retire_rec
5030: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_retire_rec', '', p_log_level_rec); end if;
5031: if not FA_UTIL_PVT.get_asset_retire_rec
5032: (px_asset_retire_rec => l_asset_retire_rec,
5033: p_mrc_sob_type_code => p_mrc_sob_type_code
5034: ,p_log_level_rec => p_log_level_rec) then

Line 5039: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_cat_rec', '', p_log_level_rec); end if;

5035: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5036: end if;
5037:
5038: -- pop asset_cat_rec
5039: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_cat_rec', '', p_log_level_rec); end if;
5040: if not FA_UTIL_PVT.get_asset_cat_rec
5041: (p_asset_hdr_rec => l_asset_hdr_rec
5042: ,px_asset_cat_rec => l_asset_cat_rec
5043: ,p_date_effective => NULL

Line 5114: fa_debug_pkg.add(l_calling_fn, 'trx_type_code:', lv_trans_rec.transaction_type_code, p_log_level_rec);

5110: -- asset_hdr_rec: asset_id, book_type_code(only CORPORATE)
5111: -- asset_dist_tbl: distribution_id, trx_units
5112:
5113: if g_log_level_rec.statement_level then
5114: fa_debug_pkg.add(l_calling_fn, 'trx_type_code:', lv_trans_rec.transaction_type_code, p_log_level_rec);
5115: fa_debug_pkg.add(l_calling_fn, 'trx_date_entered:', lv_trans_rec.transaction_date_entered, p_log_level_rec);
5116: fa_debug_pkg.add(l_calling_fn, 'asset_id:', l_asset_hdr_rec.asset_id, p_log_level_rec);
5117: fa_debug_pkg.add(l_calling_fn, 'book_type_code:', l_asset_hdr_rec.book_type_code, p_log_level_rec);
5118: end if;

Line 5115: fa_debug_pkg.add(l_calling_fn, 'trx_date_entered:', lv_trans_rec.transaction_date_entered, p_log_level_rec);

5111: -- asset_dist_tbl: distribution_id, trx_units
5112:
5113: if g_log_level_rec.statement_level then
5114: fa_debug_pkg.add(l_calling_fn, 'trx_type_code:', lv_trans_rec.transaction_type_code, p_log_level_rec);
5115: fa_debug_pkg.add(l_calling_fn, 'trx_date_entered:', lv_trans_rec.transaction_date_entered, p_log_level_rec);
5116: fa_debug_pkg.add(l_calling_fn, 'asset_id:', l_asset_hdr_rec.asset_id, p_log_level_rec);
5117: fa_debug_pkg.add(l_calling_fn, 'book_type_code:', l_asset_hdr_rec.book_type_code, p_log_level_rec);
5118: end if;
5119:

Line 5116: fa_debug_pkg.add(l_calling_fn, 'asset_id:', l_asset_hdr_rec.asset_id, p_log_level_rec);

5112:
5113: if g_log_level_rec.statement_level then
5114: fa_debug_pkg.add(l_calling_fn, 'trx_type_code:', lv_trans_rec.transaction_type_code, p_log_level_rec);
5115: fa_debug_pkg.add(l_calling_fn, 'trx_date_entered:', lv_trans_rec.transaction_date_entered, p_log_level_rec);
5116: fa_debug_pkg.add(l_calling_fn, 'asset_id:', l_asset_hdr_rec.asset_id, p_log_level_rec);
5117: fa_debug_pkg.add(l_calling_fn, 'book_type_code:', l_asset_hdr_rec.book_type_code, p_log_level_rec);
5118: end if;
5119:
5120: --for i in 1..l_asset_dist_tbl.count loop

Line 5117: fa_debug_pkg.add(l_calling_fn, 'book_type_code:', l_asset_hdr_rec.book_type_code, p_log_level_rec);

5113: if g_log_level_rec.statement_level then
5114: fa_debug_pkg.add(l_calling_fn, 'trx_type_code:', lv_trans_rec.transaction_type_code, p_log_level_rec);
5115: fa_debug_pkg.add(l_calling_fn, 'trx_date_entered:', lv_trans_rec.transaction_date_entered, p_log_level_rec);
5116: fa_debug_pkg.add(l_calling_fn, 'asset_id:', l_asset_hdr_rec.asset_id, p_log_level_rec);
5117: fa_debug_pkg.add(l_calling_fn, 'book_type_code:', l_asset_hdr_rec.book_type_code, p_log_level_rec);
5118: end if;
5119:
5120: --for i in 1..l_asset_dist_tbl.count loop
5121:

Line 5123: fa_debug_pkg.add(l_calling_fn, 'dist_id:', l_asset_dist_tbl(1).distribution_id, p_log_level_rec);

5119:
5120: --for i in 1..l_asset_dist_tbl.count loop
5121:
5122: if g_log_level_rec.statement_level then
5123: fa_debug_pkg.add(l_calling_fn, 'dist_id:', l_asset_dist_tbl(1).distribution_id, p_log_level_rec);
5124: fa_debug_pkg.add(l_calling_fn, 'trx_units:', l_asset_dist_tbl(1).transaction_units, p_log_level_rec);
5125: end if;
5126:
5127: --end loop;

Line 5124: fa_debug_pkg.add(l_calling_fn, 'trx_units:', l_asset_dist_tbl(1).transaction_units, p_log_level_rec);

5120: --for i in 1..l_asset_dist_tbl.count loop
5121:
5122: if g_log_level_rec.statement_level then
5123: fa_debug_pkg.add(l_calling_fn, 'dist_id:', l_asset_dist_tbl(1).distribution_id, p_log_level_rec);
5124: fa_debug_pkg.add(l_calling_fn, 'trx_units:', l_asset_dist_tbl(1).transaction_units, p_log_level_rec);
5125: end if;
5126:
5127: --end loop;
5128:

Line 5254: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'begin ', l_calling_fn, p_log_level_rec); end if;

5250:
5251: BEGIN
5252:
5253:
5254: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'begin ', l_calling_fn, p_log_level_rec); end if;
5255:
5256: -- ****************************************************
5257: -- ** Assign input parameters to local rec/tbl types
5258: -- ****************************************************

Line 5286: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'set_of_books_id: ', l_asset_hdr_rec.set_of_books_id, p_log_level_rec); end if;

5282: l_asset_retire_rec.status := 'REINSTATE';
5283: end if;
5284:
5285:
5286: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'set_of_books_id: ', l_asset_hdr_rec.set_of_books_id, p_log_level_rec); end if;
5287:
5288: if (p_mrc_sob_type_code <> 'R') then
5289:
5290: if ((l_asset_retire_rec.units_retired = l_asset_desc_rec.current_units

Line 5336: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'do fa_transaction_headers_pkg.insert_row', '', p_log_level_rec); end if;

5332: p_log_level_rec => p_log_level_rec) then
5333: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5334: end if;
5335:
5336: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'do fa_transaction_headers_pkg.insert_row', '', p_log_level_rec); end if;
5337:
5338: fa_transaction_headers_pkg.insert_row
5339: (x_rowid => l_rowid,
5340: x_transaction_header_id => l_trans_rec.transaction_header_id,

Line 5384: fa_debug_pkg.add(l_calling_fn, 'do fa_retirements_pkg.update_row', '', p_log_level_rec);

5380:
5381: end if; -- reporting_flag
5382:
5383: if g_log_level_rec.statement_level then
5384: fa_debug_pkg.add(l_calling_fn, 'do fa_retirements_pkg.update_row', '', p_log_level_rec);
5385: fa_debug_pkg.add(l_calling_fn, 'retirement_id: ', l_asset_retire_rec.Retirement_Id, p_log_level_rec);
5386: end if;
5387:
5388: -- ? just for now

Line 5385: fa_debug_pkg.add(l_calling_fn, 'retirement_id: ', l_asset_retire_rec.Retirement_Id, p_log_level_rec);

5381: end if; -- reporting_flag
5382:
5383: if g_log_level_rec.statement_level then
5384: fa_debug_pkg.add(l_calling_fn, 'do fa_retirements_pkg.update_row', '', p_log_level_rec);
5385: fa_debug_pkg.add(l_calling_fn, 'retirement_id: ', l_asset_retire_rec.Retirement_Id, p_log_level_rec);
5386: end if;
5387:
5388: -- ? just for now
5389: -- l_asset_retire_rec.detail_info := null;

Line 5587: fa_debug_pkg.initialize;

5583: -- initialize error message stack.
5584: fa_srvr_msg.init_server_message;
5585:
5586: -- initialize debug message stack.
5587: fa_debug_pkg.initialize;
5588: end if;
5589:
5590: -- ****************************************************
5591: -- ** Assign input parameters to local rec/tbl types

Line 5679: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'begin do_validation', '', g_log_level_rec); end if;

5675: -- *********************************************
5676: -- ** Do basic validation on input parameters
5677: -- *********************************************
5678:
5679: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'begin do_validation', '', g_log_level_rec); end if;
5680: -- validate that all user-entered input parameters are valid
5681: if not do_validation
5682: (p_validation_type => g_undo_reinstatement
5683: ,p_trans_rec => l_trans_rec

Line 5698: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'end do_validation', '', g_log_level_rec); end if;

5694: ,p_log_level_rec => g_log_level_rec) then
5695: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5696: end if;
5697:
5698: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'end do_validation', '', g_log_level_rec); end if;
5699:
5700: if not undo_all_books_reinstatement
5701: (p_trans_rec => l_trans_rec
5702: ,p_asset_hdr_rec => l_asset_hdr_rec

Line 5723: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Asset type: ', l_asset_type_rec.asset_type, g_log_level_rec); end if;

5719:
5720: if (l_asset_type_rec.asset_type = 'CIP'
5721: or l_asset_type_rec.asset_type = 'CAPITALIZED') then
5722:
5723: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Asset type: ', l_asset_type_rec.asset_type, g_log_level_rec); end if;
5724:
5725: if not fa_cache_pkg.fazctbk
5726: (x_corp_book => l_asset_hdr_rec.book_type_code
5727: ,x_asset_type => l_asset_type_rec.asset_type

Line 5736: fa_debug_pkg.add(l_calling_fn, 'entered loop for tax books', '', g_log_level_rec);

5732:
5733: for l_tax_index in 1..l_tax_book_tbl.count loop
5734:
5735: if g_log_level_rec.statement_level then
5736: fa_debug_pkg.add(l_calling_fn, 'entered loop for tax books', '', g_log_level_rec);
5737: fa_debug_pkg.add(l_calling_fn, 'selected tax book: ', l_tax_book_tbl(l_tax_index), g_log_level_rec);
5738: end if;
5739:
5740: if not FA_ASSET_VAL_PVT.validate_asset_book

Line 5737: fa_debug_pkg.add(l_calling_fn, 'selected tax book: ', l_tax_book_tbl(l_tax_index), g_log_level_rec);

5733: for l_tax_index in 1..l_tax_book_tbl.count loop
5734:
5735: if g_log_level_rec.statement_level then
5736: fa_debug_pkg.add(l_calling_fn, 'entered loop for tax books', '', g_log_level_rec);
5737: fa_debug_pkg.add(l_calling_fn, 'selected tax book: ', l_tax_book_tbl(l_tax_index), g_log_level_rec);
5738: end if;
5739:
5740: if not FA_ASSET_VAL_PVT.validate_asset_book
5741: (p_transaction_type_code => l_trans_rec.transaction_type_code

Line 5766: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'calling undo_sub_retirement for tax book', '', g_log_level_rec); end if;

5762: where asset_id=lv_asset_hdr_rec.asset_id
5763: and book_type_code=l_tax_book_tbl(l_tax_index)
5764: and status = 'REINSTATE';
5765:
5766: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'calling undo_sub_retirement for tax book', '', g_log_level_rec); end if;
5767:
5768: if not undo_all_books_reinstatement
5769: (p_trans_rec => lv_trans_rec -- tax
5770: ,p_asset_hdr_rec => lv_asset_hdr_rec -- tax

Line 5947: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop period_rec', '', p_log_level_rec); end if;

5943: fnd_profile.put('GL_SET_OF_BKS_ID', l_asset_hdr_rec.set_of_books_id);
5944: fnd_client_info.set_currency_context(to_char(l_asset_hdr_rec.set_of_books_id));
5945:
5946: -- pop current period_rec info
5947: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop period_rec', '', p_log_level_rec); end if;
5948: if not FA_UTIL_PVT.get_period_rec
5949: (p_book => l_asset_hdr_rec.book_type_code
5950: ,p_effective_date => NULL
5951: ,x_period_rec => l_period_rec

Line 5962: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'begin asset/book-level validation on transaction', '', p_log_level_rec); end if;

5958: -- ***************************************************
5959: -- begin asset/book-level validation on transaction
5960:
5961: -- nothing to do here
5962: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'begin asset/book-level validation on transaction', '', p_log_level_rec); end if;
5963:
5964: -- ***************************
5965: -- ** Transaction approval
5966: -- ***************************

Line 5982: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'calling do_sub_retirement for each book/sob', '', p_log_level_rec); end if;

5978: -- ***************************
5979: -- ** Main
5980: -- ***************************
5981:
5982: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'calling do_sub_retirement for each book/sob', '', p_log_level_rec); end if;
5983:
5984: l_rate := 1;
5985: if not undo_sub_reinstatement
5986: (p_trans_rec => l_trans_rec

Line 6009: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'in sob_id loop', '', p_log_level_rec); end if;

6005: -- loop thourgh reporting set of books
6006: for sob_rec in sob_cursor(l_asset_hdr_rec.book_type_code
6007: ,l_asset_hdr_rec.set_of_books_id) loop
6008:
6009: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'in sob_id loop', '', p_log_level_rec); end if;
6010:
6011: -- set the sob_id and currency context for reporting book(sob)
6012: fnd_profile.put('GL_SET_OF_BKS_ID', sob_rec.sob_id);
6013: fnd_client_info.set_currency_context(to_char(sob_rec.sob_id));

Line 6103: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'set_of_books_id: ', l_asset_hdr_rec.set_of_books_id, p_log_level_rec); end if;

6099: end if;
6100:
6101: l_asset_retire_rec.status := 'PROCESSED';
6102:
6103: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'set_of_books_id: ', l_asset_hdr_rec.set_of_books_id, p_log_level_rec); end if;
6104:
6105: /*
6106: * Check to see previous retirement involved source lines or not.
6107: */

Line 6338: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'begin ', l_calling_fn, p_log_level_rec); end if;

6334:
6335: BEGIN
6336:
6337:
6338: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'begin ', l_calling_fn, p_log_level_rec); end if;
6339: -- ****************************************************
6340: -- ** Assign input parameters to local rec/tbl types
6341: -- ****************************************************
6342: l_validation_type := p_validation_type;

Line 6360: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check fundamental validation on input parameters', '', p_log_level_rec); end if;

6356: -- *********************************************
6357: -- ** Do basic validation on input parameters
6358: -- *********************************************
6359: -- do fundamental validation on input parameters
6360: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check fundamental validation on input parameters', '', p_log_level_rec); end if;
6361:
6362: -- check list for validation on input parameters:
6363: -- validation of asset_id, book_type_code - done
6364: -- validation of transaction date(retired_date)

Line 6379: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Both asset_id and book_type_code should be provided.', '', p_log_level_rec); end if;

6375: -- check if asset_id and book are provided
6376: if l_validation_type=g_retirement then
6377: if l_asset_hdr_rec.asset_id is null
6378: or l_asset_hdr_rec.book_type_code is null then
6379: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Both asset_id and book_type_code should be provided.', '', p_log_level_rec); end if;
6380: -- msg_name: FA_API_SHARED_INVALID_NOTNULL
6381: -- msg_text: Invalid value for <>. <> is a required field.
6382: g_msg_name := 'FA_API_SHARED_INVALID_NOTNULL';
6383: g_token1 := 'XMLTAG';

Line 6421: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Either asset_id/book or retirement_id should be provided.', '', p_log_level_rec); end if;

6417: )
6418: or
6419: (l_asset_retire_rec.retirement_id is not null
6420: )) then
6421: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Either asset_id/book or retirement_id should be provided.', '', p_log_level_rec); end if;
6422: -- msg_name: FA_API_SHARED_INVALID_NOTNULL
6423: -- msg_text: Invalid value for <>. <> is a required field.
6424: g_msg_name := 'FA_API_SHARED_INVALID_NOTNULL';
6425: g_token1 := 'XMLTAG';

Line 6434: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if retirement type exists in fa_lookups', '', p_log_level_rec); end if;

6430:
6431: -- check if retirement type exists in fa_lookups if it is provided
6432: if l_validation_type=g_retirement then
6433: if l_asset_retire_rec.retirement_type_code is not null then
6434: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if retirement type exists in fa_lookups', '', p_log_level_rec); end if;
6435: if not FA_ASSET_VAL_PVT.validate_fa_lookup_code
6436: (p_lookup_type => 'RETIREMENT'
6437: ,p_lookup_code => l_asset_retire_rec.retirement_type_code
6438: ,p_log_level_rec => p_log_level_rec) then

Line 6441: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Error: Retirement type is invalid', '', p_log_level_rec); end if;

6437: ,p_lookup_code => l_asset_retire_rec.retirement_type_code
6438: ,p_log_level_rec => p_log_level_rec) then
6439: g_msg_name := null;
6440: g_token1 := null;
6441: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Error: Retirement type is invalid', '', p_log_level_rec); end if;
6442: raise FND_API.G_EXC_UNEXPECTED_ERROR;
6443: end if;
6444: end if;
6445: end if;

Line 6451: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if trade in asset number is the asset you are retiring', '', p_log_level_rec); end if;

6447: -- check if trade_in_asset_id is valid if it is not null
6448: if l_validation_type=g_retirement then
6449: if l_asset_retire_rec.trade_in_asset_id is not NULL then
6450:
6451: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if trade in asset number is the asset you are retiring', '', p_log_level_rec); end if;
6452: if l_asset_hdr_rec.asset_id=l_asset_retire_rec.trade_in_asset_id then
6453: g_msg_name := 'FA_RET_INVALID_TRADE_IN';
6454: g_token1 := null;
6455: raise FND_API.G_EXC_ERROR;

Line 6459: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if trade_in_asset_id exists in Oracle Assets', '', p_log_level_rec); end if;

6455: raise FND_API.G_EXC_ERROR;
6456: end if;
6457:
6458: -- check if the trade-in asset exists in Oracle Assets
6459: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if trade_in_asset_id exists in Oracle Assets', '', p_log_level_rec); end if;
6460: if not FA_ASSET_VAL_PVT.validate_asset_id_exist
6461: (p_asset_id => l_asset_hdr_rec.asset_id
6462: ,p_log_level_rec => p_log_level_rec) then
6463: g_msg_name := 'FA_RET_TRADE_IN_NONEXISTENT';

Line 6472: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if either units_retired or cost_retired is provided', '', p_log_level_rec); end if;

6468: end if; -- trade-in asset
6469: end if; -- g_retirement
6470:
6471: -- check if either units_retired or cost_retired is provided
6472: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if either units_retired or cost_retired is provided', '', p_log_level_rec); end if;
6473: if l_validation_type=g_retirement then
6474: if l_asset_retire_rec.units_retired is null
6475: and l_asset_retire_rec.cost_retired is null then
6476: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Either units_retired or cost_retired should be provided.', '', p_log_level_rec); end if;

Line 6476: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Either units_retired or cost_retired should be provided.', '', p_log_level_rec); end if;

6472: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if either units_retired or cost_retired is provided', '', p_log_level_rec); end if;
6473: if l_validation_type=g_retirement then
6474: if l_asset_retire_rec.units_retired is null
6475: and l_asset_retire_rec.cost_retired is null then
6476: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Either units_retired or cost_retired should be provided.', '', p_log_level_rec); end if;
6477: g_msg_name := 'FA_API_SHARED_INVALID_NOTNULL';
6478: g_token1 := 'XMLTAG';
6479: g_value1 := 'UNITS_RETIRED or COST_RETIRED';
6480: raise FND_API.G_EXC_ERROR;

Line 6484: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check units', '', p_log_level_rec); end if;

6480: raise FND_API.G_EXC_ERROR;
6481: end if;
6482: end if;
6483:
6484: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check units', '', p_log_level_rec); end if;
6485: if l_validation_type=g_retirement then
6486: if l_asset_retire_rec.units_retired is not null then
6487:
6488: -- check to make sure that units_retired is positive

Line 6520: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop local asset_retire_rec', '', p_log_level_rec); end if;

6516: -- Basically we need to populate asset_retire_rec at this point
6517: -- so that the following validation against units_retired
6518: -- ,which users will not probably provide, can be done.
6519:
6520: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop local asset_retire_rec', '', p_log_level_rec); end if;
6521: if l_validation_type in (g_reinstatement
6522: ,g_undo_retirement
6523: ,g_undo_reinstatement) then
6524: -- pop local asset_retire_rec for retirement

Line 6555: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check to make sure that the transaction is not for CIP on TAX book', '', p_log_level_rec); end if;

6551: ,p_log_level_rec => p_log_level_rec) then
6552: raise FND_API.G_EXC_UNEXPECTED_ERROR;
6553: end if;
6554:
6555: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check to make sure that the transaction is not for CIP on TAX book', '', p_log_level_rec); end if;
6556: if fa_cache_pkg.fazcbc_record.book_class = 'TAX'
6557: and l_asset_type_rec.asset_type = 'CIP' then
6558:
6559: -- we do not support this transaction

Line 6560: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Error: You can not perform this transaction on CIP asset.', '', p_log_level_rec); end if;

6556: if fa_cache_pkg.fazcbc_record.book_class = 'TAX'
6557: and l_asset_type_rec.asset_type = 'CIP' then
6558:
6559: -- we do not support this transaction
6560: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Error: You can not perform this transaction on CIP asset.', '', p_log_level_rec); end if;
6561: g_msg_name := null;
6562: g_token1 := null;
6563: raise FND_API.G_EXC_ERROR;
6564:

Line 6583: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Error: You can not perform this transaction on CIP asset.', '', p_log_level_rec); end if;

6579: if fa_cache_pkg.fazcbc_record.book_class = 'TAX'
6580: and l_asset_type_rec.asset_type = 'CIP' then
6581:
6582: -- we do not support this transaction
6583: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Error: You can not perform this transaction on CIP asset.', '', p_log_level_rec); end if;
6584: g_msg_name := null;
6585: g_token1 := null;
6586: raise FND_API.G_EXC_ERROR;
6587:

Line 6596: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check to make sure that units_retired is valid', '', p_log_level_rec); end if;

6592: end if; -- check p_calling_fn
6593:
6594:
6595: if l_validation_type = g_reinstatement then
6596: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check to make sure that units_retired is valid', '', p_log_level_rec); end if;
6597:
6598: if l_asset_retire_rec.units_retired is not null then
6599:
6600: -- default units_to_reinsate to total units retired before

Line 6738: fa_debug_pkg.add(l_calling_fn, 'Error: You can not reinstate assets that were retired in previous fiscal year', '', p_log_level_rec);

6734: -- date must be in current fiscal year
6735: if lv_asset_retire_rec.date_retired < l_period_rec.fy_start_date
6736: or lv_asset_retire_rec.date_retired > l_period_rec.fy_end_date then
6737: if g_log_level_rec.statement_level then
6738: fa_debug_pkg.add(l_calling_fn, 'Error: You can not reinstate assets that were retired in previous fiscal year', '', p_log_level_rec);
6739: end if;
6740: g_msg_name := 'FA_RET_DATE_MUSTBE_IN_CUR_FY';
6741: g_token1 := null;
6742: raise FND_API.G_EXC_ERROR;

Line 6799: fa_debug_pkg.add(l_calling_fn, 'check if the asset is already fully retired', '', p_log_level_rec);

6795: if l_validation_type = g_retirement then
6796:
6797: -- check if the asset has already been fully retired
6798: if g_log_level_rec.statement_level then
6799: fa_debug_pkg.add(l_calling_fn, 'check if the asset is already fully retired', '', p_log_level_rec);
6800: end if;
6801: if FA_ASSET_VAL_PVT.validate_fully_retired
6802: (p_asset_id => l_asset_hdr_rec.asset_id
6803: ,p_book => l_asset_hdr_rec.book_type_code

Line 6813: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Error: You can not perform this transaction.', '', p_log_level_rec); end if;

6809:
6810: elsif l_validation_type = g_reinstatement then
6811:
6812: if lv_asset_retire_rec.status <> 'PROCESSED' then
6813: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Error: You can not perform this transaction.', '', p_log_level_rec); end if;
6814: g_msg_name := null;
6815: g_token1 := null;
6816: raise FND_API.G_EXC_ERROR;
6817: end if;

Line 6838: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Error: You can not perform this transaction.', '', p_log_level_rec); end if;

6834: elsif l_validation_type = g_undo_retirement then
6835:
6836: -- ? Is PARTIAL required ? when is it used ?
6837: if lv_asset_retire_rec.status not in ('PENDING','PARTIAL') then
6838: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Error: You can not perform this transaction.', '', p_log_level_rec); end if;
6839: g_msg_name := null;
6840: g_token1 := null;
6841: raise FND_API.G_EXC_ERROR;
6842: end if;

Line 6869: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Error: You can not perform this transaction.', '', p_log_level_rec); end if;

6865:
6866: elsif l_validation_type = g_undo_reinstatement then
6867:
6868: if lv_asset_retire_rec.status not in ('REINSTATE') then
6869: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Error: You can not perform this transaction.', '', p_log_level_rec); end if;
6870: g_msg_name := null;
6871: g_token1 := null;
6872: raise FND_API.G_EXC_ERROR;
6873: end if;

Line 7078: fa_debug_pkg.add(l_calling_fn, 'Error Calling FA_INVOICE_PVT.INVOICE_ENGINE', '', p_log_level_rec);

7074: x_asset_deprn_mrc_tbl_new => l_asset_deprn_mrc_tbl_new,
7075: p_calling_fn => l_calling_fn
7076: ,p_log_level_rec => p_log_level_rec) then
7077: if g_log_level_rec.statement_level then
7078: fa_debug_pkg.add(l_calling_fn, 'Error Calling FA_INVOICE_PVT.INVOICE_ENGINE', '', p_log_level_rec);
7079: fa_debug_pkg.add(l_calling_fn, 'SQLERRM: ', SQLERRM, p_log_level_rec);
7080: end if;
7081: raise FND_API.G_EXC_UNEXPECTED_ERROR;
7082: end if;

Line 7079: fa_debug_pkg.add(l_calling_fn, 'SQLERRM: ', SQLERRM, p_log_level_rec);

7075: p_calling_fn => l_calling_fn
7076: ,p_log_level_rec => p_log_level_rec) then
7077: if g_log_level_rec.statement_level then
7078: fa_debug_pkg.add(l_calling_fn, 'Error Calling FA_INVOICE_PVT.INVOICE_ENGINE', '', p_log_level_rec);
7079: fa_debug_pkg.add(l_calling_fn, 'SQLERRM: ', SQLERRM, p_log_level_rec);
7080: end if;
7081: raise FND_API.G_EXC_UNEXPECTED_ERROR;
7082: end if;
7083: