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
698

hai sir

1. how many max. break points can u keep in one program.

2. when bugs occur in program.( while doing debugging).

3. how can debugg the smart forms.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
676

Hi,

1. how many max. break points can u keep in one program.

Maximum of 30 breakpoints

2. when bugs occur in program.( while doing debugging).

Debugging is used to check whether the logic which we have written works correctly.

We don't get bugs in debugging.

o 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

3. how can debugg the smart forms.

In the Smartform, within the Code Node you can hardcode a normal abap Break Point ..

Please set a break point in side the smartform:

BREAK <USERNAME>.

Then at the time of print/ preview the program stops there.

Example : If you set the break point in initializationas

BREAK <USERNAME>.

Program stops at break point. After that use Serach and set more break points.

-


>Search the program logic/Textelement/Address via search and set the break point at that code.

Other way to debug smartform is to debug the Function Module of that smartforms. If you want to debug particular smartform node that the solution would be, insert a "Program Line" just above the node you want to debug and this program line write a normal abap breakpoint. So whenever you call the smartforms, it will stop at this breakpoint and you can debug onwards.

or

SFTRACE can be used for debugging SMARTFORMS.

Read More here.

http://help.sap.com/saphelp_erp2004/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm

See the Below thread for how to debug the Smartforms

Regards,

Priyanka.

4 REPLIES 4
Read only

Former Member
0 Likes
676

hi,

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

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.

u can set 5 watch points.

Edited by: p541399 on Feb 27, 2008 11:16 AM

Read only

Former Member
0 Likes
676

Hi,

Smartforms can be debugge , by debugging directly Function module.

If u written any code in smartform itself. write

BREAK-POINT.

the cursor takes u directly to this point.

Regards,

sarath

Read only

Former Member
0 Likes
677

Hi,

1. how many max. break points can u keep in one program.

Maximum of 30 breakpoints

2. when bugs occur in program.( while doing debugging).

Debugging is used to check whether the logic which we have written works correctly.

We don't get bugs in debugging.

o 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

3. how can debugg the smart forms.

In the Smartform, within the Code Node you can hardcode a normal abap Break Point ..

Please set a break point in side the smartform:

BREAK <USERNAME>.

Then at the time of print/ preview the program stops there.

Example : If you set the break point in initializationas

BREAK <USERNAME>.

Program stops at break point. After that use Serach and set more break points.

-


>Search the program logic/Textelement/Address via search and set the break point at that code.

Other way to debug smartform is to debug the Function Module of that smartforms. If you want to debug particular smartform node that the solution would be, insert a "Program Line" just above the node you want to debug and this program line write a normal abap breakpoint. So whenever you call the smartforms, it will stop at this breakpoint and you can debug onwards.

or

SFTRACE can be used for debugging SMARTFORMS.

Read More here.

http://help.sap.com/saphelp_erp2004/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm

See the Below thread for how to debug the Smartforms

Regards,

Priyanka.

Read only

Former Member
0 Likes
676

Hi Dude,

I suppose there is no max. limit for the number of break-points that could be set.

I suggest you to set few break-points.

while debugging, Using F5 executes the code in a line by line manner,F6 executes a Form without entering in to it in other cases it is similar to F5,F7 immediately returns to the calling statement from inside a fom irrespective of its current position.

F8 executes a code completely if there are no break-points in its way,if there is a break-point it stops there.

If a break point is set inside a conditional loop and if the program flow doesn't enter in to the loop,then pressing F8 in that case executes the code completely if the conditional loop is not entered.

To your second query,first of all you could debug a program only if it is syntactically correct.Then you could identify the run-time errors by checking the values contained in the variables and tables.

Regards,

Lakshmanan