Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Regarding debugger...

Former Member
0 Likes
646

Hi,

Can anybody provide the material for debugger in ABAP.

Thanks in advance

Badri.

1 ACCEPTED SOLUTION
4 REPLIES 4
Read only

Former Member
0 Likes
617

http://help.sap.com/saphelp_470/helpdata//EN/10/6d1c370c468b7be10000009b38f936/frameset.htm

Refer to that link.

BR, JAcek

P>S Plese reward helpful answers

Message was edited by: Jacek Slowikowski

Read only

Former Member
0 Likes
617

Hi,

See the links ==>

http://help.sap.com/saphelp_webas620/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm

For screens which does not have command lines you can follow the steps.

1) create a file debug.txt with the below code

[FUNCTION]
Command=/H
Title=Debugger
Type=SystemCommand

2) Save it

3) Drag and drop this file on the screen in which you need to debug.

Rgds,

Thomas.

Read only

Former Member
0 Likes
617

Hi Badri,

check this material.

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 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.

There are many occasions during normal system operation during which the ABAP/4 debugger can be started. When executing program, the ABAP/4 debugger is automatically started when the system encounters a breakpoint.

Starting the ABAP/4 debugger

There are many ways to start debugger

• By clicking the Execute button and selecting the debugging mode.

• From the ABAP/4 editor, by executing a program choosing Program  Execute  Debugging from the menu.

• Setting breakpoint in the program

Components of ABAP/4 debugger

The debugger shows the program information using six different views.

• Fields: Displays the field contents.

• Table: Allows modifying the contents of internal table.

• Breakpoints: Displays list of Breakpoint in the Program.

• Watchpoints: Allows dealing with Watchpoints.

• Calls: System call status like Event, Form etc.,

• Overview: Presents the program structure, events, subroutines, and modules.

• Settings: Displays the calling sequence within a particular event, up to the current breakpoint.

Arrow indicates the breakpoint of the program i.e., where user has stopped the program.

Breakpoints

A breakpoint is the signal, which is specified in the program, tells the system to stop the program execution and to start the debugger. Following types of breakpoint are available with ABAP/4:

• Static are set up with the BREAKPOINT keyword inside the program, which you can directly display with the ABAP/4 source code editor. To set the breakpoint in the program enters the keyboard BREAKPOINT.

• Dynamic this breakpoint is not visible in the code. Position the cursor over the source code line to have the breakpoint and then select utilities -  breakpoint -  set. You can delete them or display them from breakpoint list. Or you can execute the program in the ABAP/4 debugger i.e., in debugging mode.

• Watchpoints are field specific. The program is stopped when the field reaches the value specified in the watchpoint. Execute the program in debugging mode. Position the cursor over the needed field. Press the F button to get the view of field. Select the checkbox for the needed watchpoint. Click on the continue button.

• Keywords/events The program stops just before executing a specific event or keyword. To set breakpoint at particular event, from initial screen of debugger, select Breakpoint  Breakpoint at  at event/at keyword. Enter the name of the keyword or event. Click on OK.

Navigating through the breakpoint

Following buttons are used to navigate through the program and debugger.

• Single step: Executes a single program command.

• Execute: Similar to the single step, but when a program calls a subroutine, it executes the whole subroutine unlike single step.

• Continue: Executes the program until it is finished or until it finds next breakpoint.

• Return: Allows for executing the program instruction up to the end of a routine and stops in the line of code where the subroutine gives back control to the main program.

• Tables: Switches the debugger to the table view.

Displaying and modifying values

Every time the program is stopped within a debugger, you can display and modify the contents of table field and fields.

To display the fields, click on V and you can view the contents of system field, program field, ABAP/4 dictionary fields, and external program fields.

Displaying and modifying internal tables

When you click on the Table button from the initial ABAP/4 debugger screen, the system will display the table debugger view. Here you need to enter the name of the internal table to be displayed. You can modify or delete or add i.e., insert the internal table Contents. These changes are applicable only for the debugging and do not affect the structure of internal table in the program.

Setting WATCHPOINTS

• Execute a program in debugging mode.

• Position the cursor over the needed field.

• Press the F button to get a view of the fields.

• Select the checkbox for the needed watchpoint.

• Click on the CONTINUE button.

• To display the active watchpoint select Goto -  Breakpoint

Thanks & Regards,

kalyani A