The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT rev.project_id,
rev.draft_revenue_num,
rev.gl_date,
p.segment1,
rev.draft_revenue_num_credited -- for Revenue Adjustments
FROM pa_draft_revenues rev,
pa_projects p
WHERE rev.transfer_rejection_reason IS NULL
AND rev.transfer_status_code = 'R'
AND rev.request_id = p_request_id
AND rev.event_id IS NULL
AND rev.project_id = p.project_id
ORDER BY rev.project_id, rev.draft_revenue_num;
SELECT set_of_books_id,
org_id
FROM pa_implementations;
SELECT TO_NUMBER(org_information2)
FROM hr_organization_information
WHERE organization_id = p_org_id
AND org_information_context = 'Operating Unit Information';
Is Select Event_ID, source_id_int_1 , source_id_int_2
From XLA_EVENTS_INT_GT;
select meaning
into l_reject_reason
from pa_lookups
where lookup_type = 'TRANSFER REJECTION REASON'
and lookup_code = 'PA_SLA_AC_CR_FAIL';
DELETE FROM XLA_EVENTS_INT_GT;
PA_MCB_INVOICE_PKG.log_message('PA_XLA_REVENUE_EVENTS.Create_Events : Before Insert into XLA_EVENTS_INT_GT');
INSERT INTO XLA_EVENTS_INT_GT
(
event_type_code ,
event_date ,
event_status_code ,
source_id_int_1 ,
source_id_int_2 ,
security_id_int_1 ,
APPLICATION_ID ,
LEDGER_ID ,
LEGAL_ENTITY_ID ,
ENTITY_CODE ,
event_id ,
security_id_char_1 ,
transaction_number ,
event_class_code -- inserting for Revenue Adjustments
)
VALUES
(
decode(l_revenue_num_cr_tab(i), NULL, 'REVENUE', 'REVENUE_ADJ') ,
l_gl_date_tab(i) ,
XLA_EVENTS_PUB_PKG.C_EVENT_UNPROCESSED ,
l_project_id_tab(i) ,
l_revenue_num_tab(i) ,
l_org_id ,
275 ,
l_ledger_id ,
l_legal_entity_id ,
'REVENUE' ,
xla_events_s.nextval * -1 ,
NULL,
--'Revenue' ,
l_project_num_tab(i)||'-'||l_revenue_num_tab(i) ,
decode(l_revenue_num_cr_tab(i), NULL, 'REVENUE', 'REVENUE_ADJ')
);
UPDATE pa_draft_revenues_all
SET event_id = l_event_id_tab(l_index),
transfer_rejection_reason = DECODE(sign(nvl(l_event_id_tab(l_index), -1)), 1 , NULL, l_reject_reason)
WHERE project_id = l_project_id_tab_tmp(l_index)
AND draft_revenue_num = l_revenue_num_tab_tmp(l_index);
l_project_id_tab.delete;
l_revenue_num_tab_tmp.delete;
l_revenue_num_tab.delete;
l_project_id_tab_tmp.delete;
l_gl_date_tab.delete;
l_event_id_tab.delete;
l_project_num_tab.delete;
l_revenue_num_cr_tab.delete;
SELECT code_combination_id
INTO l_ccid
FROM xla_distribution_links xdl,
xla_ae_headers aeh,
xla_ae_lines ael
WHERE xdl.source_distribution_id_num_1 = P_Source_Distribution_Id_Num_1
AND xdl.source_distribution_id_num_2 = P_Source_Distribution_Id_Num_2
AND xdl.Source_Distribution_Type = P_Distribution_Type
AND xdl.application_id = 275
AND xdl.ae_header_id = aeh.ae_header_id
AND xdl.ae_line_num = ael.ae_line_num
AND xdl.ae_header_id = ael.ae_header_id
AND aeh.application_id = ael.application_id
AND ael.application_id = xdl.application_id
AND aeh.balance_type_code = 'A'
AND aeh.accounting_entry_status_code = 'F'
AND aeh.ledger_id = P_Ledger_Id
AND xdl.event_id = P_Acct_Event_Id;