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 in realtime

Former Member
0 Likes
1,777

so many people are saying that we are using debugging to find errors in support projects...

i don't know real time senario ,pls help me how to use debugging process to find errors in lengthy support projects.

2 REPLIES 2
Read only

abdulazeez12
Active Contributor
0 Likes
629

Classic debugger is the one used earlier for older versions. now there is a new one. These are user friendly when you point on an icon will give you the info or else you can click and check them functionality in a test program. These are user friendly.

if you go to utilities -> settings and the debugging tab you will see these two options. you can toggle between them and check the difference and the look and feel.

check these...

ABAP DEBUGGING

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

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

Debug Program scheduled Background

3 types update,normal and system debugging

check this for update debugging

If you set "Update Debbugging" you can debug the codes which works in update tusk.

SAP std often runs the routine (function or form) to update the database in update tusk mode, these routine start as soon as a commit work is done.

The commit is called at the end of the program, so you can't debug them by "normal debbugging" because it ends as soon as the program ends

or----


All the database updates are performed by the update work processes by calling the functions/subroutines in update tasks.

These tasks are executed after a commit work is reached in the application. By default you cannot debug these functions.

TO debug these u need to explicitly activate update debugging.

for system debugging check the below link

http://help.sap.com/saphelp_nw2004s/helpdata/en/ef/5f0640555ae369e10000000a155106/content.htm

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.

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

BREAKPOINT

In the source code we set the Break-point there by clicking the stop button, the system will stop there when you execute the program.

Watchpoint

For watchpoints, we need to give some condition and when this condition is satisfied, program will stop

example : if you want to debug only

for matnr value 100 than set watch point

matnr = 100. when value reaches 100 than

program stops at that point.

more at

http://help.sap.com/saphelp_nw04/helpdata/en/c6/617cdce68c11d2b2ab080009b43351/content.htm

check these documents as well

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/abap-runtime-...

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/f720ea47-0801-0010-f7a3-bd37d...

Regards,

Shakir

Read only

Former Member
0 Likes
629

Hi

check these 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

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

[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

DEBUG Smartform:

1) One 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.

2) SFTRACE can be used for debugging SMARTFORMS.

Read More here.

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

script

1). Use Tools - Word Processing - Layout Set (SE71). Enter name of layout set and then Utilities - Activate Debugger.

It is of no consequence which layoutset you enter when selecting the SAPscript debugger. (Menu path: Tools-Wordprocessing - Forms, Utilities - Activate Debugger) The next layoutset called will invoke the debugger.

2). Another way to set the SAPScript debugger is to run program RSTXDBUG.

When you debug Print program it is same as you debug any other ABAP program. While when you debug SAPScript, you actually debug the code ( scripting) you have written SAPScript Form.

As per ur question there is nothing new with script debugging,

it is same as normal report debugging...

SMARTFORMS DEBUGGING

For smartforms debugging you can do this.

1. Execute the smartform (execute button in SMARTFORMS transaction)

2. Take the generated function module and display it in SE80.

3.Find the smartforms Elements (text elements, windows, code lines, loops) in this and set Soft break points.

Correct name is SMARTFORM_TRACE. You have lots of options for adequate analysis

Tcode - SFTRACE

SCRIPT

There are 2 separate kinds of debugging available when you try to debug scripts.

1. Debugging the print program : This is the normal debugging we do for our report programs.

2. Debugging the script itself : You Can debug a SAP Script by activating debugger in two ways:

a .In SE71->Menu->Utilities->Activate Debugger, then debugger will be get activated and when your print program is executing Script Debugger will be in active and you can proceed with your debugging.

b. Goto se38-> RSTXDBUG ->Execute this same as going thru in se71-> Menu, now debugger will be activated.

refer to the link below

http://www.howforge.com/how-to-debugging-sapscript-form

Look at the BLOG here, it is well explained

/people/sudheer.junnuthula2/blog/2007/01/09/script-debugging

Regards

Anji