Wednesday, 2 January 2019

How to Create FND_USER and Assign Responsibility to the User in Oracle Apps EBS using API - fnd_user_pkg.createuser



How to Create FND_USER and Assign Responsibility to the User in Oracle Apps EBS using API -  fnd_user_pkg.createuser



-------------------------------------------------------------------
-- API to CREATE FND User with Responsibility in Oracle Apps EBS --
-------------------------------------------------------------------
DECLARE

  -- v_session_id INTEGER := userenv('sessionid');
  v_user_name       VARCHAR2(30) := upper('&Enter_User_Name');
  v_user_password   VARCHAR2(30) := '&Enter_Password';
BEGIN
  --Note, can be executed only when you have apps password.
  -- Call the procedure to Creaet FND User
  fnd_user_pkg.createuser(
     x_user_name                        => v_user_name
    ,x_owner                            => ''
    ,x_unencrypted_password             => v_user_password
 --   ,x_session_number                   => v_session_id
    ,x_start_date                       => SYSDATE - 10
    ,x_end_date                         => NULL -- SYSDATE + 1000
    ,x_last_logon_date                  => SYSDATE - 10
    ,x_description                      => 'danishhalim.blogspot.com'
    ,x_password_date                    => SYSDATE - 10
    ,x_password_accesses_left           => NULL
    ,x_password_lifespan_accesses       => NULL
    ,x_password_lifespan_days           => NULL
   -- ,x_employee_id                      => 10001 /*Change this id by running below SQL*/
    ,x_email_address                    => 'heavendanish@gmail.com'
    ,x_fax                              => ''
    ,x_customer_id                      => ''
    ,x_supplier_id                      => ''
    );
  fnd_user_pkg.addresp(username       => v_user_name
                      ,resp_app       => 'SYSADMIN'
                      ,resp_key       => 'SYSTEM_ADMINISTRATOR'
                      ,security_group => 'STANDARD'
                      ,description    => 'Auto Assignment'
                      ,start_date     => SYSDATE - 10
                      ,end_date       => NULL --SYSDATE + 1000
                      );
END;

Commit;

SELECT * FROM FND_USER WHERE USER_NAME LIKE '%XX%' 








No comments:

Post a Comment

How to change Employee Number Generation from Manual to Automatic in Oracle HRMS (When attempting to apply for a job in iRecruitment)

When attempting to apply for a job in iRecruitment, the following error occurs: ERROR: You must enter an Application Number. Solution: How t...