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

debugging

Former Member
0 Likes
1,657

can any body send the actual real time procedure for debugging that will be exactly done by a abap programmer.please send the exact step by step procedure ,not any links.I will be thankful for those who have done it

8 REPLIES 8
Read only

Former Member
0 Likes
973

Hi,

go to se38->give ur program name-.execute->give /h at command prompt->execute->now debugging will start->

f5-used for line by line debugging

f6-used for directly executing function modules or performs i.e. control won't go into that block.

f7-run to cursor

f8-direct executing.

fileds: here we can check fild values.

click fileds option and double click on the filed or type the filen name beside filed

tables : here we can check the data in the internal table.

click tables option and double click on the internal table.

Break points:

if you want to debug a particulr part you can use this.

place the cursor at any perform click breakpoint or double click on that line.it will be set.

if /h from report statement it will debug,so for debugging from particular point we will use break points.use f7 to traverse between multiple break points.

Watch-points: In some cases we need to check the data populated in the internal table for eample if we want to check the data of internal table record belongs to 100th vendor we will create watch point for this goto->breakpoints->create watch points->give filed itab-lifnr->=->100.

debugging procedure:

Use '/H' in the command line and execute the report/program, so that it goes to debugging mode

2. keep a hard coded break point in the code like BREAK-POINT and it stops there.

3.From the program Menu, Keep the Soft Break-points and do the debugging.

see the links

Refer to this thread

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

http://www.sappro.com/downloads/Settings&SystemAreas.pdf

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

https://forums.sdn.sap.com/click.jspa?searchID=2673672&messageID=3187106

https://forums.sdn.sap.com/click.jspa?searchID=2673672&messageID=850453

https://forums.sdn.sap.com/click.jspa?searchID=2673672&messageID=1546485

https://forums.sdn.sap.com/click.jspa?searchID=2673628&messageID=2048883

http://www.saplinks.net/index.php?option=com_content&task=view&id=24&Itemid=34

http://www.sap-img.com/abap/testing-and-debugging-abap-codes-functions.htm

<b>Reward points</b>

Regards

Read only

Former Member
0 Likes
973

Go through the demo in the link it will show you.

ABAP Debugger - ECC 6.0 Please listen in SDN using head phones

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9cbb7716-0a01-0010-58b1-a2d...

Also please read below:

http://help.sap.com/saphelp_erp2005/helpdata/en/af/0cb5403fd63426e10000000a1550b0/con

Read only

Former Member
0 Likes
973

hi ,

SAP FI, CO, MM, PP, SD, PM, PS, QM, SM, HR, WF, BW, APO, Basis, ABAP/4, Certification, Books

Debugging Program with ABAP Debugger

Activate the Debugger before executing your ABAP program

System -> Utilities -> Debug ABAP/4

The purpose of the debugger is to allow you to execute your program line by line. It also allow you display the data as you execute the program. (double click on the varaible field name and it will be display)

or after program have been executed,

Run transaction SM66 and find your work process.

Select the line of your work process and double click on it

Click the debugging option.

If this is a custom program, you can put a wait statement in the code to buy yourself some time.

-


1) To understand the Watchpoint, you have to play with it.

a) Debug your program.

b) Place your cursor on the field you want to watch

c) Press Shift+F8, or click the Create Watchpoint button

d) Select the LOCAL WATCHPOINT checkbox if you want the watchpoint to be active for the immediate program only (and not includes etc. By default, you want to leave this unchecked).

e) Drop down on the relational operator, and choose one. They are self-explanatory. (For this example, use '=')

f) Select the COMPARISON FIELD checkbox if you want to check the field against another field, else leave unchecked if you want to check your field against a static value.

g) Enter your comparison field (if you checked the previous box) or your check value in the last box. Once your selected field equals the selected value, the program will break as if a breakpoint was reached. It is possible that the program never breaks, meaning your watchpoint criteria was never satisfied (For example if you check Itab-Field = VALUEA, if Itab-field never have a value equal to VALUEA the program will NOT break.)

2) I use SQL Trace is used for analysis, then based on the information retrieved I do manual tuning.

Sam Hearn - Business Analyst

-


