How To Debug The Program in ABAP
How To Debug The Program in ABAP
The Debugger is a programming tool that you can use to execute ABAP programs, by line or by section. With this tool, you can display data objects and check the flow logic of programs. Two types of debugging are currently possible: Debugging with the classic Debugger for release levels up to and including 6.40 or debugging with the new Debugger, which is available for all releases after 6.40. The main differences between the classic and the new ABAP Debuggers are described below: 1. The Classic ABAP Debugger runs in the same roll area as the application to be analyzed (debuggee). It is therefore displayed in the same window as the application. However, this technology also has some restrictions. For example, some ABAP programs (such as conversion exist) cannot be analyzed in debug mode for technical reasons. However, the most significant restriction is that no ABAP technology can be used for designing the Debugger interface and it is therefore not possible to create a modern user interface. 2. The New ABAP Debugger, on the other hand, is executed in a separate external session (Debugger), while the application to be analyzed (debuggee) uses a second external session. With this technology, the user interface of the Debugger can be designed freely by ABAP means. The new Debugger provides the user with a flexible interface that can be configured as required and has more than eight desktops. Here it is possible to place and arrange up to four tools - depending on the user's selection. For example, it is possible to display source texts or structures. In this way, the user can design the Debugger interface according to his own individual requirements. As of Release 6.40, you can select the debugging type as you wish by choosing the classic Debugger or the new Debugger in the ABAP Editor from the path Utilities Settings. It is also possible to switch the Debugger at any time during a session under the menu option Debugging. As of Release 7.00, the new ABAP Debugger is the default
http://help.sap.com/saphelp_nw2004s/helpdata/en/b3/d322540c3beb4ba53795784eebb680/fra meset.htm
Please click on the link Go to SE38 Transaction Code Give the name of the prog. Then press the Debugging button ( it is present in the toolbar) Now press F5 for executing the prog. line by line. Actually, debugging an ABAP/4 program is a topic in itself and u will find many articles on debugging on the net but here I will try to give u a brief abt it so that u can start. Go to T-code SE38 and enter the name of the report you want to debug. Then, one has to set the breakpoint in the report. If in case you want to debug the report right from the start, then u can set the breakpoint on the Report keyword itself. But one should not do this practically, the main points to set the breakpoint can be Function Modules, Event keywords like Submit, If, Loop etc.
Odaiah Pelley Page 1
Once you have selected the point for the breakpoint, put the cursor on that point and click on the Debug button present in the toolbar. You will the line turning into yellow color stating the debugger is active. Similarly, you can put as many breakpoints as you want. Now press F8 and the control stops at the first breakpoint that you have set. If you want to go slow and watch each and every step from there,then you can use F5 for executing the report line by line. If you want to execute by skipping the Function modules, then you can press F6. If in case you are inside the Function module and you want to come out of it ,then press F7 and you will be out. Now,if you want to go directly from one breakpoint to another,then press F8. For keeping a watch on the values of the different variables during execution,double click on the variables or the table names, and the values appears on the bottom portion of the screen. F5 Single Statement F6 Statement Wise Classes/ Sub-routines/Funcation Module it wont go inside
Odaiah Pelley
Page 2
Ski
http://help.sap.com/saphelp_nw2004s/helpdata/en/b3/d322540c3beb4ba53795784eebb 680/frameset.htm
F7 Processing block It should came out function/class F8 Execute Perform F5 Module Dialog program, block code
Click on Display object list Generally we use External break point T.code: VOFM
Odaiah Pelley Page 3
After 600 Customs routine Global Variables Values accessible inter programming Local Variables Specific to block / program Functional Pool Includes/Global Variables Top include Global Variables are declared. Module Perform Call function Function Module Complete exit F8 Maintain Request Task R3TR Any ABAP Work bench CORR Correction LANG Translation of language LIMU Sub Objects of development data dictionary Object type GPVI Variance client dependent Go to Transport Log Utilities display object list Request Task complete check Complete consistency UtilitiesReorganizeMerge Request Reassign Task Append to work bench request
Odaiah Pelley
Page 4