ABAP Debugging
ABAP Debugging
Behavior of program
is different in different situation, with different values of variable. Such program needs
additional testing by which you can test the program by stopping at each point where you feel
program is behaving abnormally.
The abap/4 debugger is the development workbench tool which allows you to stop a program
during its execution when a particular condition is met. When the program is stopped, you can
use the debugger to display the contents of the table and the variable being used by the
program . it allows you to execute the program step by step reviewing exactly the real flow of
the program execution. When executing program the abap/4 debugger is automatically started
when the system encounters a breakpoint.
Starting the abap/4 debugger : their are many ways to start debugger.
4) Execute the program, in the selection screen, here in command field type /h, click on
execute.
5) If you want to test any transaction code ( eg: MM01,VA01,MM02,VA02 etc) go to that
transaction code, type /h in the command field, press enter button twice.
3) Return or f7 : processing returns to one level higher in the hierarchy or returns back
To previous point.
4) Continue or f8: executes the code from one breakpoint to next breakpoint or upto to
the end of the proram.
Breakpoint : it is a signal within a programs code that tells the abap/4 runtime processor to
interrupt a program at a particular point in the code. You can set the following types of
breakpoints.
In debugging mode of progam set breakpoint at loop at it_mara. Rightside type it_mara in
variable column. Postion the cursor on it_mara. Press create watchpoint icon on application
toolbar. Watchpoint screen will come and inthat screen in variable box it_mara will come
automatically. In free condition entry field type it_mara-matnr = ‘000000000000000023’. Press
enter. Watch point created message will come. Now press f8 , watchpoint reached message will
come.