03-13-2007 11:32 AM
Hi Gurus,
pls explain the debuuging tecniques in
1.reports,
2.scripts,
3.modulepool,
4.utility programs
Thanks,
Ramu
03-13-2007 11:35 AM
Hi,
Go through this doc:
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
Hope these Q & A will helps you.
Regards,
Anji
03-13-2007 11:35 AM
Hi,
Go through this doc:
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
Hope these Q & A will helps you.
Regards,
Anji
03-13-2007 11:57 AM
03-13-2007 11:35 AM
Hello,
Have a look at this document
http://help.sap.com/saphelp_46c/helpdata/en/c6/617d09e68c11d2b2ab080009b43351/frameset.htm
REgards,
Vasanth
03-13-2007 11:41 AM
Hi....
Plz follow the follow links:
<b>Debugging a Report:</b>
<b>Debugging SAP SCRIPT:
</b>
<b>Debugging SAP Module Pool:</b>
Also see:
http://help.sap.com/saphelp_46c/helpdata/en/c6/617d09e68c11d2b2ab080009b43351/frameset.htm
Reward points if useful....
Suresh
03-13-2007 11:45 AM
Please have a look at below link. May be helpful to you.
Best Regards,
Vibha
*Please mark all the helpful answers
03-13-2007 11:49 AM
hi
good
reports->
1-/h
2-BREAK-POINT(hard coded)
3-Use Breakpint in a particular line
scripts->
a-/h
b-File->Test
Thanks
mrutyun^
03-13-2007 11:51 AM
Hi....
Debugging a popup screen:
also see:
Reward points if useful......
Suresh......