You are on page 1of 15

# $Header: afsload.lct 115.60 2007/03/16 14:49:33 jvalenti ship $ # # afsload.

lct - Security information # # Entities # FORM, FUNCTION, MENU, ENTRY, OBJECT, OBJECT_INSTANCE_SET, GRANT # # PARAMETERS: # # While UPLOADING: # CUSTOM_MODE - Controls whether a customized row is updated or not. # "FORCE" is to wipe out any customization. # Any value other than "FORCE" is to preserve customization. # Default value is to preserve customization. # UPLOAD_MODE - NLS: whenever you run to upload NLS translations. # REPLACE: pre-delete all entries so that only insert is needed # MERGE: find matching row (whether to update it is controlled # by CUSTOM_MODE). If matching row not found, insert it. # NOTE: REPLACE and MERGE are used only for MENU ENTRY # Default value is MERGE. # # While DOWNLOADING: # FORM Entity: # FORM_APP_SHORT_NAME- Application short name of Form Application # FORM_NAMEDeveloper name of form # # FUNCTION Entity: # FUNC_APP_SHORT_NAME- Application short name of Function. # FUNCTION_NAMEDeveloper function name # # MENU Entity (including menu entries): # Oracle Development Only! See the following internal document: # http://www-apps.us.oracle.com/atg/plans/r115x/patchmenu.txt # for more information on coding standards for downloading menus # for seed data patching. # # PARENT_MENU_NAMEName of the menu to start downloading at. If this # parameter is specified on its own, that menu and # all its children will be downloaded. If specified # with FUNCTION_NAME and/or SUB_MENU_NAME, then only # the menu entry with that function and/or submenu nam e # immediately under the PARENT_MENU_NAME will be # downloaded. # FUNCTION_NAMEFunction name to limit download to. If this paramet er # is specified then PARENT_MENU_NAME must also be # specified in order to download menus. Specifies # the function on a menu entry immediately under # PARENT_MENU_NAME which will be downloaded; all other # menu entries under PARENT_MENU_NAME will not be # downloaded. # SUB_MENU_NAMESub Menu name to limit download to. If this paramet er # is specified then PARENT_MENU_NAME must also be # specified in order to download menus. Specifies # the Sub Menu on a menu entry immediately under # PARENT_MENU_NAME which will be downloaded (along wit h # all its children); all other menu entries under

# PARENT_MENU_NAME will not be downloaded. # MENU_APP_SHORT_NAME- Application short name of Menu. The menu on the res p # for this application will be downloaded. If you # pass this parameter, do not pass any of the other # parameters; this parameter is only supported on its # own. # MENU_NAMEOBSOLETE. Developer menu name. This is supported # for backward compatibility only; it is replaced # by PARENT_MENU_NAME which does the same thing. # # OBJECT Entity: # OBJ_NAMEObject name # # OBJECT_INSTANCE_SET Entity: # INSTANCE_SET_NAME- Object instance set name # # GRANT Entity: # GNT_GUIDGlobal ID for GRANT # GNT_MENU_NAMEdownloads grants to this menu # GNT_ISNdownloads grants to this instance set name # GNT_OBJ_NAMEdownloads grants to this object name_ # PROGRAM_NAMEdownloads grants to this program_name # PROGRAM_TAGdownloads grants to this program_tag # # # Note that a new unique GRANT_GUID can be generated by running # the following SQL statement: # select sys_guid() from dual; # COMMENT = "dbdrv: exec fnd bin FNDLOAD bin &phase=daa+51 checkfile:~PROD:~PATH:~ FILE &ui_apps 0 Y UPLOAD @FND:patch/115/import/afsload.lct @~PROD:~PATH/~FILE" DEFINE FORM KEY APPLICATION_SHORT_NAME VARCHAR2(4000) KEY FORM_NAME VARCHAR2(4000) BASE AUDIT_ENABLED_FLAG VARCHAR2(1) BASE LAST_UPDATE_DATE VARCHAR2(10) TRANS USER_FORM_NAME VARCHAR2(80) TRANS DESCRIPTION VARCHAR2(240) CTX OWNER VARCHAR2(4000) END FORM DEFINE KEY BASE BASE BASE BASE BASE BASE BASE BASE BASE BASE # KEY BASE # KEY BASE BASE BASE FUNCTION FUNCTION_NAME VARCHAR2(4000) FORM REFERENCES FORM TYPE VARCHAR2(30) PARAMETERS VARCHAR2(4000) WEB_HOST_NAME VARCHAR2(4000) WEB_AGENT_NAME VARCHAR2(4000) WEB_HTML_CALL VARCHAR2(4000) WEB_ENCRYPT_PARAMETERS VARCHAR2(4000) WEB_SECURED VARCHAR2(4000) WEB_ICON VARCHAR2(4000) FUNC_OBJECT REFERENCES OBJECT OBJ_NAME VARCHAR2(30) OBJECT_NAME REFERENCES OBJECT OBJ_NAME VARCHAR2(30) REGION_APPLICATION_SHORT_NAME VARCHAR2(50) REGION_APPLICATION_NAME VARCHAR2(50) REGION_CODE VARCHAR2(4000)

