DBA Data[Home] [Help]

APPS.FA_PROCESS_GROUPS_PKG SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 193

        select  bk.asset_id,
                bk.transaction_header_id_in,
                bk.rowid,
                th.transaction_type_code,
                th.transaction_date_entered,
                th.transaction_subtype,
                th.transaction_key,
                th.amortization_start_date,
                th.calling_interface,
                th.member_transaction_header_id,
                th.trx_reference_id,
                th.event_id
        from fa_books bk,
             fa_transaction_headers th
        where bk.asset_id in (l_source_asset_id, l_dest_asset_id)
        and   bk.book_type_code = p_book
        and   bk.adjustment_required_status = 'GADJ'
        and   bk.date_ineffective is null
        and   th.transaction_header_id = bk.transaction_header_id_in
	order by bk.transaction_header_id_in;
Line: 215

        select  bk.asset_id,
                bk.transaction_header_id_in,
                bk.rowid,
                th.transaction_type_code,
                th.transaction_date_entered,
                th.transaction_subtype,
                th.transaction_key,
                th.amortization_start_date,
                th.calling_interface,
                th.member_transaction_header_id,
                th.trx_reference_id,
                th.event_id
        from fa_books bk,
             fa_transaction_headers th
        where bk.book_type_code = p_book
        and   bk.adjustment_required_status = 'GADJ'
        and   bk.date_ineffective is null
        and   th.transaction_header_id = bk.transaction_header_id_in
	order by bk.transaction_header_id_in;
Line: 236

        select transaction_header_id_in
        from fa_books
        where asset_id = l_asset_id
        and   book_type_code = p_book
        and   transaction_header_id_out = l_trx_id_in;
Line: 243

	select count(*)
	from fa_books
	where transaction_header_id_in = l_trx_id_in
	and   adjustment_required_status = 'GADJ';
Line: 249

        select   TRX_REFERENCE_ID,
                 TRANSACTION_TYPE,
                 SRC_TRANSACTION_SUBTYPE,
                 DEST_TRANSACTION_SUBTYPE,
                 BOOK_TYPE_CODE,
                 SRC_ASSET_ID,
                 SRC_TRANSACTION_HEADER_ID,
                 DEST_ASSET_ID,
                 DEST_TRANSACTION_HEADER_ID,
                 MEMBER_ASSET_ID,
                 MEMBER_TRANSACTION_HEADER_ID,
                 SRC_AMORTIZATION_START_DATE,
                 DEST_AMORTIZATION_START_DATE,
                 RESERVE_TRANSFER_AMOUNT,
                 SRC_EXPENSE_AMOUNT,
                 DEST_EXPENSE_AMOUNT,
                 SRC_EOFY_RESERVE,
                 DEST_EOFY_RESERVE
        from fa_trx_references
        where TRX_REFERENCE_ID = l_trans_rec.trx_reference_id;
Line: 274

      select adjustment_amount
      from   fa_adjustments
      where  asset_id = l_asset_hdr_rec.asset_id
      and    book_type_code = l_asset_hdr_rec.book_type_code
      and    transaction_header_id = l_trans_rec.transaction_header_id;
Line: 281

      select adjustment_amount
      from   fa_adjustments_mrc_v
      where  asset_id = l_asset_hdr_rec.asset_id
      and    book_type_code = l_asset_hdr_rec.book_type_code
      and    transaction_header_id = l_trans_rec.transaction_header_id;
Line: 295

      select nvl(reserve_retired, 0)
      from   fa_retirements
      where  transaction_header_id_in = l_trans_rec.member_transaction_header_id;
Line: 300

      select nvl(reserve_retired, 0)
      from   fa_retirements_mrc_v
      where  transaction_header_id_in = l_trans_rec.member_transaction_header_id;
Line: 305

      select nvl(reserve_retired, 0)
           , transaction_header_id_in
      from   fa_retirements
      where  transaction_header_id_out = l_trans_rec.member_transaction_header_id;
Line: 311

      select nvl(reserve_retired, 0)
           , transaction_header_id_in
      from   fa_retirements_mrc_v
      where  transaction_header_id_out = l_trans_rec.member_transaction_header_id;
Line: 319

      select sum(decode(debit_credit_flag, 'CR', -1, 1) *
                 decode(l_trans_rec.transaction_key, 'MR', 1, -1) *
                 adjustment_amount)
      from   fa_adjustments
      where  asset_id = l_asset_hdr_rec.asset_id
      and    book_type_code = l_asset_hdr_rec.book_type_code
      and    transaction_header_id = l_trans_rec.transaction_header_id
      and    adjustment_type = 'RESERVE';
