Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Get Portal LoggedIn User ID

Hi,

I want to get the portal logged in user ID using webdynpro Java. I am using the following code , but ! getting the exception "Unhandled UME Exception" when we writing itself.( not runtime ).

try
	           {
		IWDClientUser wdUser = WDClientUser.getCurrentUser();
                                 IUser user = wdUser.getSAPUser();
		wdComponentAPI.getMessageManager().reportSuccess(""+user);
	            }
	        catch(UnknownError e)
		{
		   wdComponentAPI.getMessageManager().reportSuccess("hello");
		}

Can u tell me how to solve this issue ?

thanks

Jyothi.

Former Member
Former Member replied

Hi,

try this,

try {

IWDClientUser user = WDClientUser.getCurrentUser();

userid = user.getSAPUser().getUniqueName();

} catch (WDUMException e) {

e.printStackTrace();

}

i hope you added the security jar to javabuild path.

Regards,

ramesh

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question