on 04-07-2009 12:23 PM
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
if you are working with ESS or MSS i have answer with me,
Cheers,
Apparao
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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());
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.