The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT gl.currency_code
INTO gc_func_currency
FROM gl_ledgers gl
,gl_access_set_norm_assign gasna
WHERE gasna.access_set_id = fnd_profile.VALUE('GL_ACCESS_SET_ID')
AND gl.ledger_id = gasna.ledger_id
AND gl.ledger_category_code = 'PRIMARY';
SELECT FSEG.segment_name
INTO gc_ctrl_seg
FROM fnd_id_flex_structures fst
,fnd_id_flex_segments fseg
WHERE fst.id_flex_code = fseg.id_flex_code
AND fst.id_flex_num = fseg.id_flex_num
AND fst.application_id = fseg.application_id
AND fseg.id_flex_code = 'GL#'
AND fseg.id_flex_num = P_CHART_OF_ACCOUNTS_ID
AND fseg.application_id = 101
AND fseg.segment_num = P_CONTROL_SEGMENT;
IF P_CURRENCY_TYPE = 'Selected Currency' THEN
gc_currency_code_where:=' TRX.invoice_currency_code = :P_CURRENCY_CODE ';