BASE LAST_UPDATE_DATE VARCHAR2(10) BASE MAINTENANCE_MODE_SUPPORT VARCHAR2(8) BASE CONTEXT_DEPENDENCE VARCHAR2(8) BASE JRAD_REF_PATH VARCHAR2(4000) TRANS USER_FUNCTION_NAME VARCHAR2(80) TRANS DESCRIPTION VARCHAR2(240) CTX OWNER VARCHAR2(4000) END FUNCTION DEFINE MENU KEY MENU_NAME VARCHAR2(4000) BASE TYPE VARCHAR2(30) BASE LAST_UPDATE_DATE VARCHAR2(10) TRANS USER_MENU_NAME VARCHAR2(80) TRANS DESCRIPTION VARCHAR2(240) CTX OWNER VARCHAR2(4000) DEFINE ENTRY TRANS PROMPT TRANS DESCRIPTION BASE GRANT_FLAG BASE LAST_UPDATE_DATE CTX SUBMENU # KEY MENU_NAME CTX FUNCTION # KEY FUNCTION_NAME CTX OWNER END ENTRY END MENU VARCHAR2(60) VARCHAR2(240) VARCHAR2(1) VARCHAR2(10) REFERENCES MENU VARCHAR2(30) REFERENCES FUNCTION VARCHAR2(30) VARCHAR2(4000)

DEFINE OBJECT KEY OBJ_NAME BASE APPLICATION_SHORT_NAME BASE DATABASE_OBJECT_NAME BASE PK1_COLUMN_NAME BASE PK2_COLUMN_NAME BASE PK3_COLUMN_NAME BASE PK4_COLUMN_NAME BASE PK5_COLUMN_NAME BASE PK1_COLUMN_TYPE BASE PK2_COLUMN_TYPE BASE PK3_COLUMN_TYPE BASE PK4_COLUMN_TYPE BASE PK5_COLUMN_TYPE BASE LAST_UPDATE_DATE TRANS DISPLAY_NAME TRANS DESCRIPTION CTX OWNER END OBJECT DEFINE OBJECT_INSTANCE_SET KEY INSTANCE_SET_NAME BASE INS_OBJ_NAME BASE PREDICATE BASE LAST_UPDATE_DATE TRANS DISPLAY_NAME TRANS DESCRIPTION CTX OWNER END OBJECT_INSTANCE_SET

VARCHAR2(4000) VARCHAR2(50) VARCHAR2(30) VARCHAR2(30) VARCHAR2(30) VARCHAR2(30) VARCHAR2(30) VARCHAR2(30) VARCHAR2(8) VARCHAR2(8) VARCHAR2(8) VARCHAR2(8) VARCHAR2(8) VARCHAR2(10) VARCHAR2(240) VARCHAR2(2000) VARCHAR2(4000)

VARCHAR2(30) REFERENCES OBJECT VARCHAR2(4000) VARCHAR2(10) VARCHAR2(240) VARCHAR2(2000) VARCHAR2(4000)

DEFINE GRANT KEY GRANT_GUID BASE GRANTEE_TYPE BASE GRANTEE_KEY BASE GNT_MENU_NAME BASE START_DATE BASE END_DATE BASE GNT_OBJ_NAME BASE INSTANCE_TYPE BASE GNT_ISN BASE INSTANCE_PK1_VALUE BASE INSTANCE_PK2_VALUE BASE INSTANCE_PK3_VALUE BASE INSTANCE_PK4_VALUE BASE INSTANCE_PK5_VALUE BASE PARAMETER1 BASE PARAMETER2 BASE PARAMETER3 BASE PARAMETER4 BASE PARAMETER5 BASE PARAMETER6 BASE PARAMETER7 BASE PARAMETER8 BASE PARAMETER9 BASE PARAMETER10 BASE CTX_SECURITY_GROUP_KEY BASE CTX_RESP_KEY BASE CTX_RESP_APP_SHORT_NAME BASE CTX_ORGANIZATION BASE PROGRAM_NAME BASE PROGRAM_TAG BASE LAST_UPDATE_DATE BASE NAME BASE DESCRIPTION CTX OWNER END GRANT

