Skip to Content
avatar image
Former Member

Logged on Users in Portal

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Mar 17, 2009 at 06:20 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 17, 2009 at 06:20 AM

    Hi,

    Try and use this link:

    list-all-users-who-are-logged-in

    Also note that you have to add the UME DC as dependency.

    Regards,

    Pravesh

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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 dc Active -


      SAP_JEE-----Sap.Security.sda.api..

      Regards

      Kirankumar M

  • avatar image
    Former Member
    Mar 17, 2009 at 10:14 AM

    Hi,

    Use IWDClientUser intetface to get the require data.

    Thanks & Regards

    Ravi

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 19, 2009 at 04:06 AM

    Thanks to all.

    -Abhi

    Add comment
    10|10000 characters needed characters exceeded