黄智勇 发表于 2015-9-23 09:53:50

How to modify Responsibility key in Oracle EBS(Application)

  From Oracle Application 11.5.10.CU2,responsibility key have below restrictions for security reasons.
1.Without any spaces in the responsibility key
2.Without special NLS characters.
  So,How to modify Responsibility's key of an existed responsibility
  Using API:
  declare
l_resp_key fnd_responsibility_vl.responsibility_key%type;
cursor c_responsibility is
select * from
FND_RESPONSIBILITY_vl
where responsibility_key = '&OLD_RESPONSIBILITY_KEY' --Old Resp key;
begin
l_resp_key := '&NEW_RESPONSIBILITY_KEY'--New Resp key;
FOR r_responsibility in c_responsibility loop
FND_RESPONSIBILITY_PKG.UPDATE_ROW(
   X_RESPONSIBILITY_ID => r_responsibility.RESPONSIBILITY_ID,
   X_APPLICATION_ID => r_responsibility.APPLICATION_ID,
   X_WEB_HOST_NAME => r_responsibility.WEB_HOST_NAME,
   X_WEB_AGENT_NAME => r_responsibility.WEB_AGENT_NAME,
   X_DATA_GROUP_APPLICATION_ID => r_responsibility.DATA_GROUP_APPLICATION_ID,
   X_DATA_GROUP_ID => r_responsibility.DATA_GROUP_ID,
   X_MENU_ID => r_responsibility.MENU_ID,
   X_START_DATE => r_responsibility.START_DATE,
   X_END_DATE => r_responsibility.END_DATE,
   X_GROUP_APPLICATION_ID => r_responsibility.GROUP_APPLICATION_ID,
   X_REQUEST_GROUP_ID => r_responsibility.REQUEST_GROUP_ID,
   X_VERSION => r_responsibility.VERSION,
   X_RESPONSIBILITY_KEY => l_resp_key,
   X_RESPONSIBILITY_NAME => r_responsibility.RESPONSIBILITY_NAME,
   X_DESCRIPTION => r_responsibility.DESCRIPTION,
   X_LAST_UPDATE_DATE => r_responsibility.LAST_UPDATE_DATE,
   X_LAST_UPDATED_BY => r_responsibility.LAST_UPDATED_BY,
   X_LAST_UPDATE_LOGIN => r_responsibility.LAST_UPDATE_LOGIN);
end loop;
commit;
exception
when others then
dbms_output.put_line(sqlerrm(sqlcode));
end;
/
  Related Tables:
  select * from FND_RESPONSIBILITY
select * from FND_RESPONSIBILITY_TL
select * from WF_LOCAL_ROLES
select * from WF_LOCAL_USER_ROLES
select * from WF_USER_ROLE_ASSIGNMENTS
select * from WF_ROLE_HIERARCHIES
select * from WF_USER_ROLE_ASSIGNMENTS
select * from WF_ITEMS
select * from WF_ITEM_ACTIVITY_STATUSES
select * from WF_ITEM_ACTIVITY_STATUSES_H
select * from WF_NOTIFICATIONS
select * from WF_PROCESS_ACTIVITIES
select * from WF_ROUTING_RULES
select * from WF_COMMENTS
  Related Event:
  oracle.apps.fnd.resp.update
  select * from WF_ACTIVE_SUBSCRIPTIONS_V where event_name='oracle.apps.fnd.resp.update'
  Define of WF_ACTIVE_SUBSCRIPTIONS_V
  SELECT evt.name EVENT_NAME,
      DECODE(evt.generate_function,
             NULL,
             DECODE(evt.JAVA_GENERATE_FUNC,
                    NULL,
                    NULL,
                    'java://' || evt.JAVA_GENERATE_FUNC),
             evt.generate_function) GENERATE_FUNCTION,
      sub.system_guid SYSTEM_GUID,
      sub.guid SUBSCRIPTION_GUID,
      sub.source_type SUBSCRIPTION_SOURCE_TYPE,
      sub.source_agent_guid SUBSCRIPTION_SOURCE_AGENT_GUID,
      NVL(sub.phase, 0) SUBSCRIPTION_PHASE,
      sub.rule_data SUBSCRIPTION_RULE_DATA,
      sub.out_agent_guid SUBSCRIPTION_OUT_AGENT_GUID,
      sub.to_agent_guid SUBSCRIPTION_TO_AGENT_GUID,
      sub.priority SUBSCRIPTION_PRIORITY,
      DECODE(sub.rule_function,
             NULL,
             DECODE(sub.JAVA_RULE_FUNC,
                    NULL,
                    NULL,
                    'java://' || sub.JAVA_RULE_FUNC),
             sub.rule_function) SUBSCRIPTION_RULE_FUNCTION,
      sub.wf_process_type WF_PROCESS_TYPE,
      sub.wf_process_name WF_PROCESS_NAME,
      sub.parameters SUBSCRIPTION_PARAMETERS,
      sub.ON_ERROR_CODE SUBSCRIPTION_ON_ERROR_TYPE
