Skip to Content
avatar image
Former Member

Get current login user name

Hi Everyone ,

Could you guys help me out in getting the current username in SAP Personas screen in a text box. Is there any code or standard FM or program to record the steps. Let me know your suggestions .

Thanks

Sivaganesh

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Jan 13, 2015 at 09:47 AM

    I'd like to say that you can just use System->Status from whatever screen you are on, and grab the username from there. Unfortunately, whenever I do that within Personas I get a "The session has timed out" error. That seems like a bug - does it happen to anyone else?

    The alternative answer is to call a WebRFC to return the username. Details of how to call RFCs from Personas can be found in this blog - Calling RFCs from a Personas script. The ABAP function you'd need to write yourself, but there's an example in the above blog and returning just the username is a simpler function than the example.

    Steve.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      HI Steve,

      I am already using the logic of getting the username from system-->Status.

      But the problem is.. iam passing this username to a webRFC which in turn gives information such as project id , district id etc,. The issue is iam using this information to refresh a html viewer.

      All this iam trying to achieve on Page Load.

      You can find my other detailed explanation here .. could you help me out how to solve this issue.?

      Thanks

      Sivaganesh

  • avatar image
    Former Member
    Mar 09, 2015 at 01:03 PM

    Hi Siva ,

    I am facing the same issue , could you please share the solution ?

    Thanks

    Shivani

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 09, 2015 at 06:09 PM

    Hi Sivaganesh,

    If you are already calling a WebRFC from within Personas, then you can just use the SY-UNAME field in the WebRFC as it contains the users id.

    Thanks,

    Todd

    Add comment
    10|10000 characters needed characters exceeded