zoukankan      html  css  js  c++  java
  • BWList of logged on users in the Portal

    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;

    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());
    }
    }
    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
  • 相关阅读:
    Leetcode题解(十六)
    Leetcode题解(十五)
    Leetcode题解(十四)
    Leetcode题解(十三)
    Leetcode题解(十二)
    Leetcode题解(十一)
    php数据库访问及增删改
    克隆对象及加载类
    抽象
    PHP继承
  • 原文地址:https://www.cnblogs.com/xiaomaohai/p/6157334.html
Copyright © 2011-2022 走看看