Skip to Content



Everyday we are using lot’s of application to sharing our information (personal, professional..etc). But what about business information, our work information, process information, yes information, it could be any type of. let’s take an example, some time a end user has to inform another business user related to created document, then he makes call or mail to deliver the same.

Here i have made a simple program is a kind of chat program, where a user can see who all are logged in system and also send a message to them instantly and make a conversation without make any call or mail.

yes, for the privacy, the program is storing every chat information in customize table for later use.

In below steps, i have explain logic and steps.

    Initial Screen:

I made initial screen size same as other chat application.


In above screen, two users are logged in. In this screen i have use CL_GUI_TIMER class and it’s check the online user information every second.(interval value set in class attributes), The login chat screen will only refresh, if any new user found or vise versa.

If any new user logged in or any user left the system. respective user information will add or remove from the above screen.

Means, the above screen will only provide the logged / online users or bookmarked users.

In login exit, a logic has been maintained to check the user is already using the chat program or not, or if any reason user’s SAPGUI crashed. the old login information will be deleted from customize table.

Exit Information: SUSR0001 [User exit after logon to SAP System].

attached code in ZXUSRU01.txt

Make the first chat:

To do chat with user, select the any user from above chat screen.

After select an user, a chat screen will open.

              chat screen.JPG

Selected user name will be the title of the screen, as display in above screen. (i have selected Rohan Sen).

To send message the selected user, enters the respective text in open text window.


After press ‘ENTER’ button. System will check for the selected user is logged-in or not  and chat screen is open or not.

If chat screen is not open for the selected user. A pop-message will open to selected user screen as below.


Used Function Module: TH_POPUP

Else message will be store in maintained table.

After executing the chat t-code, user will get initial screen (as above), but though user has received a message from user, then blue chat /wp-content/uploads/2015/08/chat_out_775842.pngicon will be displaying at the place of yellow chat icon, as below screen.

Suppose user is not online, then all received message will be store in maintained table and while login into the system, a pop-up message box will appear as below screen, which will have message sender and date information.

                    message receive.JPG

User can only send message to off-line users if they have bookmarked.

Message Received

When both users are using application and sharing information the view will be as below.

    chat start.jpg

It’s same like other chat screen, user enters will be at the right side of the chat screen and receiver enters will be at the left side. (as above).

with other necessary information like time and date.

Here if date is current date, then it will display as “today”.

One more tool has provided to see the earlier conversation.

          erlier conversation.JPG

By clicking the above button, the very next day available conversation will be display in chat screen as below.

            earlier load.JPG

If you see, the conversation details are more, so automatic a scroll bar will be appear (as above screen in red area), which is very thin and only display when user scroll the screen.

even only the current conversation will display in screen, mean scroll will always be on the bottom of chat screen.

Technical Information:

Though all solution is depends on HTML, CSS and java script, some additional installation requires from the SAPGUI, Local system side.

1. SAPGUI Installation, Please find below screen about SAPGUI.


    For more information, please go through with below discussion.

2. Java Script setting, internally SAP used IE in CL_GUI_HTML_VIEWER class, to make available java script functionality enable setting in IE.

    IE setting.JPG

    IE-Setting->Advance Tab

3. MIME setting

          Created a new folder inside SAP->PUBLIC->SAP_CHAT and imported jpg & png file from attached zip file.

All respective programs, include and class are in attached zip in below google drive link for further analysis.

SAP Communicator

Program Name : zcommunication

Class Name    : zcl_communication

Tables Name  : zcom_books (bookmark information)

                        zcom_run    (Communicator execution information)

                        zcommun    (Current Communication Information)

                        zcommun_his (Communicator history)

attached Nugget File in above link


File Name: NUGG_ZCOMM.nugg

Note: The application made in SAP Netweaver 740 Version.

New version link with some more advance option to make communication better way.

SAP Communicator 2.0 Part 1

SAP Communicator 2.0 Part 2

Thanks & Regards,


To report this post you need to login first.


You must be Logged on to comment or reply to a post.

    1. Tee Gee

      Hi Praveen,

      The nugget file creates only the program Zcommunication, can you please provide the nugget with the class,method and tables.

  1. Raphael Pacheco

    Hi Praveen,

    You have already submitted this your creation to the Idea Place? It would be interesting that you send your ideas there. 🙂

    Warm regards,

    Raphael Pacheco.

  2. Former Member

    Hi Praveen,

    Great Job !…

    The nugget file creates only the program Zcommunication and ZCL class,

    Could you please provide the nugget with the class,method and tables !.

    I have one question :

    Suppose, in DEV, one ID is using by many people ,, that time how it works ?

    Thanks in Advance.

    1. Praveer Sen Post author

      Hi Mahen,

      I assume, in PRD one user one user id.

      but for the safe side in this program, suppose a user is using this  t-code and in same time other user logged with same id and try to execute the t-code, he will receive an error message like ‘Chat system is already executing’.

      I have checked this in SUSR0001 enhancement point.

      I will provide the code for the same..and update the nugget file.



        1. Praveer Sen Post author

          Yes you can, you have to change the logic based on COMPUTERNAME or IP Address of user system.

          You can use


          CL_GUI_FRONTEND_SERVICES->GET_COMPUTER_NAME methods to get the information.

          or through terminal information

          User TERMINAL_ID_GET FM.

          and based on that, you can change the logic.



  3. Praveer Sen Post author

    Hi All,

    I have attached the respective class nugget file and user exit SUSR0001 (User exit after logon to SAP System) codes.



    1. Former Member


      Pls attach the latest nugget file here with all tables used in program because when i try to activate the class ZCL_COMMUNICATION, i’m getting below error.




      Any how i can able to activate the class and program.But when i try to execute the program : ZCOMMUNICATION, it is showing blank screen.Do i need to add any table entries?




      1. Praveer Sen Post author

        Hi Katrice,

        zcommun  table information in zcommun  folder in SAP Communicator link. check the SAP Communication zip file.

        even i have given the all image files, upload those into SAP->PUBLIC->SAP_CHAT MIME folder.

        for better display you have to update current patch level of SAPGUI.



          1. Praveer Sen Post author

            No, through the timer logic, 1st and 2nd screen will handle the all chat sequence for the opponent.

            Create a number range named ‘ZCOMMU’ with year check.

            use ZCOMM_ID domain for the number range, refer COMID field from zcommun table.



      1. Praveer Sen Post author

        Have you created Number range?

        There is no extra setting, all logic works through timer logic, where ZCOMMUN will contains the send item information, once the opponent execute the t-code the same information will shift to ZCOMMUN_HIS table and clear from the ZCOMMUN table.



  4. Tanmay Verma

    Hi Praveer,

    Really a great application. I also had thought to build similar application using the FM TH_POPUP but didn’t had idea about the other classes used in this application.

    This is a really helpful document for others trying to achieve something similar.




Leave a Reply