The following lines contain the word 'select', 'insert', 'update' or 'delete':
select version
into ver
from v$instance
where rownum = 1;
SELECT RULE_TYPE, ACTION_ID from fnd_resp_functions
where application_id = p_appl_id
and responsibility_id = p_resp_id;
SELECT MENU_ID, ENTRY_SEQUENCE, FUNCTION_ID, SUB_MENU_ID, GRANT_FLAG
from fnd_menu_entries
where MENU_ID = l_sub_menu_id;
/* Select the list of exclusion rules into our cache */
for excl_rec in excl_c loop
EXCLUSIONS(excl_rec.action_id) := excl_rec.rule_type;
select menu_id
into l_menu_id
from fnd_responsibility
where responsibility_id = p_resp_id
and application_id = p_appl_id;
SELECT MENU_ID, ENTRY_SEQUENCE, FUNCTION_ID, SUB_MENU_ID, GRANT_FLAG
from fnd_menu_entries
where SUB_MENU_ID = l_sub_menu_id;
insert into fnd_compiled_menu_functions
(menu_id, function_id, grant_flag)
values
(CUR_MNES(i).MENU_ID, C_INVALID_MENU_VAL, C_INVALID_GRANT_VAL);
'Mark inserted.');
select 1
into dummy
from fnd_resp_functions
where responsibility_id = l_resp_id
and application_id = l_resp_appl_id
and rownum = 1;
select menu_id
into l_menu_id
from fnd_responsibility
where responsibility_id = l_resp_id
and application_id = l_resp_appl_id;
select 1
into dummy
from fnd_compiled_menu_functions
where menu_id = p_menu_id
and rownum = 1;
select 1
into dummy
from fnd_compiled_menu_functions
where menu_id = p_menu_id
and grant_flag = C_INVALID_GRANT_VAL
and rownum = 1;
select 1
into dummy
from fnd_compiled_menu_functions
where menu_id = p_menu_id
and function_id = p_function_id
and grant_flag = 'Y' ;
select 1
into dummy
from fnd_compiled_menu_functions
where menu_id = p_menu_id
and function_id = p_function_id;
select F.FUNCTION_NAME, F.MAINTENANCE_MODE_SUPPORT, F.CONTEXT_DEPENDENCE
into l_function_name, L_MAINTENANCE_MODE_SUPPORT, L_CONTEXT_DEPENDENCE
from FND_FORM_FUNCTIONS F
where F.FUNCTION_ID = test_instance_id_maintmode.function_id;
select F.MAINTENANCE_MODE_SUPPORT, F.CONTEXT_DEPENDENCE
into L_MAINTENANCE_MODE_SUPPORT, L_CONTEXT_DEPENDENCE
from FND_FORM_FUNCTIONS F
where F.function_id = test_instance_id.function_id;
select F.FUNCTION_ID, F.MAINTENANCE_MODE_SUPPORT, F.CONTEXT_DEPENDENCE
into function_id, L_MAINTENANCE_MODE_SUPPORT, L_CONTEXT_DEPENDENCE
from FND_FORM_FUNCTIONS F
where F.FUNCTION_NAME = test_instance.function_name;
select MAINTENANCE_MODE_SUPPORT, CONTEXT_DEPENDENCE
into L_MAINTENANCE_MODE_SUPPORT, L_CONTEXT_DEPENDENCE
from fnd_form_functions
where function_id = l_function_id;
select F.FUNCTION_ID, F.MAINTENANCE_MODE_SUPPORT, F.CONTEXT_DEPENDENCE
into function_id, L_MAINTENANCE_MODE_SUPPORT, L_CONTEXT_DEPENDENCE
from FND_FORM_FUNCTIONS F
where F.FUNCTION_NAME = test.function_name;
select /*+ INDEX_FFS(menus) */ menu_id from fnd_menus menus
where not exists
(select 'X'
from fnd_compiled_menu_functions cmf
where menus.menu_id = cmf.menu_id);
insert into fnd_compiled_menu_functions
(menu_id, function_id, grant_flag)
values
(tbl_menu_id(q), C_INVALID_MENU_VAL, C_INVALID_GRANT_VAL);
select
/*+ INDEX (fnd_compiled_menu_functions fnd_compiled_menu_functions_n3) */
menu_id
into l_menu_id
from fnd_compiled_menu_functions
where grant_flag = C_INVALID_GRANT_VAL
and rownum = 1;
select
/*+ INDEX (fnd_compiled_menu_functions fnd_compiled_menu_functions_n3) */
MENU_ID into L_MENU_ID
from FND_COMPILED_MENU_FUNCTIONS
where GRANT_FLAG = C_INVALID_GRANT_VAL
and ROWNUM = 1;
SELECT MENU_ID, ENTRY_SEQUENCE, FUNCTION_ID, SUB_MENU_ID, GRANT_FLAG
from fnd_menu_entries
where MENU_ID = p_menu_id;
select function_id, grant_flag
from fnd_compiled_menu_functions
where menu_id = l_submnu_id
and grant_flag <> C_INVALID_GRANT_VAL
and grant_flag <> C_BLANK_GRANT_VAL;
select 1
into dummy
from fnd_compiled_menu_functions
where menu_id = p_menu_id
and grant_flag = C_INVALID_GRANT_VAL
and rownum = 1;
/* If we havent already deleted the data for this menu, delete it now. */
begin
delete from fnd_compiled_menu_functions
where menu_id = p_menu_id
and grant_flag <> C_INVALID_GRANT_VAL;
c_log_head || l_api_name || '.insert1',
'Inserting into compiled table menu_id: '|| to_char(p_menu_id)
||' func_id:'||to_char(tbl_func_id(q) )
||' gnt_flag:'||tbl_gnt_flg(q) );
insert into fnd_compiled_menu_functions
(MENU_ID, FUNCTION_ID, GRANT_FLAG)
values
(p_menu_id, tbl_func_id(q), tbl_gnt_flg(q));
'Insert failed with dup val on index. No Problem.');
'About to update grant_flag.');
/* If the grant flag isn't right, update it. */
update fnd_compiled_menu_functions
set grant_flag = tbl_gnt_flg(q)
where menu_id = p_menu_id
and function_id = tbl_func_id(q)
and grant_flag = 'N';
c_log_head || l_api_name || '.insert2',
'Inserting into compiled table p_menu_id: '|| to_char(p_menu_id)
||' tbl_copy_func_id(z):'||tbl_copy_func_id(z)
||' tbl_copy_gnt_flg(ze):'||tbl_copy_gnt_flg(z) );
insert into fnd_compiled_menu_functions
(menu_id, function_id, grant_flag)
values
(p_menu_id, tbl_copy_func_id(z), tbl_copy_gnt_flg(z));
'Insert failed with dup val on index. No Problem.');
'About to update grant_flag.');
/* If the grant flag isn't right, update it. */
update fnd_compiled_menu_functions
set grant_flag = tbl_copy_gnt_flg(z)
where menu_id = p_menu_id
and function_id = tbl_copy_func_id(z)
and grant_flag = 'N';
/* If there were no functions in this menu, then insert a "blank" mark */
/* to indicate that we've compiled this menu but there are no fns. */
if (l_rows_processed = 0) then
begin
if (fnd_log.LEVEL_STATEMENT >= fnd_log.g_current_runtime_level) then
fnd_log.string(FND_LOG.LEVEL_STATEMENT,
c_log_head || l_api_name || '.insert_blank',
'Inserting blank row into compiled table p_menu_id: '||
to_char(p_menu_id) );
insert into fnd_compiled_menu_functions
(menu_id, function_id, grant_flag)
values
(p_menu_id, C_BLANK_MENU_VAL, C_BLANK_GRANT_VAL);
'Insert failed with dup val on index. No Problem.');
delete from fnd_compiled_menu_functions
where menu_id = p_menu_id
and grant_flag = C_INVALID_GRANT_VAL;
select menu_id from fnd_menus;
more_to_delete boolean;
more_to_delete := TRUE;
while (more_to_delete) loop
begin
more_to_delete := FALSE;
delete from fnd_compiled_menu_functions
where menu_id = (select menu_id
from fnd_compiled_menu_functions
where rownum = 1);
more_to_delete := TRUE;
more_to_delete := FALSE;
insert into fnd_compiled_menu_functions
(menu_id, function_id, grant_flag)
values
(tbl_menu_id(q), C_INVALID_MENU_VAL, C_INVALID_GRANT_VAL);
select function_id
into v_function_id
from fnd_form_functions
where function_name=p_function_name;