Adding created_by in the user creation script [message #584424] |
Tue, 14 May 2013 05:17 |
|
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 #585608 is a reply to message #584424] |
Tue, 28 May 2013 05:37 |
|
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)
|
|
|