Please find below code for displaying a progress bar in ABAP. Once you execute this code a progress bar will be displayed in the status bar. You need to manipulate the code in such a way so that it can be displayed in your program.
REPORT ZEX_PROGRESSIND .
DATA: A LIKE SY-UCOMM.
DO 100 TIMES. DO 300 TIMES. GET TIME. ENDDO. A(3) = SY-INDEX.A+3 = '%'. CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR' EXPORTING PERCENTAGE = SY-INDEX TEXT = A. ENDDO.
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.
Always use Pretty Printer and Extended Program Check before releasing the code.
Do not leave unused code in the program. Comment the code thoroughly. Align the comments and the Code. Follow the SAP Standards and SAP Best Practices guidelines. It’s a good practice to take a dump of the code on your local drive.