Tuesday, May 13, 2008

Function Module: SAP Logged in USERS to Application Server.

Function Module: SAP Logged in USERS to Application Server

To get a list of users logged in to SAP, to a particular application server use the following function module.

TH_USER_LIST

The above mentioned function module gives a complete list of the users logged in  to the desired Application Server. Apart from the user list it also gives information related to the user such as.





Please find below sample code for executing this function Module.

REPORT ZEX_GETUSERLIST .


Parameters: p_server like MSXXLIST-NAME.

Data: int_list like UINFO occurs 0 with header line.


CALL FUNCTION 'TH_USER_LIST'
 EXPORTING
   APSERVER       = p_server
  TABLES
    LIST           = int_list.


    Loop at int_list.
    write: int_list-BNAME, int_list-TCODE.
    ENDLOOP.



 

No comments:

Post a Comment