VARCHAR2(2000) VARCHAR2(8) VARCHAR2(240) REFERENCES MENU VARCHAR2(11) VARCHAR2(11) REFERENCES OBJECT VARCHAR2(8) REFERENCES OBJECT_INSTANCE_SET VARCHAR2(256) VARCHAR2(256) VARCHAR2(256) VARCHAR2(256) VARCHAR2(256) VARCHAR2(256) VARCHAR2(256) VARCHAR2(256) VARCHAR2(256) VARCHAR2(256) VARCHAR2(256) VARCHAR2(256) VARCHAR2(256) VARCHAR2(256) VARCHAR2(256) VARCHAR2(30) VARCHAR2(30) VARCHAR2(50) VARCHAR2(60) VARCHAR2(30) VARCHAR2(30) VARCHAR2(10) VARCHAR2(80) VARCHAR2(240) VARCHAR2(4000)

DOWNLOAD FORM " select a.application_short_name, f.form_name, f.audit_enabled_flag, to_char(f.last_update_date, 'YYYY/MM/DD') last_update_date, f.user_form_name, f.description, fnd_load_util.owner_name(f.LAST_UPDATED_BY) OWNER from fnd_form_vl f, fnd_application a where f.application_id = a.application_id and ((:FORM_APP_SHORT_NAME is NULL) or ((:FORM_APP_SHORT_NAME is not NULL) AND (a.application_short_name like :FORM_APP_SHORT_NAME))) and ((:APPLICATION_SHORT_NAME is NULL) or ((:APPLICATION_SHORT_NAME is not NULL) AND (a.application_short_name like :APPLICATION_SHORT_NAME))) and ((:FORM_NAME is NULL) or ((:FORM_NAME is not NULL) AND (f.form_name like :FORM_NAME))) " DOWNLOAD FUNCTION " select f.function_name,

a.application_short_name, nvl(fo.form_name, fnd_load_util.null_value) form_name, -- fo.form_name, f.type, nvl(f.parameters, fnd_load_util.null_value) parameters, nvl(f.web_host_name, fnd_load_util.null_value) web_host_name, nvl(f.web_agent_name, fnd_load_util.null_value) web_agent_name, nvl(f.web_html_call, fnd_load_util.null_value) web_html_call, nvl(f.web_encrypt_parameters, fnd_load_util.null_value) web_encrypt_p arameters, nvl(f.web_secured, fnd_load_util.null_value) web_secured, nvl(f.web_icon, fnd_load_util.null_value) web_icon, nvl(decode(f.object_id, -1, 'GLOBAL', ob.obj_name), fnd_load_util.nul FUNC_OBJECT_OBJ_NAME, nvl(decode(f.object_id, -1, 'GLOBAL', ob.obj_name), fnd_load_util.nul OBJECT_NAME_OBJ_NAME, ap.application_short_name, ap.application_short_name, nvl(f.region_code, fnd_load_util.null_value) region_code, to_char(f.last_update_date, 'YYYY/MM/DD') last_update_date, f.maintenance_mode_support, f.context_dependence, nvl(f.jrad_ref_path, fnd_load_util.null_value) jrad_ref_path, f.user_function_name, f.description, fnd_load_util.owner_name(f.LAST_UPDATED_BY) OWNER fnd_form_functions_vl f, fnd_application a, fnd_form_vl fo, fnd_objects_vl ob, fnd_application ap fo.application_id = a.application_id (+) ((:FUNC_APP_SHORT_NAME is NULL) or ((:FUNC_APP_SHORT_NAME is not NULL) AND (a.application_short_name like :FUNC_APP_SHORT_NAME))) fo.application_id (+) = f.application_id f.form_id = fo.form_id (+) ((:FUNCTION_NAME is NULL) or ((:FUNCTION_NAME is not NULL) AND (f.function_name like :FUNCTION_NAME))) f.region_application_id = ap.application_id (+) f.object_id = ob.object_id (+)

l_value) l_value)

