Skip to Content

As I had to perform debugging of a BEx query to resolve a query issue, I have come across different ways in which we can debug a BEx query. Following are the different ways I could think of:

Option 1:
Go to RSRT give the technical name of the query —->Press on Technical Information.Copy the Name of Generated Program by SAP for example GP4FPXSHQLLJ6VFZGM8YGMXRM0P is the program name.
Now get into SE38—> give the Program name GP4FPXSHQLLJ6VFZGM8YGMXRM0P and execute the program name.
Give selective internal and external break points and Debug accordingly.

Option 2:
In general way go to RSRT —> give the Query name and execute with Debug.

Execute + Debug option enables for example to check aggregates, set authorization breakpoints, run query with BI Accelerator, display SQL statement for the query and show BW statistics.

You may choose different query display format. BEX Analyser display format is by far the fastest and the simplest, List gives you additional query options and using HTML format you receive portal-like view.

Option 3:

RSRT —> give the Query name and execute Debugging with /h .

Option 4:

Start the query from BEx, then go to SM50 and take in debugging the process in loop. (Program/Session-Program – Debugging).

 SM50

 

SM50

 

 

Option 5:

Using other T Codes –

  • RSRTRACE  to set a specific trace on a query/user
  • SQL Trace (ST05): to check if the DB statistics of your tables are up-to-date, to check if your indices exist and non-degenerated, aggregates are used, data model is sound, buffers and caches are used as expected

         ST05

     

ST05   

  • ABAP Trace (SE30): to identify those parts of an ABAP coding which consumes most of the time (highest optimization potential), to check number of executions per call, to locate origin of function / method calls, to analyze customer specific coding like user exits, virtual key figures, etc.

SE30

 

SE30

 

 

Notes:

1. Display of MDX from the menu “Display MDX Statement” is not supported anymore. The MDX can be displayed only when executing the query. To do that, go to transaction RSCRMDEBUG. Enter Username and the Debugging Options as #mdx_gen#. Choose #Insert# and execute. Then exit this screen and go to transaction RSCRM_BAPI. Execute the query and you would see a popup appears prompting the display of MDX query.

To stop the popup, follow same steps, instead of #Insert# choose
#Delete# and execute.

This would help you view the MDX Statement.

2. If you want to debug any Customer Exit, you can put a BREAK_POINT after       “WHEN” statement, save and activate CMOD include. Try to execute query from BEx, you can directly jump into debugging mode.

You can also set this code at start of the include:
DATA: FLAG TYPE C.
WHILE FLAG IS INITIAL.
ENDWHILE.
Pay attention to leave the code immediately after that.

3. You can use the tool to check users’ authorization to a query. To execute a query as another user start RSUDO transaction and choose a user and a query

 I would also request other bloggers to add in any other options /scenarios/tricks that you have come across when debugging a BEx query.

To report this post you need to login first.

4 Comments

You must be Logged on to comment or reply to a post.

  1. J├╝rgen Noe
    This is a very good overview about possible debug options for a BEx query. I use RSRT in 90% of the cases. It’s not clear when I should use other options you mentioned. Can you give some light on this?

    Regards,
    Juergen

    (0) 
    1. Dhanya Anthikatepambil Post author
      Thanks Juergen for the feedback!
      RSRT gives you option of debugging only on the set checklist that you see when you click on ‘Execute +Debug’.
      But if you want to check the variable exits and virtual key figures, detail analysis of SQL statements, to check runtime of query,if  buffers and caches are used as expected, etc..you may want to use other options.
      (0) 

Leave a Reply