on 03-31-2009 5:59 AM
Hi,
I have used the following code to read the user who has logged into the portal. However my WDJ application fails to return the user name for one particular user. Any suggestions ?
IWDClientUser wdClientUser = WDClientUser.getCurrentUser();
IUser sapUser = wdClientUser.getSAPUser();
if (sapUser != null)
{
IUserAccount[] acct = sapUser.getUserAccounts();
if (acct[0] != null)
{
String strUserName = acct[0].getDisplayName();
strUserName=strUserName.toUpperCase();
userID = strUserName;
}
}
Hi
Try this
String logonID = "";
try
{
IWDClientUser wdUser = null;
try
{
wdUser = WDClientUser.getCurrentUser();
}
catch (WDUMException e1)
{
// TODO Auto-generated catch block
e1.printStackTrace();
}
IUser user = wdUser.getSAPUser();
logonID = user.getUniqueName();
}
catch (Exception e)
{
}
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.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.