Skip to Content
avatar image
Former Member

how to access list of portal users

hi,

i need to gain access to all sap portal users from webdynpro. does somebody know, where the user information is stored?

thanks a lot in advance,

matthias

ps: scrolling a bit further down, i've got 2 other unanswered questions :-]

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jul 12, 2005 at 03:43 PM
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 12, 2005 at 03:11 PM

    Hi

    If you are the J2EE instances of WAS and Portal are same then you can use the WDClientUser API to retrieve the user details

    Code would be something like.

    IWDClientUser user = WDClientUser.getCurrentUser();
    wdComponentAPI.getMessageManager().reportSuccess("User is "+user.getSAPUser().getUniqueID());

    Refer this thread for more information.

    how-to-get-user-id-in-web-dynpro-application

    If the J2EE instances are different then you will have to write a Portal service that retrieves the name of the logged in Portal user and passes it as a return parameter. Now expose this portal service as a webservice and then consume the Webservice model in webdynpro.

    Hope that was helpful

    Regards

    Ravi

    Add comment
    10|10000 characters needed characters exceeded

    • Hello Natalia,

      SearchResult is kind of Iterator, so it is not correct to call toString method to get user ID.

      Try Matthias`s suggested code:

      while (sr.hasNext())
      {
      	strtest = sr.next().toString();
      	IUser user = UMFactory.getUserFactory().getUser(strtest);
      	...
      }
      

      Best regards, Maksim Rashchynski.