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.
This was last published in April 2005

Dig Deeper on SAP ABAP

PRO+

Content

Find more PRO+ content and other member only offers, here.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchManufacturingERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchCRM

SearchContentManagement

SearchFinancialApplications

Close