FROM wf_event_subscriptions sub, wf_events evt
WHERE sub.status = 'ENABLED'
  AND sub.licensed_flag = 'Y'
  AND sub.event_filter_guid = evt.guid
  AND evt.type = 'EVENT'
  AND evt.status = 'ENABLED'
  AND evt.licensed_flag = 'Y'
  UNION ALL
  (SELECT evt.name EVENT_NAME,
                 DECODE(evt.generate_function,
                        NULL,
                        DECODE(evt.JAVA_GENERATE_FUNC,
                               NULL,
                               NULL,
                               'java://' || evt.JAVA_GENERATE_FUNC),
                        evt.generate_function) GENERATE_FUNCTION,
                 sub.system_guid SYSTEM_GUID,
                 sub.guid SUBSCRIPTION_GUID,
                 sub.source_type SUBSCRIPTION_SOURCE_TYPE,
                 sub.source_agent_guid SUBSCRIPTION_SOURCE_AGENT_GUID,
                 NVL(sub.phase, 0) SUBSCRIPTION_PHASE,
                 sub.rule_data SUBSCRIPTION_RULE_DATA,
                 sub.out_agent_guid SUBSCRIPTION_OUT_AGENT_GUID,
                 sub.to_agent_guid SUBSCRIPTION_TO_AGENT_GUID,
                 sub.priority SUBSCRIPTION_PRIORITY,
                 DECODE(sub.rule_function,
                        NULL,
                        DECODE(sub.JAVA_RULE_FUNC,
                               NULL,
                               NULL,
                               'java://' || sub.JAVA_RULE_FUNC),
                        sub.rule_function) SUBSCRIPTION_RULE_FUNCTION,
                 sub.wf_process_type WF_PROCESS_TYPE,
                 sub.wf_process_name WF_PROCESS_NAME,
                 sub.parameters SUBSCRIPTION_PARAMETERS,
                 sub.ON_ERROR_CODE SUBSCRIPTION_ON_ERROR_TYPE
            FROM wf_event_subscriptions sub,
                 wf_event_groups       egrp,
                 wf_events             grp,
                 wf_events             evt
           WHERE sub.status = 'ENABLED'
             AND sub.licensed_flag = 'Y'
             AND grp.guid = sub.event_filter_guid
             AND grp.type = 'GROUP'
             AND grp.status = 'ENABLED'
             AND egrp.group_guid = grp.guid
             AND egrp.member_guid = evt.guid
             AND evt.type = 'EVENT'
             AND evt.status = 'ENABLED'
             AND evt.licensed_flag = 'Y')
ORDER BY 7;
  -EOF-
页: [1]
查看完整版本: How to modify Responsibility key in Oracle EBS(Application)