Académique Documents
Professionnel Documents
Culture Documents
Version 1.0
Compiled by : Siddhartha Srivastava
Reviewed by: Venu Gurram
Author email id : siddhartha.srivastava@igate.com
Review date: 27 Jan 2015
-1-
Topics to be covered
Overview
Different types of breakpoints
Flow of Control
Debugger Settings
Debugging various ABAP objects
-2-
Overview - Introduction
For any day to day issue faced in SAP, debugger is the most basic tool that
can be utilized to reach the root cause. It not only lets you trouble shoot
effectively but also helps you visualize what-if scenarios.
The Debugger is a programming tool that you can use to execute ABAP
programs, by line or by section. With this tool, you can display data objects
and check the flow logic of programs.
There are two types of Debugger available:
Classic Debugger for release levels up to and including 6.40
New Debugger, which is available for all releases after 6.40
-3-
Overview - Difference
Classic Debugger
-4-
Overview - Switching
Switching from new debugger to classic debugger
-5-
-6-
-7-
2. Session Breakpoint
It is valid for all user logons on the current server of the current system.
It is particularly required ,when debugging BSP applications.
It is valid only for a period of 2 hours.
-8-
Dynamic/Session break points: We can put dynamic breakpoints from SE80 or SE38 or
debugger. Dynamic breakpoints are always user-specific, and are deleted when you log off from
the R/3 System. They can be deleted or deactivated during runtime.
-9-
In SE80: Select a program or transaction and from the top menu choose
Program -> Test -> Debugging.
In SE38: From the top menu choose Program -> Test -> Debugging.
From any other screen: From the top menu choose System -> Utilities -> Debug
ABAP
or Enter /h in the command field and press enter.
Once inside the debugger, breakpoints can be set at statements, subroutines, FM, etc
as shown here.
- 10 -
Flow of Control
F5 (Single Step)
F6 (Execute)
- 11 -
Choose Watchpoint.
Enter the name of the field for which
you want to set the watchpoint. In the
Program field, the name of the program
currently running is always defaulted.
You can use the Additional Condition
option to specify whether the flow
should interrupt after meeting the
specified condition.
Useful in looping conditions where you have
to reach a particular material out of several
iterations. This can be achieved by setting
the variable SY-TABIX = intended iteration.
- 12 -
Debugger Settings
Debugger settings are accessed in ABAP debugger by navigating to Settings >
Display/Change Debugger settings.
- 13 -
In SE71 (which is the transaction for Sap script), from top menu goto Utilities>Activate Debugger. The debugger will be get activated and when your print program
is executing Script Debugger will be in active state and you can proceed with your
debugging.
Goto SE38-> Give the program name RSTXDBUG ->Execute this same as going
through in se71-> Menu, now debugger will be activated.
- 14 -
- 15 -
This include contains the entire code i.e. the code we have written in initialization
+ form routines + program lines + sap generated code. Put a breakpoint at any
point you want. If we issue any doc which triggers this form, when the control
reaches the break point it will stop. Prefer session break point in the related
function module.
January 27, 2015
- 16 -
- 17 -
- 18 -
Thank You!
- 19 -