Skip to Content
Author's profile photo Former Member

How to find the source code where the message is raised

Many a times we get some message in the bottom left of our screen while executing some custom program or TCode. This document will show you how to find the exact line of code which raises this message. I hope it will be useful to all of us.

1. I am using customized program in this example. When I execute this program I get the following message ‘No records found’. Now I want to find the source code from where this message is raised.

Picture 1.png

2. Go to TCode SE30/SAT. Enter your program name in ‘In Dialog’ box and select Program radio button. In this case I am using ‘ZFRO_CI_PAYMENT_INFO’ program. Then click on Execute.

Picture 2.png

3. System will take you to the same program. Enter your data so that same message pops up. Then press Exit button so that you come back to SAT TCode screen. Click on Evaluate tab. You will see Existing ABAP Runtime Measurements.

Picture 3.1.pngPicture 3.2.png

4. Click on Trace File column.

Picture 4.png

5. Search for message number in the trace file.

Picture 5.1.png     Picture 5.2.png 

6. Double click on this line will directly take you to the source code.Picture 6.png

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member


      The new debugger has an option to set up break points at a specific message. You can include the message Id, number and the message type as well.

      In my mind this is a more easier option. May be you can add this into your blog as well.



      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hi Vikram,

      Thanks for bringing it up. I will definitely check on this one.

      Author's profile photo Bence Bodzsar
      Bence Bodzsar

      In older releases watchpoint for SY-MSGNO is still much more simple.

      Author's profile photo Custodio de Oliveira
      Custodio de Oliveira

      Sorry, I think this document is unnecessary. You could have read this blog: Six kinds of debugging tips to find the source code where the message is raised

      So the lesson is: search before posting

      Author's profile photo Former Member
      Former Member
      Blog Post Author


      I checked that document before uploading mine. My method is somewhat different from the methods mentioned in the document.

      Author's profile photo Tamás Holics
      Tamás Holics

      Now there is a simpler way. You can even attach all these details to tickets in external ITSM platforms or directly to SAP Solution Manager tickets.

      You can see how this works here: