You are on page 1of 9

SAP-ABAP/4 Programming

SITA CORP ABAP/4 Training Material

Debugging

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 variable being used by the program .

2008 Intelligroup Inc.

Confidential and proprietary

Starting the ABAP / 4 Debugger in Different Ways


Method 1 : By Clicking the Execute button and enter /H in command box. Method 2 : In ABAP / 4 editor, by executing a program

Choosing Program-->Execute -->Debugging


from the Menu.

Method 3 : Setting Breakpoint in the Program.

2008 Intelligroup Inc.

Confidential and proprietary

Database transaction or LUW

In ABAP debugger we can view and change data. It also allow you to execute our program line by line.

2008 Intelligroup Inc.

Confidential and proprietary

Functions of the Debugger screen


Single step(F5) - Use this option to step through the program statement by statement. This allows you to branch into subroutines and function modules, and to execute these routines step by step as well. Once a subroutine or function module has been processed, control returns to the statement following the CALL FUNCTION or PERFORM statement. Execute(F6)- Use this option to process a program line by line. All of the statements on the current line are processed in a single step. If you are positioned on a line that calls a subroutine and you choose Execute, the Debugger processes the whole subroutine and then moves on to the line following the subroutine call. This allows you to jump through the 2008 Intelligroup Inc. statements within the subroutine. Confidential and proprietary

Functions of the Debugger screen

Return(F7) - The Debugger returns from a routine to the point at which control returns to the main program. Use this option to return from a subroutine, function module, or called program to the calling program. Continue(F8)- Use this option to process the program up to the next dynamic or static breakpoint or up to the cursor position. If there are no more breakpoints in the program and no cursor has been set, the system exits debugging mode and executes the rest of the program normally.

2008 Intelligroup Inc.

Confidential and proprietary

Watch Points

In SAP ABAP a WatchPoint can be set to break the program at the point when the value of a filed in the program changes. In SAP ABAP a maximum of 10 WathPoints can be set in a session. This is a very handy tool if you want to break and debug the program only from the point when a field under consideration has the desired value. 1. Choose Breakpoint Create watchpoint or the corresponding pushbutton. The Create Watchpoint dialog box appears: 2008 Intelligroup Inc. Confidential and proprietary Decide whether you want to set a local or global

Watch Points
If you want your watchpoint to be activated each time the contents of the field change, the definition is now complete, and you can return to the Debugger by pressing ENTER . To create a conditional watchpoint, that is only activated when a particular situation arises, choose one of the following relational operators Operator Meaning< Less than <=Less than or equal =Equal <>Not equal >= Greater than or equal 2008 Inc. than Confidential and proprietary Intelligroup > Greater

Watch Points

2008 Intelligroup Inc.

Confidential and proprietary

You might also like