Skip to Content
author's profile photo Former Member
Former Member

How to get the user id from Portal in WD


I am developing a web dynpro app to be used in the portal. One requirement is to record the user id of the user who logged into the portal.

Does anyone know how to get it within the web dynpro application?

Thanks a lot!


Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jan 27, 2005 at 03:36 PM

    IWDClientUser wdUser = WDClientUser.getCurrentUser();

    Hi Hart,

    Try using the following piece of code.

    IUser user = wdUser.getSAPUser();

    if(user != null){

    IUserAccounts[] acct = user.getUserAccounts();

    if(acct[0] != null){

    String strUserid = acct[0].getLogonUid();





    // code for anonymous user




    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Sidharth,

      Thanks a lot for your prompt help! These codes will definitely help me resolve the problem. Actually I am looking through some documents and got some similar codes.



Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.