cancel
Showing results for 
Search instead for 
Did you mean: 

How to access R/3 UME in Webdynpro portal

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Raj

Thanks for sending answer.i had given points for u.can you suggest me where can i find more information on this

Thanks

Prasad

Former Member
0 Kudos

Prasad,

Send me your e-mail ID, I will send you one document which is useful. Moreover look at the libraries and APIs for further information.

/Raj.

Former Member
0 Kudos

Hi Raj

Can you send me document to potluritwins@yahoo.com .Please send me ASAP.Basically i am looking how to start and get concepts out of that.i will provide good points to you

Thanks

Prasad

Former Member
0 Kudos

Check your mail, I sent it.

Former Member
0 Kudos

Hi Raj,

Can you please send the same document to me at amit.kapoor@sap.com.

I need to access portal roles in my webdynpro application.

Regards

Amit

Answers (1)

Answers (1)

Former Member
0 Kudos

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