Description : This code snippet gives the list of logged on users in the portal using Webdynpro for JAVA
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;
wdComponentAPI.getMessageManager().reportSuccess("Number of logged on Users in the portal"+currentUsers.length);
{
if(currentUsers[i].getSAPUser() != null)
{
//Displaying the logged on users;
wdComponentAPI.getMessageManager().reportSuccess("User - "+currentUsers[i].getSAPUser().getUniqueName());
}
}
本文介绍了一个使用WebDynpro for Java获取当前门户中登录用户的代码片段。该代码展示了如何利用特定的API获取所有已登录用户的详细信息,并通过消息管理器显示这些用户的信息。
430

被折叠的 条评论
为什么被折叠?



