0% found this document useful (0 votes)
47 views18 pages

ABAP Debugging

This document discusses debugging in ABAP programs. It defines debugging as identifying errors in programs using an ABAP debugger. The debugger allows stopping a program at specific statements, events, modules or exceptions. It can display and change field values at runtime. The document describes how to set breakpoints and watchpoints to interrupt a program, and explains the debugger interface including different display modes.

Uploaded by

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

ABAP Debugging

This document discusses debugging in ABAP programs. It defines debugging as identifying errors in programs using an ABAP debugger. The debugger allows stopping a program at specific statements, events, modules or exceptions. It can display and change field values at runtime. The document describes how to set breakpoints and watchpoints to interrupt a program, and explains the debugger interface including different display modes.

Uploaded by

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

Error is not a terror till ………

It is detected and prevented from hampering the


desirables .
We write programs to meet our demands.

And like other actions , we make mistakes while


writing the code .

If they are not trapped at the right time, problem


becomes bigger, and bigger and bigger …….
Mistakes can be syntactical or logical .

Syntactical errors are trapped during syntax check in code


editor .Program does not get compiled and activated till
they are removed .

Existence of logical errors are not understood till


we get a difference in outputs .It can reside
anywhere in flow logic and can get activated
when the proper condition is fired .
ABAP Debugger helps to get rid of logical mistakes by
trapping the field values at different stages in program flow .
DEBUGGER

Efficient means of identifying errors in ABAP


programs .

Programs can be stopped at a particular statement ,


event , subroutine , function module or system
exceptions .

Field contents can be displayed or changed at


runtime .
STARTING OF DEBUGGER

From Initial screen of


ABAP Editor

From Menu path of any


screen

By /h method
Let us see how the initial screen of a debugger looks like
Fields
The scrollable field display contains the contents of up to eight fields. The
contents of the three most important system fields are always displayed.
This is the default display mode in the Debugger.

Table
Displays the contents of an internal table. This mode allows you to display
and edit the entries in an internal table.

Breakpoints
A scrollable display containing up to 30 breakpoints. Next to each
breakpoint is a counter. You can also delete breakpoints in this display.

Watch points
You can set a watchpoint for a field so that the program is interrupted
whenever the value of that field changes. This display mode contains a
list of watchpoints, the fields and programs to which they are assigned,
the current values of the fields, and the conditions upon which the
watchpoint is activated.
Calls
This mode displays the current sequence of events, and the sequence of
calls up to the current breakpoint. The last active call is displayed at the
top of the list; previous calls are listed in reverse chronological order.
When an event (for example, START-OF-SELECTION) concludes, it is
deleted from the display.

Overview
This mode displays the structure of the program. It lists its events,
subroutines, and modules, and shows which sections belong to which
events. It also displays the section currently being processed.

Settings
This mode displays the current Debugger settings. You can change the
settings by selecting or deselecting various options
Other Display Modes
There are other display modes, which you can access using the Goto
menu:

Single field
Displays the contents and technical attributes of a field

Structured field
Displays the components of a structure, along with their contents and
attributes. If you double-click a component, the system displays detailed
information for it (see Single field above).

Object
Displays the structure of an object in ABAP Objects.
Breakpoint

Signal at a particular point in the program telling the


runtime processor to interrupt processing and start the
debugger
Breakpoints

Static Dynamic

Directly Set Specially Set

At At At function At system
statement Event module exceptions
You leave the debugger and all your dynamic breakpoints are lost .

But , you want to retain them to use them after you do some other
work and then again enter into debugger mode for the program
within the same terminal session .
If this is the case , then you have to save the breakpoints .
All you have to do is follows the menu path : Breakpoint-->Save .

Remember , the moment you leave the terminal session , all


your breakpoints set dynamically, saved or unsaved , are lost .
Display Breakpoints

Display Directly Set Breakpoints from ABAP Editor:-

1. Click here to see the process .

2. Click here to see the results .

Display Dynamic Breakpoints(Direct/Special) from


Debugger:-
Click here to see what to do .
Click here to view list of breakpoints .
WATCHPOINTS

Indicator in a program that tells the ABAP runtime processor to


interrupt the program at a particular point .
Not activated until contents of a specified field change .
User specific , hence does not affect other users running the same
program .
Can only de defined in debugger .
Up to 5 watch points can be set for a program .
Watch point monitor contents of specific fields . They inform when the
value of a field changes .
Conditions for activation of watch points can be set .
One can specify logical conditions between up to 5 conditional watch
points .
Can be defined as either global or local . A global watch point is active in
all called program . Local watch points are only active in a specified
watch point .
Can be changed or deleted .
Creating Watch points
Start the debugger .
Follow menu path :- Choose-->Create Watchpoint or press Create
Watchpoint button from the Application Toolbar .A dialog box appears .
 Choose for local or global watchpoints .
 Enter name of the field for which watchpoint is to be set .
Enter conditions , if any , for activation of the watchpoint .

Changing Watchpoints
In debugger , follow menu path : Go to-->Control Debugging-->
Watchpoints or press the Watchpoint pushbutton at the top of the screen
.
A list of watchpoints will be shown in tabular display .
To change the watchpoint , choose the Change pushbutton with pencil icon
for the watchpoint . To delete it , press the Delete pushbutton for the
watchpoint with garbage icon .
Pushbuttons for Program Execution in Debugger

Continue
Single Step Execute Return Display List
(till cursor)

You might also like