SAP Help Information on how debug an ABAP program
Debug ABAP programs with SAP
It is very simple to debug an abap program you basically set a break point and then execute the program. When the
program gets to the line of code you have set the breakpoint at it will load up a debug screen and show you the
position it has got too. You can then perform various functionality such as single step through the rest of the
lines of code or allow it to continue to run the rest of the code etc.
One further thing to consider is that there are 2 type of breakpoint 'Session' and 'External'. Session is really
for basic ABAP reports and programs and external is for web application developments such BSP's and web dynpros.
Step 1 - Set break point in code
There are 2 basic ways to set a break point in your code the first is to add the red stop sign to row of code
where you want the abap program to stop. This can be done by left/right clicking in the left column next to the ABAP
code or clicking on the stop button in the top application bar.
Also note the second breakpoint icon which is for a session breakpoint
The alternative method is to hard code the breakpoint into your ABAP code using the BREAK-POINT statement.
You can also use BREAK followed by a valid SAP user name i.e. BREAK TESTUSER.
Step 2 - Execute ABAP code
Now execute the code and it should stop at your breakpoint and show you the debugber screen