2023 Feb 06 5:12 AM
Dear all,
I want to fetch the Windows Login name for all the SAP User's , My SAP Id is "ABCD" but my windows login is "XYZ".
Have tried the Function Module GUI_GET_DESKTOP_INFO with option "5" but unforunately it fetches only for the currect user and the same happens with the METHOD CL_GUI_FRONTEND_SERVICES=>GET_USER_NAME.
Could any please help.
with rgds
Ranjith Singh
2023 Feb 06 7:01 AM
the command line to know this is "whoami"
if you could run system command and catch the result, you will have your answer
2023 Feb 06 8:30 AM
frdric.girod whoami gives the same result as METHOD CL_GUI_FRONTEND_SERVICES=>GET_USER_NAME, doesn't it?
anandkumarpsd There is no connection between windows login name and a sap user name.
You log in as sapid ABCD from windows user XYZ
I could log in as sapid ABCD from windows user OPQ.
What you could do is have a program running at login, that calls METHOD CL_GUI_FRONTEND_SERVICES=>GET_USER_NAME and stores the result in a table. Over time you'd find out which windows users were logging as which SAP users.
2023 Feb 06 3:24 PM
Use matthew.billingham's suggestion. I already used Enhancement (SMOD) SUSR001 Customer Exit EXIT_SAPLSUSF_001 to execute method CL_GUI_FRONTEND_SERVICES=>GET_USER_NAME at start of session and save it in a specific table, also with terminal ID and IP address (Just use some robust code, as triggering an error is not an option when using this exit!)
(Or do you use some SSO, in this case, there should be such information somewhere between SAP system and Active DIrectory...)
2023 Feb 07 9:57 AM
2023 Feb 07 9:54 AM
Don't use the answer option (read the text 'Before answering') and comment the answer you want to reply.