Problem solve Get help with specific problems with your technologies, process and projects.

Display all users logged onto a server

Use this tip to reveal a list of all users on a system.

Use the code below to display all users logged onto a server:
DATA: BEGIN OF T_USER_TAB OCCURS 0.
INCLUDE STRUCTURE UINFO.
DATA: END OF T_USER_TAB. 

DATA NUMBER_OF_USERS TYPE I.

CALL FUNCTION 'TH_USER_LIST'
TABLES
  LIST   = T_USER_TAB      EXCEPTIONS
  OTHERS = 1.

DESCRIBE TABLE T_USER_TAB  LINES NUMBER_OF_USERS.

WRITE:/ NUMBER_OF_USERS, 'ARE LOGGED IN NOW'.

LOOP AT T_USER_TAB. 
WRITE:/ T_USER_TAB-BNAME.
ENDLOOP.

Dig Deeper on SAP ABAP

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchContentManagement

SearchHRSoftware

Close