from

where and and and and and and

" DOWNLOAD MENU " select m.menu_name, m.type, to_char(m.last_update_date, 'YYYY/MM/DD') last_update_date, m.user_menu_name, m.description, fnd_load_util.owner_name(m.LAST_UPDATED_BY) OWNER from fnd_menus_vl m where ( (menu_name like :MENU_NAME) or ((:MENU_NAME is NULL) and (menu_name like :PARENT_MENU_NAME))) union select m.menu_name, m.type, to_char(m.last_update_date, 'YYYY/MM/DD') last_update_date, m.user_menu_name, m.description, fnd_load_util.owner_name(m.LAST_UPDATED_BY) OWNER

from fnd_menus_vl m where ( (:MENU_NAME is NULL) and (:PARENT_MENU_NAME is NULL) and (:MENU_APP_SHORT_NAME is not NULL) and (menu_id in (select distinct r.menu_id from fnd_application a, fnd_responsibility r where a.application_short_name like :MENU_APP_SHORT_NAME and r.application_id = a.application_id))) order by 1 " DOWNLOAD ENTRY " select substrb(nvl(e.prompt, fnd_load_util.null_value),1,60) prompt, e.description, e.grant_flag, to_char(e.last_update_date, 'YYYY/MM/DD') last_update_date, nvl(m.menu_name, fnd_load_util.null_value) menu_name, nvl(u.function_name, fnd_load_util.null_value) function_name, fnd_load_util.owner_name(e.LAST_UPDATED_BY) OWNER from fnd_menu_entries_vl e, fnd_menus_vl m, fnd_menus_vl m2, fnd_form_functions_vl u where e.function_id = u.function_id (+) and e.sub_menu_id = m.menu_id (+) and e.menu_id = m2.menu_id and ( (m2.menu_name like :MENU_NAME) or ((:MENU_NAME is NULL) and (m2.menu_name like :PARENT_MENU_NAME))) and ( (:PARENT_MENU_NAME is NULL) or (:PARENT_MENU_NAME <> m2.menu_name) or ( ( (:FUNCTION_NAME is NULL) or ( m2.menu_name like :PARENT_MENU_NAME and u.function_name like :FUNCTION_NAME )) and ( (:SUB_MENU_NAME is NULL) or ( m2.menu_name like :PARENT_MENU_NAME and m.menu_name like :SUB_MENU_NAME)))) order by e.entry_sequence " DOWNLOAD OBJECT " select o.obj_name, a.application_short_name, o.database_object_name, o.pk1_column_name, o.pk2_column_name, o.pk3_column_name, o.pk4_column_name, o.pk5_column_name, o.pk1_column_type, o.pk2_column_type, o.pk3_column_type, o.pk4_column_type, o.pk5_column_type, to_char(o.last_update_date, 'YYYY/MM/DD') last_update_date, o.display_name, o.description, fnd_load_util.owner_name(o.LAST_UPDATED_BY) OWNER from fnd_objects_vl o, fnd_application a

where ((:OBJ_NAME is NULL) or ((:OBJ_NAME is not NULL) AND (o.obj_name like :OBJ_NAME))) and o.application_id = a.application_id " DOWNLOAD OBJECT_INSTANCE_SET " select i.instance_set_name, o.obj_name, i.predicate, to_char(i.last_update_date, 'YYYY/MM/DD') last_update_date, i.display_name, i.description, fnd_load_util.owner_name(i.LAST_UPDATED_BY) OWNER from fnd_object_instance_sets_vl i, fnd_objects_vl o where o.object_id = i.object_id and ((:INSTANCE_SET_NAME is NULL) or ((:INSTANCE_SET_NAME is not NULL) AND (i.instance_set_name like :INSTANCE_SET_NAME))) and ((:INS_OBJ_NAME is NULL) or ((:INS_OBJ_NAME is not NULL) AND (o.obj_name like :INS_OBJ_NAME))) " DOWNLOAD GRANT " select rawtohex(g.grant_guid) grant_guid, g.grantee_type, decode(g.grantee_type, 'GLOBAL', 'GLOBAL', g.grantee_key), m.menu_name, to_char(g.start_date, 'YYYY/MM/DD') start_date, to_char(g.end_date, 'YYYY/MM/DD') end_date, decode(g.object_id, -1, 'GLOBAL', o.obj_name), g.instance_type, i.instance_set_name, g.instance_pk1_value, g.instance_pk2_value, g.instance_pk3_value, g.instance_pk4_value, g.instance_pk5_value, g.parameter1, g.parameter2, g.parameter3, g.parameter4, g.parameter5, g.parameter6, g.parameter7, g.parameter8, g.parameter9, g.parameter10, decode (g.ctx_secgrp_id, -1, '*GLOBAL*', secgrps.security_group_key) ctx_security_group_key, decode (g.ctx_resp_id, -1, '*GLOBAL*', resp.responsibility_key) ctx_resp_key, decode (g.ctx_resp_appl_id, -1, '*GLOBAL*', respapp.application_short_name) ctx_resp_app_short_name, decode (g.ctx_org_id, -1, '*GLOBAL*', g.ctx_org_id) ctx_organization, g.program_name, g.program_tag, to_char(g.last_update_date, 'YYYY/MM/DD') last_update_date,

