0% found this document useful (0 votes)
146 views4 pages

ABAP. DEBUG Q's

ABAP Debugger is an integrated test tool within the ABAP Workbench. You use it to check the program logic and to find errors in the source code of an ABAP program.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
146 views4 pages

ABAP. DEBUG Q's

ABAP Debugger is an integrated test tool within the ABAP Workbench. You use it to check the program logic and to find errors in the source code of an ABAP program.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

What is ABAP debugging? Debugging is a process to understand program behavior in runtime.

SAP has a inbuilt debugger which is part of the ABAP workbench. Debugging steps There are two possible strategies for starting the Debugger in the ABAP Workbench: By running the program in debugging mode. By setting breakpoints then running a Program in Debugging Mode

From the Object Navigator -> select a program and choose Test/Execute from the Development Object menu. The Choose Execution Type dialog box appears. Choose Debugging From the initial screen of the ABAP Editor Choose Program -> Execute ->Debugging (or the Debugging pushbutton). From any screen Choose System Utilities Debug ABAP.
From any screen Enter " /h " in the command field.

What is ABAP debugger ? The ABAP Debugger is an integrated test tool within the ABAP Workbench. You use it to check the program logic and to find errors in the source code of an ABAP program. In the Debugger, you can step through the source code of a program. The running program is interrupted after each step, allowing you to check its processing logic and the results of individual statements. What is the use of ABAP debugging? Use the Debugger as a test tool for finding errors in the source code of an ABAP program. How do you debug the program? What are the different ways to start debugger? There are two possible strategies for starting the Debugger in the ABAP Workbench: By setting breakpoints then running the program By running the program in debugging mode. Setting Breakpoints A breakpoint is a signal in a specific line of the program source code. This signal indicates to the ABAP runtime processor to stop the program at the relevant line and start the ABAP Debugger. A distinction is made between static and dynamic breakpoints. For further information about the

different types of breakpoints and how to use them, refer to Breakpoints. Direct Processing You can start the Debugger without previously having set breakpoints. This is the best procedure to use when you want to test a program right from the beginning. It is also a useful procedure if you are not overly familiar with the program and therefore are not sure where best to set breakpoints. You can start the Debugger as follows: From the Object Navigator Select a report or transaction and choose Program Test Debugging. From the ABAP Editor Choose Program Execute Debugging (or the Debugging pushbutton). From any screen Choose System Utilities Debug ABAP. From any screen Enter /h in the command field.

What are the functions of ABAP debugger? The ABAP debugger contains the following function: Ways of starting the Debugger Choosing different views Choosing different execution options in the Debugger Displaying source code in the Debugger Setting and deleting breakpoints Setting and deleting watchpoints Stopping a program at a particular statement or event Displaying and changing field contents at runtime Displaying ABAP Objects and references Displaying and positioning strings Setting and deleting database locks Opening the ABAP Editor, or Object Navigator System settings and runtime warnings What are the different display modes in the ABAP debugger? When you are debugging a program, there are various display modes that you can use. All of the display modes have the same structure. The top part of the screen displays an extract of the program source code. The bottom part displays the information specifically available in that

display mode. There are also pushbuttons on the screen allowing you to switch to the most frequently-used display modes.

ABAP Debugging How do I debug background Processes? In transaction SM50 (process overview), you can select a background process and choose Program/Mode -> Program -> Debugging from the menu. An alternative workaround, which allows you to step into a particular piece of code is to place a piece of code in a endless DO-ENDDO, where you can change a variable to step out of the DO at a particular point in your code. This allows you to hold the process at that point and debug it from SM50 as described above. An implementation of this exists in function module C160_HOLD_FOR_DEBUG, which will enter the endless loop if a particular environment variable is set, thereby allowing you to control its behaviour. (Further instructions are found in the comments in subroutine INC14Z_HOLD_FOR_DEBUG of include LC14ZFCB). How do I debug completed background process? You can do this only after the job has finished execution. This will simulate the exact background scenario with the same selection screen values as used in the job and sy-batch set to 'X'.

Use SM37 to get list of jobs , type 'JDBG' in the command line ( no '/' ), put the cursor on the job and press ENTER You are in debug mode now. Step through SAP program (press F7 couple of times) until you get to code you need.

How do I debug remote function calls? You can use the same techniques as described in How do I debug background Processes? above. How do I debug Updates/System code? Both options are available from the menu in debugging. Choose Settings -> System/Update Debugging to activate either before proceeding. Why does it give a dump when I put a break-point in between SELECT and ENDSELECT?

A breakpoint in SELECT loops can cause an exception through loss of the database cursor. The reason for this is that during debugging a database commit is triggered and hence the cursor is lost. How do I set breakpoints in modal dialogs? There are two similar approaches to set breakpoints in modal dialogs: Approach 1:

Click on the Create shortcut icon on the toolbar. In the popup window choose "System command" and in the command enter "/h" A shortcut on the desktop would be created Drag and drop the shortcut to the modal window to set debugging on.

Approach 2:

Create a txt file on the desktop with the following lines:


[FUNCTION] Command=/H Title=Debugger

Type=SystemCommand

Drag and drop this file to the modal window to set debugging on.

You might also like