on 10-30-2006 7:12 PM
Hi
I am developing application using webdynpro java.after that i will integrate webdynpro application in portal.But portal UME is configured to R/3 System.When the user logs on to portal,i need to capture that user info. in my webdynpro application.and another functionality i supposed to do is some of webdynpro application content should be shown to perticular user group.Since portal UME is configured to R/3 ,how to implement this senario?I am new to this webdynpro java.can anybody suggest how much time it takes to implement this.Please help me
Thanks
Prasad
Prasad,
Use the following code:
String userid = null;
//Extracting the Portal User ID.
try {
IWDClientUser user = WDClientUser.getCurrentUser();
if (user.isAnonymousUser()) {
} else {
userid = WDClientUser.getCurrentUser().getSAPUser
().getUniqueName();
wdContext.currentContextElement().setUserID(userid.toUpperCase());
}
} catch (WDUMException ex){
msgMgr.reportException(ex.getMessage(), false);
}
Thanks,
Raj.
Message was edited by: Raj
Message was edited by: Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can get the Portal Login User and roles assigned to the user by using the following code:
Portal User:
IWDClientUser wdUser = WDClientUser.forceLoggedInClientUser();
IUser user = wdUser.getSAPUser();
String Username = user.getUniqueName();
Roles:
Iterator itr = user.getRoles(true);
IRoleFactory rfact = UMFactory.getRoleFactory();
while (itr.hasNext()) {
String roleName = (String) itr.next();
IRole role = null;
try {
role = rfact.getRole(roleName);
wdComponentAPI.getMessageManager().reportSuccess("Role:" +
roleName
+ "Display Name:" + role.getDisplayName()
+ "ID: " + role.getUniqueID()
+ "Uniquename: " + role.getUniqueName()
+ "Description: " + role.getDescription());
} catch (UMException e) {
wdComponentAPI.getMessageManager.reportException("error: " + e.getLocalizedMessage(),true);
}
}
Depending on the role you can perform the required action.
Regards,
Jhansi
null
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.