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

Getting Window's user logon ID ?

Hi All,

Was wondering if there is a way to get the window's logon

user ID, Domain using ABAP code/function module.

Basically I am trying to get all the users logged on to different terminals with their window's logon user id.

Cheers,

Neeth

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 08, 2005 at 08:04 AM

    Hi Nameeth,

    you could also use function module GUI_GET_DESKTOP_INFO. With parameter TYPE = 5, you will get the name of the logon ID. Please check documentation on this function module for more info.

    Please let us know if it helped. Best regards,

    Alvaro

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 08, 2005 at 07:09 AM

    I am not sure of a function in SAP.

    If you just want their IP address from where they logged on and their SAP user id use "THUSRINFO" function module.

    If you want their windows logon info, you could try running a VB script from abap to get the same.

    Regards

    Raja

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 08, 2005 at 07:15 AM

    HI,

    e.g.

    1)

    DATA: username TYPE string.

    CALL METHOD cl_gui_frontend_services=>get_user_name

    CHANGING user_name = username

    EXCEPTIONS cntl_error = 1

    error_no_gui = 2

    not_supported_by_gui = 3

    OTHERS = 4.

    CALL METHOD cl_gui_cfw=>flush( ).

    WRITE: / username.

    2) terminal:

    cl_gui_frontend_services=>GET_COMPUTER_NAME

    grx Andreas

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 08, 2005 at 08:37 AM

    Got it! (points for solved 😊

    ..Thanks for the help guys.

    Add a comment
    10|10000 characters needed characters exceeded

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.