DBA Data[Home] [Help]

APPS.FA_FIN_ADJ1_PKG SQL Statements

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

Line: 13

    select 'Y'
    from fa_deprn_summary ds
    where ds.book_type_code = bks_book_type_code and
          ds.asset_id = bks_asset_id              and
          ds.deprn_source_code = 'DEPRN'                and
          ds.deprn_amount <> 0   and
	  rownum <2;
Line: 23

    select 'Y'
    from   fa_deprn_summary ds,
           fa_deprn_periods dp
    where  dp.book_type_code= bks_book_type_code      and
           ds.asset_id = bks_asset_id                 and
           ds.book_type_code= bks_book_type_code      and
           ds.deprn_source_code = 'BOOKS'             and
	   dp.period_close_date is null               and
           ds.period_counter = dp.period_counter - 1;
Line: 70

    select least(bks_cost - bks_salvage_value,
		 nvl(ce.limit, bks_cost - bks_salvage_value))
    from fa_ceilings ce
    where ce.ceiling_name = bks_ceiling_name
    and bks_date_placed_in_service
    between ce.start_date
    and nvl(ce.end_date, bks_date_placed_in_service);
Line: 79

    select bks_cost - bks_salvage_value -
	   bks_itc_basis * ir.basis_reduction_rate
    from fa_itc_rates ir
    where ir.itc_amount_id = bks_itc_amount_id;
Line: 85

    select least(bks_cost - bks_salvage_value -
		 bks_itc_basis * ir.basis_reduction_rate,
		 nvl(ce.limit, bks_cost - bks_salvage_value -
			       bks_itc_basis * ir.basis_reduction_rate))
    from fa_ceilings ce, fa_itc_rates ir
    where ir.itc_amount_id = bks_itc_amount_id
    and ce.ceiling_name = bks_ceiling_name
    and bks_date_placed_in_service
    between ce.start_date
    and nvl(ce.end_date, bks_date_placed_in_service);
Line: 204

 procedure update_and_check_amts(
		bks_depreciation_check		in varchar2,
		bks_current_period_flag		in varchar2,
		bks_recoverable_cost		in number,
		bks_deprn_reserve		in number,
		bks_ytd_deprn			in number,
		bks_cost			in number,
		bks_salvage_value		in number,
		x_return_status		 out nocopy boolean,
		bks_calling_fn			varchar2,
		p_log_level_rec        IN     FA_API_TYPES.log_level_rec_type default null)
is
   amt_error	exception; -- syoung.
Line: 241

			CALLING_FN => 'FA_FIN_ADJ1.Update_And_Check_Amts',
			NAME => 'FA_BOOK_NEG_SALVAGE_VALUE',
			p_log_level_rec => p_log_level_rec);
Line: 256

			CALLING_FN => 'FA_FIN_ADJ1.Update_And_Check_Amts',
			NAME => 'FA_BOOK_POS_SALVAGE_VALUE',
			p_log_level_rec => p_log_level_rec);
Line: 276

                        CALLING_FN => 'FA_FIN_ADJ1.Update_And_Check_Amts',
                        NAME => 'FA_BOOK_INVALID_RESERVE',
			p_log_level_rec => p_log_level_rec);
Line: 289

			CALLING_FN => 'FA_FIN_ADJ1.Update_And_Check_Amts',
			NAME =>  'FA_BOOK_ALL_POSITIVE',
			p_log_level_rec => p_log_level_rec);
Line: 302

			CALLING_FN => 'FA_FIN_ADJ1.Update_And_Check_Amts',
                        NAME =>  'FA_BOOK_ALL_NEGATIVE',
			p_log_level_rec => p_log_level_rec);
Line: 317

		CALLED_FN => 'fa_fin_adj1_pkg.update_and_check_amts',
		CALLING_FN => bks_Calling_Fn,
		p_log_level_rec => p_log_level_rec); */
Line: 326

		CALLING_FN => 'FA_FIN_ADJ1.Update_And_Check_Amts'
		,p_log_level_rec => p_log_level_rec);
Line: 331

end update_and_check_amts;
Line: 363

    select 'Y'
    from fa_book_controls bc,
	 fa_fiscal_year fy
    where bc.book_type_code = bks_book_type_code
    and   bc.fiscal_year_name = fy.fiscal_year_name
    and   bks_date_placed_in_service between
	  fy.start_date and fy.end_date
    and fy.fiscal_year = bc.current_fiscal_year;
