on 03-17-2009 6:12 AM
Hi All,
I wanted to develop an webdynpro Java application which gives the list of users logged currenly in the Portal.
Which API do i need to run after.Any help is appreciated.
Abhi
Hi
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
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());
}
}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
Best Regards
Satish Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
10 | |
10 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.