The following lines contain the word 'select', 'insert', 'update' or 'delete':
select trx.customer_trx_id
from ar_document_transfers xfr,
ra_customer_trx trx
where xfr.status = 'WAITING' and
xfr.source_id = trx.customer_trx_id and
trx.PRINTING_PENDING <> 'N' and
trx.PRINTING_COUNT is null and
trx.PRINTING_LAST_PRINTED is null and
trx.PRINTING_ORIGINAL_DATE is null and
trx.LAST_PRINTED_SEQUENCE_NUM is null;
ar_doc_transfer_standard.updateStatus;
insert into ar_document_transfers
( DOCUMENT_TRANSFER_ID,
SOURCE_ID,
SOURCE_TABLE,
TP_SOURCE_TABLE,
TP_SOURCE_ID,
ECX_TRX_TYPE,
ECX_TRX_SUBTYPE,
ECX_PARTY_TYPE,
EVENT_NAME,
STATUS,
REQUEST_ID,
APPLICATION_ID,
RESPONSIBILITY_ID,
CREATION_DATE,
CREATED_BY,
LAST_UPDATE_DATE,
LAST_UPDATED_BY,
LAST_SUBMISSION_DATE,
DOCUMENT_MSGID
)
(select AR_DOCUMENT_TRANSFERS_S.nextval,
SOURCE_ID,
SOURCE_TABLE,
TP_SOURCE_TABLE,
TP_SOURCE_ID,
ECX_TRX_TYPE,
ECX_TRX_SUBTYPE,
ECX_PARTY_TYPE,
EVENT_NAME,
'WAITING',
FND_GLOBAL.CONC_REQUEST_ID,
FND_GLOBAL.RESP_APPL_ID,
FND_GLOBAL.RESP_ID,
SYSDATE,
FND_GLOBAL.USER_ID,
SYSDATE,
FND_GLOBAL.USER_ID,
NULL,
NULL
from ar_document_transfers_v d
where (l_trx_class is null or d.trx_class = l_trx_class) and
(l_trx_type_id is null or d.trx_type_id = l_trx_type_id) and
(l_trx_number_low is null or l_trx_number_low <= d.trx_number) and
(l_trx_number_high is null or d.trx_number <= l_trx_number_high) and
(l_cust_class is null or d.cust_class = l_cust_class) and
(l_cust_account_id is null or d.cust_account_id = l_cust_account_id) and
(l_trx_date_low is null or l_trx_date_low <= d.trx_date) and
(l_trx_date_high is null or d.trx_date <= l_trx_date_high));
arp_etax_util.global_document_update(trx.customer_trx_id,null,'PRINT');
update ra_customer_trx
set PRINTING_PENDING = 'N',
PRINTING_COUNT = 1,
PRINTING_LAST_PRINTED = sysdate,
PRINTING_ORIGINAL_DATE = sysdate,
LAST_PRINTED_SEQUENCE_NUM = 1
where customer_trx_id in (select source_id from ar_document_transfers where status = 'WAITING') and
PRINTING_PENDING <> 'N' and
PRINTING_COUNT is null and
PRINTING_LAST_PRINTED is null and
PRINTING_ORIGINAL_DATE is null and
LAST_PRINTED_SEQUENCE_NUM is null;