Академический Документы
Профессиональный Документы
Культура Документы
Debugging with
External Breakpoints
Introduction
Debugging ABAP can be a frustrating experience. On more than one experience Ive found myself kneedeep in code trying to understand what is happening when a failure occurs in a BAPI that I am calling.
Generally one of the first things that I like to analyze is the input and output data when debugging a
program. The ABAP debugger allows you to manipulate the input data for every field or data structure
in a program. Unfortunately its not always clear how every field is used, making it difficult to figure out
which elements of data correlate to each field in your ABAP program. If youve worked in SAP long
enough you know that the data model can seem quite obfuscated at times.
Fortunately for us, there is a nice feature in the ABAP debugger which allows us to pass data from an
external program into the debugging session. Lets say you have a third party application that calls a
standard BAPI/BADI: using external breakpoints you can pass data directly from your third party app into
the debugging session. This will help you quickly analyze your data to find out if there is a problem with
your input.
The purpose of this document is to demonstrate how to use the external breakpoints in the ABAP
debugger and give an example using SAP Identity Management.
Setting Breakpoints
Using the menu bar along the top of the transaction you can now set breakpoints in the code at
various locations which can be used to stop the program flow for analysis periodically.
You will find a field called User in the section Debugging External Requests. This is where you must
enter the user responsible for executing the program. An easy mistake to make is to enter your own
user ID, because after all you are the one who is debugging the program! However, its the user who
calls the program remotely that is important. In this case it may be the user assigned to the RFC
destination.
Make sure that the checkbox is selected at the bottom of the screen which says Session breakpoint
active immed.
5
The first button allows you to step through each line of code one by one. The fourth button is the
Continue button which will take you to the next breakpoint.
At the bottom right hand side of the screen there is a table that will display the variables and the data
that is being stored in those variables:
You can display the data in a variable by double-clicking on the element in the code (left hand side of the
screen):