Line: 329

      select sum(decode(debit_credit_flag, 'CR', -1, 1) * adjustment_amount)
      from   fa_adjustments_mrc_v
      where  asset_id = l_asset_hdr_rec.asset_id
      and    book_type_code = l_asset_hdr_rec.book_type_code
      and    transaction_header_id = l_trans_rec.transaction_header_id
      and    adjustment_type = 'RESERVE';
Line: 341

      select th.asset_id
           , th.transaction_header_id
           , th.transaction_type_code
           , th.transaction_date_entered
           , th.transaction_name
           , th.source_transaction_header_id
           , th.mass_reference_id
           , th.transaction_subtype
           , th.transaction_key
           , th.amortization_start_date
           , th.calling_interface
           , th.mass_transaction_id
           , th.member_transaction_header_id
           , th.trx_reference_id
           , th.last_update_date
           , th.last_updated_by
           , th.last_update_login
           , th.event_id
           , tr.transaction_type
      from   fa_transaction_headers th,
             fa_trx_references tr  --Added for bug 537059
      where  th.transaction_header_id = l_trans_rec.member_transaction_header_id
      and    tr.trx_reference_id(+) = th.trx_reference_id;  --Added for bug 537059
Line: 545

                                         , lm_trans_rec.who_info.last_update_date
                                         , lm_trans_rec.who_info.last_updated_by
                                         , lm_trans_rec.who_info.last_update_login
					 , lm_trans_rec.event_id  --Added for bug 537059
					 , l_trx_ref_type; -- bug 5475029
Line: 561

            select event_type_code
              into l_event_type_code
              from xla_events
             where application_id = 140
               and event_id = l_trans_rec.event_id;
Line: 573

               if not fa_xla_events_pvt.update_inter_transaction_event
                  (p_ledger_id              => l_asset_hdr_rec.set_of_books_id,
                   p_trx_reference_id       => lm_trans_rec.trx_reference_id,
                   p_book_type_code         => p_book,
                   p_event_type_code        => l_event_type_code,
                   p_event_date             => l_trans_rec.transaction_date_entered,
                   p_event_status_code      => XLA_EVENTS_PUB_PKG.C_EVENT_UNPROCESSED,
                   p_calling_fn             => l_calling_fn,
                   p_log_level_rec          => p_log_level_rec) then
                 raise group_adj_err;
Line: 595

               if not fa_xla_events_pvt.update_transaction_event
                  (p_ledger_id              => l_asset_hdr_rec.set_of_books_id,
                   p_transaction_header_id  => l_thid,
                   p_book_type_code         => p_book,
                   p_event_type_code        => l_event_type_code,
                   p_event_date             => l_trans_rec.transaction_date_entered,
                   p_event_status_code      => XLA_EVENTS_PUB_PKG.C_EVENT_UNPROCESSED,
                   p_calling_fn             => l_calling_fn,
                   p_log_level_rec          => p_log_level_rec) then
                  raise group_adj_err;
Line: 778

                         p_update_books_summary  => TRUE,
                         p_proceeds_of_sale      => 0,
                         p_cost_of_removal       => 0,
                         x_deprn_exp             => l_deprn_exp,
                         x_bonus_deprn_exp       => l_bonus_deprn_exp,
                         x_deprn_rsv             => l_deprn_rsv,
                         p_log_level_rec => p_log_level_rec)) then

               if (p_log_level_rec.statement_level) then
                  fa_debug_pkg.add('calc_fin_info', 'calling FA_AMORT_PVT.faxama', 'FAILED', p_log_level_rec => p_log_level_rec);
Line: 823

               lm_trans_rec.who_info.created_by := l_trans_rec.who_info.last_updated_by;
Line: 824

               lm_trans_rec.who_info.creation_date := l_trans_rec.who_info.last_update_date;
Line: 924

            update fa_books
            set rate_adjustment_factor =
			l_asset_fin_rec_new.rate_adjustment_factor,
		reval_amortization_basis =
			l_asset_fin_rec_new.reval_amortization_basis,
		adjusted_cost = l_asset_fin_rec_new.adjusted_cost,
		adjusted_capacity = l_asset_fin_rec_new.adjusted_capacity,
		eofy_reserve = l_asset_fin_rec_new.eofy_reserve,
		adjustment_required_status = 'NONE'
            where rowid = l_rowid;
