The following lines contain the word 'select', 'insert', 'update' or 'delete':
select frm.function_name
from fnd_form_functions frm,fnd_compiled_menu_functions fcm,fnd_menus fm
where frm.function_id=fcm.function_id
and fcm.menu_id=fm.menu_id
and fm.menu_name=l_menu_name;
select start_date,end_date into l_user_start_date,l_user_end_date
from fnd_user where user_name = p_user_name;
select min(role_start_date) ,max(nvl(role_end_date,to_date('31-12-9999','DD-MM-YYYY'))),min(effective_start_date),
max(nvl(effective_end_date,to_date('31-12-9999','DD-MM-YYYY'))),min( start_date),max(nvl(end_date,to_date('31-12-9999','DD-MM-YYYY')))
into l_role_start_date,l_role_end_date,l_effective_start_date,l_effective_end_date,
l_assignment_start_date,l_assignment_end_date
from wf_user_role_assignments
where user_name=p_user_name and role_name = p_role_name;
select distinct wur.name||frm.function_name
from fnd_responsibility fr,fnd_resp_functions frf, wf_local_roles wur,fnd_form_functions frm,
(select wur1.name roleName from wf_local_roles wur1
where wur1.name = p_resp_name
union
select super_name roleName from wf_role_hierarchies
where enabled_flag='Y'
connect by prior super_name=sub_name
and prior enabled_flag='Y'
start with sub_name= p_resp_name) roles
where wur.name = roles.roleName
and fr.responsibility_key = substr(wur.name,instr(wur.name,'|',1,2)+1,(instr(wur.name,'|',1,3)-1-instr(wur.name,'|',1,2)))
and frf.responsibility_id=fr.responsibility_id
and ((frf.rule_type='F' and frf.action_id = frm.function_id)
or (frf.rule_type='M' and frm.function_id in (select fcm.function_id from fnd_compiled_menu_functions fcm
where fcm.menu_id=frf.action_id)
));
l_function_list.delete(l_function_list.first,l_function_list.last);
l_function_list(func) := func; --insert the fuction into the table