Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
1. OVERVIEW

In some occasions we need to find exactly where a SELECT statement is done for a particular table.

We can use breakpoint for SELECT statement but, most probably, the debugging session can be hard due to the number of hits we can get.

We can use some traces transaction like ST05 or ST12, but we need to switch ON/OFF the trace and then analyse the result.

To go straight forward and find exactly the place in the code where table, or a group of them, are being involved in a SELECT statement we can use Filter Criteria for the Breakpoint.

 

2. TEST CASE

Imagine that we want to identify where tables EKKO and EKPO are being selected during execution of Transaction Code  ME23N - Display Purchase Order

 

Start a debugging session:



 

Press ENTER:



 

Run TCode ME23N and press ENTER:



 

Just after debugging environment is available, create a Breakpoint for SELECT statement:





 

Now go to “Break./Watchpoints” tab:



 

Select the line for Breakpoint created and press “Define Filter”:



 

Select RSTPDA_SCRIPT_BP_SQL_DBTAB filter option:



 

Now write the table you want to focus on:



 

Actually this is a Select Options, so you can decided the tables as you wish:



 

Then, accept the selection criteria. You can decide to save the breakpoint but although breakpoint will be available for next run the filter is removed so just put it back if you need to debug again:



 

Go to Desktop 1 tab:



 

Press F8 … Hit for EKKO reached!



 

Press F8… again another EKKO selection:



 

Now EKPO hit!:



 

And another EKPO selection found!:



 

3. CONCLUSION

We can save much time to find out where a particular table is used in a SELECT statement or where to develop an enhancement after the SELECT.

Finally mention that his approach is also working when SELECT statement is built with dynamic table name:
https://help.sap.com/viewer/cfae740a0a21455dbe6e510c2d86e36a/7.3.19/en-US/fceb39c4358411d1829f0000e8...



 

Alfonso Rodríguez Pérez.
SAP ABAP Consultant.
18 Comments