Line: 1190

            update fa_books
            set adjustment_required_status = 'NONE'
            where rowid = l_rowid;
Line: 1315

   select distribution_id,
          units_assigned,
          code_combination_id,
          location_id,
          assigned_to
     from fa_distribution_history
    where asset_id = p_asset_id
      and transaction_header_id_out is null;
Line: 1325

        select transaction_header_id_in
        from fa_books
        where asset_id = l_asset_id
        and   book_type_code = p_trx_ref_rec.book_type_code
        and   transaction_header_id_out = l_trx_id_in;
Line: 1333

        select transaction_header_id,
                transaction_type_code,
                transaction_date_entered,
                transaction_name,
                source_transaction_header_id,
                mass_reference_id,
                transaction_subtype,
                transaction_key,
                amortization_start_date,
                'FAPGADJ',
                mass_transaction_id,
                member_transaction_header_id,
                trx_reference_id
        from fa_transaction_headers
        where transaction_header_id = l_trx_id;
Line: 1351

      select nvl(reserve_transfer_amount, 0)
      from fa_trx_references
      where dest_asset_id = l_src_asset_hdr_rec.asset_id
      and   member_asset_id = p_trx_ref_rec.member_asset_id
      and   book_type_code = p_trx_ref_rec.book_type_code
      order by trx_reference_id desc;
Line: 1772

                         p_update_books_summary  => TRUE,
                         p_proceeds_of_sale      => 0,
                         p_cost_of_removal       => 0,
                         x_deprn_exp             => l_group_reclass_options_rec.source_exp_amount,
                         x_bonus_deprn_exp       => l_bonus_deprn_exp,
                         x_deprn_rsv             => l_deprn_rsv,
                         p_log_level_rec => p_log_level_rec)) then

            if (p_log_level_rec.statement_level) then
               fa_debug_pkg.add('calc_fin_info', 'calling FA_AMORT_PVT.faxama', 'FAILED', p_log_level_rec => p_log_level_rec);
Line: 1805

      l_rsv_adj.selection_mode           := FA_ADJUST_TYPE_PKG.FA_AJ_ACTIVE;
Line: 1806

      l_rsv_adj.selection_thid           := 0;
Line: 1807

      l_rsv_adj.selection_retid          := 0;
Line: 1809

      l_rsv_adj.last_update_date         := l_src_trans_rec.transaction_date_entered;
Line: 1834

      l_exp_adj.selection_mode           := FA_ADJUST_TYPE_PKG.FA_AJ_ACTIVE;
Line: 1835

      l_exp_adj.selection_thid           := 0;
Line: 1836

      l_exp_adj.selection_retid          := 0;
Line: 1838

      l_exp_adj.last_update_date         := l_src_trans_rec.transaction_date_entered;
Line: 1872

                l_src_trans_rec.who_info.last_update_date,
                l_src_trans_rec.who_info.last_updated_by,
                l_src_trans_rec.who_info.last_update_login,
                p_log_level_rec         => p_log_level_rec) then
            raise group_rec_err;
Line: 1901

                    l_src_trans_rec.who_info.last_update_date,
                    l_src_trans_rec.who_info.last_updated_by,
                    l_src_trans_rec.who_info.last_update_login) then
                  raise group_rec_err;
Line: 1922

                l_src_trans_rec.who_info.last_update_date,
                l_src_trans_rec.who_info.last_updated_by,
                l_src_trans_rec.who_info.last_update_login,
                p_log_level_rec         => p_log_level_rec) then
               raise group_rec_err;
Line: 1952

               l_src_trans_rec.who_info.last_update_date,
               l_src_trans_rec.who_info.last_updated_by,
               l_src_trans_rec.who_info.last_update_login) then
               raise group_rec_err;
Line: 2111

            update fa_adjustments
               set track_member_flag     = null
             where transaction_header_id = l_trans_rec.transaction_header_id
               and book_type_code        = l_asset_hdr_rec.book_type_code;
Line: 2120

         select transaction_header_id
           into l_trans_rec.transaction_header_id
           from fa_transaction_headers
          where asset_id = l_mem_asset_hdr_rec.asset_id
            and book_type_code = l_mem_asset_hdr_rec.book_type_code
            and transaction_type_code = 'TRANSFER'
            and transaction_header_id > l_mem_trans_rec.transaction_header_id;
