[Home] [Help]
The following lines contain the word 'select', 'insert', 'update' or 'delete':
select greatest(calendar_period_open_date,least(sysdate, calendar_period_close_date))
from fa_deprn_periods
where book_type_code = x_book_type_code
and period_close_date is null;
select 'Y'
from ( select a.transaction_header_id_in
from fa_books a
, fa_asset_hierarchy b
where a.book_type_code = x_book_type_code
and a.asset_id = x_asset_id
and a.asset_id = b.asset_id
and a.date_ineffective IS NULL ) a1,
fa_books c
where c.transaction_header_id_out = a1.transaction_header_id_in
and nvl(c.period_counter_fully_retired, 0) <> 0;
select 1 from dual
where exists ( select 'X'
from fa_mass_update_batch_details
where batch_id = v_batch_id
and status_code IN ('P', 'R' ) );
if(x_retire_status = 'DELETED') then
-- check if fully retired
open check_hr_asset;
select fa_mass_update_batch_hdrs_s.nextval
into v_batch_id
from dual;
fa_cua_mass_update2_pkg.g_override_book_check:= 'YES';
l_trans_rec.who_info.last_update_date := sysdate;
l_trans_rec.who_info.last_updated_by := fnd_global.user_id;
l_trans_rec.who_info.created_by := l_trans_rec.who_info.last_updated_by;
l_trans_rec.who_info.last_update_login := fnd_global.login_id;
fa_cua_mass_update1_pkg.process_asset(
px_trans_rec => l_trans_rec,
p_batch_id => v_batch_id,
p_asset_id => x_asset_id,
p_book => x_book_type_code,
p_amortize_flag => v_amortize_flag,
x_err_code => v_err_code,
x_err_attr_name => v_dummy_varchar , p_log_level_rec => p_log_level_rec);
delete from fa_mass_update_batch_headers
where batch_id = v_batch_id;
delete from fa_mass_update_batch_details
where batch_id = v_batch_id;
delete from fa_mass_update_batch_headers
where batch_id = v_batch_id;
delete from fa_mass_update_batch_details
where batch_id = v_batch_id;