DBA Data[Home] [Help]

APPS.FA_MC_UTIL_PVT SQL Statements

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

Line: 22

   select glcr.ledger_id
   from   gl_ledgers gltr,
          fa_mc_book_controls mcbc,
          gl_ledgers glcr
   where  gltr.ledger_id = p_set_of_books_id
   and    gltr.currency_code = glcr.currency_code
   and    gltr.chart_of_accounts_id = glcr.chart_of_accounts_id
   and    gltr.ledger_id <> glcr.ledger_id
   and    mcbc.book_type_code = fa_cache_pkg.fazcbc_record.distribution_source_book
   and    glcr.ledger_id = mcbc.set_of_books_id;
Line: 56

      select count(1)
      into   l_found_in_corp
      FROM   fa_mc_books_rates
      WHERE  set_of_books_id = p_set_of_books_id
      AND    transaction_header_id = p_transaction_header_id;
Line: 250

   select br1.exchange_rate,
          br1.avg_exchange_rate
     into px_rate,
          px_avg_exchange_rate
     from fa_mc_books_rates br1
    where br1.asset_id              = p_asset_id
      and br1.book_type_code        = p_book_type_code
      and br1.set_of_books_id       = p_set_of_books_id
      and br1.transaction_header_id =
          (select max(br2.transaction_header_id)
             from fa_mc_books_rates br2
            where br2.asset_id        = p_asset_id
              and br2.book_type_code  = p_book_type_code
              and br2.set_of_books_id = p_set_of_books_id);
Line: 331

         select decode(rate.exchange_rate,0,
                        decode(ad.fixed_assets_cost,0,0,
                              (rate.fixed_assets_cost/ad.fixed_assets_cost)
                        ), rate.exchange_rate
                      )
           into l_exchange_rate
           from fa_mc_mass_rates rate,
                fa_mass_additions ad
          where rate.mass_addition_id = p_inv_rec.split_parent_mass_additions_id
            and rate.mass_addition_id = ad.mass_addition_id
            and rate.set_of_books_id  = p_set_of_books_id;
Line: 414

                  select a.invoice_currency_code,
                         nvl(b.exchange_rate, 1),
                         nvl(b.exchange_date, a.invoice_date),
                         b.exchange_rate_type,
                         nvl(b.base_amount,   b.amount)
                    into l_mc_inv_currency_code,
                         l_mc_inv_exchange_rate,
                         l_mc_inv_exchange_date,
                         l_mc_inv_exchange_rate_type,
                         l_mc_line_base_amount
                    from ap_invoices_all a,
                         ap_mc_invoice_dists b
                   where a.invoice_id               = p_inv_rec.invoice_id
                     and a.invoice_id               = b.invoice_id
                     and b.distribution_line_number = p_inv_rec.ap_distribution_line_number
                     and b.set_of_books_id          = p_set_of_books_id;
Line: 454

                  select a.invoice_currency_code,
                         nvl(b.exchange_rate, 1),
                         nvl(b.exchange_date, a.invoice_date),
                         b.exchange_rate_type,
                         nvl(b.base_amount, b.amount)
                    into l_inv_currency_code,
                         l_inv_exchange_rate,
                         l_inv_exchange_date,
                         l_inv_exchange_rate_type,
                         l_line_base_amount
                    from ap_invoices_all a,
                         ap_invoice_distributions_all b
                   where a.invoice_id               = p_inv_rec.invoice_id
                     and a.invoice_id               = b.invoice_id
                     and b.distribution_line_number = p_inv_rec.ap_distribution_line_number;
Line: 545

                  select current_asset_cost
                    into l_current_asset_cost
                    from pa_mc_prj_ast_lines_all
                   where project_asset_line_id = p_inv_rec.project_asset_line_id
                     and set_of_books_id       = p_set_of_books_id;
Line: 561

			 select current_asset_cost
			 into l_prj_fixed_assets_cost
			 from pa_project_asset_lines_all
                         where project_asset_line_id = p_inv_rec.project_asset_line_id;