Line: 2128

         update fa_adjustments_mrc_v
            set track_member_flag     = null
          where transaction_header_id = l_trans_rec.transaction_header_id
            and book_type_code        = l_asset_hdr_rec.book_type_code;
Line: 2203

                         p_update_books_summary  => TRUE,
                         p_proceeds_of_sale      => 0,
                         p_cost_of_removal       => 0,
                         x_deprn_exp             => l_group_reclass_options_rec.destination_exp_amount,
                         x_bonus_deprn_exp       => l_bonus_deprn_exp,
                         x_deprn_rsv             => l_deprn_rsv,
                         p_log_level_rec => p_log_level_rec)) then

         if (p_log_level_rec.statement_level) then
            fa_debug_pkg.add('calc_fin_info', 'calling FA_AMORT_PVT.faxama', 'FAILED', p_log_level_rec => p_log_level_rec);
Line: 2230

      l_rsv_adj.selection_mode           := FA_ADJUST_TYPE_PKG.FA_AJ_ACTIVE;
Line: 2231

      l_rsv_adj.selection_thid           := 0;
Line: 2232

      l_rsv_adj.selection_retid          := 0;
Line: 2234

      l_rsv_adj.last_update_date         := l_src_trans_rec.transaction_date_entered;
Line: 2258

      l_exp_adj.selection_mode           := FA_ADJUST_TYPE_PKG.FA_AJ_ACTIVE;
Line: 2259

      l_exp_adj.selection_thid           := 0;
Line: 2260

      l_exp_adj.selection_retid          := 0;
Line: 2262

      l_exp_adj.last_update_date         := l_src_trans_rec.transaction_date_entered;
Line: 2303

             l_dest_trans_rec.who_info.last_update_date,
             l_dest_trans_rec.who_info.last_updated_by,
             l_dest_trans_rec.who_info.last_update_login,
             p_log_level_rec         => p_log_level_rec) then
            raise group_rec_err;
Line: 2332

                    l_src_trans_rec.who_info.last_update_date,
                    l_src_trans_rec.who_info.last_updated_by,
                    l_src_trans_rec.who_info.last_update_login) then
               raise group_rec_err;
Line: 2352

             l_dest_trans_rec.who_info.last_update_date,
             l_dest_trans_rec.who_info.last_updated_by,
             l_dest_trans_rec.who_info.last_update_login,
             p_log_level_rec         => p_log_level_rec) then
            raise group_rec_err;
Line: 2382

               l_src_trans_rec.who_info.last_update_date,
               l_src_trans_rec.who_info.last_updated_by,
               l_src_trans_rec.who_info.last_update_login) then
               raise group_rec_err;
Line: 2452

         update fa_books
         set    adjustment_required_status = 'NONE'
              , adjusted_cost = l_grp_src_asset_fin_rec_new.adjusted_cost
              , rate_adjustment_factor = l_grp_src_asset_fin_rec_new.rate_adjustment_factor
              , formula_factor = l_grp_src_asset_fin_rec_new.formula_factor
              , salvage_value = l_grp_src_asset_fin_rec_new.salvage_value
              , allowed_deprn_limit_amount = l_grp_src_asset_fin_rec_new.allowed_deprn_limit_amount
              , recoverable_cost = l_grp_src_asset_fin_rec_new.recoverable_cost
              , adjusted_recoverable_cost = l_grp_src_asset_fin_rec_new.adjusted_recoverable_cost
              , adjusted_capacity = l_grp_src_asset_fin_rec_new.adjusted_capacity
              , reval_amortization_basis = l_grp_src_asset_fin_rec_new.reval_amortization_basis
              , eofy_reserve = l_grp_src_asset_fin_rec_new.eofy_reserve
         where  asset_id = l_src_asset
         and    book_type_code = p_trx_ref_rec.book_type_code
         and    transaction_header_id_out is null;
Line: 2468

         update fa_books
         set    adjustment_required_status = 'NONE'
         where  asset_id = l_src_asset
         and    book_type_code = p_trx_ref_rec.book_type_code
         and    transaction_header_id_out is null;
