BASIS Function module Used the same way in S/4HANA

TH_USER_INFO Get User Session Information

Returns the terminal name, IP address, number of open sessions and maximum number of sessions of the current or given user. It is used to log which computer a program was run from or to detect multiple sessions of a user. Terminal and address information is only meaningful for SAP GUI sessions and may be empty when running in the background.

Function group
THFB
Remote-enabled (RFC)
No
Type
Function module

Importing parameters

ParameterTypeDescriptionRequired
CLIENTSY-MANDTClient—
USERSY-UNAMEUser name—
CHECK_GUISY-INDEXCheck GUI connection—

Exporting parameters

ParameterTypeDescription
HOSTADDRMSXXLIST-HOSTADRHost address
TERMINAL—Terminal name
ACT_SESSIONSSM04DIC-COUNTERNumber of open sessions
MAX_SESSIONSSM04DIC-COUNTERMaximum number of sessions
MY_SESSIONSM04DIC-COUNTERCurrent session
MY_INTERNAL_SESSIONSM04DIC-COUNTERCurrent internal session
TASK_STATESM04DIC-COUNTERTask state
UPDATE_REC_EXISTTHFB_BOOLUpdate record exists
TIDSY-INDEXTerminal ID
GUI_CHECK_FAILEDSY-INDEXGUI check failed
ADDRSTRNI_NODEADDRIP address
RCIReturn code

Call template (ABAP)

A skeleton generated from the interface. It lists mandatory importing parameters, exporting parameters and tables; declare the variables with suitable types in your own program.

CALL FUNCTION 'TH_USER_INFO'
  IMPORTING
    hostaddr = lv_hostaddr
    terminal = lv_terminal
    act_sessions = lv_act_sessions
    max_sessions = lv_max_sessions
    my_session = lv_my_session
    my_internal_session = lv_my_internal_session
    task_state = lv_task_state
    update_rec_exist = lv_update_rec_exist
    tid = lv_tid
    gui_check_failed = lv_gui_check_failed.

Can't find the report you need?

We also build anything that is not in the catalog. Describe it briefly and we will suggest the right solution.

Request a custom report