Line: 373

    SELECT 'Y'
    FROM fa_transaction_headers th,
	 fa_book_controls bc,
	 fa_deprn_periods dp
    WHERE th.book_type_code = bks_book_type_code
    AND	  th.book_type_code = bc.book_type_code
    AND	  bc.book_type_code = dp.book_type_code
    AND   th.transaction_type_code = 'PARTIAL RETIREMENT'
    AND   dp.period_counter = bc.last_period_counter +1
    AND   th.transaction_date_entered between
	  dp.calendar_period_open_date and nvl(dp.calendar_period_close_date,
	  sysdate);
Line: 387

    select 'Y'
    from fa_flat_rates fr, fa_methods mth
    where mth.method_code = bks_deprn_method_code
    and   mth.life_in_months is null
    and   mth.method_id = fr.method_id
    and   fr.basic_rate = bks_basic_rate
    and   fr.adjusted_rate = bks_adjusted_rate;
Line: 396

    select 'Y'
    from fa_methods mth
    where mth.method_code = bks_deprn_method_code
    and   bks_life_years * 12 + bks_life_months = mth.life_in_months;
Line: 402

    select 'Y'
    from fa_formulas f, fa_methods mth
    where mth.method_code = bks_deprn_method_code
    and   mth.method_id = f.method_id (+)
    and   ((mth.rate_source_rule = 'PRODUCTION') or
           ((mth.rate_source_rule = 'FORMULA') and
            (instr (f.formula_actual, 'CAPACITY') <> 0)))
    and   bks_depreciate_flag = 'NO';
Line: 424

     2. Added the code to check the return status of update_and_check_amts(
,p_log_level_rec => p_log_level_rec)
     3. Added the exception block which was commented out. - aling
  */

  if bks_cost is null then
    message_name := 'FA_BOOK_NO_FINANCIAL_INFO';
Line: 447

  update_and_check_amts(
		bks_depreciation_check,
		bks_current_period_flag,
		bks_recoverable_cost,
		bks_deprn_reserve,
		bks_ytd_deprn,
		bks_cost,
		bks_salvage_value,
		h_status,	-- syoung: added this local.
		'fa_fin_adj1_pkg.chk_val_before_commit',
		p_log_level_rec);
Line: 513

    SELECT f.formula_actual
    INTO   h_formula_actual
    FROM   fa_formulas f, fa_methods m
    WHERE  m.method_id = f.method_id
    AND    m.method_code = bks_deprn_method_code
    AND    rownum = 1
    ORDER BY m.method_id;
Line: 652

    select 'Y'
    from fa_books bk
    where bk.rowid = bks_row_id;
Line: 657

    select 'Y'
    from fa_books bk
    where bk.prorate_convention_code = bks_prorate_convention_code
    and   bk.rowid = bks_row_id;
Line: 663

    select 'Y'
    from fa_books bk
    where bk.rowid = bks_row_id
    and   bk.cost = bks_cost
    and   bk.recoverable_cost = bks_recoverable_cost
    and   bk.date_placed_in_service = bks_date_placed_in_service
    and   bk.deprn_method_code = bks_deprn_method_code
    and   nvl(bk.life_in_months, 99999) =
	  nvl(bks_life_years * 12 + bks_life_months, 99999)
    and   bk.prorate_convention_code = bks_prorate_convention_code
    and   bk.salvage_value = bks_salvage_value
/* BUG# 1514366
    the rates are already passes in decimal format - no need to convert
    also removing the global attributes from this statement as they have
    not financial impact.
    -- bridgway 11/26/00

    and   nvl(bk.basic_rate, 99999) = nvl(bks_basic_rate_dsp/100, 99999);
Line: 717

    select 'Y'
    from fa_books bk
    where bk.rowid = bks_row_id
    and   nvl(bk.unit_of_measure, 99999) = nvl(bks_unit_of_measure, 99999);
Line: 723

    select 'Y'
    from fa_books bk
    where bk.rowid = bks_row_id
    and   bk.depreciate_flag = bks_depreciate_flag;
Line: 729

    select 'Y'
    from fa_books bk,
         fa_transaction_headers th,
         fa_deprn_summary ds
    where bk.rowid = bks_row_id
    and   bks_depreciate_flag = 'YES'
    and   bk.depreciate_flag  = 'NO'
    and   bk.transaction_header_id_in = th.transaction_header_id
    and   th.transaction_type_code = 'ADDITION'
    and   th.book_type_code = bk.book_type_code
    and   ds.asset_id = bk.asset_id
    and   ds.deprn_reserve = 0
    and   ds.book_type_code = bk.book_type_code
    and   ds.deprn_source_code = 'BOOKS';