on 07-30-2009 8:35 AM
Hi,everybody!
How can I uses Web Dynpro get all server node's logined users?
Hi,
Required jar files for this code snippet
-> webdynpro_services.jar located at <plugins folder>\com.sap.tc.webdynpro.runtime\lib
-> com.sap.security.api.jar located at <plugins folder>\com.sap.security\lib
import 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());
}
}
Regards,
Sunaina Reddy T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
webdynpro have no api that can be get all logined users in cluster
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear,all!
All of this methods,they only can to be get a single server node's users.I want get the all server nodes which contains all logined users.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
IWDClientUser number[] = WDClientUser.getClientUsers();
wdComponentAPI.getMessageManager().reportSuccess("No.of logged users"+number.length);
int i=0;
while(number<i>.getSAPUser()!=null&&i<number.length)
{
wdComponentAPI.getMessageManager().reportSuccess("current user "+number<i>.getSAPUser().getUniqueName());
i++;
}
Add com.sap.security.api.jar file to project to use UME api.
Regards,
srikanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
use this code to get login users
PS: you have add securty.api.jar file to you project lib and build path
IWDClientUser currentUsers[]=WDClientUser.getClientUsers();
//Displaying the count of logged on users
wdComponentAPI.getMessageManager().reportSuccess("Number of logged on Users in the portal - "+(currentUsers.length-1));
for(int i=0;i<currentUsers.length;i++){
if(currentUsers<i>!=null){
// Displaying the logged on users;
if(!currentUsers<i>.getLastName().equals("Guest")){
String first= currentUsers<i>.getFirstName();
wdComponentAPI.getMessageManager().reportSuccess("User - "currentUsers<i>.getFirstName()" "+currentUsers<i>.getLastName());
}
}
}
orYou can get this information always doing call to ABAP side, with BAPI or RFC of your systems.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi xu,
u can refer this link for get the idea
and u can refer this one for more idea
https://wiki.sdn.sap.com/wiki/display/Snippets/List%2bof%2blogged%2bon%2busers%2bin%2bthe%2bPortal
let me know u need any further information
bvr
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.