DBA Data[Home] [Help]

APPS.FA_CDE_PKG SQL Statements

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

Line: 26

        SELECT  rowid,
                used_flag used,
                production *
                (least (to_date (X_period.end_jdate, 'J'), end_date) -
                greatest (to_date (X_period.start_jdate, 'J'), start_date) + 1)
                / (end_date - start_date + 1) prod
        FROM    FA_PERIODIC_PRODUCTION
        WHERE   asset_id = X_dpr_ptr.asset_id
        AND     book_type_code = h_dist_book
        AND     start_date <= to_date (X_period.end_jdate, 'J')
        AND     end_date >= to_date (X_period.start_jdate, 'J')
        FOR UPDATE OF
                used_flag
        NOWAIT;
Line: 55

                        UPDATE  FA_PERIODIC_PRODUCTION
                        SET     Used_Flag = 'YES'
                        WHERE   RowID = h.rowid;
Line: 89

        SELECT  rate
        INTO    X_rate
        FROM    fa_rates
        WHERE   method_id = X_method_id
        AND     year = X_year_of_life
        AND     period_placed_in_service = X_prorate_period;
Line: 259

        h_formula := 'SELECT ' || h_formula_parsed ||
           ' rate FROM fa_books fabk, fa_deprn_periods fadp ' ||
           ' WHERE (fabk.asset_id = :v1) ' ||
           ' AND (fabk.book_type_code = :v2' ||
           ' ) AND (fabk.book_type_code = fadp.book_type_code) ' ||
           ' AND (fabk.date_ineffective is null) ' ||
           ' AND (fadp.period_close_date is null)';
Line: 333

		SELECT rate_in_use
                INTO X_Rate
   	        FROM fa_books
   	        WHERE book_type_code = X_Book_Type_Code
                AND asset_id = X_Asset_Id
	        AND date_ineffective is null;
Line: 441

    select  fy.start_date,
            fy.end_date,
            bc2.current_fiscal_year,
            bk.date_placed_in_service,
            bk.deprn_start_date
    into    X_curr_fy_start_date,
            X_curr_fy_end_date,
            h_curr_fy,
            h_dpis,
            h_deprn_start_date
    from    fa_books bk,
            fa_fiscal_year fy,
            fa_book_controls bc,
            fa_book_controls bc2
    where   bc.book_type_code = X_Book_Type_Code
    and     fy.fiscal_year_name = bc.fiscal_year_name
    and     fy.fiscal_year = X_Fiscal_Year
    and     bc2.book_type_code = X_Book_Type_Code
    and     bk.book_type_code = X_Book_Type_Code
    and     bk.asset_id = X_Asset_Id
    and     bk.date_ineffective is null;
Line: 468

          select count(*)
          into   h_conversion_year
          from   fa_fiscal_year fy,
                 fa_book_controls bc
          where  bc.book_type_code = X_Book_Type_Code
          and    bc.fiscal_year_name = fy.fiscal_year_name
          and    X_Conversion_Date between fy.start_date and
                                           fy.end_date;
Line: 1292

  select 'Y'
  from fa_calendar_periods fcp1,
       fa_calendar_periods  fcp2,
       fa_book_controls fbc
  where to_date (dpr_in.prorate_jdate,'J') BETWEEN fcp1.start_date and fcp1.end_date
		and fbc.book_type_code = dpr_in.book
                and fcp1.calendar_type = fbc.deprn_calendar
                and to_date (decode( dpr_in.jdate_retired,0,null,dpr_in.jdate_retired),'J') BETWEEN fcp2.start_date and fcp2.end_date
                and fcp2.calendar_type=fcp1.calendar_type
		and fcp1.period_name=fcp2.period_name;
Line: 2710

                           , dpr.update_override_status
                           , p_log_level_rec) then

                  fa_srvr_msg.add_message(calling_fn => 'fa_cde_pkg.faooda',
                                         p_log_level_rec => p_log_level_rec);
Line: 2759

                nvl(fa_cache_pkg.fazcdrd_record.period_update_flag,'N') ='N' and
                nvl(fa_cache_pkg.fazcdrd_record.subtract_ytd_flag,'N') ='N') then

               if (dpr.deprn_rounding_flag = fa_std_types.FA_DPR_ROUND_ADD or
                   dpr.deprn_rounding_flag is null) then
                  --
                  --  Go into following logic if this is group (except sumup) or calculating member
                  --
                  if (nvl(dpr.asset_type, 'CAPITALIZED') = 'GROUP' and
                      nvl(dpr.member_rollup_flag, 'N') <> 'Y') or
                     (nvl(dpr.asset_type, 'CAPITALIZED') <> 'GROUP' and
                      nvl(dpr.tracking_method, 'NULL') = 'CALCULATE') then

                     perd_deprn_exp := actual_annual_deprn_amt -
                                       (nvl(cur_deprn_rsv,0)+ nvl(year_deprn_exp,0) - cur_eofy_reserve);