I have another tip for 1 which is very handy (I've been using it for several months).

1. Create and save a file name AbapDebugParaPopUps.ini with the following contents using Notepad:

[System]

Name=MLP

Client=001

Description=MLP

[User]

Name=D000328

Language=D

Password=

[Function]

Command=/h

Title=/h in Popup aktivierbar

Type=SystemCommand

2. Add a link to it in the start menu of windows (or in a place of your desk accesible from a modal window)

3. Whenever you need to debug a modal window in abap, you just drag and drop the file onto the modal window and press enter or a function code that completes the screen. After that you'll enter in debug mode. <<AbapDebugparaPopUps.ini>>

reward points for the useful answers

regards

reena

Read only

Former Member
0 Likes
973

hi,

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.

At the moment, two types of debugging are possible: Debugging with the classic Debugger for release levels prior to 6.40 or debugging with the new Debugger, which is available for all releases after 6.40. The main differences between the classic and the new ABAP Debuggers are described below:

The new ABAP Debugger is executed in its own external mode (Debugger), while the application to be analyzed (debuggee) uses a second external mode. So far, the application to be analyzed and the debugger itself shared the same roll area of an external mode. For this reason, each action of the Debugger could influence the program flow of the application. Therefore, the classic Debugger cannot use any ABAP statements for designing the user interface. The path for designing modern UI techniques is not available for it.

· With the classic Debugger it is generally not possible to analyze programs in debugging mode that run in an ABAP processor unit and are called recursively from a subordinate unit. For example, a conversion exit cannot be analyzed using the Debugger if it runs within a WRITE statement. However, with the new Debugger this is possible.

The new Debugger provides the user with a flexible interface that can be configured as required and has more than eight desktops. Here it is possible to place and arrange up to four tools - depending on the user's selection. For example, it is possible to display source texts or structures. In this way, the user can design the Debugger interface according to his own individual requirements.

As of Release 6.40, you can select the debugging type as you wish by choosing the classic Debugger or the new Debugger in the ABAP Editor from the path Utilities ® Settings. It is also possible to switch the debugger at any time during a session under the menu option Debugging.

There are plans to make the new Debugger the default option as soon as it contains the following functions, which are currently not available:

Watchpoints

Debugging special types (http, BSP, RFC, update task)

Display of memory consumption

Display of system areas

to debug an abap program created in SE38

follow this steps

open your program

in command prompt type /h it will start your session in debugging mode.

press execute button now your program goes in debug mode.

press following functional keys

press key F5 which starts debugging code line by line debugging

press key F6 which starts debugging code directly multiple lines (ie.,executing a function blok at a time)

press key F7 to run debugging mode including cursor to specify location.

press key F8 to execute the code with out debugging

you can please watch points

Watchpoints allow you the option of monitoring the content of individual variables.

The Debugger stops as soon as the value of the monitored variable changes.

In addition, conditions can be specified. The Debugger also checks whether such a condition is fulfilled.

also can set break points

Apart from being able to execute an ABAP program in the Debugger, you can also start the Debugger call by the choosing a breakpoint. This is achieved by setting one or more of these breakpoints in the program. A breakpoint is a signal at a particular point in the program that tells the ABAP runtime processor to interrupt processing and start the Debugger. The Debugger is activated when the program reaches this point.

**********please reward points if the information is helpful to you*********************

Read only

former_member196299
Active Contributor
0 Likes
973

hi Sandeep ,

Generally we do debugging for any program to check the steps and findout where is the problem in the program during runtime , which is one of the very essential part of programming .

You may get various materials on net for debugging, anyways below are some of the simple ways for the beginners .

NOTE :You can put break points in an activated report .

You can start debugging for a program in many ways.

for example : if u are debugging a report then open your report an put break-points in the areas you doubt to have the problem .By putting break points your program will stop in those areas and then you can check the values of the variables .

there are few things to be remembered :

f5-used for line by line debugging

f6-used for directly executing function modules or performs i.e. control won't go into that block.

f7-run to cursor

f8-direct executing.

fileds: here we can check fild values.

click fileds option and double click on the filed or type the filen name beside filed

tables : here we can check the data in the internal table.

click tables option and double click on the internal table.

The other way to start debugging is put /h and then execute your program , you will reach to the 1st step the system does for you and then you can continue to debug further taking help of the f5,f6,f7 and f8 function keys .

Hope these informatioons will be helpful to you !

Regards,

Ranjita

Read only

Former Member
0 Likes
973

Hi

1. If you wants to debug any transection just open the transection first.

Then before executing it put '/H' and press enter on same screen and then execute.

The whole program will execute in debugger mode.

2. Secondly if u are debugging Z program u can put break-point command anywhere in the program and then execute it.

regards

sukhjinder

Read only

Former Member
0 Likes
973

Starting the Debugger

There are two possible strategies for starting the Debugger in the ABAP Workbench:

• By setting breakpoints then running the program

• By running the program in debugging mode.

Setting Breakpoints

A breakpoint is a signal in a line of code that tells the ABAP runtime processor to interrupt the program at that line and start the ABAP Debugger. A distinction is made between static and dynamic breakpoints. For further information about the different types of breakpoints and how to use them, refer to Breakpoints.

Running a Program in Debugging Mode

You can start the Debugger without previously having set breakpoints. This is the best procedure to use when you want to test a program right from the beginning. It is also useful if you do not know the program very well and therefore are not sure where best to set breakpoints. You can start the Debugger as follows:

From the Object Navigator Select a report or transaction and program and choose Program &#61614;&#61472;Test &#61614;&#61472;Debugging.

From the ABAP Editor Choose Program &#61614; Execute &#61614; Debugging (or the Debugging pushbutton).

From any screen Choose System &#61614; Utilities &#61614; Debug ABAP.

From any screen Enter " /h " in the command field.

Checking System Programs for Errors

To check a program or program component that is part of the ABAP Workbench (for example, the Screen Painter), you must use the system Debugger. To start the system Debugger, choose

Starting the Debugger

There are two possible strategies for starting the Debugger in the ABAP Workbench:

• By setting breakpoints then running the program

• By running the program in debugging mode.

Setting Breakpoints

A breakpoint is a signal in a line of code that tells the ABAP runtime processor to interrupt the program at that line and start the ABAP Debugger. A distinction is made between static and dynamic breakpoints. For further information about the different types of breakpoints and how to use them, refer to Breakpoints.

Running a Program in Debugging Mode

You can start the Debugger without previously having set breakpoints. This is the best procedure to use when you want to test a program right from the beginning. It is also useful if you do not know the program very well and therefore are not sure where best to set breakpoints. You can start the Debugger as follows:

From the Object Navigator Select a report or transaction and program and choose Program &#61614;&#61472;Test &#61614;&#61472;Debugging.

From the ABAP Editor Choose Program &#61614; Execute &#61614; Debugging (or the Debugging pushbutton).

From any screen Choose System &#61614; Utilities &#61614; Debug ABAP.

From any screen Enter " /h " in the command field.

Checking System Programs for Errors

To check a program or program component that is part of the ABAP Workbench (for example, the Screen Painter), you must use the system Debugger. To start the system Debugger, choose

Display Modes Available Using Pushbuttons

Fields The scrollable field display contains the contents of up to eight fields. The contents of the three most important system fields are always displayed. This is the default display mode in the Debugger. See also Processing Fields

Table Displays the contents of an internal table. This mode allows you to display and edit the entries in an internal table. See also Processing Internal Tables

Breakpoints A scrollable display containing up to 30 breakpoints. Next to each breakpoint is a counter. You can also delete breakpoints in this display. See also Managing Dynamic Breakpoints

Watchpoints You can set a watchpoint for a field so that the program is interrupted whenever the value of that field changes. This display mode contains a list of watchpoints, the fields and programs to which they are assigned, the current values of the fields, and the conditions upon which the watchpoint is activated. See also Setting Watchpoints

Calls This mode displays the current sequence of events, and the sequence of calls up to the current breakpoint. The last active call is displayed at the top of the list; previous calls are listed in reverse chronological order. When an event (for example, START-OF-SELECTION) concludes, it is deleted from the display.

Overview This mode displays the structure of the program. It lists its events, subroutines, and modules, and shows which sections belong to which events. It also displays the section currently being processed.

Settings This mode displays the current Debugger settings. You can change the settings by selecting or deselecting various options. For further information, refer to Settings and Warnings