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

Former Member
0 Likes
1,098

hi,

I have 2 debugg a transaction code.

Actually in that tcode many errors are there,i know that using /h ,i can debugg.But how to find the error?

Means how to know that where i have 2 place the breakpoint ..?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
658

start the debugging using /H...

once debugger starts...

Breakpoints -> Breakpoint at -> Statement

enter message statement...

and press F8..

the control will stop at the message statement...

there you can backtrack and analyse why any perticular error message is getting displayed...

hi,

I have 2 debugg a transaction code.

Actually in that tcode many errors are there,i know that using /h ,i can debugg.But how to find the error?

Means how to know that where i have 2 place the breakpoint ..?

3 REPLIES 3
Read only

Former Member
0 Likes
659

start the debugging using /H...

once debugger starts...

Breakpoints -> Breakpoint at -> Statement

enter message statement...

and press F8..

the control will stop at the message statement...

there you can backtrack and analyse why any perticular error message is getting displayed...

Read only

p291102
Active Contributor
0 Likes
658

Hi,

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

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

Thanks,

Sankar M

Read only

Former Member
0 Likes
658

I know that I am answering this very old question, by this time you might have debugged this program already :).

You should know logically where to put the break points. Break points can be put where you think that code does wrong calculation or where you suspect that where the variable values are changing.

If you still are not sure, and program or t/code is small debug it line by line.

How to put break points and watch points are already discussed in this thread.

Hope this will give clue on how to debug your program.