on 06-09-2005 1:06 PM
Hi,
I would like in my WebDynpro to retreive SAP User and Password corresponding to a Portal User.
should i use "IUserMappingService"?
Joseph
Hi Joseph,
U can IuserMapping Service
Check the code snipped below which might satisfy ur requirement.
IWDClientUser user1 = WDClientUser.forceLoggedInClientUser();
IUser user2 = user1.getSAPUser();
IUserMapping test = UMFactory.getUserMapping();
Map map=null;
try {
String name =test.getR3UserName(user2,"SAPLOGONTICKET",map,true);
wdComponentAPI.getMessageManager().reportSuccess("name"+name);
} catch (UMException e) {
// TODO Auto-generated catch block
wdComponentAPI.getMessageManager().reportSuccess(e.toString());
}
The second paramter in getR3UserName is logonmethod
It is either "SAPLOGONTICKET" or UIDPW based on ur usermapping logon method in portal.
Hope this helps
Regards,
Sowjanya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
We can find the jar file required in the path
drive:\Program Files\SAP\JDT\eclipse\plugins\com.sap.security\lib
com.sap.security.api.jar.
To get the user
IWDClientUser wdUser = WDClientUser.getCurrentUser();
IUser user = wdUser.getSAPUser();
if (user != null) { IUserAccount[] acct = user.getUserAccounts();
if(acct[0] != null)
{
strUserid = acct[0].getLogonUid();
}
}
strUserid will give the userID.
Is this ur requirement ?
Regards
Bharathwaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
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.