Debugging in SAP ABAP- Everything You Need to Know

For those who might perhaps not be in the know, debugging in the programming field, specifically debugging in SAP,  is a crucial process used by developers to determine just how a program can perform in a runtime environment. ABAP like most other languages has a built-in debugger, which is a core component of its workbench. This feature makes it infinitely easier to write “syntactically” and logically accurate programs.

There are 2 types of strategies that programmers use to carry out debugging in SAP ABAP and they are:

Driving Business Value Through UC - Sap-ebook-banner

Running the program in debug mode

The ABAP debugger can be initiated by choosing a given program in the Object Navigator menu and selecting ‘test/execute’ from the development object menu that appears. Doing this triggers the “Choose Execution Type” dialog box from which you can choose “debugging”. You can also run the debug mode from the ABAP editor by selecting program/debugger or clicking on the Debug pushbutton.

Setting breakpoints

There are 2 kinds of breakpoints in ABAP, which are static and dynamic. The former isn’t user-specific by default (can’t affect other users running the same program), but you can set it to be so.

Dynamic breakpoints are set directly in the ABAP editor/debugger and are displayed as “stop signs”. These types of breakpoints are user-specific and are deleted whenever the user logs off. There are 3 types of dynamic breakpoints, and these are:

Breakpoints at statement

These prompt the debugger to stop the running of the program directly at the statement preceding the one that has been marked.

Breakpoints at event

These types of breakpoints stop the running of a program before an event, subroutine or module pool is fired.

Breakpoint at system exceptions

These stops the running of the program when the debugger encounters a marked system exception (usually after a runtime error is intercepted by a catch statement).

Watchpoints

These are indicators in a program that informs the ABAP runtime processor to stop the its running after at reaches a specific point. Unlike breakpoints they aren’t activated until the value of a particular marked block of code changes. Like dynamic breakpoints they are user-specific.

There are many other elements that can be discussed in this topic; but this is just but a highlight. These are the major things there is to know about debugging in SAP ABAP.
 

mm
Marissa Hart is the Lead Author & Editor ShareMe. ShareMe is a blog focused on SharePoint Online. SharePoint Online delivers the powerful features of SharePoint without the associated overhead of managing the infrastructure.