Translate

Thursday, January 2, 2014

FND USER CREATION API SCRIPT

Oracle provides below API to create FND User.

/*procedure FND_USER_PKG.CreateUser (
  x_user_name                  in varchar2,
  x_owner                      in varchar2,
  x_unencrypted_password       in varchar2 default null,
  x_session_number             in number default 0,
  x_start_date                 in date default sysdate,
  x_end_date                   in date default null,
  x_last_logon_date            in date default null,
  x_description                in varchar2 default null,
  x_password_date              in date default null,
  x_password_accesses_left     in number default null,
  x_password_lifespan_accesses in number default null,
  x_password_lifespan_days     in number default null,
  x_employee_id                in number default null,
  x_email_address              in varchar2 default null,
  x_fax                        in varchar2 default null,
  x_customer_id                in number default null,
  x_supplier_id                in number default null)
*/

Below is an example of the above seeded API. You may add/remove parameters based on your requirement.  

DECLARE
   l_user_name             VARCHAR2(100)  := 'TEST_FND_USER';
   l_user_password         VARCHAR2(100)  := 'welcome1';
   l_password_date         VARCHAR2(100)  := SYSDATE;
   l_password_lifespan_days    NUMBER     := 90;
   l_email_address         VARCHAR2(100) := 'test@default.com';

BEGIN
  FND_USER_PKG.CREATEUSER
  (  x_user_name            => l_user_name,
     x_owner                => NULL,
     x_unencrypted_password => l_user_password,
     x_password_date        => l_password_date,
     x_password_lifespan_days   => l_password_lifespan_days,
     x_email_address        => l_email_address
 );

 COMMIT;

 DBMS_OUTPUT.PUT_LINE('Apps User ' || l_user_name || ' has been successfully created');

EXCEPTION
       WHEN OTHERS THEN
           ROLLBACK;
           DBMS_OUTPUT.PUT_LINE(SQLERRM);
END;

1 comment:

  1. I'm  here to share my testimony of what a good trusted loan company did for me. My name is Nikita Tanya, from Russian and I’m a lovely mother of 3 kids I lost my funds on trying to get a loan it was so hard for me and my children, I went online to seek for a loan assistance  all hope was lost until one faithful day when I met this friend of mine who recently secured a loan from a very honest man Mr, Benjamin. She introduced me to this honest loan officer Mr, Benjamin  who helped me get a loan in within 5 working days, I will forever be grateful to Mr Benjamin, for helping me get back on feet again. You can contact Mr Benjamin via email: 247officedept@gmail.com    they do not know I’m doing this for them, but i just have to do it because a lot of people are out there who are in need of a loan assistance  please come to this honest man  and  you can be save as well .WhatsApp:(+1 989-394-3740)

    ReplyDelete