Oracle EBS 复制用户职责

DECLARE
  l_new_user_name VARCHAR2(100) := ‘HAND_HYL‘;
  l_new_password  VARCHAR2(100) := ‘54321‘;
  l_new_user_id   NUMBER;

  l_user_name_copy_from VARCHAR2(100) := ‘SYSADMIN‘;

BEGIN
  -- Test statements here

  IF fnd_user_pkg.userExists(x_user_name => l_new_user_name) THEN
    NULL;
  ELSE
    fnd_user_pkg.CreateUser(x_user_name            => l_new_user_name,
                            x_unencrypted_password => l_new_password,
                            x_owner                => NULL);
  END IF;
  SELECT user_id INTO l_new_user_id FROM fnd_user fu WHERE fu.user_name = l_new_user_name;

  FOR rec IN (SELECT d.RESPONSIBILITY_ID
                    ,d.RESPONSIBILITY_APPLICATION_ID
                    ,d.START_DATE
                    ,d.END_DATE
              FROM   fnd_user_resp_groups_direct d
                    ,fnd_user u
              WHERE  d.user_id = u.user_id
                     AND u.user_name = l_user_name_copy_from
                     AND SYSDATE BETWEEN nvl(d.START_DATE, SYSDATE - 1) AND
                     nvl(d.END_DATE, SYSDATE + 1)) LOOP

    IF fnd_user_resp_groups_api.Assignment_Exists(user_id                       => l_new_user_id,
                                                  responsibility_id             => rec.responsibility_id,
                                                  responsibility_application_id => rec.responsibility_application_id) THEN
      NULL;
    ELSE
      fnd_user_resp_groups_api.Insert_Assignment(user_id                       => l_new_user_id,
                                                 responsibility_id             => rec.responsibility_id,
                                                 responsibility_application_id => rec.responsibility_application_id,
                                                 start_date                    => rec.START_DATE,
                                                 end_date                      => rec.END_DATE,
                                                 description                   => NULL);
    END IF;
  END LOOP;
END;

原文地址:https://www.cnblogs.com/jenrry/p/10006823.html

时间: 2024-11-06 22:41:29

Oracle EBS 复制用户职责的相关文章

EBS复制用户职责

DECLARE l_old_userName VARCHAR2(100):='CHENXISHENG_BP'; l_userName VARCHAR2(100):='SHH';--用户名需要大写 l_passWord VARCHAR2(240):='hand123';--密码需要数字和字母的组合 l_description VARCHAR2(240):='宋欢欢'; CURSOR cur_resps IS SELECT DISTINCT users.user_name, appl.applica

Oracle EBS 初始化用户密码

---修改密码,并且将限制用户下次登录的时候(第一次登录),强制要换一个新的口令: ---此过程可以完全模拟我们在标准用户的Form里面初始化用户的密码的动作! ---最后要说明的是,这个处理过程是通过研究标准创建用户的画面得出来的结果,所以,如果有需要,请放心使用! SELECT last_logon_date,password_date,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN FROM FND_USER WHERE USER_NAME = 'QWR01'; DE

Oracle EBS 初始化用户密码(转)

---修改密码,并且将限制用户下次登录的时候(第一次登录),强制要换一个新的口令: ---此过程可以完全模拟我们在标准用户的Form里面初始化用户的密码的动作! ---最后要说明的是,这个处理过程是通过研究标准创建用户的画面得出来的结果,所以,如果有需要,请放心使用! SELECT last_logon_date,password_date,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN FROM FND_USER WHERE USER_NAME = 'QWR01'; DE

Oracle EBS 提示XX对当前用户不可用--XX is not a valid responsibility for the current user

Oracle EBS 提示XX对当前用户为不可用职责--XX is not a valid responsibility for the current user 最近在EBS中添加新职责进行切换没问题,但是要进入相关职责的Form或Web页面则会碰到如图的难题.解决方法是这样的. 1. 进入Functional Administrator职责. 2. 选择Core Services->Caching Framework->Global Configuration. 3. 分别Clear Al

Oracle EBS-SQL (SYS-1): sysadmin_用户职责查询.sql

select fu.user_name 用户名, fu.description 用户说明, frv.RESPONSIBILITY_NAME 职责名称, REQUEST_GROUP_NAME 报表组, (select  ppf.FULL_NAME from apps.per_people_f  ppf where fu.employee_id = ppf.PERSON_ID and trunc(sysdate)  between  trunc(ppf.EFFECTIVE_START_DATE) a

Oracle EBS-SQL (SYS-6):sys_在线用户职责查询2.sql

SELECT FSAV.USER_NAME,FU.DESCRIPTION,FSAV.RESPONSIBILITY_NAME,FSAV.USER_FORM_NAME,FSAV.LOGIN_NAME,FSAV.TIME,FSAV.PID,FSAV.TERMINAL_ID,FSAV.USER_ID,FSAV.RESP_APPL_ID,FSAV.RESPONSIBILITY_ID,FSAV.FORM_ID,FSAV.FORM_APPL_ID FROM FND_SIGNON_AUDIT_VIEW FSAV

Oracle EBS FND User Info API (转) EBS用户账号密码职责相关

1. 与用户信息相关API PKG. --和用户处理有关的API FND_USER_PKG; --和用户密码处理有关的API FND_WEB_SEC; --和用户职责处理有关的API FND_USER_RESP_GROUPS_API; 2. 激活失效用户帐号. ----------------------------- ---处理实例 ----------------------------- SELECT * FROM FND_USER WHERE USER_NAME = 'QWR01'; -

EBS 用户职责 不显示

两种情况: 1.用户添加职责后,在FORM页面的职责列表无法看到 首先,系统管理员职责运行[同步 WF 局部表](Synchronize WF LOCAL tables)以及[工作流目录服务用户/职责验证](Workflow Directory Services User/Role Validation). 其次,检查Wf_Local_User_Roles.User_Name = '用户名'的相关职责起始日期. Select r.Application_Id,        r.Responsi

(Oracle EBS)和标准用户有关的处理的API [Z]

/* 和标准用户有关的处理的API. */ ---和用户处理有关的API FND_USER_PKG ---和用户密码处理有关的API fnd_web_sec ---和用户职责处理有关的API FND_USER_RESP_GROUPS_API ----------------------------- ---处理实例 ----------------------------- SELECT * FROM FND_USER WHERE USER_NAME = 'WX214492' ---更新用户,将