cancel
Showing results for 
Search instead for 
Did you mean: 

User in EP

Former Member
0 Kudos

How can I identify the user of Enterprise Portal from my Web dynpro application.I anybody knows, please give the code with packages to be imported

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi Fahad,

try this snippet of code...

IWDClientUser wdUser = WDClientUser.getCurrentUser();

IUser user = wdUser.getSAPUser();

if (user != null)

{

IUserAccount[] acct = user.getUserAccounts();

if(acct[0] != null)

{

String strUserid = acct[0].getLogonUid();

wdContext.current"EP_info_node"Element().set"EP_info_element"(new String(strUserid));

}

}

you will need to add external jar for this.

Within the properties of the project, choose Java build path -> Libraries -> Add external jars ->

com.sap.securities -> lib -> com.sap.security.api.

hope this helps.

Regards,

Abhishek.

Answers (3)

Answers (3)

former_member182372
Active Contributor
0 Kudos

Fahad, did you try to type "portal user" in "Forum Search" input field and press "Go" in a top section of forum page? It gives me about 1K result items.

Regards, Maksim Rashchynski.

Former Member
0 Kudos

Hi,

Check thread.

Regards,

Satyajit.

Former Member
0 Kudos

Hi,

Use this code to get crrent user logged in:

IWDClientUser clientUser = WDClientUser.getCurrentUser();

IUser user = clientUser.getSAPUser();

and to get all user

IWDClientUser[] clientUserArray = WDClientUser.getClientUsers();

import com.sap.tc.webdynpro.services.sal.um.api.WDClientUser;

Regards,

Rajeev

Message was edited by: Rajeev Ranjan