cancel
Showing results for 
Search instead for 
Did you mean: 

List all users who are logged in

Former Member
0 Kudos

Hi,

Is there a way where I can programmatically list ALL users who are currently logged in?

My application needs to track all users who are logged in.

Regards,

weiloong

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

hi

follow 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<i>.getSAPUser() != null)

{

//Displaying the logged on users;

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

}

}Note: I used reportSuccess statement to show the output, instead you can bind the list of users to a node and show in the Table

Thanks

Bharathi.ch

Former Member
0 Kudos

Hi All,

I am also looking for info similar to Wei,but to be specific, i would like to trace nomber of users hitting a webpage (iview),an hourly basis,day, week etc.. <b>Programatically</b>, i know there is a tool Portal Active Report,i would like to know is there any other alternative, and also i would like to know who is hitting what, which page got more hits, i don't want to use any third part tool, is there any info how we can do this Programatically(not the one which alredy existing PCR).

Regards,

RK

Message was edited by: Ramakrishna Venkat

Former Member
0 Kudos

Hi,

The tool is called the Portal Activity Report and documentation can be found at:

http://help.sap.com/saphelp_nw04/helpdata/en/58/728ea01cf64fff996b827f2a06f9b1/frameset.htm

This tool will give you most of the features you requested.

Regards,

Or

former_member182372
Active Contributor
0 Kudos

Hi,

key words to search are:

InitialContext.lookup("remotesecurity")

com.sap.engine.services.security.remote.RemoteSecurity

com.sap.engine.services.security.remote.sessions.RemoteSecuritySessions

RemoteSecuritySessions.listSecuritySessions

com.sap.engine.services.security.login.SecuritySession

Good luck and regards!

Maxim R.

Former Member
0 Kudos

Hi,

I don't know what the situation you are talking about is.

You can get the user name of the current logged in user you can have that in some array or some file and keep on appending as and when you get a new user logging in.

Regards

Noufal

Former Member
0 Kudos

Hi Weiloong,

there's a function module called TH_USER_LIST in R/3 you can use for this. It'll return the list of users logged in.

-Mikko