The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT flv.lookup_code Doc_Type_Num
, flv.meaning Doc_Num
FROM fnd_lookup_values flv
WHERE flv.lookup_type = 'JA_CN_DOCUMENT_TYPE'
AND flv.language = USERENV('LANG');
SELECT Tran_Type_Num
, Tran_Type_Name
FROM(
--Transanction type for document type 'Receivable'
SELECT TO_CHAR(rctt.cust_trx_type_id) Tran_Type_Num
, rctt.NAME Tran_Type_Name
, 'RECEIVABLES' Source
FROM Ra_Cust_Trx_Types_All rctt
WHERE EXISTS (SELECT hro.ORGANIZATION_ID
FROM hr_operating_units hro, xle_entity_profiles xfi
WHERE xfi.legal_entity_id = hro.default_legal_context_id
AND hro.set_of_books_id = pn_ledger_id --parameter: pn_ledger_id
AND xfi.legal_entity_id = pn_legal_entity_id --parameter: pn_legal_entity_id
AND rctt.Org_Id = hro.ORGANIZATION_ID
AND NVL(rctt.Legal_Entity_Id, pn_legal_entity_id) = pn_legal_entity_id) --parameter: pn_legal_entity_id
AND rctt.start_date <=
(SELECT MAX(GP.END_DATE)
FROM GL_PERIODS GP, GL_LEDGERS LED
WHERE LED.PERIOD_SET_NAME = GP.PERIOD_SET_NAME
AND LED.ACCOUNTED_PERIOD_TYPE = GP.PERIOD_TYPE
AND GP.PERIOD_year = pv_accounting_year --parameter: pv_accounting_year
AND led.ledger_id = pn_ledger_id) --parameter: pn_ledger_id
AND (rctt.end_date IS NULL OR
rctt.end_date >=
(SELECT MIN(GP.START_DATE)
FROM GL_PERIODS GP, GL_LEDGERS LED
WHERE LED.PERIOD_SET_NAME = GP.PERIOD_SET_NAME
AND LED.ACCOUNTED_PERIOD_TYPE = GP.PERIOD_TYPE
AND GP.PERIOD_year = pv_accounting_year --parameter: pv_accounting_year
AND led.ledger_id = pn_ledger_id)) --parameter: pn_ledger_id
UNION
--Transaction type for document type 'Receipt'
SELECT flv.lookup_code Tran_Type_Num
, flv.meaning Tran_Type_Name
, 'RECEIPT' Source
FROM fnd_lookup_values flv
WHERE flv.lookup_type = 'JA_CN_REC_TRAN_TYPE'
AND flv.language = USERENV('LANG')
UNION
--Transaction type for document type 'Payable'
SELECT alit.LOOKUP_CODE Tran_Type_Num
, alit.DISPLAYED_FIELD Tran_Type_Name
, 'PAYABLE' Source
FROM Ap_Lc_Invoice_Types_V alit
WHERE alit.LOOKUP_CODE NOT IN
(--'PAYMENT REQUEST', 'INVOICE REQUEST',
'CREDIT MEMO REQUEST')
UNION
--Transaction type for document type 'Payment'
SELECT alc.lookup_code Tran_Type_Num
, alc.displayed_field Tran_Type_Name
, 'PAYMENT' Source
FROM ap_lookup_codes alc
WHERE alc.lookup_type = 'PAYMENT TYPE'
AND alc.lookup_code NOT IN ('A', 'N')
) ORDER BY Source;