Скрипт обновления параметров профиля
28 Апрель 2014
Нет комментариев
Скрипт обновления параметров профиля. В данном примере изменяется поле SQL_VALIDATION.
declare l_sql VARCHAR2(4000); begin l_sql := 'SQL="SELECT LOOKUP_CODE, MEANING \"Включить проверку\" INTO :PROFILE_OPTION_VALUE, :VISIBLE_OPTION_VALUE FROM FND_LOOKUP_VALUES_VL WHERE LOOKUP_TYPE = ''!!!LOOKUP_NAME'' AND ENABLED_FLAG = ''Y'' AND SYSDATE BETWEEN NVL(START_DATE_ACTIVE,SYSDATE) AND NVL(END_DATE_ACTIVE,SYSDATE) ORDER BY MEANING" COLUMN="\"Включить проверку\"(20)"'; for i in (select profile_option_name , user_profile_option_name , start_date_active , end_date_active , user_changeable_flag , user_visible_flag , read_allowed_flag , write_allowed_flag , site_enabled_flag , site_update_allowed_flag , app_enabled_flag , app_update_allowed_flag , resp_enabled_flag , resp_update_allowed_flag , user_enabled_flag , user_update_allowed_flag , (select a.application_short_name from fnd_application a where a.application_id = t.application_id ) as appl_short_name from fnd_profile_options_vl t where profile_option_name like '!!!%' ) loop dbms_output.put_line('update '||i.profile_option_name); fnd_profile_options_pkg.load_row ( x_profile_name => i.profile_option_name, x_owner => '!!!XX', x_application_short_name => i.appl_short_name, x_user_profile_option_name => i.user_profile_option_name, x_description => i.user_profile_option_name, x_user_changeable_flag => i.user_changeable_flag, x_user_visible_flag => i.user_visible_flag, x_read_allowed_flag => i.read_allowed_flag, x_write_allowed_flag => i.write_allowed_flag, x_site_enabled_flag => i.site_update_allowed_flag, x_site_update_allowed_flag => i.site_update_allowed_flag, x_app_enabled_flag => i.app_enabled_flag, x_app_update_allowed_flag => i.app_update_allowed_flag, x_resp_enabled_flag => i.resp_enabled_flag, x_resp_update_allowed_flag => i.resp_update_allowed_flag, x_user_enabled_flag => i.user_enabled_flag, x_user_update_allowed_flag => i.user_update_allowed_flag, x_start_date_active => to_char(i.start_date_active,'YYYY/MM/DD'), x_end_date_active => to_char(i.end_date_active,'YYYY/MM/DD'), x_sql_validation => l_sql ); dbms_output.put_line('done'); end loop; end;
Последние комментарии