0% found this document useful (0 votes)
39 views2 pages

ABAP Debugging

ABAP debugging
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views2 pages

ABAP Debugging

ABAP debugging
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

Debugging : many times an error free program doesn’t give desired output.

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.

1) By typing break-point keyword in the program.


2) Position the cursor on any executable line in the progam and click on set/delete
session break-point icon on application toolbar. If u want to delete it just click on the
Break-point symbol on the line.
3) Position the cursor on any executable line in the progam and click on set/delete
external break-point icon on application toolbar. If u want to delete it goto utilities
External breakpoints-- set/delete external breakpoint.

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.

Important debugging functions :

1) Single step or f5 : executes the program statement line by line.


2) Execute or f6 : executes all processing steps belonging to a line complexity in one step.
Ie in subroutines or function modules all lines will be processed in one step.

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.

1) Static : type breakpoint keyword in the abap code editor.


2) Dynamic : click on set/delete session break-point icon on application toolbar. click on
set/delete external break-point icon on application toolbar.
3) Watchpoints : it is set from within the debugger. They are field-specific. They are used
to see if any field value is changed or not. Its just an indication.

Creation of watchpoint : suppose in one internal table I am having 30 entries . in 21 st entry I


want to see what is happening. For this we will create watchpoint after creation of watchpoint
we will debug, once the message comes watchpoint reached debugger will stop.

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.

You might also like