Introduction to ABAP Managed Database Procedure (AMDP)

0
18742

What is a Database Procedure?

Every database support procedure including SAP HANA. These procedure are implemented using native scripting language(HANA SQL Script in case of HANA database).

They created and executed on the database layer. These are highly database specific. So what are ABAP-Managed Database Procedures (AMDP) then? Any guesses?

ABAP Managed Database Procedure

The technique in which stored procedure or database procedure that are stored in ABAP repository and transported by ABAP transport is called ABAP-Managed Database Procedure.

The implementation of AMDP is written in HANA SQL Script language and executed on the database.

ABAP Managed Database Procedures is one of the recommended patterns for use in ABAP code optimization on SAP HANA database. Push down approach.

Now that we know the definition of AMDP, lets see how AMDP is created in ABAP.

ABAP-Managed Database Procedures are implemented as methods of a global ABAP class.

AMDP Developing Environment

ABAP-Managed Database Procedures(AMDP) development is only supported in the Eclipse-based development environment (ABAP Development Tools) and NOT in SAP GUI Class Builder, SE24.

But you can view the code in SAP GUI Class Builder(SE21).

Now we know that AMDP is implemented as ABAP class methods. So what makes an AMDP class.

AMDP Class

An global class, that contains the interfaces “IF_AMDP_MARKER_HDB” is called AMDP Class.

AMDP Introduction AMDP Class 1

AMDP Method

A method declaration in AMDP class with addition of “BY DATABASE PROCEDURE” in implementation section is called AMDP method. Along with the database system, language of database system and other options.

AMDP Introduction AMDP Method 1

Lets look at more closely at AMDP Method syntax

FOR:

It specifies the database system on which AMDP runs. For example HDB stands for SAP HANA Database

LANGUAGE:

It specifies the database language of the implementation. For example SQL Script

USING:

It specifies different database tables which can be used inside the ABAP method. Support Transparent tables and Dictionary views.

OPTIONS:

It specifies only reads are permitted on the database tables in the database procedure. Support only READ-ONLY parameter.

Also Read: Top 20 ABAP Managed Database Procedure(AMDP) Interview Questions

Summary

You have successfully learned introduction to ABAP Managed Database Procedure.

Please feel free to comment and let us know your feedback. Subscribe for more updates

If you liked it, please share it! Thanks!