The following lines contain the word 'select', 'insert', 'update' or 'delete':
CURSOR batch_size IS SELECT system_batch_size FROM cn_repositories WHERE org_id = x_org_id;
cn_process_audits_pkg.insert_row(x_rowid, x_proc_audit_id, NULL,
'NOT', 'Notification run', NULL, NULL, NULL, NULL, NULL, SYSDATE, NULL, x_org_id);
INSERT INTO cn_not_trx (
not_trx_id,
batch_id,
notified_date,
processed_date,
notification_run_id,
collected_flag,
row_id,
source_trx_id,
source_doc_type,
event_id,
org_id)
SELECT
cn_not_trx_s.NEXTVAL,
FLOOR(cn_not_trx_s.CURRVAL/l_sys_batch_size),
SYSDATE,
ara.gl_date, --AE 02-22-96
x_proc_audit_id,
'N',
ara.rowid,
ara.receivable_application_id,
'AR',
cn_global.pmt_event_id,
x_org_id
FROM ar_receivable_applications ara,
cn_repositories cr
WHERE ara.application_type = 'CASH'
AND ara.status = 'APP'
AND ara.gl_date BETWEEN x_start_date AND x_end_date
AND ara.posting_control_id <> -3 --AE 02-22-96
AND ara.set_of_books_id = cr.set_of_books_id --AE 02-21-96
AND cr.repository_id = 100 --AE 02-21-96
AND ara.org_id = x_org_id
AND cr.org_id = ara.org_id
AND NOT EXISTS (
SELECT 1
FROM cn_not_trx
WHERE source_trx_id = ara.receivable_application_id
AND event_id= cn_global.pmt_event_id
AND org_id = x_org_id) ;
cn_process_audits_pkg.update_row(x_proc_audit_id, NULL, SYSDATE, 0,
'Finished notification run: Notified ' || x_trx_count || ' payments.');
cn_message_pkg.debug('notify_payments: No rows inserted into CN_NOT_TRX. Possible reason: Transactions have not been posted to GL and gl_date is null.');
fnd_file.put_line(fnd_file.Log, 'notify_payments: No rows inserted into CN_NOT_TRX. Possible reason: Transactions have not been posted to GL and gl_date is null.');
cn_process_audits_pkg.update_row(X_proc_audit_id, NULL, SYSDATE, SQLCODE,
SQLERRM);