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

How to go about debugging SAP standard code

former_member195355
Participant
0 Kudos

Are there any tricks and tips for debugging SAP standard code?

I can spend days debugging and not be any clearer about what the code is doing.

I feel like I'm missing out on some essential information that must come naturally to all you boffins.

So please share your thoughts here.

1 ACCEPTED SOLUTION

FredericGirod
Active Contributor
0 Kudos

Hi Robert,

it's a big subject

If you debug for an error, you could start to ask SAP to stop at each MESSAGE statement.

If you debug to find how SAP put a value in a field, you could set WATCHPOINT (very useful)

If you need to debug a popup, create a shortcut on your desktop, set the command /h  drag/drop and .. enjoy

If you debug to understand SAP (I know, it's not possible), you could set a trace ST05, find the good table, ask for the corresponding ABAP code, set a break point and relaunch the transaction.

And very useful, the CALL STACK in the old abap debugger (I don't know where it is in the new one)

there is a lot of tips to go faster in debugging ...

Maybe we could create a document (if it not already exists)

regards

Fred

7 REPLIES 7

FredericGirod
Active Contributor
0 Kudos

Hi Robert,

it's a big subject

If you debug for an error, you could start to ask SAP to stop at each MESSAGE statement.

If you debug to find how SAP put a value in a field, you could set WATCHPOINT (very useful)

If you need to debug a popup, create a shortcut on your desktop, set the command /h  drag/drop and .. enjoy

If you debug to understand SAP (I know, it's not possible), you could set a trace ST05, find the good table, ask for the corresponding ABAP code, set a break point and relaunch the transaction.

And very useful, the CALL STACK in the old abap debugger (I don't know where it is in the new one)

there is a lot of tips to go faster in debugging ...

Maybe we could create a document (if it not already exists)

regards

Fred

0 Kudos

Hi Fred,

In the new debugger, the call stack is, by default, visible in the tab 'Desktop 2'.

Regards,

Akshat

Former Member
0 Kudos

Hi ,

Please check below link will help you how to debug efficiently

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

former_member209119
Active Participant
0 Kudos

Hi,

There cannot be a particular method to be followed.

It becomes lot easy if you know what you are tracking. say a particular variable some value.

Use break points at FMs. you can also make use of tracking sy-subrc value ...

Use Watch points. These tols make it possible to avoid going thru unnecessary code lines.

1) If you go to the object list, you would find all the sub-routines used in the program for that standard t-code. You could select the proper sub-routine and put a break-point in that sub-routine, if you are able to track it.

2) If you are not sure, then you can directly run the t-code and then put '/H'. Switch the debugger mode on. Then while debugging, you can put Watch Points at appopriate places. For. E.G. if you are looking for any errors, you can create a watch point for SY-SUBRC NE 0

0 Kudos

Hi,

I usually run trace ,when I debug the standard program,If you access to ST12 or SAT.Switch on the particular units and use /ron  from the point you want to debug and switch off.you can use the Hierarchy button to find the sequence of calls made by the standard program.

Regards

Krishna

Former Member
0 Kudos

Hi Robert,

gave me a useful tip to use ST12 and to look out for blogs by Hermann Gahm.

Also the following SAP press book looks good:

http://www.sap-press.com/products/ABAP-Performance-Tuning.html

former_member195355
Participant
0 Kudos

Keep those tips coming boys and girls!