g.name, g.description, fnd_load_util.owner_name(g.LAST_UPDATED_BY) OWNER from fnd_object_instance_sets_vl i, fnd_objects_vl o, fnd_menus_vl m, fnd_grants g, fnd_security_groups secgrps, fnd_responsibility resp, fnd_application respapp where g.object_id = o.object_id (+) and g.ctx_secgrp_id = secgrps.security_group_id (+) and g.ctx_resp_id = resp.responsibility_id (+) and g.ctx_resp_appl_id = resp.application_id (+) and g.ctx_resp_appl_id = respapp.application_id (+) and g.instance_set_id = i.instance_set_id (+) and g.menu_id = m.menu_id and ((:GNT_MENU_NAME is NULL) or ((:GNT_MENU_NAME is not NULL) AND (m.menu_name like :GNT_MENU_NAME))) and ((:GNT_GRANTEE_KEY is NULL) or ((:GNT_GRANTEE_KEY is not NULL) AND (g.grantee_key like :GNT_GRANTEE_KEY))) and ((:GNT_GRANTEE_TYPE is NULL) or ((:GNT_GRANTEE_TYPE is not NULL) AND (g.grantee_type like :GNT_GRANTEE_TYPE))) and ((:GNT_INSTANCE_PK1_VALUE is NULL) or ((:GNT_INSTANCE_PK1_VALUE is not NULL) AND (g.instance_pk1_value like :GNT_INSTANCE_PK1_VALUE))) and ((:GNT_INSTANCE_PK2_VALUE is NULL) or ((:GNT_INSTANCE_PK2_VALUE is not NULL) AND (g.instance_pk2_value like :GNT_INSTANCE_PK2_VALUE))) and ((:GNT_INSTANCE_PK3_VALUE is NULL) or ((:GNT_INSTANCE_PK3_VALUE is not NULL) AND (g.instance_pk3_value like :GNT_INSTANCE_PK3_VALUE))) and ((:GNT_INSTANCE_PK4_VALUE is NULL) or ((:GNT_INSTANCE_PK4_VALUE is not NULL) AND (g.instance_pk4_value like :GNT_INSTANCE_PK4_VALUE))) and ((:GNT_INSTANCE_PK5_VALUE is NULL) or ((:GNT_INSTANCE_PK5_VALUE is not NULL) AND (g.instance_pk5_value like :GNT_INSTANCE_PK5_VALUE))) and ((:GNT_PARAMETER1 is NULL) or ((:GNT_PARAMETER1 is not NULL) AND (g.parameter1 like :GNT_PARAMETER1))) and ((:GNT_PARAMETER2 is NULL) or ((:GNT_PARAMETER2 is not NULL) AND (g.parameter2 like :GNT_PARAMETER2))) and ((:GNT_PARAMETER3 is NULL) or ((:GNT_PARAMETER3 is not NULL) AND (g.parameter3 like :GNT_PARAMETER3))) and ((:GNT_PARAMETER4 is NULL) or ((:GNT_PARAMETER4 is not NULL) AND (g.parameter4 like :GNT_PARAMETER4))) and ((:GNT_PARAMETER5 is NULL) or ((:GNT_PARAMETER5 is not NULL) AND (g.parameter5 like :GNT_PARAMETER5))) and ((:GNT_ISN is NULL) or ((:GNT_ISN is not NULL) AND (i.instance_set_name like :GNT_ISN))) and ((:GNT_OBJ_NAME is NULL) or

and and and and "

((:GNT_OBJ_NAME is not NULL) AND (o.obj_name like :GNT_OBJ_NAME)) or ((:GNT_OBJ_NAME = 'GLOBAL') AND (g.object_id = -1))) ((:GNT_GUID is NULL) or ((:GNT_GUID is not NULL) AND (g.grant_guid like :GNT_GUID))) ((:GNT_NAME is NULL) or ((:GNT_NAME is not NULL) AND (g.name like :GNT_NAME))) ((:PROGRAM_NAME is NULL) or ((:PROGRAM_NAME is not NULL) AND (g.program_name like :PROGRAM_NAME))) ((:PROGRAM_TAG is NULL) or ((:PROGRAM_TAG is not NULL) AND (g.program_tag like :PROGRAM_TAG)))

