ABAP Debugger
ABAP Debugger is a tool used to execute and analyze programs line by line. Using it we can check the flow logic of a program and display runtime values of the variables. By setting breakpoints, we can stop a program during its execution and this will display the contents of the table and variable being used by the program. A maximum of 30 breakpoints can be set in the ABAP debugger.
Types of Debuggers
1) In the ABAP Editor (SE38) On the initial screen: Enter the program name. Choose Program>Execute->Debugging .
2) In the ABAP Editor (SE38) In the source text display: Choose Program->Test>Debugging .
3) In the Object Navigator (SE80) Select the program to be tested with a doubleclick. Program->Test>Debugging
4) In the Object Navigator (SE80) Select the Function Module to be tested with a double-click. Function Module->Test> Function Module Test->Debugging
5) In the Object Navigator (SE80) Select the Method to be tested with a doubleclick. Method->Test/Execute>Execute Method>Debugging
6) In the transaction maintenance (SE93) Enter a transaction code. Choose Transaction Code->Test>Debugging .
7) In the job overview (SM37) Select an inactive job. Enter jdbg in the command line of the system function bar.
8) In the ABAP Editor (SE38) In the main window of an application, you can enter /h in the command field of the system function bar. You can also select relevant options in the menu bar.
Table Configuration
Internal table contents will be displayed by clicking on ITAB. Click settings button to configure the table. Fields displayed can be rearranged with arrow buttons as shown in the figure. Also fields can be suppressed from display.
Statement Debugging
By pressing the Step Size button you can activate the statement debugging. Step size is used to find which condition got failed in the statement.
Statement Debugging
The debugger will execute the sub conditions of long IF statement separately one after another. By pressing the Step Size button again you return to a normal line stepping in the debugger.
There is an option for navigate to editor in Breakpoint tab. By clicking this, it will navigate to the program where breakpoint is set. And a message will be displayed as New window opened for source code display.
If we want to add a data to the table or alter table content while debugging, Services of the tool can be used. It consists of many services. We can select the option in which our table has to be altered.
Debugger Scripting
Debugger scripting helps to trace and implement our own custom breakpoints and watchpoints. Select script tab->Load Script->Enter Script name in pop up window. Select statement where and all breakpoints has to be set.
Debugger Scripting
For example, if we want to set breakpoint on particular keyword such as SELECT, DELETE, MODIFY etc which is used in multiple lines of the program, it requires time if we set line by line. So in this case, we prefer DEBUGGER SCRIPTING. It has the option to set breakpoints on all script used in the program.
Take a message id details of an error message displayed during program execution. In debugger screen, Goto breakpoints-> breakpoint at> breakpoint at message. A pop up window shown in the figure will be displayed. Enter message id details-> Enter, it will take you to the program line where error occurred.
Debugger Variant
Once we sign off the session, the breakpoints we set will get deleted. So we can save breakpoints by Debugger->Debugger session->save. This will exist till we delete the breakpoints manually.
Skip Breakpoints
Inside Breakpoint tab, there is an option to skip breakpoints. Breakpoints will be skipped with the counts in skip counter. If skip counter is left blank, it wont skip any breakpoints.
A pop up window cannot be debugged using /h command or by selecting any other menus. So click and drag a txt file into the pop up window with the functions shown in the figure.
Thank You
Thank You