Line: 2942

               if (nvl(fa_cache_pkg.fazcdrd_record.period_update_flag,'N') ='Y') then -- ENERGY
                  dpr.adj_capacity := dpr.adj_capacity - perd_prod;                   -- ENERGY
Line: 2985

               select adjusted_cost
               into l_temp_adj_cost
               from fa_books
               where book_type_code = dpr.book
               and asset_id = dpr.asset_id
               and transaction_header_id_out is null;
Line: 3554

                      nvl(fa_cache_pkg.fazcdrd_record.period_update_flag,'N') ='N' and
                      nvl(p_subtract_ytd_flag,'N') = 'N' and
                      nvl(fa_cache_pkg.fazcdrd_record.use_eofy_reserve_flag, 'N') = 'N'))) then

		-- Bug 6665510: FP: Japan Tax Reform Project (Start)
	        if nvl(fa_cache_pkg.fazccmt_record.guarantee_rate_method_flag, 'NO') = 'YES' then

		  if (p_log_level_rec.statement_level) then
                    fa_debug_pkg.add('faxcde', '+++ JAPAN ', 'in guarantee rate call deprn basis', p_log_level_rec);
Line: 4181

                p_update_override_status IN BOOLEAN,
                p_log_level_rec        IN     FA_API_TYPES.log_level_rec_type default null) return boolean is

   h_calendar_type   varchar2(15);
Line: 4219

    fa_debug_pkg.add('faodda', 'p_update_override_status', p_update_override_status,p_log_level_rec);
Line: 4244

   /* select the corresponding period_counter for the current period: fyctr, perd_ctr */

      -- Get calendar Info: type, fy_name and num_per_fiscal_year
/*         SELECT bc.deprn_calendar, bc.fiscal_year_name,
                ct.number_per_fiscal_year
         into h_calendar_type, h_fy_name, h_num_per_fy
         from fa_book_controls bc, fa_calendar_types ct
         where bc.book_type_code = book
         and bc.deprn_calendar = ct.calendar_type;
Line: 4262

      select fy.fiscal_year * h_num_per_fy + cp.period_num
      into perd_c
      from fa_calendar_periods cp, fa_fiscal_year fy
      where cp.period_num = perd_ctr
            and fy.fiscal_year = fyctr
            and cp.calendar_type = h_calendar_type
            and cp.start_date >= fy.start_date
            and cp.end_date <= fy.end_date
            and fy.fiscal_year_name = h_fy_name;
Line: 4276

      select cp.period_name into perd_name
      from fa_calendar_periods cp, fa_fiscal_year fy
      where cp.calendar_type = h_calendar_type and
            cp.period_num = perd_ctr and
            cp.start_date >= fy.start_date and
            cp.end_date <= fy.end_date and
            fy.fiscal_year_name = h_fy_name and
            fy.fiscal_year = fyctr;
Line: 4300

        SELECT deprn_amount, bonus_deprn_amount, subtract_ytd_flag, deprn_override_id
        INTO override_depr_amt, override_bonus_amt, subtract_ytd_flag, h_deprn_override_id
        FROM FA_DEPRN_OVERRIDE
        WHERE
           book_type_code = book and
           asset_id = h_asset_id and
           period_name = perd_name and
           used_by = 'ADJUSTMENT' and
           status = 'POST';
Line: 4310

        SELECT deprn_amount, bonus_deprn_amount, subtract_ytd_flag, deprn_override_id
        INTO override_depr_amt, override_bonus_amt, subtract_ytd_flag, h_deprn_override_id
        FROM FA_DEPRN_OVERRIDE
        WHERE
           book_type_code = book and
           asset_id = h_asset_id and
           period_name = perd_name and
           used_by = 'DEPRECIATION' and
           status = 'POST';
Line: 4373

         select bk.cost into report_cost from fa_books_mrc_v bk
         where bk.book_type_code = book and
               bk.asset_id = h_asset_id and
               bk.transaction_header_id_out is null;
Line: 4382

         select bk.cost into primary_cost from fa_books  bk
         where bk.book_type_code = book and
               bk.asset_id = h_asset_id and
               bk.transaction_header_id_out is null;
Line: 4428

         UPDATE fa_deprn_override
            SET status = 'POSTED'
          WHERE deprn_override_id = h_deprn_override_id;
Line: 4432

      ELSIF p_update_override_status THEN
         UPDATE fa_deprn_override
            SET status = 'SELECTED'
          WHERE deprn_override_id = h_deprn_override_id;