Show TOC

Debugging AMDPs and CDS Table FunctionsLocate this document in the navigation structure

Prerequisites
  • NetWeaver Releases:

    • AMPDs: SAP NetWeaver Release 7.50, SP00, or higher
    • CDS Table Functions: SAP NetWeaver AS for ABAP 7.51 innovation package, or higher
  • Database:

    • AMPDs: SAP HANA DB SPS9, or higher (SPS8 with restricted functionality only)
    • CDS Table Functions: SAP HANA DB SPS11, or higher
  • ADT Client:

    • AMPDs: ADT Version 2.36 or higher.
    • CDS Table Functions: ADT Version 2.68 or higher.
Context

Context of ABAP Managed Database Procedures (AMDPs)

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.

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

Context of CDS Table Functions

Starting with NetWeaver 7.51, you have the option of debugging CDS table functions using the AMDP debugger. A table function consists of a CDS definition and a SQLScript procedure implementation that is used for data retrieval when the table function is accessed (for example using OpenSQL).

More on this: ABAP CDS Table Functions

AMDP Debugger and Features Provided

The AMDP Debugger that is part of the ADT client installation, allows you to debug the embedded AMDP code and CDS table functions within the ABAP development IDE. It 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.

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.