DBA Data[Home] [Help]

APPS.FA_RETIREMENT_PVT dependencies on FA_BOOKS

Line 71: from fa_books

67: and source_type_code = 'DEPRECIATION';
68:
69: CURSOR c_member_exists IS
70: select 'Y'
71: from fa_books
72: where book_type_code = p_asset_hdr_rec.book_type_code
73: and group_asset_id = p_asset_fin_rec.group_asset_id
74: and period_counter_fully_retired is null
75: and transaction_header_id_out is null;

Line 587: FA_BOOKS_PKG.Update_Row(

583: end if;
584:
585: if (nvl(l_member_exists, 'N') <> 'Y') then
586:
587: FA_BOOKS_PKG.Update_Row(
588: X_Book_Type_Code => l_asset_hdr_rec.book_type_code,
589: X_Asset_Id => l_asset_hdr_rec.asset_id,
590: X_terminal_gain_loss_flag => 'Y',
591: X_mrc_sob_type_code => p_mrc_sob_type_code,

Line 667: FA_BOOKS_PKG.Delete_Row(

663: CLOSE c_get_thid;
664:
665: if (p_mrc_sob_type_code = 'R') then
666:
667: FA_BOOKS_PKG.Delete_Row(
668: X_Transaction_Header_Id_in => l_transaction_header_id,
669: X_mrc_sob_type_code => p_mrc_sob_type_code,
670: X_Calling_Fn => l_calling_fn,
671: p_log_level_rec => p_log_level_rec);

Line 673: FA_BOOKS_PKG.Reactivate_Row(

669: X_mrc_sob_type_code => p_mrc_sob_type_code,
670: X_Calling_Fn => l_calling_fn,
671: p_log_level_rec => p_log_level_rec);
672:
673: FA_BOOKS_PKG.Reactivate_Row(
674: X_Transaction_Header_Id_Out => l_transaction_header_id,
675: X_mrc_sob_type_code => p_mrc_sob_type_code,
676: X_Calling_Fn => l_calling_fn,
677: p_log_level_rec => p_log_level_rec);

Line 690: FA_BOOKS_PKG.Delete_Row(

686: end loop;
687:
688: else
689:
690: FA_BOOKS_PKG.Delete_Row(
691: X_Transaction_Header_Id_in => l_transaction_header_id,
692: X_mrc_sob_type_code => p_mrc_sob_type_code,
693: X_Calling_Fn => l_calling_fn,
694: p_log_level_rec => p_log_level_rec);

Line 696: FA_BOOKS_PKG.Reactivate_Row(

692: X_mrc_sob_type_code => p_mrc_sob_type_code,
693: X_Calling_Fn => l_calling_fn,
694: p_log_level_rec => p_log_level_rec);
695:
696: FA_BOOKS_PKG.Reactivate_Row(
697: X_Transaction_Header_Id_Out => l_transaction_header_id,
698: X_mrc_sob_type_code => p_mrc_sob_type_code,
699: X_Calling_Fn => l_calling_fn,
700: p_log_level_rec => p_log_level_rec);

Line 1147: FA_BOOKS_PKG.Deactivate_Row(

1143: --
1144: -- Find Salvage value retired, recoverable cost, deprn limit, adjusted recoverable cost
1145: -- cip_cost_retired, new adjusted cost by calling deprn basis.
1146: -- Also find out whether there is other amount to reinstate. I guess not.
1147: FA_BOOKS_PKG.Deactivate_Row(
1148: X_Asset_Id => p_asset_hdr_rec.asset_id,
1149: X_Book_Type_Code => p_asset_hdr_rec.book_type_code,
1150: X_Transaction_Header_Id_Out => p_trans_rec.transaction_header_id,
1151: X_Date_Ineffective => p_trans_rec.who_info.last_update_date,

Line 1158: FA_BOOKS_PKG.INSERT_ROW(

1154: p_log_level_rec => p_log_level_rec);
1155:
1156: --tk_util.DumpFinRec(l_asset_fin_rec_mn, 'member');
1157:
1158: FA_BOOKS_PKG.INSERT_ROW(
1159: X_Rowid => l_rowid,
1160: X_Book_Type_Code => p_asset_hdr_rec.book_type_code,
1161: X_Asset_Id => p_asset_hdr_rec.asset_id,
1162: X_Date_Placed_In_Service => p_asset_fin_rec.date_placed_in_service,

Line 1349: FA_BOOKS_PKG.Update_Row(

1345:
1346: end if; -- (nvl(l_asset_fin_rec_old.member_rollup_flag, 'N') = 'Y')
1347:
1348: -- +++++ Clear Terminal Gain Loss Amount +++++
1349: FA_BOOKS_PKG.Update_Row(
1350: X_Book_Type_Code => l_asset_hdr_rec.book_type_code,
1351: X_Asset_Id => l_asset_hdr_rec.asset_id,
1352: X_terminal_gain_loss_amount => FND_API.G_MISS_NUM,
1353: X_mrc_sob_type_code => p_mrc_sob_type_code,

Line 1473: , fa_books bk -- ENERGY

1469: CURSOR c_get_group_method_info is -- ENERGY
1470: select db.rule_name -- ENERGY
1471: from fa_deprn_basis_rules db -- ENERGY
1472: , fa_methods mt -- ENERGY
1473: , fa_books bk -- ENERGY
1474: where bk.asset_id = p_asset_fin_rec.group_asset_id -- ENERGY
1475: and bk.book_type_code = p_asset_hdr_rec.book_type_code -- ENERGY
1476: and bk.transaction_header_id_out is null -- ENERGY
1477: and bk.deprn_method_code = mt.method_code -- ENERGY

Line 2884: from fa_books

2880: where trx.transaction_header_id = p_ret.th_id_in;
2881:
2882: CURSOR c_member_exists IS
2883: select 'Y'
2884: from fa_books
2885: where book_type_code = p_ret.book
2886: and group_asset_id = p_bk.group_asset_id
2887: and ((period_counter_fully_retired is null)
2888: or (period_counter_fully_retired is not null

Line 3253: FA_BOOKS_PKG.Update_Row(

3249: if (nvl(l_member_exists, 'N') <> 'Y') then
3250:
3251: if (nvl(l_asset_fin_rec_old.terminal_gain_loss, 'NO') = 'END_OF_YEAR') then
3252:
3253: FA_BOOKS_PKG.Update_Row(
3254: X_Book_Type_Code => l_asset_hdr_rec.book_type_code,
3255: X_Asset_Id => l_asset_hdr_rec.asset_id,
3256: X_terminal_gain_loss_flag => 'Y',
3257: X_mrc_sob_type_code => p_mrc_sob_type_code,

Line 3303: -- update terminal gain loss amount in fa_books

3299: end if;
3300:
3301: -- If remaining resrve is not 0, insert NBV RETIRED GAIN/LOSS,
3302: -- and RESERVE to fa_adjustments table.
3303: -- update terminal gain loss amount in fa_books
3304: if (nvl(l_deprn_reserve, 0) <> 0) then
3305:
3306: if (p_log_level_rec.statement_level) then
3307: fa_debug_pkg.add(l_calling_fn, 'Create Terminal Gain/Loss entries',

Line 3380: FA_BOOKS_PKG.Update_Row(

3376: fa_debug_pkg.add(l_calling_fn, 'Create Terminal Gain/Loss entries',
3377: 'End',p_log_level_rec);
3378: end if;
3379:
3380: FA_BOOKS_PKG.Update_Row(
3381: X_Book_Type_Code => l_asset_hdr_rec.book_type_code,
3382: X_Asset_Id => l_asset_hdr_rec.asset_id,
3383: X_terminal_gain_loss_amount => l_deprn_reserve,
3384: X_mrc_sob_type_code => p_mrc_sob_type_code,

Line 3648: FA_BOOKS_PKG.Update_Row(

3644:
3645: end if; -- (nvl(l_asset_fin_rec_old.member_rollup_flag, 'N') = 'N')
3646:
3647: -- +++++ Clear Terminal Gain Loss Amount +++++
3648: FA_BOOKS_PKG.Update_Row(
3649: X_Book_Type_Code => l_asset_hdr_rec.book_type_code,
3650: X_Asset_Id => l_asset_hdr_rec.asset_id,
3651: X_terminal_gain_loss_amount => FND_API.G_MISS_NUM,
3652: X_mrc_sob_type_code => p_mrc_sob_type_code,

Line 3684: from fa_books

3680: l_calling_fn VARCHAR2(50) := 'FA_RETIREMENT_PVT.Do_Terminal_Gain_Loss_All_Bk';
3681:
3682: cursor c_member_exists IS
3683: select 'Y'
3684: from fa_books
3685: where book_type_code = p_book_type_code
3686: and group_asset_id = p_asset_id
3687: and period_counter_fully_retired is null
3688: and transaction_header_id_out is null;

Line 3695: fa_books bk

3691: select max(gth.transaction_header_id)
3692: from fa_transaction_headers gth,
3693: fa_transaction_headers mth,
3694: fa_retirements ret,
3695: fa_books bk
3696: where bk.group_asset_id = p_asset_id
3697: and bk.book_type_code = p_book_type_code
3698: and ret.asset_id = bk.asset_id
3699: and ret.book_type_code = p_book_type_code

Line 3709: from fa_books_mrc_v

3705: and mth.transaction_header_id = gth.member_transaction_header_id;
3706:
3707: cursor c_mc_member_exists IS
3708: select 'Y'
3709: from fa_books_mrc_v
3710: where book_type_code = p_book_type_code
3711: and group_asset_id = p_asset_id
3712: and period_counter_fully_retired is null
3713: and transaction_header_id_out is null;

Line 3720: fa_books_mrc_v bk

3716: select max(gth.transaction_header_id)
3717: from fa_transaction_headers gth,
3718: fa_transaction_headers mth,
3719: fa_retirements_mrc_v ret,
3720: fa_books_mrc_v bk
3721: where bk.group_asset_id = p_asset_id
3722: and bk.book_type_code = p_book_type_code
3723: and ret.asset_id = bk.asset_id
3724: and ret.book_type_code = p_book_type_code

Line 3891: FA_BOOKS_PKG.Update_Row(

3887:
3888: raise gl_err;
3889: end if;
3890:
3891: FA_BOOKS_PKG.Update_Row(
3892: X_Book_Type_Code => p_book_type_code,
3893: X_Asset_Id => p_asset_id,
3894: X_terminal_gain_loss_amount => l_deprn_reserve,
3895: X_terminal_gain_loss_flag => 'N',

Line 3909: FA_BOOKS_PKG.Update_Row(

3905: --
3906: -- Must not calculate terminal gain loss as long as some
3907: -- non-retired member exists
3908: --
3909: FA_BOOKS_PKG.Update_Row(
3910: X_Book_Type_Code => p_book_type_code,
3911: X_Asset_Id => p_asset_id,
3912: X_terminal_gain_loss_flag => FND_API.G_MISS_CHAR,
3913: X_mrc_sob_type_code => p_mrc_sob_type_code,

Line 3948: from fa_books bk,

3944: l_period_rec FA_API_TYPES.period_rec_type;
3945:
3946: cursor c_get_groups is
3947: select bk.asset_id asset_id
3948: from fa_books bk,
3949: fa_additions ad
3950: where bk.book_type_code = p_book_type_code
3951: and bk.transaction_header_id_out is null
3952: and bk.asset_id = ad.asset_id

Line 3960: from fa_books bk,

3956: and MOD(bk.asset_id, p_total_requests) = (p_request_number - 1);
3957:
3958: cursor c_get_eofy_groups is
3959: select bk.asset_id asset_id
3960: from fa_books bk,
3961: fa_additions ad
3962: where bk.book_type_code = p_book_type_code
3963: and bk.transaction_header_id_out is null
3964: and bk.asset_id = ad.asset_id

Line 4124: from fa_books

4120: -- if there is any.
4121: --
4122: CURSOR c_find_member IS
4123: select asset_id
4124: from fa_books
4125: where group_asset_id = p_asset_hdr_rec.asset_id
4126: and book_type_code = p_asset_hdr_rec.book_type_code
4127: and period_counter_fully_retired is null
4128: and transaction_header_id_out is null;

Line 4132: from fa_books_mrc_v

4128: and transaction_header_id_out is null;
4129:
4130: CURSOR c_find_mc_member IS
4131: select asset_id
4132: from fa_books_mrc_v
4133: where group_asset_id = p_asset_hdr_rec.asset_id
4134: and book_type_code = p_asset_hdr_rec.book_type_code
4135: and period_counter_fully_retired is null
4136: and transaction_header_id_out is null;

Line 4249: UPDATE FA_BOOKS_MRC_V

4245: -- processed during depreciation
4246: --
4247: if (p_mrc_sob_type_code = 'R') then
4248:
4249: UPDATE FA_BOOKS_MRC_V
4250: SET TERMINAL_GAIN_LOSS_FLAG = 'Y'
4251: WHERE ASSET_ID = p_asset_hdr_rec.asset_id
4252: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
4253: AND TRANSACTION_HEADER_ID_OUT is null;

Line 4255: UPDATE FA_BOOKS_SUMMARY_MRC_V

4251: WHERE ASSET_ID = p_asset_hdr_rec.asset_id
4252: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
4253: AND TRANSACTION_HEADER_ID_OUT is null;
4254:
4255: UPDATE FA_BOOKS_SUMMARY_MRC_V
4256: SET TERMINAL_GAIN_LOSS_FLAG = 'Y'
4257: WHERE ASSET_ID = p_asset_hdr_rec.asset_id
4258: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
4259: AND PERIOD_COUNTER = p_period_rec.period_counter;

Line 4263: UPDATE FA_BOOKS

4259: AND PERIOD_COUNTER = p_period_rec.period_counter;
4260:
4261: else
4262:
4263: UPDATE FA_BOOKS
4264: SET TERMINAL_GAIN_LOSS_FLAG = 'Y'
4265: WHERE ASSET_ID = p_asset_hdr_rec.asset_id
4266: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
4267: AND TRANSACTION_HEADER_ID_OUT is null;

Line 4269: UPDATE FA_BOOKS_SUMMARY

4265: WHERE ASSET_ID = p_asset_hdr_rec.asset_id
4266: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
4267: AND TRANSACTION_HEADER_ID_OUT is null;
4268:
4269: UPDATE FA_BOOKS_SUMMARY
4270: SET TERMINAL_GAIN_LOSS_FLAG = 'Y'
4271: WHERE ASSET_ID = p_asset_hdr_rec.asset_id
4272: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
4273: AND PERIOD_COUNTER = p_period_rec.period_counter;

Line 4328: FROM FA_BOOKS

4324:
4325:
4326: CURSOR C_GET_SUM_REC_COST IS
4327: SELECT SUM(RECOVERABLE_COST)
4328: FROM FA_BOOKS
4329: WHERE BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
4330: AND TRANSACTION_HEADER_ID_OUT is null
4331: AND PERIOD_COUNTER_FULLY_RESERVED is null
4332: AND PERIOD_COUNTER_FULLY_RETIRED is null

Line 4339: FROM FA_BOOKS_MRC_V

4335:
4336:
4337: CURSOR C_MC_GET_SUM_REC_COST IS
4338: SELECT SUM(RECOVERABLE_COST)
4339: FROM FA_BOOKS_MRC_V
4340: WHERE BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
4341: AND TRANSACTION_HEADER_ID_OUT is null
4342: AND PERIOD_COUNTER_FULLY_RESERVED is null
4343: AND PERIOD_COUNTER_FULLY_RETIRED is null

Line 4349: FROM FA_BOOKS_SUMMARY

4345: AND GROUP_ASSET_ID = p_asset_hdr_rec.asset_id;
4346:
4347: CURSOR C_GET_BS_SUM_ADJ_COST IS
4348: SELECT SUM(ADJUSTED_COST)
4349: FROM FA_BOOKS_SUMMARY
4350: WHERE BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
4351: AND TRANSACTION_HEADER_ID_OUT is null
4352: AND nvl(FULLY_RESERVED_FLAG, 'N') = 'N'
4353: AND nvl(FULLY_RETIRED_FLAG, 'N') = 'N'

Line 4360: FROM FA_BOOKS_SUMMARY_MRC_V

4356: AND PERIOD_COUNTER = p_period_rec.period_counter;
4357:
4358: CURSOR C_MC_GET_BS_SUM_ADJ_COST IS
4359: SELECT SUM(ADJUSTED_COST)
4360: FROM FA_BOOKS_SUMMARY_MRC_V
4361: WHERE BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
4362: AND TRANSACTION_HEADER_ID_OUT is null
4363: AND nvl(FULLY_RESERVED_FLAG, 'N') = 'N'
4364: AND nvl(FULLY_RETIRED_FLAG, 'N') = 'N'

Line 4394: FROM FA_BOOKS BK

4390: , BK.RECOVERABLE_COST RECOVERABLE_COST
4391: , BK.ADJUSTED_RECOVERABLE_COST ADJUSTED_RECOVERABLE_COST
4392: , AD.ASSET_CATEGORY_ID ASSET_CATEGORY_ID
4393: , AD.CURRENT_UNITS CURRENT_UNITS
4394: FROM FA_BOOKS BK
4395: , FA_ADDITIONS_B AD
4396: WHERE BK.BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
4397: AND BK.TRANSACTION_HEADER_ID_OUT is null
4398: AND BK.GROUP_ASSET_ID = p_asset_hdr_rec.asset_id

Line 4415: FROM FA_BOOKS_MRC_V BK

4411: , BK.RECOVERABLE_COST RECOVERABLE_COST
4412: , BK.ADJUSTED_RECOVERABLE_COST ADJUSTED_RECOVERABLE_COST
4413: , AD.ASSET_CATEGORY_ID ASSET_CATEGORY_ID
4414: , AD.CURRENT_UNITS CURRENT_UNITS
4415: FROM FA_BOOKS_MRC_V BK
4416: , FA_ADDITIONS_B AD
4417: WHERE BK.BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
4418: AND BK.TRANSACTION_HEADER_ID_OUT is null
4419: AND BK.GROUP_ASSET_ID = p_asset_hdr_rec.asset_id

Line 4430: FROM FA_BOOKS

4426: CURSOR C_DIST_EXCESS IS
4427: SELECT ASSET_ID
4428: , TRANSACTION_HEADER_ID_IN
4429: , ADJUSTED_COST
4430: FROM FA_BOOKS
4431: WHERE BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
4432: AND TRANSACTION_HEADER_ID_OUT is null
4433: AND GROUP_ASSET_ID = p_asset_hdr_rec.asset_id
4434: AND PERIOD_COUNTER_FULLY_RESERVED is null

Line 4443: FROM FA_BOOKS_MRC_V

4439: CURSOR C_MC_DIST_EXCESS IS
4440: SELECT ASSET_ID
4441: , TRANSACTION_HEADER_ID_IN
4442: , ADJUSTED_COST
4443: FROM FA_BOOKS_MRC_V
4444: WHERE BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
4445: AND TRANSACTION_HEADER_ID_OUT is null
4446: AND GROUP_ASSET_ID = p_asset_hdr_rec.asset_id
4447: AND PERIOD_COUNTER_FULLY_RESERVED is null

Line 4467: , fa_books bk

4463: , fa_transaction_headers gth -- group
4464: , fa_adjustments aj
4465: , fa_deprn_periods dp
4466: , fa_additions_b ad
4467: , fa_books bk
4468: where th.book_type_code = p_asset_hdr_rec.book_type_code
4469: -- and th.date_effective = gth.date_effective
4470: and th.source_transaction_header_id = gth.transaction_header_id
4471: and gth.book_type_code = p_asset_hdr_rec.book_type_code

Line 4493: from fa_books

4489: , bk.adjusted_recoverable_cost;
4490:
4491: CURSOR c_get_thid (c_asset_id number) IS
4492: select transaction_header_id_in
4493: from fa_books
4494: where book_type_code = p_asset_hdr_rec.book_type_code
4495: and asset_id = c_asset_id
4496: and transaction_header_id_out is null;
4497:

Line 4500: from fa_books_mrc_v

4496: and transaction_header_id_out is null;
4497:
4498: CURSOR c_mc_get_thid (c_asset_id number) IS
4499: select transaction_header_id_in
4500: from fa_books_mrc_v
4501: where book_type_code = p_asset_hdr_rec.book_type_code
4502: and asset_id = c_asset_id
4503: and transaction_header_id_out is null;
4504:

Line 4941: -- Update FA_BOOKS_SUMAMRY_MRC_V table with new reserve adjustment amount and

4937: END LOOP;
4938:
4939: if (p_mrc_sob_type_code = 'R') then
4940: l_loc := 'Before BS';
4941: -- Update FA_BOOKS_SUMAMRY_MRC_V table with new reserve adjustment amount and
4942: -- related columns. Return new adjusted_cost and deprn reserve for later use
4943: FORALL i in t_asset_id.first..t_asset_id.last
4944: UPDATE FA_BOOKS_SUMMARY_MRC_V
4945: SET RESERVE_ADJUSTMENT_AMOUNT = RESERVE_ADJUSTMENT_AMOUNT + t_adjustment_amount(i)

Line 4944: UPDATE FA_BOOKS_SUMMARY_MRC_V

4940: l_loc := 'Before BS';
4941: -- Update FA_BOOKS_SUMAMRY_MRC_V table with new reserve adjustment amount and
4942: -- related columns. Return new adjusted_cost and deprn reserve for later use
4943: FORALL i in t_asset_id.first..t_asset_id.last
4944: UPDATE FA_BOOKS_SUMMARY_MRC_V
4945: SET RESERVE_ADJUSTMENT_AMOUNT = RESERVE_ADJUSTMENT_AMOUNT + t_adjustment_amount(i)
4946: , DEPRN_RESERVE = DEPRN_RESERVE + t_adjustment_amount(i)
4947: , ADJUSTED_COST = RECOVERABLE_COST - DEPRN_RESERVE - t_adjustment_amount(i)
4948: WHERE ASSET_ID = t_asset_id(i)

Line 4957: -- Deactivate FA_BOOKS row for processed assets

4953: BULK COLLECT INTO t_new_adj_cost, t_new_deprn_reserve;
4954:
4955:
4956: l_loc := 'Before Books';
4957: -- Deactivate FA_BOOKS row for processed assets
4958: FORALL i in t_asset_id.first..t_asset_id.last
4959: UPDATE FA_BOOKS_MRC_V
4960: SET DATE_INEFFECTIVE = p_trans_rec.who_info.last_update_date
4961: , TRANSACTION_HEADER_ID_OUT = t_thid(i)

Line 4959: UPDATE FA_BOOKS_MRC_V

4955:
4956: l_loc := 'Before Books';
4957: -- Deactivate FA_BOOKS row for processed assets
4958: FORALL i in t_asset_id.first..t_asset_id.last
4959: UPDATE FA_BOOKS_MRC_V
4960: SET DATE_INEFFECTIVE = p_trans_rec.who_info.last_update_date
4961: , TRANSACTION_HEADER_ID_OUT = t_thid(i)
4962: WHERE TRANSACTION_HEADER_ID_IN = t_transaction_header_id_in(i);
4963:

Line 4965: -- Insert new FA_BOOKS records for processed assets

4961: , TRANSACTION_HEADER_ID_OUT = t_thid(i)
4962: WHERE TRANSACTION_HEADER_ID_IN = t_transaction_header_id_in(i);
4963:
4964:
4965: -- Insert new FA_BOOKS records for processed assets
4966: FORALL i in t_asset_id.first..t_asset_id.last
4967: INSERT INTO FA_BOOKS_MRC_V( BOOK_TYPE_CODE
4968: , ASSET_ID
4969: , DATE_PLACED_IN_SERVICE

Line 4967: INSERT INTO FA_BOOKS_MRC_V( BOOK_TYPE_CODE

4963:
4964:
4965: -- Insert new FA_BOOKS records for processed assets
4966: FORALL i in t_asset_id.first..t_asset_id.last
4967: INSERT INTO FA_BOOKS_MRC_V( BOOK_TYPE_CODE
4968: , ASSET_ID
4969: , DATE_PLACED_IN_SERVICE
4970: , DATE_EFFECTIVE
4971: , DEPRN_START_DATE

Line 5195: FROM FA_BOOKS_MRC_V

5191: , TERMINAL_GAIN_LOSS_FLAG
5192: , SUPER_GROUP_ID
5193: , OVER_DEPRECIATE_OPTION
5194: , DISABLED_FLAG
5195: FROM FA_BOOKS_MRC_V
5196: WHERE TRANSACTION_HEADER_ID_IN = t_transaction_header_id_in(i);
5197:
5198: else
5199: l_loc := 'Before BS';

Line 5200: -- Update FA_BOOKS_SUMAMRY table with new reserve adjustment amount and

5196: WHERE TRANSACTION_HEADER_ID_IN = t_transaction_header_id_in(i);
5197:
5198: else
5199: l_loc := 'Before BS';
5200: -- Update FA_BOOKS_SUMAMRY table with new reserve adjustment amount and
5201: -- related columns. Return new adjusted_cost and deprn reserve for later use
5202: FORALL i in t_asset_id.first..t_asset_id.last
5203: UPDATE FA_BOOKS_SUMMARY
5204: SET RESERVE_ADJUSTMENT_AMOUNT = RESERVE_ADJUSTMENT_AMOUNT + t_adjustment_amount(i)

Line 5203: UPDATE FA_BOOKS_SUMMARY

5199: l_loc := 'Before BS';
5200: -- Update FA_BOOKS_SUMAMRY table with new reserve adjustment amount and
5201: -- related columns. Return new adjusted_cost and deprn reserve for later use
5202: FORALL i in t_asset_id.first..t_asset_id.last
5203: UPDATE FA_BOOKS_SUMMARY
5204: SET RESERVE_ADJUSTMENT_AMOUNT = RESERVE_ADJUSTMENT_AMOUNT + t_adjustment_amount(i)
5205: , DEPRN_RESERVE = DEPRN_RESERVE + t_adjustment_amount(i)
5206: , ADJUSTED_COST = RECOVERABLE_COST - DEPRN_RESERVE - t_adjustment_amount(i)
5207: WHERE ASSET_ID = t_asset_id(i)

Line 5226: -- Deactivate FA_BOOKS row for processed assets

5222: end loop;
5223: end if;
5224:
5225: l_loc := 'Before Books';
5226: -- Deactivate FA_BOOKS row for processed assets
5227: FORALL i in t_asset_id.first..t_asset_id.last
5228: UPDATE FA_BOOKS
5229: SET DATE_INEFFECTIVE = p_trans_rec.who_info.last_update_date
5230: , TRANSACTION_HEADER_ID_OUT = t_thid(i)

Line 5228: UPDATE FA_BOOKS

5224:
5225: l_loc := 'Before Books';
5226: -- Deactivate FA_BOOKS row for processed assets
5227: FORALL i in t_asset_id.first..t_asset_id.last
5228: UPDATE FA_BOOKS
5229: SET DATE_INEFFECTIVE = p_trans_rec.who_info.last_update_date
5230: , TRANSACTION_HEADER_ID_OUT = t_thid(i)
5231: WHERE TRANSACTION_HEADER_ID_IN = t_transaction_header_id_in(i);
5232:

Line 5234: -- Insert new FA_BOOKS records for processed assets

5230: , TRANSACTION_HEADER_ID_OUT = t_thid(i)
5231: WHERE TRANSACTION_HEADER_ID_IN = t_transaction_header_id_in(i);
5232:
5233: l_loc := 'Before Insert Books';
5234: -- Insert new FA_BOOKS records for processed assets
5235: FORALL i in t_asset_id.first..t_asset_id.last
5236: INSERT INTO FA_BOOKS( BOOK_TYPE_CODE
5237: , ASSET_ID
5238: , DATE_PLACED_IN_SERVICE

Line 5236: INSERT INTO FA_BOOKS( BOOK_TYPE_CODE

5232:
5233: l_loc := 'Before Insert Books';
5234: -- Insert new FA_BOOKS records for processed assets
5235: FORALL i in t_asset_id.first..t_asset_id.last
5236: INSERT INTO FA_BOOKS( BOOK_TYPE_CODE
5237: , ASSET_ID
5238: , DATE_PLACED_IN_SERVICE
5239: , DATE_EFFECTIVE
5240: , DEPRN_START_DATE

Line 5464: FROM FA_BOOKS

5460: , TERMINAL_GAIN_LOSS_FLAG
5461: , SUPER_GROUP_ID
5462: , OVER_DEPRECIATE_OPTION
5463: , DISABLED_FLAG
5464: FROM FA_BOOKS
5465: WHERE TRANSACTION_HEADER_ID_IN = t_transaction_header_id_in(i);
5466:
5467: end if; -- (p_mrc_sob_type_code = 'R')
5468:

Line 5565: UPDATE FA_BOOKS_SUMMARY_MRC_V

5561: WHERE ASSET_ID = l_last_asset_id
5562: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
5563: AND TRANSACTION_HEADER_ID = l_last_thid);
5564:
5565: UPDATE FA_BOOKS_SUMMARY_MRC_V
5566: SET RESERVE_ADJUSTMENT_AMOUNT = RESERVE_ADJUSTMENT_AMOUNT + l_reallocate_amount
5567: , DEPRN_RESERVE = DEPRN_RESERVE + l_reallocate_amount
5568: , ADJUSTED_COST = RECOVERABLE_COST - DEPRN_RESERVE
5569: WHERE ASSET_ID = l_last_asset_id

Line 5575: UPDATE FA_BOOKS_MRC_V

5571: AND PERIOD_COUNTER = p_period_rec.period_counter
5572: AND TRANSACTION_HEADER_ID_OUT IS NULL;
5573:
5574:
5575: UPDATE FA_BOOKS_MRC_V
5576: SET ADJUSTED_COST = ADJUSTED_COST + l_reallocate_amount
5577: WHERE TRANSACTION_HEADER_ID_IN = l_last_thid;
5578: else
5579: UPDATE FA_ADJUSTMENTS

Line 5590: UPDATE FA_BOOKS_SUMMARY

5586: WHERE ASSET_ID = l_last_asset_id
5587: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
5588: AND TRANSACTION_HEADER_ID = l_last_thid);
5589:
5590: UPDATE FA_BOOKS_SUMMARY
5591: SET RESERVE_ADJUSTMENT_AMOUNT = RESERVE_ADJUSTMENT_AMOUNT + l_reallocate_amount
5592: , DEPRN_RESERVE = DEPRN_RESERVE + l_reallocate_amount
5593: , ADJUSTED_COST = RECOVERABLE_COST - DEPRN_RESERVE
5594: WHERE ASSET_ID = l_last_asset_id

Line 5600: UPDATE FA_BOOKS

5596: AND PERIOD_COUNTER = p_period_rec.period_counter
5597: AND TRANSACTION_HEADER_ID_OUT IS NULL;
5598:
5599:
5600: UPDATE FA_BOOKS
5601: SET ADJUSTED_COST = ADJUSTED_COST + l_reallocate_amount
5602: WHERE TRANSACTION_HEADER_ID_IN = l_last_thid;
5603: end if; -- (p_mrc_sob_type_code = 'R')
5604: else

Line 5628: UPDATE FA_BOOKS_SUMMARY_MRC_V

5624: WHERE ASSET_ID = t_asset_id(i)
5625: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
5626: AND TRANSACTION_HEADER_ID = t_thid(i));
5627:
5628: UPDATE FA_BOOKS_SUMMARY_MRC_V
5629: SET RESERVE_ADJUSTMENT_AMOUNT = RESERVE_ADJUSTMENT_AMOUNT + l_reallocate_amount
5630: , DEPRN_RESERVE = DEPRN_RESERVE + l_reallocate_amount
5631: , ADJUSTED_COST = ADJUSTED_RECOVERABLE_COST - DEPRN_RESERVE
5632: WHERE ASSET_ID = t_asset_id(i)

Line 5638: UPDATE FA_BOOKS_MRC_V

5634: AND PERIOD_COUNTER = p_period_rec.period_counter
5635: AND TRANSACTION_HEADER_ID_OUT IS NULL;
5636:
5637:
5638: UPDATE FA_BOOKS_MRC_V
5639: SET ADJUSTED_COST = ADJUSTED_COST + l_reallocate_amount
5640: WHERE TRANSACTION_HEADER_ID_IN = t_thid(i);
5641: else
5642: UPDATE FA_ADJUSTMENTS

Line 5653: UPDATE FA_BOOKS_SUMMARY

5649: WHERE ASSET_ID = t_asset_id(i)
5650: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
5651: AND TRANSACTION_HEADER_ID = t_thid(i));
5652:
5653: UPDATE FA_BOOKS_SUMMARY
5654: SET RESERVE_ADJUSTMENT_AMOUNT = RESERVE_ADJUSTMENT_AMOUNT + l_reallocate_amount
5655: , DEPRN_RESERVE = DEPRN_RESERVE + l_reallocate_amount
5656: , ADJUSTED_COST = ADJUSTED_RECOVERABLE_COST - DEPRN_RESERVE
5657: WHERE ASSET_ID = t_asset_id(i)

Line 5663: UPDATE FA_BOOKS

5659: AND PERIOD_COUNTER = p_period_rec.period_counter
5660: AND TRANSACTION_HEADER_ID_OUT IS NULL;
5661:
5662:
5663: UPDATE FA_BOOKS
5664: SET ADJUSTED_COST = ADJUSTED_COST + l_reallocate_amount
5665: WHERE TRANSACTION_HEADER_ID_IN = t_thid(i);
5666:
5667: end if; -- (p_mrc_sob_type_code = 'R')

Line 5690: UPDATE FA_BOOKS_SUMMARY_MRC_V

5686: WHERE ASSET_ID = t_asset_id(i)
5687: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
5688: AND TRANSACTION_HEADER_ID = t_thid(i));
5689:
5690: UPDATE FA_BOOKS_SUMMARY_MRC_V
5691: SET RESERVE_ADJUSTMENT_AMOUNT = RESERVE_ADJUSTMENT_AMOUNT + t_adjusted_recoverable_cost(i) -
5692: t_new_deprn_reserve(i)
5693: , DEPRN_RESERVE = ADJUSTED_RECOVERABLE_COST
5694: , ADJUSTED_COST = RECOVERABLE_COST - ADJUSTED_RECOVERABLE_COST

Line 5701: UPDATE FA_BOOKS_MRC_V

5697: AND PERIOD_COUNTER = p_period_rec.period_counter
5698: AND TRANSACTION_HEADER_ID_OUT IS NULL;
5699:
5700:
5701: UPDATE FA_BOOKS_MRC_V
5702: SET ADJUSTED_COST = RECOVERABLE_COST - ADJUSTED_RECOVERABLE_COST
5703: WHERE TRANSACTION_HEADER_ID_IN = t_thid(i);
5704: else
5705: UPDATE FA_ADJUSTMENTS

Line 5716: UPDATE FA_BOOKS_SUMMARY

5712: WHERE ASSET_ID = t_asset_id(i)
5713: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
5714: AND TRANSACTION_HEADER_ID = t_thid(i));
5715:
5716: UPDATE FA_BOOKS_SUMMARY
5717: SET RESERVE_ADJUSTMENT_AMOUNT = RESERVE_ADJUSTMENT_AMOUNT + t_adjusted_recoverable_cost(i) -
5718: t_new_deprn_reserve(i)
5719: , DEPRN_RESERVE = ADJUSTED_RECOVERABLE_COST
5720: , ADJUSTED_COST = RECOVERABLE_COST - ADJUSTED_RECOVERABLE_COST

Line 5727: UPDATE FA_BOOKS

5723: AND PERIOD_COUNTER = p_period_rec.period_counter
5724: AND TRANSACTION_HEADER_ID_OUT IS NULL;
5725:
5726:
5727: UPDATE FA_BOOKS
5728: SET ADJUSTED_COST = RECOVERABLE_COST - ADJUSTED_RECOVERABLE_COST
5729: WHERE TRANSACTION_HEADER_ID_IN = t_thid(i);
5730:
5731: end if; -- (p_mrc_sob_type_code = 'R')

Line 5807: UPDATE FA_BOOKS_SUMMARY_MRC_V

5803: WHERE ASSET_ID = t_asset_id(i)
5804: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
5805: AND TRANSACTION_HEADER_ID = t_thid(i));
5806:
5807: UPDATE FA_BOOKS_SUMMARY_MRC_V
5808: SET RESERVE_ADJUSTMENT_AMOUNT = RESERVE_ADJUSTMENT_AMOUNT + l_reallocate_amount
5809: , DEPRN_RESERVE = DEPRN_RESERVE + l_reallocate_amount
5810: , ADJUSTED_COST = ADJUSTED_RECOVERABLE_COST - DEPRN_RESERVE
5811: WHERE ASSET_ID = t_asset_id(i)

Line 5817: UPDATE FA_BOOKS_MRC_V

5813: AND PERIOD_COUNTER = p_period_rec.period_counter
5814: AND TRANSACTION_HEADER_ID_OUT is null;
5815:
5816:
5817: UPDATE FA_BOOKS_MRC_V
5818: SET ADJUSTED_COST = ADJUSTED_COST + l_reallocate_amount
5819: WHERE TRANSACTION_HEADER_ID_IN = t_thid(i);
5820: else
5821: UPDATE FA_ADJUSTMENTS

Line 5832: UPDATE FA_BOOKS_SUMMARY

5828: WHERE ASSET_ID = t_asset_id(i)
5829: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
5830: AND TRANSACTION_HEADER_ID = t_thid(i));
5831:
5832: UPDATE FA_BOOKS_SUMMARY
5833: SET RESERVE_ADJUSTMENT_AMOUNT = RESERVE_ADJUSTMENT_AMOUNT + l_reallocate_amount
5834: , DEPRN_RESERVE = DEPRN_RESERVE + l_reallocate_amount
5835: , ADJUSTED_COST = ADJUSTED_RECOVERABLE_COST - DEPRN_RESERVE
5836: WHERE ASSET_ID = t_asset_id(i)

Line 5842: UPDATE FA_BOOKS

5838: AND PERIOD_COUNTER = p_period_rec.period_counter
5839: AND TRANSACTION_HEADER_ID_OUT is null;
5840:
5841:
5842: UPDATE FA_BOOKS
5843: SET ADJUSTED_COST = ADJUSTED_COST + l_reallocate_amount
5844: WHERE TRANSACTION_HEADER_ID_IN = t_thid(i);
5845: end if;
5846:

Line 5863: UPDATE FA_BOOKS_SUMMARY_MRC_V

5859: WHERE ASSET_ID = t_asset_id(i)
5860: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
5861: AND TRANSACTION_HEADER_ID = t_thid(i));
5862:
5863: UPDATE FA_BOOKS_SUMMARY_MRC_V
5864: SET RESERVE_ADJUSTMENT_AMOUNT = RESERVE_ADJUSTMENT_AMOUNT + t_adjusted_cost(i)
5865: , DEPRN_RESERVE = ADJUSTED_RECOVERABLE_COST
5866: , ADJUSTED_COST = RECOVERABLE_COST - ADJUSTED_RECOVERABLE_COST
5867: WHERE ASSET_ID = t_asset_id(i)

Line 5872: UPDATE FA_BOOKS_MRC_V

5868: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
5869: AND PERIOD_COUNTER = p_period_rec.period_counter;
5870:
5871:
5872: UPDATE FA_BOOKS_MRC_V
5873: SET ADJUSTED_COST = RECOVERABLE_COST - ADJUSTED_RECOVERABLE_COST
5874: WHERE TRANSACTION_HEADER_ID_IN = t_thid(i);
5875: else
5876: UPDATE FA_ADJUSTMENTS

Line 5887: UPDATE FA_BOOKS_SUMMARY

5883: WHERE ASSET_ID = t_asset_id(i)
5884: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
5885: AND TRANSACTION_HEADER_ID = t_thid(i));
5886:
5887: UPDATE FA_BOOKS_SUMMARY
5888: SET RESERVE_ADJUSTMENT_AMOUNT = RESERVE_ADJUSTMENT_AMOUNT + t_adjusted_cost(i)
5889: , DEPRN_RESERVE = ADJUSTED_RECOVERABLE_COST
5890: , ADJUSTED_COST = RECOVERABLE_COST - ADJUSTED_RECOVERABLE_COST
5891: WHERE ASSET_ID = t_asset_id(i)

Line 5896: UPDATE FA_BOOKS

5892: AND BOOK_TYPE_CODE = p_asset_hdr_rec.book_type_code
5893: AND PERIOD_COUNTER = p_period_rec.period_counter;
5894:
5895:
5896: UPDATE FA_BOOKS
5897: SET ADJUSTED_COST = RECOVERABLE_COST - ADJUSTED_RECOVERABLE_COST
5898: WHERE TRANSACTION_HEADER_ID_IN = t_thid(i);
5899: end if;
5900: