02-08-2005 6:44 AM
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
02-08-2005 8: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
02-08-2005 7: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
02-08-2005 7: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
02-08-2005 8: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
02-08-2005 2:23 PM
Doesn't this FM only work for the user running the program? How would it provide the logon ID for all of the users logged on to the SAP system?
Have I misunderstood the problem?
02-08-2005 8:37 AM