The following lines contain the word 'select', 'insert', 'update' or 'delete':
select r.application_id, r.responsibility_id
into resp_appl_id, resp_id
from fnd_responsibility r,
fnd_user u, wf_user_roles wur,wf_local_roles wr
where r.responsibility_key = 'SYSTEM_ADMINISTRATION'
and r.responsibility_id = wur.role_orig_system_id
and r.application_id = (select application_id
from fnd_application
where application_short_name =/* Val between 1st and 2nd separator */
replace(
substr(WUR.ROLE_NAME,
INSTR(WUR.ROLE_NAME, '|', 1, 1)+1,
( INSTR(WUR.ROLE_NAME, '|', 1, 2)
-INSTR(WUR.ROLE_NAME, '|', 1, 1)-1)
)
,'%col', ':')
)
and wur.role_orig_system = 'FND_RESP'
and wur.partition_id = 2
and u.user_id = l_user_id
and wur.user_name = u.user_name
and wur.role_name=wr.name
and wur.role_orig_system=wr.orig_system
and wur.role_orig_system_id=wr.orig_system_id
and r.version = 'W'
and r.start_date <= sysdate
and (r.end_date is null or r.end_date > sysdate)
and (wr.start_date is null or (trunc(wr.start_date) <= trunc(sysdate)))
and (wr.expiration_date is null or (trunc(wr.expiration_date) <= trunc(sysdate)))
and u.start_date <= sysdate
and (u.end_date is null or u.end_date > sysdate);
select function_id
into func_id
from fnd_form_functions
where function_name = l_func;