on 03-06-2009 11:41 AM
Hello Everyone,
We have got a requirement. When we include a custom iview in to ESS portal we want to get hold of the username of the user that has logged in and pas it on to an RFC.
I would appreciate your help.
Regards,
PG.
Hi,
IWDClientUser wdUser = WDClientUser.getCurrentUser();
IUser sapUser = wdUser.getSAPUser();
if (sapUser != null) {
IUserAccount[] acct = sapUser.getUserAccounts();
if (acct[0] != null) {
userId = acct[0].getLogonUid();
}
}
Hope it Helps
Regards,
Gayathri.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi PG
Use
String logonID = "";
try
{
IWDClientUser wdUser = null;
try
{
wdUser = WDClientUser.getCurrentUser();
}
catch (WDUMException e1)
{
// TODO Auto-generated catch block
e1.printStackTrace();
}
// hängt an security.api.jar
IUser user = wdUser.getSAPUser();
logonID = user.getUniqueName();
}
catch (Exception e)
{
msgMgr.reportException("Error: " + e.getMessage(), true);
e.printStackTrace();
}
Hope it help u
Best Regards
Satish Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello PG.
1.You want to hold the current logged-in username and pas it on to an RFC.
2. In your Development Component add com.sap.security.api.sda.dc now u will able to work with UserAPI's
3 logonID = user.getUniqueName(); will give u current logged-in user.
4. Pass it to Rfc which require this input to process.
Hope it help you
Best Regards
Satish Kumar
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.