cancel
Showing results for 
Search instead for 
Did you mean: 

Loggen in Portal Users

Former Member
0 Kudos

Hi,

I want to list all the users who have logged into the portal using a webdynpro for Java application.

Please guide me with this.

I will deploy the Java application on the Portal and when it runs it needs to pick out all the users with active sessions in this Enterprise Portal and display it.

should be like SM04 in R/3 system.

Points coming your way.

Regards,

Abhishek

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

if you are working with ESS or MSS i have answer with me,

Cheers,

Apparao

Former Member
0 Kudos

Hi Apparao,

This is something like the activity report which used to be in Portal.Nothing to do with ESS & MSS.

An application which gives the current users in the portal.

Regards,

Abhishek

pravesh_verma
Active Contributor
0 Kudos

Hi Abhi,

1.You have to call com.sap.security.api.sda (Select the DC and right click --select component development --show in --component property --go to dependency -- add and find this dc )

2.Code for get all logged in user ensure that you have this package imported in your import statements:

com.sap.tc.webdynpro.services.sal.um.api.IWDClientUser;

This is the code:


import com.sap.tc.webdynpro.services.sal.um.api.WDClientUser;
 
IWDClientUser currentUsers[] = WDClientUser.getClientUsers();
 
//Displaying the count of logged on users
wdComponentAPI.getMessageManager().reportSuccess("Number of logged on Users in the portal"+currentUsers.length);
 
for(int i = 0; i < currentUsers.length; i++)
{
if(currentUsers.getSAPUser() != null)
{
//Displaying the logged on users;
wdComponentAPI.getMessageManager().reportSuccess("User - "+currentUsers.getSAPUser().getUniqueName());
}
}

I hope this helps!!

Thanks and Regards

Pravesh

Answers (3)

Answers (3)

matteo_fusi2
Participant
0 Kudos

Hi,

look this blog

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

Regards

Matteo

Former Member
0 Kudos

Try this code

com.sap.tc.webdynpro.services.sal.um.api.IWDClientUser;

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

IWDClientUser currentUsers[] = WDClientUser.getClientUsers();

//Displaying the count of logged on users

wdComponentAPI.getMessageManager().reportSuccess("Number of logged on Users in the portal"+currentUsers.length);

for(int i = 0; i < currentUsers.length; i++)

{

if(currentUsers.getSAPUser() != null)

{

//Displaying the logged on users;

wdComponentAPI.getMessageManager().reportSuccess("User - "+currentUsers.getSAPUser().getUniqueName());

}

}

Former Member
0 Kudos

Hi Guys,

This particular piece of code works real good but it returns only users on one server node or instance.I need all the users currently live in the portal independent of the server nodes.

Regards,

Abhishek

pravesh_verma
Active Contributor
0 Kudos

Hi Abhi,

That's true. And that is correct! Your applicationis running on one particular server node. That means it will get the values for UME, for that particular server. How can it know that there are other server nodes configured from which it has to extract the data. As far as i know that is not possible.

Thanks and Regards,

Pravesh

Former Member
0 Kudos

Use the User management APIs... IUser interface methods...

Check this thread: