Display all users logged onto a server

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

This Content Component encountered an error
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.
This was first published in April 2005

Dig deeper on SAP ABAP

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchManufacturingERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchCRM

SearchContentManagement

SearchFinancialApplications

Close