The following lines contain the word 'select', 'insert', 'update' or 'delete':
select request_id
from AR_CONC_PROCESS_REQUESTS
where CONCURRENT_PROGRAM_NAME = 'ARSUMREF';
PROCEDURE insert_events_hist (p_be_name VARCHAR2,
p_event_key VARCHAR2,
p_ps_id NUMBER,
p_ctx_id NUMBER,
p_cr_id NUMBER,
p_ra_id NUMBER,
p_adj_id NUMBER,
p_hist_id NUMBER,
p_req_id NUMBER
)
IS
BEGIN
INSERT INTO AR_SUM_REF_EVENT_HIST
(business_event_name,
event_key,
payment_schedule_id,
customer_trx_id,
cash_receipt_id,
receivable_application_id,
adjustment_id,
history_id,
request_id,
last_update_date,
last_update_by,
creation_date,
created_by,
last_update_login)
VALUES (p_be_name,
p_event_key,
p_ps_id,
p_ctx_id,
p_cr_id,
p_ra_id,
p_adj_id,
p_hist_id,
p_req_id,
sysdate,
FND_GLOBAL.user_id,
sysdate,
FND_GLOBAL.user_id,
FND_GLOBAL.login_id);
END insert_events_hist;
PROCEDURE p_insert_trx_sum_hist(p_trx_sum_hist_rec IN AR_TRX_SUMMARY_HIST%rowtype,
p_history_id OUT NOCOPY NUMBER,
p_trx_type IN VARCHAR2,
p_event_type IN VARCHAR2 DEFAULT NULL)
IS
l_event_name VARCHAR2(100);
SELECT max(history_id)
FROM AR_TRX_SUMMARY_HIST
WHERE payment_schedule_id = p_ps_id;
p_event_type = 'DELETE_PMT' THEN
l_event_name := 'oracle.apps.ar.receipts.CashReceipt.Delete';
SELECT AR_TRX_SUMMARY_HIST_S.nextval
INTO l_history_id
FROM dual;
INSERT INTO AR_TRX_SUMMARY_HIST
(history_id,
last_update_date,
last_updated_by,
creation_date,
created_by,
last_update_login,
customer_trx_id,
cash_receipt_id,
payment_schedule_id,
currency_code,
previous_history_id,
due_date,
amount_in_dispute,
amount_due_original,
amount_due_remaining,
amount_adjusted,
complete_flag,
customer_id,
site_use_id,
trx_date,
installments,
event_name)
VALUES
(l_history_id,
sysdate,
fnd_global.user_id,
sysdate,
fnd_global.user_id,
fnd_global.login_id,
p_trx_sum_hist_rec.customer_trx_id,
p_trx_sum_hist_rec.cash_receipt_id,
p_trx_sum_hist_rec.payment_schedule_id,
p_trx_sum_hist_rec.currency_code,
l_previous_history_id,
p_trx_sum_hist_rec.due_date,
p_trx_sum_hist_rec.amount_in_dispute,
p_trx_sum_hist_rec.amount_due_original,
p_trx_sum_hist_rec.amount_due_remaining,
p_trx_sum_hist_rec.amount_adjusted,
p_trx_sum_hist_rec.complete_flag,
p_trx_sum_hist_rec.customer_id,
p_trx_sum_hist_rec.site_use_id,
p_trx_sum_hist_rec.trx_date,
p_trx_sum_hist_rec.installments,
l_event_name
);
select prev_trx_ps.status,
prev_trx_ps.payment_schedule_id,
prev_trx_ps.amount_applied,
prev_trx_ps.class,
prev_trx_ps.amount_credited,
prev_trx_ps.due_date
from ar_payment_schedules prev_trx_ps,
ra_customer_trx ctx
where ctx.customer_trx_id = p_ctx_id
and ctx.previous_customer_trx_id = prev_trx_ps.customer_trx_id
;
insert_events_hist (p_be_name => l_event_name,
p_event_key => l_key,
p_ps_id => null,
p_ctx_id => p_customer_trx_id,
p_cr_id => null,
p_ra_id => null,
p_adj_id => null,
p_hist_id => null,
p_req_id => null);
l_list.DELETE;
select prev_trx_ps.status,
prev_trx_ps.payment_schedule_id,
prev_trx_ps.amount_applied,
prev_trx_ps.class,
prev_trx_ps.amount_credited,
prev_trx_ps.due_date,
ctx.previous_customer_trx_id
from ar_payment_schedules prev_trx_ps,
ra_customer_trx ctx
where ctx.customer_trx_id = p_ctx_id
and ctx.previous_customer_trx_id = prev_trx_ps.customer_trx_id
;
insert_events_hist (p_be_name => l_event_name,
p_event_key => l_key,
p_ps_id => p_ps_id,
p_ctx_id => p_customer_trx_id,
p_cr_id => null,
p_ra_id => null,
p_adj_id => null,
p_hist_id => p_history_id,
p_req_id => null);
l_list.DELETE;
insert_events_hist (p_be_name => l_event_name,
p_event_key => l_key,
p_ps_id => p_payment_schedule_id,
p_ctx_id => null,
p_cr_id => null,
p_ra_id => null,
p_adj_id => null,
p_hist_id => p_history_id,
p_req_id => null);
l_list.DELETE;
SELECT nvl(customer_id, -99) cust_account_id
FROM ar_payment_schedules
WHERE payment_schedule_id = p_payment_schedule_id;
insert_events_hist (p_be_name => l_event_name,
p_event_key => l_key,
p_ps_id => p_payment_schedule_id,
p_ctx_id => null,
p_cr_id => null,
p_ra_id => null,
p_adj_id => null,
p_hist_id => null,
p_req_id => null);
l_list.DELETE;
insert_events_hist (p_be_name => l_event_name,
p_event_key => l_key,
p_ps_id => p_payment_schedule_id,
p_ctx_id => null,
p_cr_id => p_cash_receipt_id,
p_ra_id => null,
p_adj_id => null,
p_hist_id => p_history_id,
p_req_id => null);
l_list.DELETE;
insert_events_hist (p_be_name => l_event_name,
p_event_key => l_key,
p_ps_id => p_payment_schedule_id,
p_ctx_id => null,
p_cr_id => p_cash_receipt_id,
p_ra_id => null,
p_adj_id => null,
p_hist_id => p_history_id,
p_req_id => null);
l_list.DELETE;
insert_events_hist (p_be_name => l_event_name,
p_event_key => l_key,
p_ps_id => p_payment_schedule_id,
p_ctx_id => null,
p_cr_id => p_cash_receipt_id,
p_ra_id => null,
p_adj_id => null,
p_hist_id => p_history_id,
p_req_id => null);
l_list.DELETE;
select inv_ps.status trx_ps_status,
rcpt_ps.status rcpt_ps_status,
to_char(inv_ps.due_date , 'J') due_date,
inv_ps.amount_applied
from ar_receivable_applications ra,
ar_payment_schedules inv_ps,
ar_payment_schedules rcpt_ps
where ra.receivable_application_id = ra_id
and ra.applied_payment_schedule_id = inv_ps.payment_schedule_id
and ra.payment_schedule_id = rcpt_ps.payment_schedule_id;
insert_events_hist (p_be_name => l_event_name,
p_event_key => l_key,
p_ps_id => null,
p_ctx_id => null,
p_cr_id => null,
p_ra_id => p_receivable_application_id,
p_adj_id => null,
p_hist_id => null,
p_req_id => null);
l_list.DELETE;
select inv_ps.status trx_ps_status,
rcpt_ps.status rcpt_ps_status,
to_char(inv_ps.due_date , 'J') due_date,
inv_ps.amount_applied,
ra.amount_applied,
ra.amount_applied_from,
inv_ps.amount_due_remaining,
ra.earned_discount_taken,
ra.unearned_discount_taken
from ar_receivable_applications ra,
ar_payment_schedules inv_ps,
ar_payment_schedules rcpt_ps
where ra.receivable_application_id = ra_id
and ra.applied_payment_schedule_id = inv_ps.payment_schedule_id
and ra.payment_schedule_id = rcpt_ps.payment_schedule_id;
insert_events_hist (p_be_name => l_event_name,
p_event_key => l_key,
p_ps_id => null,
p_ctx_id => null,
p_cr_id => null,
p_ra_id => p_receivable_application_id,
p_adj_id => null,
p_hist_id => null,
p_req_id => null);
l_list.DELETE;
select inv_ps.status trx_ps_status,
cm_ps.status cm_ps_status,
to_char(inv_ps.due_date , 'J') due_date,
inv_ps.amount_applied
from ar_receivable_applications ra,
ar_payment_schedules inv_ps,
ar_payment_schedules cm_ps
where ra.receivable_application_id = ra_id
and ra.applied_payment_schedule_id = inv_ps.payment_schedule_id
and ra.payment_schedule_id = cm_ps.payment_schedule_id;
insert_events_hist (p_be_name => l_event_name,
p_event_key => l_key,
p_ps_id => null,
p_ctx_id => null,
p_cr_id => null,
p_ra_id => p_receivable_application_id,
p_adj_id => null,
p_hist_id => null,
p_req_id => null);
l_list.DELETE;
select inv_ps.status trx_ps_status,
cm_ps.status cm_ps_status,
to_char(inv_ps.due_date , 'J') due_date,
inv_ps.amount_applied
from ar_receivable_applications ra,
ar_payment_schedules inv_ps,
ar_payment_schedules cm_ps
where ra.receivable_application_id = ra_id
and ra.applied_payment_schedule_id = inv_ps.payment_schedule_id
and ra.payment_schedule_id = cm_ps.payment_schedule_id;
insert_events_hist (p_be_name => l_event_name,
p_event_key => l_key,
p_ps_id => null,
p_ctx_id => null,
p_cr_id => null,
p_ra_id => p_receivable_application_id,
p_adj_id => null,
p_hist_id => null,
p_req_id => null);
l_list.DELETE;
insert_events_hist (p_be_name => l_event_name,
p_event_key => l_key,
p_ps_id => null,
p_ctx_id => null,
p_cr_id => null,
p_ra_id => null,
p_adj_id => p_adjustment_id,
p_hist_id => null,
p_req_id => null);
l_list.DELETE;
insert_events_hist (p_be_name => l_event_name,
p_event_key => l_key,
p_ps_id => null,
p_ctx_id => null,
p_cr_id => null,
p_ra_id => null,
p_adj_id => p_adjustment_id,
p_hist_id => p_approval_actn_hist_id,
p_req_id => null);
l_list.DELETE;
insert_events_hist (p_be_name => l_event_name,
p_event_key => l_key,
p_ps_id => null,
p_ctx_id => null,
p_cr_id => null,
p_ra_id => null,
p_adj_id => null,
p_hist_id => null,
p_req_id => p_request_id);
l_list.DELETE;
insert_events_hist (p_be_name => l_event_name,
p_event_key=> l_key,
p_ps_id => null,
p_ctx_id => null,
p_cr_id => null,
p_ra_id => null,
p_adj_id => null,
p_hist_id => null,
p_req_id => p_request_id);
l_list.DELETE;
insert_events_hist (p_be_name => l_event_name,
p_event_key=> l_key,
p_ps_id => null,
p_ctx_id => null,
p_cr_id => null,
p_ra_id => null,
p_adj_id => null,
p_hist_id => null,
p_req_id => p_request_id);
l_list.DELETE;
insert_events_hist (p_be_name => l_event_name,
p_event_key=> l_key,
p_ps_id => null,
p_ctx_id => null,
p_cr_id => null,
p_ra_id => null,
p_adj_id => null,
p_hist_id => null,
p_req_id => p_request_id);
l_list.DELETE;
insert_events_hist (p_be_name => l_event_name,
p_event_key=> l_key,
p_ps_id => null,
p_ctx_id => null,
p_cr_id => null,
p_ra_id => null,
p_adj_id => null,
p_hist_id => null,
p_req_id => p_request_id);
l_list.DELETE;
l_event_name VARCHAR2(50) := 'oracle.apps.ar.receipts.CashReceipt.Delete';
insert_events_hist (p_be_name => l_event_name,
p_event_key => l_key,
p_ps_id => p_payment_schedule_id,
p_ctx_id => null,
p_cr_id => null,
p_ra_id => null,
p_adj_id => null,
p_hist_id => null,
p_req_id => null);
l_list.DELETE;