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:
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.
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.
RSRT —> give the Query name and execute Debugging with /h .
Start the query from BEx, then go to SM50 and take in debugging the process in loop. (Program/Session-Program – Debugging).
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
- 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.
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.
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.