ABAP - Debugging
ABAP debugging
Debugging is a process to understand program behavior in runtime. SAP has a inbuilt debugger which is part of the ABAP workbench. Debugging steps
There are two possible strategies for starting the Debugger in the ABAP Workbench:
By running the program in debugging mode.
By setting breakpoints then running the program Running a Program in Debugging Mode
- From the Object Navigator -> select a program and choose Test/Execute from the Development Object menu. The Choose Execution Type dialog box appears. Choose Debugging
- From the initial screen of the ABAP Editor Choose Program -> Execute ->Debugging (or the Debugging pushbutton).
- From any screen Choose System ® Utilities ® Debug ABAP.
- From any screen Enter " /h " in the command field.
- Breakpoints.
There are two types of breakpoints - Static
- Dynamic Static Break points
Addition of a break point statement in your program.
Static breakpoints are not normally user-specific. However, you can make them user-specific.
Dynamic Breakpoints
- Directly-set dynamic breakpoints: Can be set in the ABAP Editor or the Debugger. Dynamic breakpoints are displayed as stop signs in the Debugger and ABAP Editor. Unlike static breakpoints, they are user-specific, and are deleted when you log off from the R/3 System.
- Breakpoint at statement: The Debugger stops the program directly before the specified statement is executed. You set this special kind of dynamic breakpoint in the Debugger.
- Breakpoint at event: The Debugger stops the program directly before an event, subroutine, or module pool is called. You set this special kind of dynamic breakpoint in the Debugger.
- Breakpoints at System Exceptions: The Debugger stops the program directly after a system exception, that is, after a runtime error has been intercepted by a CATCH statement.
Watchpoints
A watchpoint is an indicator in a program that tells the ABAP runtime processor to interrupt the program at a particular point. Unlike breakpoints, however, watchpoints are not activated until the contents of a specified field change. Watchpoints, like dynamic breakpoints, are user-specific, and so do not affect other users running the same program.
You can only define watchpoints in the Debugger .You set watchpoints in the Debugger to monitor the contents of specific fields. They inform you when the value of a field changes. When the value changes, the Debugger interrupts the program
Comments
Post a Comment