[ABAP] Angemeldete Benutzer eines Application-Servers auflisten

DATA: it_uinfo TYPE TABLE OF uinfo.
DATA: it_usrinfo TYPE TABLE OF usrinfo.

CALL FUNCTION 'TH_USER_LIST'
  TABLES
    list = it_uinfo       " wenn auskommentiert, dann wird usrlist zurückgegeben, sonst nur list
    usrlist = it_usrinfo.

LOOP AT it_uinfo INTO DATA(wa_uinfo).
  WRITE: / wa_uinfo-tid,
          wa_uinfo-mandt,
          wa_uinfo-bname,
          wa_uinfo-tcode,
          wa_uinfo-term,
          wa_uinfo-zeit,
          wa_uinfo-master,
          wa_uinfo-hostadr,
          wa_uinfo-trace,
          wa_uinfo-extmodi,
          wa_uinfo-intmodi,
          wa_uinfo-type,
          wa_uinfo-stat,
          wa_uinfo-protocol,
          wa_uinfo-guiversion,
          wa_uinfo-rfc_type.
ENDLOOP.

LOOP AT it_usrinfo INTO DATA(wa_usrinfo).
  WRITE: / wa_usrinfo-tid,
          wa_usrinfo-mandt,
          wa_usrinfo-bname,
          wa_usrinfo-tcode,
          wa_usrinfo-term,
          wa_usrinfo-zeit,
          wa_usrinfo-master,
          wa_usrinfo-trace,
          wa_usrinfo-extmodi,
          wa_usrinfo-intmodi,
          wa_usrinfo-type,
          wa_usrinfo-stat,
          wa_usrinfo-protocol,
          wa_usrinfo-guiversion,
          wa_usrinfo-rfc_type,
          wa_usrinfo-hostaddr.
ENDLOOP.