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

Horacio.

More Function Module
Functions / SAP Script / ALV

Tables
Database Table

ABAP Books List
ABAP/4 Certification, Programming, Smartforms, Sapscripts and Object Oriented Programming Books

Smart Forms
SAP Smartforms

ABAP Menu:
ABAP Example Hints and Tips

Return to Index:-
SAP ABAP/4 Programming, Basis Administration, Configuration Hints and Tips

(c) www.gotothings.com All material on this site is Copyright.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
All product names are trademarks of their respective companies.  The site www.gotothings.com is in no way affiliated with SAP AG.
Any unauthorised copying or mirroring is prohibited.