Wednesday, 8 April 2020

How to create user in oracle apps from backend

How to create user in oracle apps from backend

In this post , We will be discuss about how to create user in oracle apps from backend. I will share the Oracle Standard API to create the users in oracle apps from backend. This is one of the Standard API provided by oracle to mass create the users in oracle apps. I will share the complete PLSQL script which helps to create user in oracle apps from backend. This helps to create the mass users in oracle apps from backend. Here below is the detail about how to create user in oracle apps from backend.

How to create user in oracle apps from backend

2 Important API to create user in oracle apps from backend

1.fnd_user_pkg.createuser
2.fnd_user_pkg.addresp

Detail PLSQL Script to create user in oracle apps from backend

Declare 
   v_user_name varchar2(30) :='XX_USER';   -- User Name  
   v_password  varchar2(30) :='TEST123';  -- Password 
   cursor create_responsibilities 
   is 
     select resp.responsibility_key 
           ,resp.responsibility_name 
           ,app.application_short_name       
     from  fnd_responsibility_vl resp 
          ,fnd_application       app 
     where resp.application_id = app.application_id  
     and   resp.responsibility_name in ( 'Application Developer' ) ; 
 begin 
   fnd_user_pkg.createuser ( 
           x_user_name             => upper(v_user_name) 
          ,x_owner                 => null 
          ,x_unencrypted_password  => v_password 
          ,x_session_number        => userenv('sessionid') 
          ,x_start_date            => sysdate 
          ,x_end_date              => null ); 
   dbms_output.put_line ('User '||v_user_name||' created !!!!!'); 
   for get_resp in create_responsibilities  
   loop 
     fnd_user_pkg.addresp (
                username        => v_user_name 
               ,resp_app        => get_resp.application_short_name 
               ,resp_key        => get_resp.responsibility_key 
               ,security_group  => 'STANDARD' 
               ,description     => null 
               ,start_date      => sysdate 
               ,end_date        => null); 
     dbms_output.put_line('Responsibility '||get_resp.responsibility_name||' added !!!!!!');   
   end loop; 
   commit; 
 exception 
   when others then 
   dbms_output.put_line ('Exception : '||SUBSTR(SQLERRM, 1, 500)); 
   rollback; 
 end;

How to create user in oracle apps from backend
How to create user in oracle apps from backend

0 comments:

Post a Comment

Contact us for any Collaboration, Project Support & On Job Support Work

Name

Email *

Message *