How to View SAP’s ABAP Source Code

When starting to learn the SAP ABAP programming, I’ve found that there are extremely lacks of real life example of ABAP program that’s can be used as a perfect starting point of how the ABAP application works.

At the start of any session, when the SAP GUI client tries to connect to the R/3 System, the server always presented the very familiar login screen to get and validates user’s authentication information.

So, I think the most perfect sample ABAP program to be learned should be this authenticaton or login screen, because every elements of the programming aspects should be represented by this program.

The importance of understanding this program is more emphasized because it will link to another modules that constructs the building blocks to accomplish many tasks after the login phase is successfully carried out, i.e. what kind of modules that gets activated after each successful login, how to perform compilation and loading customized programs etc.

By understanding the inner working of this program, I believe I will have the robust foundation to move on to another aspects of ABAP programming.

By examining the DIAG stream and the extensive trace log information at R/3 side of the application, I came to know, that when the user connects to R/3 server for the first time, the server will load and submits the SAPMSYST ABAP program to the client.

It is by the virtue of this program that the user will be represented by all too familiar SAP Logon Screen :

After knowing the program name, it’s time to log-on to the ABAP Editor and view this module. But when I try to display the source of ‘SAPMSYST’ :

The editor fails to show it, instead, it shows “Operation terminated” :

Whereas I can view any other elements such as the screen, etc, except the program that is the starting point information. Without the program, I will only get an incomplete picture of how the login mechanism works.

So, I am sifting through the trace log files and eventually found that the ABAP source code repository is located in D010S table and I can view for any program except SAPMSYST.

So, it would be nice if I can replace the view-able program, for example the existing S_AUTHORITY_CHECK with the SAPMSYST program. Then I should be able to view the SAPMSYST programs using S_AUTHORITY_CHECK as its surrogate.

After performing the tedious task of replacing the source code in the BLOCK binary data field of D010S as described above, I am ready to start again.

The plot thickens because, the editor still shows the “Operation terminated” message.

So, I decided to examine the R/3’s disp_work.exe that performs the source code access. And by the help of trace file, before long, I found that after accessing the BLOCK field, the server calls CsDecompr routine to perform decompression of the source code.

By performing the break point just after decompression is done, I’ve noticed the curious string of decompressed SAPMSYST program :

Whereas any other program do not have one. So, using the memory write, after the decompression process, I try to replace the this string with series of spaces (0x20) and this time no “Operation terminated” and I can now view the SAPMSYST program :


23 Responses to “How to View SAP’s ABAP Source Code”

  1. Anonymous Says:

    Nice work ..
    I have also tried to view the source of SAPMSYST many times but failed.. once I Ended up deleting the entire SAPMSYST code by mistake on our Dev server.. 😉

    Can u provide the source code … if u do not have any issues… else u can guide me how to see the code..

  2. ekasiswanto Says:

    please send me your email address

  3. vivek Says:

    Hi u can reply to

  4. emanuel Says:


    can I get the source code too? my email

    Thanks in advance!

  5. Moderator Says:

    Hi Suyra,

    Please do not forward the source code to any one…


  6. ekasiswanto Says:

    ok, based on moderator’s request, from now on, there are no more abap source code request.

  7. kim Says:


    can I get the source code too?

    my email


  8. Anonymous Says:

    I have task when user logon fail at the same time to send email to admin,so can I have source code ? this will very helpful for me.
    my email

  9. Rajesh Kumar Rathi Says:

    Hello Sir,
    I want to send a mail to hod at the time of logon of his junior, so kindly send me SAP LOGON Source code, this will very helpful for me .
    my e-mail id is

  10. Anonymous Says:


    could u share the source code?


  11. nickan66 Says:

    Great read.

    I cannot read SAPMSYST many time.
    I have some task for it.

    Can y send me the source code too?
    It will be very help for me.

    My mail is

  12. moeffe Says:

    if you are interested in decrypting protected abap sources, please leave a reply and will get in contact with you.

  13. Anonymous Says:

    hi.. i am a abap developer.i have a urgent need to display program SAPMSYST.
    can u please please guide me how to see its source code…
    my email id

  14. Anonymous Says:

    Hi…I do not want to alter the program SAPMSYST but want to view the program flow in order to come to a solution in source system. Hence could you please share the progamme code of SAPMSYST for the same. My email ID is

  15. Anonymous Says:

    Hi could you pls share your source code? thanks. my email is:

  16. Anonymous Says:

    I’m in a jam… It awesome if you were able to share this solution..

    My email is :

  17. ji jongjin Says:

    hi.. i am a abap developer.i have need to display program protected source like SAPMSYST.
    can you please please guide me how to see its source code…

  18. Anonymous Says:

    hi i got assignment from my senior that where is the link (while user clicking on reset password button ) is hard coded in sapmsyt program. it will really help full in my carrier if i get to know the source code

  19. Anonymous Says:

    pls reply to

  20. Anonymous Says:


  21. rijdz Says:

    halo mas eka,
    please guide me how to show the source of SAPMSYST like you show above.
    I’m losing track when you start to do with disp_work.exe
    Please contact me


  22. Petru Says:

    could you share the source code?
    Thank you

  23. Vxd Says:

    Could you please send the source to me as well? Or could you please advise how you changed the sources so I could do the same? Thank you. My email:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: