Skip to Content
Author's profile photo Former Member

Dealing with error/warning messages in SAP

Since I became a member of SDN, I’ve seen many (almost daily) questions in the forums about error or warning messages in SAP, they are like these:

  • Why is a message showing up?
  • How to get ride of a message
  • Can this error message be customized to be a warning instead?


I have been able to help on some of those threads by replicating the steps in my system and a little debugging to find the root cause of the message, it may seems trivial to experimented folks, but this procedure might be of help for those who are starting with SAP, this blog is for them.


The idea is get into the source code where the message is triggered, and see what is the condition that is causing this to happen; you don’t need to be an ABAPer to do it, just a little of knowledge of logic is enough.


Here is how, let’s suppose that we are updating data about employee address in transaction PA30, we are trying to save but this error message stops us:




It is clear that there is an error in the field “Zip code”, but you may want to know which ones are the valid Zip codes for the state, or what is the table that stores the Zip codes so that you add a new one.


In order to know more about the logic behind the message, double click on it, SAP will show you more information about the error:



Click on “Technical information” icon, SAP will present you technical data about the error message:



Double click on the “Message Number” field; you then will get in transaction SE91.




The first message in the list will be the one that was double clicked previously, select it and press the button “Where-used List”




Then you will see a pop up where you can define the scope of the search, it’s to say, where SAP will search for the “triggering points” of the message, usually marking “Programs” and “Classes” is enough:




Press enter and you will see all the source codes where this message can be triggered, if you are lucky only one program will appear, later we will see what we can do if more than one program contains the message.

In our example, only one program is presented:



Double click on the program short description, and SAP will automatically take you to the exact point in the source code where the message is triggered:




Now you have to investigate a little about the error, we need to know where those ZipCodes are stored, and see if we can add one more to the list. If you watch the source code, you will see that the condition that triggers the message is based on a variable called FOUND, which apparently is modified in the perform RE5UZC, let’s double click on this perform to access its code:




Clearly, the table that stores the ZipCodes is T5UZC. If you only need to know which ZipCodes are valid for PR state (which is the state we are using as example), you only need to go to SE16 enter this table and the corresponding filters to see the results. If you need to add a value in this table, or change the content, you need to go to the customizing activity, for that, you have to go transaction SM30, enter the table and press “Customizing”



Then select “Continue w/o specifying project”



You will then be taken to the customizing activity of this table:



There you can see the documentation, or modify the content to add more values, delete, etc, in order to by pass the error message.




This procedure will not be always that simple, sometimes there will be more than one program that can trigger the message, the solution for that can be setting a break point in every one, and then execute again the transaction to see in which one it stops, so that you can identify the source code. Or it can happen that there is no program at all that triggers the message, it can be due to that the message is dynamic, not very common though.


In the cases that you want to know if a error message can be turned into a warning message, you should procedure the same way, but you should check if there is another branch with the same message but instead of a ‘E’ as in error, a ‘W’ or ‘I’ as in warning and information respectively, something like this:


IF someCustomizingTable-someValue EQ X.

    MESSAGE E002(5U).


    MESSAGE W002(5U).



In these cases, you could access the customizing table someCustomizingTable and try to change the logic from there. Again, it probably won’t be that easy, but a little of research in the source code will give you the answer.


Here is another tip, it happens that users create tickets in the help desk about message that they saw, when you call them they cant replicate it anymore, but they do know what the message said; if you want to know how it could happen (by watching the source code involved), you can go to SE91 and select the match code of field “number” and click on the upper arrow



In the message text field enter the message (using wildcards if you don’t know the whole text, keep in mind that it is case sensitive)



Then press enter, you will get your message



The important fields are Application Area and Message number, with those values go back to SE91 and enter them



Then you can hit the “where-used” button and continue as explained before


I hope you found this blog useful!

Assigned tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Gomatheeswaran Palaniappan
      Gomatheeswaran Palaniappan
      Very useful document for functional consultant for diagnosis.
      Author's profile photo Brian Vanderwiel
      Brian Vanderwiel
      Good beginner blog.  I would just like to point out that using a breakpoint on the MESSAGE command in the debugger to find the location of the message is sometimes quicker and simpler (assuming debug access). 

      Here's how (NW 7+):
      Debugger on (/h)
      Break/Watchpoint tab
      Create button
      ABAP Cmnds tab
      Enter "Message" as the ABAP command

      This debugger will now stop on MESSAGE commands.

      Also available in 4.7 (and possibly earlier) using Breakpoint -> Break At -> Statement in the debugger.

      Author's profile photo Former Member
      Former Member
      Thank you very much Brian, excellent comment! I actually use your approach sometimes, but I thought that for functional beginners with little or no knowledge of programming it could be easier to follow the SE91 procedure; besides it is useful if you only know what the message says, and need to get into the source code with this information.
      Best regards!
      Author's profile photo Former Member
      Former Member
      This is certainly a great help for beginners!
      Author's profile photo Rémi Corriveau
      Rémi Corriveau

      Well done.

      Author's profile photo Former Member
      Former Member

      Very useful for the functional consultants 🙂

      Thank you.

      Author's profile photo Former Member
      Former Member

      Does anyone know how to write a code into java script to enter through these if they are soft warnings?