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

how can i debug my abap program?

Former Member
0 Likes
2,435

hi. how can i debug my program?

5 REPLIES 5
Read only

asik_shameem
Active Contributor
0 Likes
1,727

Hi

1. Put /h and execute.

or

2. In the program put a break-point and execute. control will stop at that point after that you can debug.

or

3.Go to SE38, enter your program name and press the button debug in the application tool bar

Read only

0 Likes
1,727

Clicking the debugging button and a pop up appears:

Inactive vesrions of this object or subobject exist

Only active versions will be used when you execute

The programm contains the access to fields of a predefined table. But those elements are all activated.

What seems to be the problem?

Read only

Former Member
0 Likes
1,727

Hi,

To debug ur program,

1.Put cursor in a particular statement in SE38

2.Click on "stop"(red button) on application toolbar

3.execute the program.

4.Press F5/F6

observe the step by step execution

Reward,if useful.

Thanks,

Chandu

Read only

anversha_s
Active Contributor
0 Likes
1,727

Hi,

please find this methods.

http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/frameset.htm

For debugging tutorial:

http://help.sap.com/saphelp_erp2005vp/helpdata/en/5a/4ed93f130f9215e10000000a155106/frameset.htm

http://www.sapdevelopment.co.uk/tips/debug/debughome.htm

http://www.sap-basis-abap.com/sapab002.htm

System Debugging

If you set this option, the Debugger is also activated for system programs

(programs with status S in their program attributes). When you save breakpoints, the System Debugging setting is also saved.

Up_date Debugging_

Update function modules do not run in the same user session as the program that is currently running in the ABAP Debugger.

These function modules are therefore not included in debugging.

Only if you select the Update Debugging option can you display and debug them after the COMMIT WORK.

Normal Debugging

Normal debugging is the one we do it by the normal dynamic break points or by /H or by using stattic break points.

You can switch to diffferent debuggin modes while processing.

Regards,

Anversha

Read only

Former Member
0 Likes
1,727

Hi,

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.

All these options are shown in the following screen.

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.

Reward.