UPLOAD FORM " begin declare app_id number := 0; frm_id number := 0; begin if (:UPLOAD_MODE = 'NLS') then select application_id into app_id from fnd_application where application_short_name = :APPLICATION_SHORT_NAME; select form_id into frm_id from fnd_form where form_name = :FORM_NAME and application_id = app_id; fnd_form_pkg.TRANSLATE_ROW( x_application_id => app_id, x_form_id => frm_id, x_user_form_name => :USER_FORM_NAME, x_description => :DESCRIPTION, x_owner => :OWNER, x_custom_mode => :CUSTOM_MODE, x_last_update_date => :LAST_UPDATE_DATE); else fnd_form_pkg.LOAD_ROW( x_application_short_name => :APPLICATION_SHORT_NAME, x_form_name => :FORM_NAME, x_audit_enabled_flag => :AUDIT_ENABLED_FLAG, x_user_form_name => :USER_FORM_NAME, x_description => :DESCRIPTION, x_owner => :OWNER, x_custom_mode => :CUSTOM_MODE, x_last_update_date => :LAST_UPDATE_DATE); end if; end; end; " UPLOAD FUNCTION " begin declare

func_id number := 0; v_object varchar2(430); --bug5882694 increased to 430 v_application varchar2(50); begin if (:UPLOAD_MODE = 'NLS') then select function_id into func_id from fnd_form_functions_vl where function_name = :FUNCTION_NAME; fnd_form_functions_pkg.TRANSLATE_ROW( x_function_id => func_id, x_user_function_name => :USER_FUNCTION_NAME, x_description => :DESCRIPTION, x_owner => :OWNER, x_custom_mode => :CUSTOM_MODE, x_last_update_date => :LAST_UPDATE_DATE); else if (:REGION_APPLICATION_SHORT_NAME is NOT NULL) then v_application := :REGION_APPLICATION_SHORT_NAME; elsif (:REGION_APPLICATION_NAME is NOT NULL) then v_application := :REGION_APPLICATION_NAME; end if; if (:FUNC_OBJECT_OBJ_NAME is NOT NULL) then v_object := :FUNC_OBJECT_OBJ_NAME; else if (:OBJECT_NAME_OBJ_NAME is NOT NULL) then v_object := :OBJECT_NAME_OBJ_NAME; end if; end if; fnd_form_functions_pkg.LOAD_ROW( x_function_name => :FUNCTION_NAME, x_application_short_name => :FORM_APPLICATION_SHORT_NAME, x_form_name => :FORM_FORM_NAME, x_parameters => :PARAMETERS, x_type => :TYPE, x_web_host_name => :WEB_HOST_NAME, x_web_agent_name => :WEB_AGENT_NAME, x_web_html_call => :WEB_HTML_CALL, x_web_encrypt_parameters => :WEB_ENCRYPT_PARAMETERS, x_web_secured => :WEB_SECURED, x_web_icon => :WEB_ICON, x_object_name => v_object, x_region_application_name => v_application, x_region_code => :REGION_CODE, x_user_function_name => :USER_FUNCTION_NAME, x_description => :DESCRIPTION, x_owner => :OWNER, x_custom_mode => :CUSTOM_MODE, x_last_update_date => :LAST_UPDATE_DATE, x_maintenance_mode_support => :MAINTENANCE_MODE_SUPPORT, x_context_dependence => :CONTEXT_DEPENDENCE, x_jrad_ref_path => :JRAD_REF_PATH); end if; end; end; " UPLOAD MENU

