DATA: lv_hostaddr TYPE msxxlist-hostadr.
DATA: lv_terminal TYPE c.
DATA: lv_act_sessions TYPE sm04dic-counter.
DATA: lv_max_sessions TYPE sm04dic-counter.
DATA: lv_my_session TYPE sm04dic-counter.
DATA: lv_my_internal_session TYPE sm04dic-counter.
DATA: lv_task_state TYPE sm04dic-counter.
DATA: lv_update_rec_exist TYPE thfb_bool.
DATA: lv_tid TYPE sy-index.
DATA: lv_gui_check_failed TYPE sy-index.
DATA: lv_addrstr TYPE ni_nodeaddr.
DATA: lv_rc TYPE i.
CALL FUNCTION 'TH_USER_INFO'
EXPORTING
client = sy-mandt
user = sy-uname
check_gui = 0
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
addrstr = lv_addrstr
RC = lv_rc.
IF lv_rc = 0.
WRITE: / 'Hostaddr', lv_hostaddr.
WRITE: / 'Terminal', lv_terminal.
WRITE: / 'Anzahl Sessions offen:', lv_act_sessions.
WRITE: / 'Max. Anzahl Sessions:', lv_max_sessions.
WRITE: / 'Akt. Session:', lv_my_session.
WRITE: / 'My Internal Session', lv_my_internal_session.
WRITE: / 'Task State', lv_task_state.
WRITE: / 'Update Rec Exist', lv_update_rec_exist.
WRITE: / 'TID', lv_tid.
WRITE: / 'Gui Check Failed', lv_gui_check_failed.
WRITE: / 'IP-Adresse: ', lv_addrstr.
ENDIF.