Simplifying AMDP Debugging for ABAP Developers A Hands On Approach
Simplifying AMDP Debugging for ABAP Developers A Hands On Approach
What is AMDP?
The goal of ABAP Managed Database Procedures is to make the world of database procedures
available for ABAP Developers. In order to achieve this, AMDP offers a way to create, edit and
transport database procedures nearly like standard ABAP classes. With the new AMDP
Debugger there is now also debugging support directly integrated in the ABAP tool environment.
One difference between AMDP Debugger and ABAP Debugger is the fact that the AMDP
Debugger has to be started before you can do anything else. If the debugger has not been started
your DB procedures will not stop at breakpoints. To deal with this we implemented an
automatism within ADT to start the debugger implicitly when a user creates a breakpoint for an
AMDP.
Stopping the AMDP Debugger after usage is also important because it is rather resource
intensive for the ABAP Server and it’s not affordable to have an active debugger instance for
every user in the system all the time. For this reason there are two automatisms to stop the
debugger implicitly:
Besides this the user always has the possibility to start or stop the AMDP Debugger manually.
This is for example necessary when you re-open your IDE after closing it and try to start a debug
session with your old breakpoints instead of creating new ones.
Since the current activation state of the AMDP Debugger is quite important it is also reflected by
the color of the breakpoints:
Right click on core data services and right click on new and click on other abap repository object
Enter the object name and click on finish
Click on yes
Click on save
Data was saved
Click on activate
Click on continue
Object is activated
Right click on classes and click on new abap class
Enter the name and description and click on finish
Click on activate icon
Right click on programs and click on new abap program
Enter the name and description and click on finish
Write the program and double click the sapce
PROGRAM:
REPORT zabap_debug_program.
PARAMETERS :pnumber TYPE i DEFAULT 10.
DATA:lv_number TYPE i.
lv_number = pnumber.
zamdp_debug=>zamdp_debug(
Click on yes