The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT user_id INTO p_user_id FROM fnd_user WHERE user_name = p_user_name;
'SELECT MENU_ID,FUNCTION_ID, SUB_MENU_ID '
||' FROM '||G_AMW_MENU_ENTRIES
||' WHERE menu_id = :1 ';
SELECT constraint_rev_id, type_code
FROM amw_constraints_b
WHERE start_date <= sysdate AND (end_date IS NULL OR end_date >= sysdate)
AND objective_code = 'PR';
SELECT count(*)
FROM amw_constraint_entries
WHERE constraint_rev_id=l_constraint_rev_id;
'select distinct function_id from ( '
||' select rcd.function_id '
||' from amw_role_constraint_denorm rcd '
||' ,'||G_AMW_USER_ROLES||' ur '
||' ,'||G_AMW_user||' u '
||' where rcd.constraint_rev_id = :1 '
||' and u.user_id = :2 '
||' and u.user_name = ur.user_name '
||' and ur.role_name = rcd.role_name '
||' and ur.role_orig_system = ''UMX'' '
||' UNION ALL '
||' select rcd.function_id '
||' from amw_role_constraint_denorm rcd '
||' ,'||G_AMW_USER_ROLES||' ur '
||' ,'||G_AMW_user||' u '
||' where rcd.constraint_rev_id = :3 '
||' and u.user_id = :4 '
||' and u.user_name = ur.user_name '
||' and ur.role_orig_system_id = rcd.responsibility_id '
||' and ur.role_orig_system = ''FND_RESP'' '
||' UNION ALL '
||' select rcd.function_id '
||' from amw_role_constraint_denorm rcd '
||' ,'||G_AMW_GRANTS||' gra '
||' ,'||G_AMW_USER||' u '
||' where rcd.constraint_rev_id = :5 '
||' and u.user_id = :6 '
||' and u.user_name = gra.grantee_key '
||' and gra.grantee_type = ''USER'' '
||' and gra.menu_id = rcd.menu_id '
||' and gra.instance_type = ''GLOBAL'' '
||' and gra.object_id = -1 '
||' UNION ALL '
||' select rcd.function_id '
||' from amw_role_constraint_denorm rcd '
||' ,'||G_AMW_GRANTS||' gra '
||' where rcd.constraint_rev_id = :7 '
||' and gra.grantee_key = ''GLOBAL'' '
||' and gra.grantee_type = ''GLOBAL'' '
||' and gra.menu_id = rcd.menu_id '
||' and gra.instance_type = ''GLOBAL'' '
||' and gra.object_id = -1 '
||' UNION ALL '
||' select rcd.function_id '
||' from amw_role_constraint_denorm rcd '
||' where rcd.constraint_rev_id = :8 '
||' and rcd.responsibility_id = :9 '
||') ';
'select count(function_id) from ( '
|| l_func_id_sql
|| ') ';
'select distinct group_code from ( '
||' select rcd.group_code '
||' from amw_role_constraint_denorm rcd '
||' ,'||G_AMW_USER_ROLES||' ur '
||' ,'||G_AMW_user||' u '
||' where rcd.constraint_rev_id = :1 '
||' and u.user_id = :2 '
||' and u.user_name = ur.user_name '
||' and ur.role_name = rcd.role_name '
||' and ur.role_orig_system = ''UMX'' '
||' UNION ALL '
||' select rcd.group_code '
||' from amw_role_constraint_denorm rcd '
||' ,'||G_AMW_USER_ROLES||' ur '
||' ,'||G_AMW_user||' u '
||' where rcd.constraint_rev_id = :3 '
||' and u.user_id = :4 '
||' and u.user_name = ur.user_name '
||' and ur.role_orig_system_id = rcd.responsibility_id '
||' and ur.role_orig_system = ''FND_RESP'' '
||' UNION ALL '
||' select rcd.group_code '
||' from amw_role_constraint_denorm rcd '
||' ,'||G_AMW_GRANTS||' gra '
||' ,'||G_AMW_USER||' u '
||' where rcd.constraint_rev_id = :5 '
||' and u.user_id = :6 '
||' and u.user_name = gra.grantee_key '
||' and gra.grantee_type = ''USER'' '
||' and gra.menu_id = rcd.menu_id '
||' and gra.instance_type = ''GLOBAL'' '
||' and gra.object_id = -1 '
||' UNION ALL '
||' select rcd.group_code '
||' from amw_role_constraint_denorm rcd '
||' ,'||G_AMW_GRANTS||' gra '
||' where rcd.constraint_rev_id = :7 '
||' and gra.grantee_key = ''GLOBAL'' '
||' and gra.grantee_type = ''GLOBAL'' '
||' and gra.menu_id = rcd.menu_id '
||' and gra.instance_type = ''GLOBAL'' '
||' and gra.object_id = -1 '
||' UNION ALL '
||' select rcd.group_code '
||' from amw_role_constraint_denorm rcd '
||' where rcd.constraint_rev_id = :8 '
||' and rcd.responsibility_id = :9 '
||') ';
'select count(group_code) from ( '
|| l_func_set_id_sql
||' ) ';
' select ur.role_orig_system_id '
||' from '
|| G_AMW_USER_ROLES||' ur '
||' ,'||G_AMW_user||' u '
||' ,amw_constraint_entries cst '
||' where u.user_id = :1 '
||' and cst.constraint_rev_id = :2 '
||' and u.user_name = ur.user_name '
||' and ur.role_orig_system_id = cst.function_id '
||' and ur.role_orig_system = ''FND_RESP'' '
||' UNION '
||' select cst.function_id as orig_system_id '
||' from amw_constraint_entries cst '
||' where cst.constraint_rev_id = :3 '
||' and cst.function_id = :4 ';
' select count(role_orig_system_id) from ( '
|| l_resp_all_sql
||')';
' select cst.group_code '
||' from '
|| G_AMW_USER_ROLES||' ur '
||' ,'||G_AMW_user||' u '
||' ,amw_constraint_entries cst '
||' where u.user_id = :1 '
||' and cst.constraint_rev_id = :2 '
||' and u.user_name = ur.user_name '
||' and ur.role_orig_system_id = cst.function_id '
||' and ur.role_orig_system = ''FND_RESP'' '
||' UNION '
||' select cst.group_code '
||' from amw_constraint_entries cst '
||' where cst.constraint_rev_id = :3 '
||' and cst.function_id = :4 ';
' select count(group_code) from ( '
|| l_resp_set_all_sql
||')';
SELECT count(*)
FROM amw_constraint_waivers_vl
WHERE constraint_rev_id = l_constraint_rev_id
AND object_type = 'USER'
AND PK1 = l_user_id
AND start_date <= sysdate AND (end_date >= sysdate or end_date is null);
l_func_sql :='select count(function_id)'
||'from ('
||'select function_id from ( '
|| l_func_id_sql
||') '
||' MINUS '
||' select FUNCTION_ID from amw_constraint_entries where constraint_rev_id = :10'
||')';
l_resp_sql := 'select count(distinct role_orig_system_id)'
||' from ('
|| l_resp_all_sql
||' MINUS '
||' select FUNCTION_ID from amw_constraint_entries where constraint_rev_id = :5'
||')';
SELECT constraint_rev_id, type_code, constraint_name
FROM amw_constraints_vl
WHERE start_date <= sysdate AND (end_date IS NULL OR end_date >= sysdate)
and objective_code = 'PR';
SELECT count(*)
FROM amw_constraint_entries
WHERE constraint_rev_id=l_constraint_rev_id;
'select count(distinct function_id) from ( '
||' select rcd.function_id '
||' from amw_role_constraint_denorm rcd '
||' ,'||G_AMW_USER_ROLES||' ur '
||' ,'||G_AMW_user||' u '
||' where rcd.constraint_rev_id = :1 '
||' and u.user_id = :2 '
||' and u.user_name = ur.user_name '
||' and ur.role_name = rcd.role_name '
||' and ur.role_orig_system = ''UMX'' '
||' UNION ALL '
||' select rcd.function_id '
||' from amw_role_constraint_denorm rcd '
||' ,'||G_AMW_USER_ROLES||' ur '
||' ,'||G_AMW_user||' u '
||' where rcd.constraint_rev_id = :3 '
||' and u.user_id = :4 '
||' and u.user_name = ur.user_name '
||' and ur.role_orig_system_id = rcd.responsibility_id '
||' and ur.role_orig_system = ''FND_RESP'' '
||' UNION ALL '
||' select rcd.function_id '
||' from amw_role_constraint_denorm rcd '
||' ,'||G_AMW_GRANTS||' gra '
||' ,'||G_AMW_USER||' u '
||' where rcd.constraint_rev_id = :5 '
||' and u.user_id = :6 '
||' and u.user_name = gra.grantee_key '
||' and gra.grantee_type = ''USER'' '
||' and gra.menu_id = rcd.menu_id '
||' and gra.instance_type = ''GLOBAL'' '
||' and gra.object_id = -1 '
||' UNION ALL '
||' select rcd.function_id '
||' from amw_role_constraint_denorm rcd '
||' ,'||G_AMW_GRANTS||' gra '
||' where rcd.constraint_rev_id = :7 '
||' and gra.grantee_key = ''GLOBAL'' '
||' and gra.grantee_type = ''GLOBAL'' '
||' and gra.menu_id = rcd.menu_id '
||' and gra.instance_type = ''GLOBAL'' '
||' and gra.object_id = -1 '
||' UNION ALL '
||' select rcd.function_id '
||' from amw_role_constraint_denorm rcd '
||' where rcd.constraint_rev_id = :8 '
||' and rcd.responsibility_id = :9 '
||') ';
'select count(distinct group_code) from ( '
||' select rcd.group_code '
||' from amw_role_constraint_denorm rcd '
||' ,'||G_AMW_USER_ROLES||' ur '
||' ,'||G_AMW_user||' u '
||' where rcd.constraint_rev_id = :1 '
||' and u.user_id = :2 '
||' and u.user_name = ur.user_name '
||' and ur.role_name = rcd.role_name '
||' and ur.role_orig_system = ''UMX'' '
||' UNION ALL '
||' select rcd.group_code '
||' from amw_role_constraint_denorm rcd '
||' ,'||G_AMW_USER_ROLES||' ur '
||' ,'||G_AMW_user||' u '
||' where rcd.constraint_rev_id = :3 '
||' and u.user_id = :4 '
||' and u.user_name = ur.user_name '
||' and ur.role_orig_system_id = rcd.responsibility_id '
||' and ur.role_orig_system = ''FND_RESP'' '
||' UNION ALL '
||' select rcd.group_code '
||' from amw_role_constraint_denorm rcd '
||' ,'||G_AMW_GRANTS||' gra '
||' ,'||G_AMW_USER||' u '
||' where rcd.constraint_rev_id = :5 '
||' and u.user_id = :6 '
||' and u.user_name = gra.grantee_key '
||' and gra.grantee_type = ''USER'' '
||' and gra.menu_id = rcd.menu_id '
||' and gra.instance_type = ''GLOBAL'' '
||' and gra.object_id = -1 '
||' UNION ALL '
||' select rcd.group_code '
||' from amw_role_constraint_denorm rcd '
||' ,'||G_AMW_GRANTS||' gra '
||' where rcd.constraint_rev_id = :7 '
||' and gra.grantee_key = ''GLOBAL'' '
||' and gra.grantee_type = ''GLOBAL'' '
||' and gra.menu_id = rcd.menu_id '
||' and gra.instance_type = ''GLOBAL'' '
||' and gra.object_id = -1 '
||' UNION ALL '
||' select rcd.group_code '
||' from amw_role_constraint_denorm rcd '
||' where rcd.constraint_rev_id = :8 '
||' and rcd.responsibility_id = :9 '
||') ';
'select resp.responsibility_name '
||' from amw_constraint_entries rcd '
||' ,'||G_AMW_RESPONSIBILITY_VL||' resp '
||' where rcd.constraint_rev_id = :1 and resp.responsibility_id = :2 '
||' and rcd.function_id = resp.responsibility_id ';
'select func.user_function_name '
||' from amw_constraint_entries rcd '
||' ,'|| G_AMW_FORM_FUNCTIONS_VL ||' func '
||' where rcd.constraint_rev_id = :1 '
||' and rcd.function_id = func.function_id ';
SELECT count(*)
FROM amw_constraint_waivers_vl
WHERE constraint_rev_id = l_constraint_rev_id
AND object_type = 'USER'
AND PK1 = l_user_id
AND start_date <= sysdate AND (end_date >= sysdate or end_date is null);
' select ur.role_orig_system_id '
||' from '
|| G_AMW_USER_ROLES||' ur '
||' ,'||G_AMW_user||' u '
||' ,amw_constraint_entries cst '
||' where u.user_id = :1 '
||' and cst.constraint_rev_id = :2 '
||' and u.user_name = ur.user_name '
||' and ur.role_orig_system_id = cst.function_id '
||' and ur.role_orig_system = ''FND_RESP'' '
||' UNION '
||' select cst.function_id as orig_system_id '
||' from amw_constraint_entries cst '
||' where cst.constraint_rev_id = :3 '
||' and cst.function_id = :4 ';
' select count(role_orig_system_id) from ( '
|| l_resp_all_sql
||')';
' select cst.group_code '
||' from '
|| G_AMW_USER_ROLES||' ur '
||' ,'||G_AMW_user||' u '
||' ,amw_constraint_entries cst '
||' where u.user_id = :1 '
||' and cst.constraint_rev_id = :2 '
||' and u.user_name = ur.user_name '
||' and ur.role_orig_system_id = cst.function_id '
||' and ur.role_orig_system = ''FND_RESP'' '
||' UNION '
||' select cst.group_code '
||' from amw_constraint_entries cst '
||' where cst.constraint_rev_id = :3 '
||' and cst.function_id = :4 ';
' select count(group_code) from ( '
|| l_resp_set_all_sql
||')';
l_resp_sql := 'select count(distinct role_orig_system_id)'
||' from ('
|| l_resp_all_sql
||' MINUS '
||' select FUNCTION_ID from amw_constraint_entries where constraint_rev_id = :5'
||')';
'select distinct rv.display_name '
||' from amw_role_constraint_denorm rcd '
||' ,'||G_AMW_USER_ROLES||' ur '
||' ,'||G_AMW_user||' u '
||' ,'||G_AMW_ALL_ROLES_VL||' rv '
||' where rcd.constraint_rev_id = :1 '
||' and u.user_id = :2 '
||' and u.user_name = ur.user_name '
||' and ur.role_name = rcd.role_name '
||' and ur.role_orig_system = ''UMX'' '
||' and ur.role_name = rv.name ';
'select distinct resp.responsibility_name '
||' from amw_role_constraint_denorm rcd '
||' ,'||G_AMW_USER_ROLES||' ur '
||' ,'||G_AMW_user||' u '
||' ,'||G_AMW_RESPONSIBILITY_VL||' resp '
||' where rcd.constraint_rev_id = :1 '
||' and u.user_id = :2 '
||' and u.user_name = ur.user_name '
||' and ur.role_orig_system_id = rcd.responsibility_id '
||' and ur.role_orig_system = ''FND_RESP'' '
||' and ur.role_orig_system_id = resp.responsibility_id '
||' UNION ALL '
||' select distinct resp.responsibility_name '
||' from amw_constraint_entries cste '
||' ,'||G_AMW_USER_ROLES||' ur '
||' ,'||G_AMW_user||' u '
||' ,'||G_AMW_RESPONSIBILITY_VL||' resp '
||' where cste.constraint_rev_id = :3 '
||' and u.user_id = :4 '
||' and u.user_name = ur.user_name '
||' and ur.role_orig_system_id = cste.function_id '
||' and ur.role_orig_system = ''FND_RESP'' '
||' and ur.role_orig_system_id = resp.responsibility_id ';
' select menu.user_menu_name '
||' from amw_role_constraint_denorm rcd '
||' ,'||G_AMW_MENUS_VL||' menu '
||' ,'||G_AMW_user||' u '
||' ,'||G_AMW_GRANTS||' gra '
||' where rcd.constraint_rev_id = :1 '
||' and u.user_id = :2 '
||' and u.user_name = gra.grantee_key '
||' and gra.grantee_type = ''USER'' '
||' and gra.instance_type = ''GLOBAL'' '
||' and gra.object_id = -1 '
||' and gra.menu_id = rcd.menu_id '
||' and gra.menu_id = menu.menu_id '
||' UNION '
||' select menu.user_menu_name '
||' from amw_role_constraint_denorm rcd '
||' ,'||G_AMW_MENUS_VL||' menu '
||' ,'||G_AMW_GRANTS||' gra '
||' where rcd.constraint_rev_id = :3 '
||' and gra.grantee_key = ''GLOBAL'' '
||' and gra.grantee_type = ''GLOBAL'' '
||' and gra.instance_type = ''GLOBAL'' '
||' and gra.object_id = -1 '
||' and gra.menu_id = rcd.menu_id '
||' and gra.menu_id = menu.menu_id ';
select distinct FUNCTION_ID
from FND_COMPILED_MENU_FUNCTIONS
where MENU_ID = p_menu_id;
g_menu_function_id_list.delete();
SELECT sub_menu_id menu_id
FROM fnd_menu_entries
START WITH menu_id =p_menu_id
CONNECT BY PRIOR sub_menu_id = menu_id
UNION
SELECT menu_id
FROM fnd_menu_entries
START WITH menu_id =p_menu_id
CONNECT BY PRIOR menu_id = sub_menu_id;
select distinct FUNCTION_ID
from FND_MENU_ENTRIES --FND_COMPILED_MENU_FUNCTIONS
where MENU_ID = p_menu_id;
select distinct FUNCTION_ID
from FND_MENU_ENTRIES --FND_COMPILED_MENU_FUNCTIONS
where MENU_ID = p_menu_id or MENU_ID = p_sub_menu_id;
g_menu_id_list.delete();
g_function_id_list.delete();
g_menu_function_id_list.delete();
g_menu_function_id_list.delete();
select *
from AMW_CONSTRAINTS_VL
where
(TYPE_CODE = 'ALL' or TYPE_CODE = 'ME' or TYPE_CODE = 'SET') and
START_DATE <= sysdate and
(END_DATE is null or END_DATE >= sysdate)
and objective_code = 'PR';
select distinct FUNCTION_ID, GROUP_CODE
from AMW_CONSTRAINT_ENTRIES
where
CONSTRAINT_REV_ID = p_constraint_rev_id and
(OBJECT_TYPE = 'FUNC' or OBJECT_TYPE is null);
select distinct GROUP_CODE
from AMW_CONSTRAINT_ENTRIES
where
CONSTRAINT_REV_ID = p_constraint_rev_id and
(OBJECT_TYPE = 'FUNC' or OBJECT_TYPE is null);
SELECT count(*)
FROM amw_constraint_waivers_vl
WHERE constraint_rev_id = l_constraint_rev_id
AND object_type = 'RESP'
AND PK1 = l_resp_id
AND PK2 = l_appl_id
AND start_date <= sysdate AND (end_date >= sysdate or end_date is null);
g_constraint_function_id_list.delete();
g_constraint_group_code_list.delete();
select USER_FUNCTION_NAME into m_function_name
from FND_FORM_FUNCTIONS_VL
where FUNCTION_ID = g_constraint_function_id_list(i);
g_group_code_list.delete();
select *
from AMW_CONSTRAINTS_VL
where
(TYPE_CODE = 'ALL' or TYPE_CODE = 'ME' or TYPE_CODE = 'SET') and
START_DATE <= sysdate and
(END_DATE is null or END_DATE >= sysdate)
and objective_code = 'PR';
select distinct FUNCTION_ID, GROUP_CODE
from AMW_CONSTRAINT_ENTRIES
where
CONSTRAINT_REV_ID = p_constraint_rev_id and
(OBJECT_TYPE = 'FUNC' or OBJECT_TYPE is null);
select distinct GROUP_CODE
from AMW_CONSTRAINT_ENTRIES
where
CONSTRAINT_REV_ID = p_constraint_rev_id and
(OBJECT_TYPE = 'FUNC' or OBJECT_TYPE is null);
g_constraint_function_id_list.delete();
g_constraint_group_code_list.delete();
select USER_FUNCTION_NAME into m_function_name
from FND_FORM_FUNCTIONS_VL
where FUNCTION_ID = g_constraint_function_id_list(i);
g_group_code_list.delete();