The following lines contain the word 'select', 'insert', 'update' or 'delete':
select rab.name
from ra_batches rab
,ra_customer_trx ract
where rab.batch_id = ract.batch_id
and ract.customer_trx_id = trx_id;
select apb.batch_name
from ap_batches apb
,ap_invoices api
where apb.batch_id = api.batch_id
and api.invoice_id = trx_id;
select gjb.name
from gl_je_batches gjb
,gl_je_headers gljh
where gjb.je_batch_id = gljh.je_batch_id
and gljh.je_header_id = trx_id;
select invoice_type_lookup_code
into lv_fin_doc_type
from ap_invoices_all
where invoice_id = pn_trx_id;
select sl.trx_type into lv_sl_trx_type
from ar_cash_receipt_history_all crh, ce_statement_reconcils_all sr,ce_statement_lines sl
where crh.cash_receipt_id = pn_trx_id
and crh.cash_receipt_history_id = sr.reference_id
and sr.statement_line_id = sl.statement_line_id;
select cr.reversal_category into lv_cr_reversal_category
from ar_cash_receipts_all cr
where cr.cash_receipt_id = pn_trx_id
and cr.type = 'MISC';
select type
into lv_fin_doc_type
from ra_cust_trx_types --Modified the query for bug 6156524 Used ra_cust_trx_types table instead of ra_cust_trx_types_all table.
where cust_trx_type_id = pn_trx_type_id;