BEGIN " begin declare mnu_id begin

number := 0;

if (:UPLOAD_MODE = 'NLS') then if(:MENU_NAME is not NULL) then select menu_id into mnu_id from fnd_menus where menu_name = :MENU_NAME; else mnu_id := NULL; end if; fnd_menus_pkg.TRANSLATE_ROW( x_menu_id => mnu_id, x_user_menu_name => :USER_MENU_NAME, x_description => :DESCRIPTION, x_owner => :OWNER, x_custom_mode => :CUSTOM_MODE, x_last_update_date => :LAST_UPDATE_DATE); else fnd_menus_pkg.SET_NEW_MENU; fnd_menus_pkg.LOAD_ROW( x_menu_name x_menu_type x_user_menu_name x_description x_owner x_custom_mode x_last_update_date => => => => => => => :MENU_NAME, :TYPE, :USER_MENU_NAME, :DESCRIPTION, :OWNER, :CUSTOM_MODE, :LAST_UPDATE_DATE);

if (:UPLOAD_MODE = 'REPLACE' and :CUSTOM_MODE = 'FORCE') then delete from fnd_menu_entries_tl where menu_id = (select menu_id from fnd_menus where menu_name = :MENU_NAME); delete from fnd_menu_entries where menu_id = (select menu_id from fnd_menus where menu_name = :MENU_NAME); end if; end if; end; end; " END " declare request_status varchar2(30); begin /* Submit a request if one hasn't already been submitted to compile*/ /* the menu entries that were uploaded in this menu */ request_status := FND_MENU_ENTRIES_PKG.SUBMIT_COMPILE; end; " UPLOAD ENTRY " begin declare func_id number := 0;

mnu_id number := 0; sub_mnu_id number := 0; l_sub_menu_name varchar2(4000); l_function_name varchar2(4000); begin if (:UPLOAD_MODE = 'NLS') then select decode(:SUBMENU_MENU_NAME, fnd_load_util.null_value, null, null, :SUBMENU_MENU_NAME, :SUBMENU_MENU_NAME) into l_sub_menu_name from dual; select decode(:FUNCTION_FUNCTION_NAME, fnd_load_util.null_value, null, null, :FUNCTION_FUNCTION_NAME, :FUNCTION_FUNCTION_NAME) into l_function_name from dual; if(l_function_name is not NULL) then select function_id into func_id from fnd_form_functions where function_name = l_function_name; else func_id := NULL; end if; if(l_sub_menu_name is not NULL) then select menu_id into sub_mnu_id from fnd_menus where menu_name = l_sub_menu_name; else sub_mnu_id := NULL; end if; if(:MENU_NAME is not NULL) then select menu_id into mnu_id from fnd_menus where menu_name = :MENU_NAME; else mnu_id := NULL; end if; fnd_menu_entries_pkg.TRANSLATE_ROW( x_menu_id => mnu_id, x_sub_menu_id => sub_mnu_id, x_function_id => func_id, x_prompt => :PROMPT, x_description => :DESCRIPTION, x_owner => :OWNER, x_custom_mode => :CUSTOM_MODE, x_last_update_date => :LAST_UPDATE_DATE); else fnd_menu_entries_pkg.LOAD_ROW( x_mode => :UPLOAD_MODE, x_ent_sequence => to_char(fnd_menus_pkg.NEXT_ENTRY_SEQUENCE), x_menu_name => :MENU_NAME, x_sub_menu_name => :SUBMENU_MENU_NAME, x_function_name => :FUNCTION_FUNCTION_NAME, x_grant_flag => :GRANT_FLAG,

x_prompt x_description x_owner x_custom_mode x_last_update_date end if; end; end; "

=> => => => =>

:PROMPT, :DESCRIPTION, :OWNER, :CUSTOM_MODE, :LAST_UPDATE_DATE);

