on 12-30-2007 7:54 AM
can any one give some idea about abap debugging
Dear toka narasimha,
First test your code with '/h' type in command window which shall take you to debug or by putting break points with F8. You test your program from code and then go to se30 performance analysis transaction and there you can know what are the drawbacks. Then go to SLIN transaction and do extended syntax check or from code in menu options where you have debugging -> extended check and the program id ready without error.
Testing your code.
As mentioned above after doing syntax check and extended syntax check you have to create a TEST PLAN. You have to test all possible Postive & Negative test cases.
Test for division by zero if it involves calculation or code accordingly.
Try to test for field overflows. If it involves sap script or smart forms try to print outputs which have single page and also multiple page and which does not have any output at all.
Test by leaving all parameters in selection screen blank.
Test by entering wrong values in selection screen and display a pop-up if the user enters wrong selection screen values.
You can also do ABAP trace and SQL trace to make sure that your program is efficient.
Debugging code/program.
As mentioned above type /h in command line and try to execute the program. Another way is to set break-point at the function module or the required line and do single step execute or execute. Once you finished debugging, you can select Delete to clear all the break points.
Third option in certain cases is to check for sy-subrc <> 0 and proceed from there by making it 0 by updating the sy-subrc in the debug editor and see how the program behaves if the value is what you enterd in the debug screen. For certain case try to use WATCH POINT feature in debug editor.
Hope this helps you.
Do award points if you found them useful.
Regards,
Rakesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Below are steps to debug the ABAP Report,
1. Execute the report using F8.
2. type /h in tcode input field.
3. Execute again with F8.
this will start ABAP debugger
you can see the values of any field or tables using the controls in debugger.
4. F5 will execute report line by line
5. F6 will execute any block of report like PERFORM or any Function Module
6. F7 will get the debugger to line at which break-point has been given
for system debugging check the below link
http://help.sap.com/saphelp_nw2004s/helpdata/en/ef/5f0640555ae369e10000000a155106/content.htm
http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/frameset.htm
For debugging tutorial:
http://help.sap.com/saphelp_erp2005vp/helpdata/en/5a/4ed93f130f9215e10000000a155106/frameset.htm
http://www.sapdevelopment.co.uk/tips/debug/debughome.htm
Reward Points if useful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
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.
-
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>>
regards,
sadhu kishore
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.