Home » Applications » Oracle Fusion Apps & E-Business Suite » Adding created_by in the user creation script
icon4.gif  Adding created_by in the user creation script [message #584424] Tue, 14 May 2013 05:17 Go to next message
Kirthana
Messages: 2
Registered: February 2011
Location: India
Junior Member
Hi everybody,
I have written a small script to add user to FND_USER table.

DECLARE
v_user_name VARCHAR2 (30) := UPPER ('mario5');
v_password VARCHAR2 (30) := 'ebspro';
v_session_id NUMBER := USERENV ('sessionid');
v_email VARCHAR2 (30) := UPPER ('oracle.pro@gmail.com');
BEGIN
FND_USER_PKG.createuser (x_user_name => v_user_name,
x_owner => NULL,
x_unencrypted_password => v_password,
x_session_number => v_session_id,
x_start_date => SYSDATE,
x_end_date => NULL,
x_email_address => v_email
);
COMMIT;
DBMS_OUTPUT.put_line ('Success');
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.put_line ('Failed'|| SUBSTR (SQLERRM, 1, 100));
ROLLBACK;
END;
But I want to add created_by field with value as 1 but I'm not able to do add it in the above script as it gives an error PLS-00306: wrong number or types of arguments in call to 'CREATEUSER'
This is what I tried.I declared it add passed it in the function ( v_created_by number := fnd_profile.VALUE ('USER_ID')

How else can I add that attribute? Please help me get past this issue.

Regards,
Kirthana
Re: Adding created_by in the user creation script [message #584613 is a reply to message #584424] Thu, 16 May 2013 04:11 Go to previous messageGo to next message
vamsi kasina
Messages: 2096
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
There is no parameter for created by separately.
Check the code in the package FND_USER_PKG.
owner itself is being taken as the created_by.
Pass AUTOINSTALL (In fnd_user, user_name is AUTOINSTALL for user_id 1) to x_owner and check.

By
Vamsi
Re: Adding created_by in the user creation script [message #585608 is a reply to message #584424] Tue, 28 May 2013 05:37 Go to previous message
a_kamalraj
Messages: 18
Registered: May 2013
Location: Bangalore
Junior Member

Hi ,

Below is the package procedure specification....

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);

there is no parameter called created_by in this....

Cheers
Kamal(kamal.love@gmail.com)
Previous Topic: Cloning Problem
Next Topic: Item_Type_Code in Orderline table
Goto Forum:
  


Current Time: Thu Dec 25 04:12:31 CST 2014

Total time taken to generate the page: 0.09223 seconds