DECLARE
l_user_id NUMBER;
l_user VARCHAR2 (100) := 'GIRIDHART'; --Username goes here..
BEGIN
Fnd_User_Pkg.CreateUser (l_user, 'CUST', 'welcome');
/* Validating the user*/
SELECT user_id
INTO l_user_id
FROM fnd_user
WHERE user_name = l_user;
Fnd_User_Resp_Groups_Api.Insert_Assignment (l_user_id,
20420, -- System Administrator responsibility
1,
0,
SYSDATE - 30,
NULL,
NULL);
COMMIT;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.PUT_LINE ('Error - ' || SUBSTR (SQLERRM, 1, 300));
END;
l_user_id NUMBER;
l_user VARCHAR2 (100) := 'GIRIDHART'; --Username goes here..
BEGIN
Fnd_User_Pkg.CreateUser (l_user, 'CUST', 'welcome');
/* Validating the user*/
SELECT user_id
INTO l_user_id
FROM fnd_user
WHERE user_name = l_user;
Fnd_User_Resp_Groups_Api.Insert_Assignment (l_user_id,
20420, -- System Administrator responsibility
1,
0,
SYSDATE - 30,
NULL,
NULL);
COMMIT;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.PUT_LINE ('Error - ' || SUBSTR (SQLERRM, 1, 300));
END;
No comments:
Post a Comment