The following lines contain the word 'select', 'insert', 'update' or 'delete':
select ti.rowid,
ti.asset_id,
ti.asset_number,
ti.asset_type,
ti.adjusted_rate,
ti.basic_rate,
ti.bonus_rule,
ti.ceiling_name,
ti.cost,
ti.date_placed_in_service,
ti.depreciate_flag,
ti.deprn_method_code,
ti.itc_amount_id,
ti.life_in_months,
ti.original_cost,
bk.cost,
ti.production_capacity,
ti.prorate_convention_code,
ti.salvage_value,
ti.short_fiscal_year_flag,
ti.conversion_date,
ti.original_deprn_start_date,
ti.fully_rsvd_revals_counter,
ti.unrevalued_cost,
ti.reval_ceiling,
ti.deprn_reserve,
ti.ytd_deprn,
ti.reval_amortization_basis,
ti.reval_reserve,
ti.ytd_reval_deprn_expense,
decode(ti.amortize_nbv_flag,
'YES', 'AMORTIZED',
'EXPENSED') transaction_subtype,
ti.amortization_start_date,
nvl(ti.transaction_name, 'Tax Upload Interface') transaction_name,
ti.attribute1,
ti.attribute2,
ti.attribute3,
ti.attribute4,
ti.attribute5,
ti.attribute6,
ti.attribute7,
ti.attribute8,
ti.attribute9,
ti.attribute10,
ti.attribute11,
ti.attribute12,
ti.attribute13,
ti.attribute14,
ti.attribute15,
ti.attribute_category_code,
nvl(ti.global_attribute1,
bk.global_attribute1) global_attribute1,
nvl(ti.global_attribute2,
bk.global_attribute2) global_attribute2,
nvl(ti.global_attribute3,
bk.global_attribute3) global_attribute3,
nvl(ti.global_attribute4,
bk.global_attribute4) global_attribute4,
nvl(ti.global_attribute5,
bk.global_attribute5) global_attribute5,
nvl(ti.global_attribute6,
bk.global_attribute6) global_attribute6,
nvl(ti.global_attribute7,
bk.global_attribute7) global_attribute7,
nvl(ti.global_attribute8,
bk.global_attribute8) global_attribute8,
nvl(ti.global_attribute9,
bk.global_attribute9) global_attribute9,
nvl(ti.global_attribute10,
bk.global_attribute10) global_attribute10,
nvl(ti.global_attribute11,
bk.global_attribute11) global_attribute11,
nvl(ti.global_attribute12,
bk.global_attribute12) global_attribute12,
nvl(ti.global_attribute13,
bk.global_attribute13) global_attribute13,
nvl(ti.global_attribute14,
bk.global_attribute14) global_attribute14,
nvl(ti.global_attribute15,
bk.global_attribute15) global_attribute15,
nvl(ti.global_attribute16,
bk.global_attribute16) global_attribute16,
nvl(ti.global_attribute17,
bk.global_attribute17) global_attribute17,
nvl(ti.global_attribute18,
bk.global_attribute18) global_attribute18,
nvl(ti.global_attribute19,
bk.global_attribute19) global_attribute19,
nvl(ti.global_attribute20,
bk.global_attribute20) global_attribute20,
nvl(ti.global_attribute_category,
bk.global_attribute_category) global_attribute_category,
ti.group_asset_id,
ti.nbv_at_switch, -- Changes made as per the ER No.s 6606548 and 6606552 by Vkukutam Start
ti.prior_deprn_limit_amount,
ti.period_full_reserve,
ti.prior_deprn_method,
ti.period_extd_deprn,
ti.prior_deprn_limit,
ti.prior_basic_rate,
ti.prior_adjusted_rate,
ti.prior_life_in_months,
ti.prior_deprn_limit_type -- Changes made as per the ER No.s 6606548 and 6606552 by Vkukutam End
from fa_tax_interface ti,
fa_books bk
where ti.book_type_code = p_book_type_code
and ti.posting_status = 'POST'
and ti.tax_request_id = p_parent_request_id
and ti.worker_id = p_request_number
and bk.asset_id = ti.asset_id
and bk.book_type_code = p_book_type_code
and bk.transaction_header_id_out is null
order by ti.asset_id;
select fdp.calendar_period_close_date
from fa_book_controls fbc
,fa_deprn_periods fdp
where fbc.book_type_code = fdp.book_type_code
and fdp.period_counter = fbc.last_period_counter+1
and fbc.book_type_code = p_book_type_code;
select fcp.end_date
,ffy.fiscal_year
,fcp.period_num
,fct.number_per_fiscal_year
from fa_fiscal_year ffy
,fa_book_controls fbc
,fa_calendar_periods fcp
,fa_calendar_types fct
where ffy.fiscal_year_name = fbc.fiscal_year_name
and ffy.fiscal_year_name = fct.fiscal_year_name
and fbc.book_type_code = p_book_type_code
and fcp.calendar_type = fct.calendar_type
and fct.calendar_type = fbc.deprn_calendar
and fcp.start_date >= ffy.start_date
and fcp.end_date <= ffy.end_date
and upper(fcp.period_name) = upper(p_period);
l_asset_fin_mrc_tbl_new.delete;
l_inv_tbl.delete;
l_asset_deprn_mrc_tbl_new.delete;
l_trans_rec.who_info.last_updated_by := FND_GLOBAL.USER_ID;
l_trans_rec.who_info.last_update_date := sysdate;
l_trans_rec.who_info.last_update_login := FND_GLOBAL.CONC_LOGIN_ID;
select nvl(sum(decode(debit_credit_flag,
'DR', adjustment_amount,
-adjustment_amount)), 0)
into l_deprn_exp_amort_nbv
from fa_adjustments
where book_type_code = l_asset_hdr_rec.book_type_code
and asset_id = l_asset_hdr_rec.asset_id
and source_type_code = 'DEPRECIATION'
and adjustment_type = 'EXPENSE';
SELECT ytd_deprn,deprn_reserve
INTO l_book_ytd,l_book_rsv
FROM fa_deprn_summary
WHERE asset_id = l_asset_hdr_rec.asset_id
AND book_type_code = l_asset_hdr_rec.book_type_code
AND deprn_source_code = 'BOOKS';
update fa_tax_interface
set posting_status = 'POSTED',
tax_request_id = l_request_id
where rowid = l_tax_rowid(l_loop_count);
update fa_tax_interface
set posting_status = 'ERROR',
tax_request_id = l_request_id
where rowid = l_tax_rowid(l_loop_count);
update fa_tax_interface
set posting_status = 'ERROR',
tax_request_id = l_request_id
where rowid = l_tax_rowid(l_loop_count);
select tax.rowid,
nvl(tax.group_asset_id,
bk.group_asset_id)
from fa_tax_interface tax,
fa_additions_b ad,
fa_books bk
where tax.book_type_code = p_book_type_code
and tax.posting_status = 'POST'
and tax.asset_number = ad.asset_number
and bk.asset_id = ad.asset_id
and bk.book_type_code = p_book_type_code
and bk.transaction_header_id_out is null;
select tax.rowid,
mod(nvl(tax.group_asset_id,
nvl(ad.asset_id, 1)), p_total_requests) + 1,
nvl(ad.asset_id, 1),
ad.asset_type
from fa_tax_interface tax,
fa_additions_b ad
where tax.book_type_code = p_book_type_code
and tax.posting_status = 'POST'
and ad.asset_number(+) = tax.asset_number;
update fa_tax_interface
set group_asset_id = l_group_asset_id_tbl(i)
where rowid = l_rowid_tbl(i);
update fa_tax_interface
set asset_id = l_asset_id_tbl(i),
asset_type = l_asset_type_tbl(i),
worker_id = l_worker_id_tbl(i),
tax_request_id = p_parent_request_id
where rowid = l_rowid_tbl(i);
fa_debug_pkg.add(l_calling_fn, 'rows updated into fa_tax_interface', sql%rowcount);