Line: 2476

         update fa_books
         set    adjustment_required_status = 'NONE'
              , adjusted_cost = l_dest_asset_fin_rec_new.adjusted_cost
              , rate_adjustment_factor = l_dest_asset_fin_rec_new.rate_adjustment_factor
              , formula_factor = l_dest_asset_fin_rec_new.formula_factor
              , salvage_value = l_dest_asset_fin_rec_new.salvage_value
              , allowed_deprn_limit_amount = l_dest_asset_fin_rec_new.allowed_deprn_limit_amount
              , recoverable_cost = l_dest_asset_fin_rec_new.recoverable_cost
              , adjusted_recoverable_cost = l_dest_asset_fin_rec_new.adjusted_recoverable_cost
              , adjusted_capacity = l_dest_asset_fin_rec_new.adjusted_capacity
              , reval_amortization_basis = l_dest_asset_fin_rec_new.reval_amortization_basis
              , eofy_reserve = l_dest_asset_fin_rec_new.eofy_reserve
         where  asset_id = l_dest_asset
         and    book_type_code = p_trx_ref_rec.book_type_code
         and    transaction_header_id_out is null;
Line: 2492

         update fa_books
         set    adjustment_required_status = 'NONE'
         where  asset_id = l_dest_asset
         and    book_type_code = p_trx_ref_rec.book_type_code
         and    transaction_header_id_out is null;
Line: 2499

      update fa_trx_references
      set reserve_transfer_amount = l_group_reclass_options_rec.reserve_amount
        , src_expense_amount = l_group_reclass_options_rec.source_exp_amount
        , dest_expense_amount = l_group_reclass_options_rec.destination_exp_amount
      where trx_reference_id =  l_src_trans_rec.trx_reference_id;
Line: 2507

         update fa_books_mrc_v
         set    adjustment_required_status = 'NONE'
              , adjusted_cost = l_grp_src_asset_fin_rec_new.adjusted_cost
              , rate_adjustment_factor = l_grp_src_asset_fin_rec_new.rate_adjustment_factor
              , formula_factor = l_grp_src_asset_fin_rec_new.formula_factor
              , salvage_value = l_grp_src_asset_fin_rec_new.salvage_value
              , allowed_deprn_limit_amount = l_grp_src_asset_fin_rec_new.allowed_deprn_limit_amount
              , recoverable_cost = l_grp_src_asset_fin_rec_new.recoverable_cost
              , adjusted_recoverable_cost = l_grp_src_asset_fin_rec_new.adjusted_recoverable_cost
              , adjusted_capacity = l_grp_src_asset_fin_rec_new.adjusted_capacity
              , reval_amortization_basis = l_grp_src_asset_fin_rec_new.reval_amortization_basis
              , eofy_reserve = l_grp_src_asset_fin_rec_new.eofy_reserve
         where  asset_id = l_src_asset
         and    book_type_code = p_trx_ref_rec.book_type_code
         and    transaction_header_id_out is null;
Line: 2523

         update fa_books_mrc_v
         set    adjustment_required_status = 'NONE'
         where  asset_id = l_src_asset
         and    book_type_code = p_trx_ref_rec.book_type_code
         and    transaction_header_id_out is null;
Line: 2531

         update fa_books_mrc_v
         set    adjustment_required_status = 'NONE'
              , adjusted_cost = l_dest_asset_fin_rec_new.adjusted_cost
              , rate_adjustment_factor = l_dest_asset_fin_rec_new.rate_adjustment_factor
              , formula_factor = l_dest_asset_fin_rec_new.formula_factor
              , salvage_value = l_dest_asset_fin_rec_new.salvage_value
              , allowed_deprn_limit_amount = l_dest_asset_fin_rec_new.allowed_deprn_limit_amount
              , recoverable_cost = l_dest_asset_fin_rec_new.recoverable_cost
              , adjusted_recoverable_cost = l_dest_asset_fin_rec_new.adjusted_recoverable_cost
              , adjusted_capacity = l_dest_asset_fin_rec_new.adjusted_capacity
              , reval_amortization_basis = l_dest_asset_fin_rec_new.reval_amortization_basis
              , eofy_reserve = l_dest_asset_fin_rec_new.eofy_reserve
         where  asset_id = l_dest_asset
         and    book_type_code = p_trx_ref_rec.book_type_code
         and    transaction_header_id_out is null;
Line: 2547

         update fa_books_mrc_v
         set    adjustment_required_status = 'NONE'
         where  asset_id = l_dest_asset
         and    book_type_code = p_trx_ref_rec.book_type_code
         and    transaction_header_id_out is null;