UPLOAD OBJECT " begin declare app_id number := 0; begin select application_id into app_id from fnd_application where application_short_name = :APPLICATION_SHORT_NAME; if (:UPLOAD_MODE = 'NLS') then fnd_objects_pkg.TRANSLATE_ROW( x_obj_name => :OBJ_NAME, x_owner => :OWNER, x_display_name => :DISPLAY_NAME, x_description => :DESCRIPTION, x_custom_mode => :CUSTOM_MODE, x_last_update_date => :LAST_UPDATE_DATE); else fnd_objects_pkg.load_row( x_obj_name => :OBJ_NAME, x_owner => :OWNER, x_pk1_column_name => :PK1_COLUMN_NAME, x_pk2_column_name => :PK2_COLUMN_NAME, x_pk3_column_name => :PK3_COLUMN_NAME, x_pk4_column_name => :PK4_COLUMN_NAME, x_pk5_column_name => :PK5_COLUMN_NAME, x_pk1_column_type => fnd_data_security.upgrade_column_type(:PK1_COLUMN_TYPE), x_pk2_column_type => fnd_data_security.upgrade_column_type(:PK2_COLUMN_TYPE), x_pk3_column_type => fnd_data_security.upgrade_column_type(:PK3_COLUMN_TYPE), x_pk4_column_type => fnd_data_security.upgrade_column_type(:PK4_COLUMN_TYPE), x_pk5_column_type => fnd_data_security.upgrade_column_type(:PK5_COLUMN_TYPE), x_application_short_name => :APPLICATION_SHORT_NAME, x_database_object_name => :DATABASE_OBJECT_NAME, x_display_name => :DISPLAY_NAME, x_description => :DESCRIPTION, x_custom_mode => :CUSTOM_MODE, x_last_update_date => :LAST_UPDATE_DATE); end if; end; end; " UPLOAD OBJECT_INSTANCE_SET " begin

declare app_id begin

number := 0;

if (:UPLOAD_MODE = 'NLS') then fnd_object_instance_sets_pkg.TRANSLATE_ROW( x_instance_set_name => :INSTANCE_SET_NAME, x_owner => :OWNER, x_display_name => :DISPLAY_NAME, x_description => :DESCRIPTION, x_custom_mode => :CUSTOM_MODE, x_last_update_date => :LAST_UPDATE_DATE); else fnd_object_instance_sets_pkg.load_row( x_instance_set_name => :instance_set_name, x_owner => :OWNER, x_object_name => :INS_OBJ_NAME_OBJ_NAME, x_predicate => fnd_data_security.upgrade_predicate(:PREDICATE), x_display_name => :DISPLAY_NAME, x_description => :DESCRIPTION, x_custom_mode => :CUSTOM_MODE, x_last_update_date => :LAST_UPDATE_DATE); end if; end; end; " UPLOAD GRANT " begin declare app_id number := 0; begin if (:UPLOAD_MODE = 'NLS') then null; /* There are no translated columns in NLS mode, so nothing*/ /* to do in NLS mode. */ else fnd_grants_pkg.load_row( x_grant_guid => :GRANT_GUID, x_grantee_type => :GRANTEE_TYPE, x_grantee_key => :GRANTEE_KEY, x_menu_name => :GNT_MENU_NAME_MENU_NAME, x_start_date => :START_DATE, x_end_date => :END_DATE, x_obj_name => :GNT_OBJ_NAME_OBJ_NAME, x_instance_type => :INSTANCE_TYPE, x_instance_set_name => :GNT_ISN_INSTANCE_SET_NAME, x_instance_pk1_value => :INSTANCE_PK1_VALUE, x_instance_pk2_value => :INSTANCE_PK2_VALUE, x_instance_pk3_value => :INSTANCE_PK3_VALUE, x_instance_pk4_value => :INSTANCE_PK4_VALUE, x_instance_pk5_value => :INSTANCE_PK5_VALUE, x_parameter1 => :PARAMETER1, x_parameter2 => :PARAMETER2, x_parameter3 => :PARAMETER3, x_parameter4 => :PARAMETER4, x_parameter5 => :PARAMETER5, x_parameter6 => :PARAMETER6, x_parameter7 => :PARAMETER7, x_parameter8 => :PARAMETER8, x_parameter9 => :PARAMETER9,

x_parameter10 => :PARAMETER10, x_ctx_security_group_key => :CTX_SECURITY_GROUP_KEY, x_ctx_resp_key => :CTX_RESP_KEY, x_ctx_resp_app_short_name => :CTX_RESP_APP_SHORT_NAME, x_ctx_organization => :CTX_ORGANIZATION, x_program_name => :PROGRAM_NAME, x_program_tag => :PROGRAM_TAG, x_owner => :OWNER, x_custom_mode => :CUSTOM_MODE, x_last_update_date => :LAST_UPDATE_DATE, x_name => :NAME, x_description => :DESCRIPTION); end if; end; end; "

You might also like