比如有一个外围支持系统,用户需要在外围系统登录之后点个link就可以登录到Oracle ERP系统中,那么我们需要先把外围系统的用户创建在Oracle ERP中,并且分配职责给他。
DECLARE
a BOOLEAN;
BEGIN
-------------------------------------------------------------
--Change password
-------------------------------------------------------------
/*
a := apps.fnd_user_pkg.changepassword('SIMON','oracle');
IF NOT a THEN
--RAISE_APPLICATION_ERROR(-20002, 'Password not updated');
dbms_output.put_line('Password not updated');
ELSE
dbms_output.put_line('***Password updated');
COMMIT;
END IF;
*/
-------------------------------------------------------------
--Create User
-------------------------------------------------------------
fnd_user_pkg.CreateUser('SIMON',
'SEED',
'PW4567'
);
-------------------------------------------------------------
--Add Resp
--select * from fnd_responsibility fr where fr.responsibility_id =
--select * from fnd_responsibility_tl frt where upper(frt.responsibility_name) like '%%'
--select * from fnd_application fa where fa.application_id =
--select * from fnd_security_groups fs
-------------------------------------------------------------
fnd_user_pkg.AddResp ('SIMON',
'SYSADMIN',
'SYSTEM_ADMINISTRATOR',
'STANDARD',
'Test API',
sysdate,
null
);
Commit;
End;
--使用下面代码可以在Link中直接登录Oracle ERP系统:
iSupport Login
method="post" name="Login" id="Login">
DECLARE
a BOOLEAN;
BEGIN
-------------------------------------------------------------
--Change password
-------------------------------------------------------------
/*
a := apps.fnd_user_pkg.changepassword('SIMON','oracle');
IF NOT a THEN
--RAISE_APPLICATION_ERROR(-20002, 'Password not updated');
dbms_output.put_line('Password not updated');
ELSE
dbms_output.put_line('***Password updated');
COMMIT;
END IF;
*/
-------------------------------------------------------------
--Create User
-------------------------------------------------------------
fnd_user_pkg.CreateUser('SIMON',
'SEED',
'PW4567'
);
-------------------------------------------------------------
--Add Resp
--select * from fnd_responsibility fr where fr.responsibility_id =
--select * from fnd_responsibility_tl frt where upper(frt.responsibility_name) like '%%'
--select * from fnd_application fa where fa.application_id =
--select * from fnd_security_groups fs
-------------------------------------------------------------
fnd_user_pkg.AddResp ('SIMON',
'SYSADMIN',
'SYSTEM_ADMINISTRATOR',
'STANDARD',
'Test API',
sysdate,
null
);
Commit;
End;
--使用下面代码可以在Link中直接登录Oracle ERP系统:
iSupport Login
method="post" name="Login" id="Login">
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11536986/viewspace-621523/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/11536986/viewspace-621523/