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.
Thanks to all.
-Abhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use IWDClientUser intetface to get the require data.
Thanks & Regards
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You can capture the Logged in User From Webdynpro
Write this code on WD do init
IWDClientUser user = WDClientUser.getLoggedInClientUser();
wdContext.currentContextElement().setUserid(user.getSAPUser().getUniqueName());
Add this file
Goto-.Used dcs-Add used dcActive -
Regards
Kirankumar M
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
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.