on 10-08-2007 6:05 AM
dear all, i use the following codes to retrive the system username
IWDClientUser wduser = WDClientUser.getCurrentUser();
IUser user=wduser.getSAPUser();
String username = user.getUniqueName();
i already add the required com.sap.security.api.jar into the project path.
but stil i get the error said unhandled exception type WDUMExeption,i got the red underlined at WDClientUser.getCurrentUser();
any idea? or any other way to retrive the username in sap? thank you
HI
Try the following Code
IUser currentUser = null;
try {
currentUser = WDClientUser.getCurrentUser().getSAPUser();
WDClientUser.getCurrentUser().getSAPUser();
} catch (WDUMException e1) {
e1.printStackTrace();
}
Regards
Chaitanya.A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Joan,
<b>try
{
IWDClientUser wduser = WDClientUser.getCurrentUser();
IUser user=wduser.getSAPUser();
String username = user.getUniqueName();
}
catch(Exception e)
{
}</b>
Put the code in try catch block as the getCurrentUser method throws WDUMExeption and needs to be handled in the calling function.
Regards,
Murtuza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.