cancel
Showing results for 
Search instead for 
Did you mean: 

Access UME from Webdynpro Application

Former Member
0 Kudos

Access UME from Webdynpro Application u2013 display the user attributes from Webdynpro iview

How to go for this...??

Edited by: saurav mago on Sep 1, 2008 6:45 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Please Refers the following Docs.

Fetching User Details from the Portal and Displaying it in Web Dynpro with Authentication in the Portal

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e039ce31-4156-2b10-1481-bdc3ff8c...

Protecting Access to the Web Dynpro Application Using UME Permissions

http://help.sap.com/saphelp_nw04/helpdata/en/f3/a64d401be96913e10000000a1550b0/frameset.htm

Integrating UME Permissions in the Web Dynpro Application - Steps

http://help.sap.com/saphelp_nw04/helpdata/en/d0/13214166abc059e10000000a155106/frameset.htm

Answers (3)

Answers (3)

Former Member
0 Kudos

Links mentioned were very useful

Former Member
0 Kudos

Hi

go through this thread:[;

[https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1789] [original link is broken] [original link is broken] [original link is broken];

check this doc also:[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/905cb568-ce15-2a10-0199-af0099da322e]

Regards,

Khushboo

Former Member
0 Kudos

Hello Saurav,

Try this:



import com.sap.security.api.IUser;
import com.sap.security.api.IUserAccount;
import com.sap.security.api.UMException;
import com.sap.tc.webdynpro.services.sal.um.api.IWDClientUser;
import com.sap.tc.webdynpro.services.sal.um.api.WDClientUser;
import com.sap.tc.webdynpro.services.sal.um.api.WDUMException;
	
try {
	IWDClientUser wdClientUser = WDClientUser.getCurrentUser();
	IUser sapUser = wdClientUser.getSAPUser();
		
	if (sapUser != null) {
			
		java.util.Iterator parentGroups = sapUser.getParentGroups(false);
		
		while (parentGroups.hasNext()) {
			String parentGroupName = (String) parentGroups.next();
			
			if (parentGroupName.equals("GRUP.R3_ROLE_DS.Z:EP_XPTO123")) {
				return true;
			}
		}
	}	
} 
catch (WDUMException e) {
	e.printStackTrace();
}

OBS.: sapUser can be used to access a lot of info regarding the user.

OBS.: you need to add a reference to "com.sap.security.api.sda", that is in the default SC SAP_JEE, if I well remember.

Regards,

Douglas Frankenberger