Skip to Content
avatar image
Former Member

how can I find IP/Terminal user who create a record on table?

Dear experts

how can I find IP/Terminal user who create a record on table for example : AFKO?

Thanks in advance

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Jul 04, 2017 at 10: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
    *"----------------------------------------------------------------------

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 04, 2017 at 11:04 AM

    Is sap logs doesn't have IP/terminal user who create or change a record?

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 04, 2017 at 11:08 AM

    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

    Add comment
    10|10000 characters needed characters exceeded