2013 May 15 10:09 PM
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.
2013 May 16 6:57 AM
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
2013 May 16 6:57 AM
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
2013 May 16 7:11 AM
Hi Fred,
In the new debugger, the call stack is, by default, visible in the tab 'Desktop 2'.
Regards,
Akshat
2013 May 16 8:24 AM
Hi ,
Please check below link will help you how to debug efficiently
http://help.sap.com/saphelp_nw04s/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
2013 May 16 9:57 AM
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
2013 May 16 10:18 AM
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
2013 May 16 3:01 PM
Hi Robert,
Thomas Zloch 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
2013 May 16 11:26 PM