New tool to get to the place where an ABAP message was raised
Finding out where in the ABAP code a message has been raised is really easy now! Read this article and discover how to do it!
When you get an error and you double click, you get a pop up called Performance Assistant showing information about the cause of the error and how to correct it. But sometimes you, technical guys, wonder were in the ABAP code the message was raised (Maybe because the explanation given in the long text is not clear enough for you). By reading the ABAP code before the error sentence is executed or setting a break-point before, you can understand better the reason a given error occurred.
I will show you how it works with an easy example:
Let’s go to transaction SE38 and type the name of a program that you know beforehand it does not exist and try to display the code. of course you will get an error message:
Click on the error message, below on the screen to open Performance Assistant:
Now click on the new button that will take you to where the ABAP sentence “message” was raised.
by reading the code, you learn that all ABAP program names are read from view ‘PROGDIR’ on transparent table REPOSRC.
Do your tests with any program of your choice and enjoy this new feature!
Can’t wait to have it in your system?
Implement the following Support Packages:
In addition to the above Support Packages, make sure to update your kernel version.
ABAP message navigation is implemented in the standard system as of AS ABAP 7.72 with SAP
In addition, make sure to update your kernel version” (to the patches mentioned below or higher):
|Kernel Release||Patch Level|
|SAP KERNEL 7.22||610|
|SAP KERNEL 7.45||715|
|SAP KERNEL 7.49||510|
|SAP KERNEL 7.53||112|
Related notes are 2566819 & 2615564
This feature is added to another tool that was added to the Performance Assistant in 2014 called PANKS:
Got an error message? The new tool PANKS is here to help you!
Just 10 years to wait until that’s installed! In the meantime, I guess I'll just have to go with with watchpoint on sy-msgno.
I have updated the blog to make it more clear that SAP_BASIS update is also needed
How does this work when the messages are collected in a Business Application Log, or similar?
You mean SLG1?
Yes but not just that. Some programs collect messages and then display them in an SLG1-like form after the processing is finished - but the BAL isn't persisted.
1, How is it implemented internally?
Does it log every raise message (MESSAGE command) or only last one?
Like Matthew Billingham mentioned, there are many developments who use internal logs (mostly application log) to collect messages.
Even so, I'm always using the MESSAGE ... INTO so I'll be able to track down where message was raised (It also helps in indexing of Where used).
2. Does it support also exceptions?
I works with exceptions too: The new functionality is delivered with a demo program tat shows different scenarios for which the functionality works.
I see now that it's also mentioned in note 2566819.
Would be the next step but it's not that easy, I guess because each program that sends messages to the log should be in charge of saving not only the message itself but also where the message came from.
🙂 nice feature.
🙁 My version is not yet there.
'PROGDIR' is not a transparent table but a view on transparent table REPOSRC.
Thank you for letting me know. I have amended the text as necessary.
Nice option but finding the message where it is presented is not that diffucult with tcode sat.
Where the error is actually generated is the hard part. in many programs the errors are collected from many sub programs during execution and at the end collected and shown.
Would be great help if you could already set a watch-point in debugging at the start of a program whether or not the variable of the sub program already exists.
Are there also sollutions for those situations available or in development?
What if you do not have authorization for /h?
This is excellent. Actually, you gave me an idea to include this in our certified SAP add-on. Now all these details can be saved to tickets in external ITSM platforms or directly to SAP Solution Manager tickets.
You can see how this works here: https://youtu.be/LoJWXunN6ok