Show TOC

Debugging AMDPsLocate this document in the navigation structure

Prerequisites
  • Database: SAP HANA DB SPS9, or higher (SPS8 with restricted functionality only)
  • ABAP Back-End System: SAP NetWeaver Release 7.50, SP00, or higher
  • Client: ABAP Development Tools (ADT) Version 2.51 or higher.
Context

ABAP Managed Database Procedures (AMDP) are the preferred way for developing HANA DB procedures on the ABAP platform. AMDPs allow you as an ABAP developer to write database procedures directly in ABAP; Special ABAP classes (so-called AMDP classes) can contain embedded code (SQLScript) that is used to generate DB procedures in the HANA DB layer.

An AMDP class can contain both regular methods and AMDP methods. An AMDP class is defined as follows:

Sample Code
 
CLASS <class_name> DEFINITION ... PUBLIC.

  PUBLIC SECTION.
    INTERFACES: if_amdp_marker_<db>.   "Tag interface  
   ...
ENDCLASS.

CLASS <class_name> IMPLEMENTATION.

...

METHOD <amdp_meth> BY DATABASE PROCEDURE 
    FOR <db> 
    LANGUAGE <db_lang> 
    [OPTIONS <db_options>] 
    [USING <db_entities>]. 
< SQLScript code > 	

ENDMETHOD.
...

ENDCLASS.
				

More on this: For syntax help, press F1 in the ABAP source editor.

As an ABAP developer you have the option to edit, enhance, and transport the database procedures in the same convenient way you are familiar with from standard ABAP classes. In addition, the AMDP Debugger that is part of the ADT client installation, allows you to debug the embedded AMDP code within the ABAP development IDE.

The AMDP Debugger is not part of the ABAP Debugger but an autonomous debugger:

  • ABAP Debugger is used to debug the execution of ABAP programs running on the application server AS ABAP.
  • AMDP Debugger is used to debug the execution of DB procedures running on HANA DB.
Note

If you want to debug native DB procedures (that are not generated from AMDP), you can use the HANA Studio Debugger instead. For further information, visit our community (SCN) page:Information published on SAP site

Features Provided

The AMDP Debugger provides you with the following basic functions:

  • Activation of the AMDP Debugger
  • Setting breakpoints
  • Stepping
  • Viewing variables
  • Viewing table contents
  • Deactivation of the AMDP Debugger.