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

BREAK POINTS & DEBUGGING

Former Member
0 Likes
3,454

hi.

plz suggest me the Use of <b>BREAK POINTS</b> in reports and also use of <b>DEBUGING..</b>

plz give me the steps to develop the same.

plz help me,

mahesh

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,931

Hi Mahesh,

You can use break point in any program by Clicking Stop sign on your application tool bar and as you run it, it will stop at that part of code. Its user and session specific.

For Debugging, you don't need to point break point, you can write /h in application tool bar and press enter, your debugging is switched on and then you can debug full code step by step, this technique is very useful for debugging standard SAP program where we need to see full code.

There is one more thing called watchpoint which you can put specific to some variable and as soon as variable value changes, you watchpoint will be trigger.

but first you need to create watchpoint for same variable.

i hope it clears your doubt

Regards

Manish

7 REPLIES 7
Read only

Former Member
0 Likes
1,932

Hi Mahesh,

You can use break point in any program by Clicking Stop sign on your application tool bar and as you run it, it will stop at that part of code. Its user and session specific.

For Debugging, you don't need to point break point, you can write /h in application tool bar and press enter, your debugging is switched on and then you can debug full code step by step, this technique is very useful for debugging standard SAP program where we need to see full code.

There is one more thing called watchpoint which you can put specific to some variable and as soon as variable value changes, you watchpoint will be trigger.

but first you need to create watchpoint for same variable.

i hope it clears your doubt

Regards

Manish

Read only

0 Likes
1,930

hi,thanks for the replye..

can u plz tell why the Debuging is required...

plz tell me

thank you,

mahesh

Read only

0 Likes
1,930

Hi,

SAP has a very powerful debugger tools in which you can view the data and change date in runtime.

Regards,

Krushna

Read only

Former Member
0 Likes
1,930

Hi,

Considering the complexity,the programs which we develop may not always behave as we expect. The syntax errors will get solved easily. But when we do mistakes while converting the business logic into actual program code logic then the actual requirement will be different than what the program actually does. Such a behaviour will become a bug and to remove that we need to look at the program when it is acutally running, to know the values which are getting stored in the varialbles. This is the point at when break-points help.

Debugging helps us resolve the logic mistakes which we do while coding.

Regards

Madhusudhan.

Read only

Former Member
0 Likes
1,930

Hi Mahesh,

Check this link.

http://help.sap.com/saphelp_nw2004s/helpdata/en/84/1f624f4505144199e3d570cf7a9225/frameset.htm

Here are some FAQ's over debugging,

Frequently Asked Questions

HOME:#How do I debug background Processes?

HOME:#How do I debug completed background process?

HOME:#How do I debug remote function calls?

HOME:#How do I debug Updates/System code?

HOME:#Why does it give a dump when I put a break-point in between SELECT and ENDSELECT?

HOME:#How do I set breakpoints in modal dialogs?

HOME:#How do I switch between the Classic and New Debugger?

HOME:#Where can I find more documentation?

How do I debug background Processes?

In transaction SM50 (process overview), you can select a background process and choose Program/Mode -> Program -> Debugging from the menu.

An alternative workaround, which allows you to step into a particular piece of code is to place a piece of code in a endless DO-ENDDO, where you can change a variable to step out of the DO at a particular point in your code. This allows you to hold the process at that point and debug it from SM50 as described above. An implementation of this exists in function module C160_HOLD_FOR_DEBUG, which will enter the endless loop if a particular environment variable is set, thereby allowing you to control its behaviour. (Further instructions are found in the comments in subroutine INC14Z_HOLD_FOR_DEBUG of include LC14ZFCB).

How do I debug completed background process?

You can do this only after the job has finished execution. This will simulate the exact background scenario with the same selection screen values as used in the job and sy-batch set to 'X'.

Use SM37 to get list of jobs , type 'JDBG' in the command line ( no '/' ), put the cursor on the job and press ENTER

You are in debug mode now. Step through SAP program (press F7 couple of times) until you get to code you need.

How do I debug remote function calls?

You can use the same techniques as described in HOME:#How do I debug background Processes? above.

How do I debug Updates/System code?

Both options are available from the menu in debugging. Choose Settings -> System/Update Debugging to activate either before proceeding.

Why does it give a dump when I put a break-point in between SELECT and ENDSELECT?

A breakpoint in SELECT loops can cause an exception through loss of the database cursor. The reason for this is that during debugging a database commit is triggered and hence the cursor is lost.

How do I set breakpoints in modal dialogs?

There are two similar approaches to set breakpoints in modal dialogs:

Approach 1:

Click on the Create shortcut icon on the toolbar.

In the popup window choose "System command" and in the command enter "/h"

A shortcut on the desktop would be created

Drag and drop the shortcut to the modal window to set debugging on.

Approach 2:

Create a txt file on the desktop with the following lines:

[HOME:FUNCTION]

Command=/H

Title=Debugger

Type=SystemCommandDrag and drop this file to the modal window to set debugging on.

How do I switch between the Classic and New Debugger?

From within the ABAP workbench, select the Utilities->Settings Menu

Select the ABAP Editor Tab

Select the Debugging tab within the ABAP Editor Tab

Select the Classic Debugger or New Debugger radio button

Rgds,

Naren

Message was edited by:

Naren Someneni

Read only

Former Member
0 Likes
1,930

hi,

Break Point is the signal, which specifies in the program. break point tells the system to stop the program execution in normal mode and starts the program executes under debugging mode.

Break point are two types,

Static Break Point and

Dynamic break point

<b>Static break point:</b> static break points are set up with BRERK POINT key word inside the program

break points are applicable each execution of the program.

<b>Dynamic break point:</b> dynamic break points are not visible in the source code.

position the cursor over the source code line to have the break point and the select UTILITY--->BREAK POINT-->SET.

Dynamic break points are applicable to single execution of the program.

<b>Purpose Of the Debugging:</b> We use Debugging to Analyse the result of every program statement.

<b>Transaction code for debugging is /h</b>

Follow this link for more information.

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

http://help.sap.com/saphelp_nw2004s/helpdata/en/43/95a6c84f7c60b7e10000000a11466f/content.htm

regards,

Ashokreddy.

Read only

Former Member
0 Likes
1,930

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

Check these documents.

http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc

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

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

http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc

http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm

http://help.sap.com/saphelp_nw04/helpdata/en/84/1f624f4505144199e3d570cf7a9225/frameset.htm

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

http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm

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

Look at the SAP help link below

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