07-04-2017 10:08 AM
Dear experts
how can I find IP/Terminal user who create a record on table for example : AFKO?
Thanks in advance
07-04-2017 11:26 AM
I don;t think there is any such functionality available by default. However it can be programmed based upon business requirements. In my case where we need to log such changes to table data, I use following function module in Save event to get the user computer name and IP address.
In this function you can pass system user (sy-uname) and client (Sy-mandt) as input.
In output the field "Terminal" will contain the desktop/laptop name of user and field "ADDRSTR" will contain the IP address.
Please beware that this only works for SAP GUI. In some case like using HTML or browser base sap gui, the Terminal field is blank or it also contains IP address.
FUNCTION TH_USER_INFO.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" REFERENCE(CLIENT) LIKE SY-MANDT OPTIONAL
*" REFERENCE(USER) LIKE SY-UNAME OPTIONAL
*" REFERENCE(CHECK_GUI) LIKE SY-INDEX DEFAULT 0
*" EXPORTING
*" VALUE(HOSTADDR) LIKE MSXXLIST-HOSTADR
*" VALUE(TERMINAL)
*" VALUE(ACT_SESSIONS) LIKE SM04DIC-COUNTER
*" VALUE(MAX_SESSIONS) LIKE SM04DIC-COUNTER
*" VALUE(MY_SESSION) LIKE SM04DIC-COUNTER
*" VALUE(MY_INTERNAL_SESSION) LIKE SM04DIC-COUNTER
*" VALUE(TASK_STATE) LIKE SM04DIC-COUNTER
*" VALUE(UPDATE_REC_EXIST) TYPE THFB_BOOL
*" VALUE(TID) LIKE SY-INDEX
*" VALUE(GUI_CHECK_FAILED) LIKE SY-INDEX OPTIONAL
*" VALUE(ADDRSTR) TYPE NI_NODEADDR OPTIONAL
*" VALUE(RC) TYPE I
*"----------------------------------------------------------------------
07-04-2017 11:26 AM
I don;t think there is any such functionality available by default. However it can be programmed based upon business requirements. In my case where we need to log such changes to table data, I use following function module in Save event to get the user computer name and IP address.
In this function you can pass system user (sy-uname) and client (Sy-mandt) as input.
In output the field "Terminal" will contain the desktop/laptop name of user and field "ADDRSTR" will contain the IP address.
Please beware that this only works for SAP GUI. In some case like using HTML or browser base sap gui, the Terminal field is blank or it also contains IP address.
FUNCTION TH_USER_INFO.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" REFERENCE(CLIENT) LIKE SY-MANDT OPTIONAL
*" REFERENCE(USER) LIKE SY-UNAME OPTIONAL
*" REFERENCE(CHECK_GUI) LIKE SY-INDEX DEFAULT 0
*" EXPORTING
*" VALUE(HOSTADDR) LIKE MSXXLIST-HOSTADR
*" VALUE(TERMINAL)
*" VALUE(ACT_SESSIONS) LIKE SM04DIC-COUNTER
*" VALUE(MAX_SESSIONS) LIKE SM04DIC-COUNTER
*" VALUE(MY_SESSION) LIKE SM04DIC-COUNTER
*" VALUE(MY_INTERNAL_SESSION) LIKE SM04DIC-COUNTER
*" VALUE(TASK_STATE) LIKE SM04DIC-COUNTER
*" VALUE(UPDATE_REC_EXIST) TYPE THFB_BOOL
*" VALUE(TID) LIKE SY-INDEX
*" VALUE(GUI_CHECK_FAILED) LIKE SY-INDEX OPTIONAL
*" VALUE(ADDRSTR) TYPE NI_NODEADDR OPTIONAL
*" VALUE(RC) TYPE I
*"----------------------------------------------------------------------
07-04-2017 12:04 PM
Is sap logs doesn't have IP/terminal user who create or change a record?
07-04-2017 12:08 PM
hi,
You might be able to use transaction STAD to figure out in detail who has done what, this data is temporary. Change documents normally exist to find out who has changed what regarding master data.
Kind regards, Rob Dielemans