Skip to Content
Technical Articles
Author's profile photo Shreya Gulati

Message Maintenance

In this blog post, you’ll get to know about Message Maintenance (SE91) t-code. Recently, I got to know about Message Maintenance t-code (SE91) and I thought to share this useful information that might help in resolving daily authorization issues.

Have you ever come across an authorization issue, where the user’s roles are perfect, but still the user is receiving the error “You’re not authorized to…” ?

Message Maintenance (SE91) might turn out to be very useful for you in deep diving to the root cause of the issue.

Message Maintenance

All types of messages which the SAP end user receives are a part of message class. If you’ve ever noticed an error message, it always comes with a ‘Message no. XXXXX123’, where XXXXX is the message class and 123 is the message number.

To access Message Maintenance, go to transaction SE91. Here, you can also create your own custom messages by clicking on ‘Create’ button. But in this blog, we’ll learn how to use Message Maintenance as a catalyst in resolving the authorization issues.

How to use Message Maintenance

  1. Go to T-code SE91. Type the message class in the input field.
  2. Type your message number in the number input field.
  3. Click on Display. When you’ll click on display, you’ll get all the other messages present in the message class along with the message number you’ve entered.

Here, you can click on that message and click on ‘where used list’ button, you’ll get the list of programs in which that error message is being used.

You can check the ‘AUTHORITY-CHECK’ statements in that program to find out the missing authorizations.

Usually, developers put useful information in ‘comments’. Like, some specific table entries which need to be filled to pass the authority check or some other conditions. This has literally helped me in resolving some of the authorization issues.

 

I hope this tool will help you in some of your daily tasks!

Thank You!

Assigned Tags

      5 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Terra Wilder
      Terra Wilder

      very helpful, thanks for sharing, below article also helpful for message maintenance

       

      https://blogs.sap.com/2016/07/09/how-to-maintain-customized-message-with-documentation/

      Author's profile photo Shreya Gulati
      Shreya Gulati
      Blog Post Author

      Thank you Terra!
      Yes the article you shared is very useful for creating new custom messages. Thanks for sharing.

      Author's profile photo Matthew Billingham
      Matthew Billingham

      The where used doesn't always work, unfortunately, since the message id and number can be variables. Or perhaps written into a log. Here's a bit of code from the generic datasource extractor function module template RSAX_BIW_GET_DATA..

          IF NOT g_flag_interface_initialized IS INITIAL.
      
            IF 1 = 2. MESSAGE e008(r3). ENDIF.
            log_write 'E'                    "message type
                      'R3'                   "message class
                      '008'                  "message number
                      ' '                    "message variable 1
                      ' '.                   "message variable 2
            RAISE error_passed_to_mess_handler.
          ENDIF.

      What the programmer has sensibly done here is put the message into a bit of code that can't be executed, before using the logging functionality. This way, you can use where used.

      The take home from this is that even when you're not using MESSAGE directly, but using variables in some way, always indicate what the message is in the code so that where used can work.

      For finding authorisation failures, you can use ST01 to trace the authorisation checks and find out exactly where the check is being made and which one it is. There are also tools to assist with this available from SAP partners.

      Author's profile photo Shreya Gulati
      Shreya Gulati
      Blog Post Author

      Thank you Matthew for sharing. This is very useful.
      And yes for authorization issues we do have trace and other tools as well. But SE91 has also helped in finding the root cause of some issues for which even trace wasn't able to help.

      Author's profile photo Matthew Billingham
      Matthew Billingham

      If it's to do with authorisation checks, then the trace should pick it up. But the trace is application server dependent, so you have to set it on all of them, otherwise you might be tracing on a appserver that isn't the one the user is logged into.

      Another tip, if you have debug, and are looking for message like 001(S1), then run the transaction in debug and set a watchpoint on sy-msgo = '001', and click on continue.

      The debugger will stop for all messages with number '001'. Usually you find the right one quite quickly.

      But even that doesn't work sometimes. Then it gets difficult.