DBA Data[Home] [Help]

APPS.FA_GAINLOSS_PKG SQL Statements

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

Line: 46

       SELECT   /*+ ORDERED index ( RET FA_RETIREMENTS_N3 ) index( FAB FA_BOOKS_N5 ) use_nl ( RET FAB ) */
                 RET.RETIREMENT_ID
                ,RET.ASSET_ID
                ,FAA.ASSET_NUMBER
       FROM     FA_RETIREMENTS          RET,
                FA_BOOKS                FAB,
                FA_METHODS              M,
                FA_ADDITIONS_B          FAA
       WHERE    RET.BOOK_TYPE_CODE = p_book_type_code
       AND      RET.STATUS in ('PENDING', 'REINSTATE', 'PARTIAL')
       AND      M.METHOD_CODE(+) =      RET.STL_METHOD_CODE
       AND      M.LIFE_IN_MONTHS(+) =   RET.STL_LIFE_IN_MONTHS
       AND      FAB.RETIREMENT_ID=      RET.RETIREMENT_ID
       AND      FAB.BOOK_TYPE_CODE=     RET.BOOK_TYPE_CODE
       AND      FAB.ASSET_ID=           RET.ASSET_ID
       AND      RET.RETIREMENT_ID > px_max_retirement_id
       AND      MOD(nvl(FAB.GROUP_ASSET_ID,RET.RETIREMENT_ID), p_total_requests) = (p_request_number - 1)
       AND      FAA.ASSET_ID = FAB.ASSET_ID
       ORDER BY RET.RETIREMENT_ID;
Line: 382

     select  count(*)
     into    l_count
     from    fa_deprn_summary
     where   book_type_code = l_asset_hdr_rec.book_type_code
       and   asset_id = l_asset_hdr_rec.asset_id
       and   period_counter = l_period_rec.period_counter;
Line: 432

        select  transaction_type_code
        into    l_trx_type_code
        from    fa_transaction_headers
        where   transaction_header_id=
          (select transaction_header_id_in
           from fa_retirements
           where retirement_id=p_retirement_id);
Line: 476

      select date_effective
        into ret.date_effective
      from fa_retirements
      where retirement_id = l_asset_retire_rec.retirement_id;
Line: 645

               select date_effective
                 into ret.date_effective
               from fa_mc_retirements
               where retirement_id = lv_asset_retire_rec.retirement_id
                 and  set_of_books_id = l_sob_tbl(l_sob_index);
Line: 699

         select asset_type
           into l_asset_type
           from fa_additions_b
          where asset_id = l_asset_hdr_rec.asset_id;
Line: 707

                element => 'setting up parameters for event update, ret_status',
                value   => l_asset_retire_rec.status,
                p_log_level_rec => p_log_level_rec);
Line: 716

            select transaction_header_id_out
              into l_thid
              from fa_retirements
             where retirement_id = l_asset_retire_rec.retirement_id;
Line: 728

         select event_id,
                transaction_date_entered
           into l_event_id,
                L_trx_date_entered
           from fa_transaction_headers
          where transaction_header_id = l_thid;
Line: 783

            update fa_transaction_headers
               set event_id = l_trans_rec.event_id
             where transaction_header_id = l_thid;
Line: 792

                element => 'calling fa_xla_events_pvt.update_transaction_event with thid: ',
                value   => l_thid);
Line: 798

            if not fa_xla_events_pvt.update_transaction_event
                  (p_ledger_id              => l_primary_sob_id,
                   p_transaction_header_id  => l_thid,
                   p_book_type_code         => l_asset_hdr_rec.book_type_code,
                   p_event_type_code        => l_event_type_code,
                   p_event_date             => greatest(l_trx_date_entered,
                                                          l_period_rec.calendar_period_open_date),
                   p_event_status_code      => FA_XLA_EVENTS_PVT.C_EVENT_UNPROCESSED,
                   p_calling_fn             => l_calling_fn,
                   p_log_level_rec => p_log_level_rec) then
               raise gainloss_err;
Line: 813

            update event for secondary ledger*/
            l_secondary_sob_id := FA_XLA_EVENTS_PVT.get_secondary_sob_id(l_asset_hdr_rec.book_type_code);
Line: 815

            if p_log_level_rec.statement_level then fa_debug_pkg.add (fname   => l_calling_fn,element => 'before secondary update l_secondary_sob_id ',value   => l_secondary_sob_id); end if;
Line: 816

            if p_log_level_rec.statement_level then fa_debug_pkg.add (fname   => l_calling_fn,element => 'before secondary update l_primary_sob_id ',value   => l_primary_sob_id); end if;
Line: 819

                if not fa_xla_events_pvt.update_transaction_event
                      (p_ledger_id              => l_secondary_sob_id,
                       p_transaction_header_id  => l_thid,
                       p_book_type_code         => l_asset_hdr_rec.book_type_code,
                       p_event_type_code        => l_event_type_code,
                       p_event_date             => greatest(l_trx_date_entered,
                                                              l_period_rec.calendar_period_open_date),
                       p_event_status_code      => FA_XLA_EVENTS_PVT.C_EVENT_UNPROCESSED,
                       p_secondary_flag               => TRUE,
                       p_secondary_sob_id  => l_secondary_sob_id,
                       p_calling_fn             => l_calling_fn,
                       p_log_level_rec => p_log_level_rec) then
                   raise gainloss_err;