For debugging, ABAP program should be in ACTIVE mode. In debugging, you can actually see what’s going on inside the ABAP programming. The actual values of all the variables can be viewed in debugging. Step-by-step you can see the values flowing in the program.
* Put the break point at the position, you want to debug.
* Run (F8) the program.
* System takes you to debugger.
* In field name type the name of variable you want to know the value of or you can just double click on that
* Then press F5 (Single Step).
* If wanna know the type & place of the variable the double click on that variable the double click on that variable
* After that to return press fields button or press F3 button.
* Also do debugging OFF.
Short keys for debugging :-
F5 – Single step – you can go line by line inside the debugger and check all the values line-by-line.
F6 – This is used to skip the particular block of code know as MODULE or PERFORM. We will learn about these in the coming lessons.
F7 – This is used to return from the another program to the previous one. Suppose program A has program B inside it, then when debugging line-by-line you step inside the program B, to return from program B to program A after processing all the lines of program B, we use F7 shortcut key.
F8 – It is used to directly EXECUTE the program and shows the final output.
Practically you can see debugging in action in previous lesson. ( Lesson 12 – Initial ABAP Programs)
Note :- PACKED and FLOAT both are used for decimal values. For decimal values use packed & not float only use float for pharma projects because in pharma projects decimal value goes to many decimal places.
Note :- “/H” is used to debug the SAP ABAP programs before executing (F8), if no break-point is set in the SAP ABAP programs.