Introduction to AMDP in SAP S4HANA.
* AMDP -- ABAP managed database procedures.
* It is a framework for managing and calling stored/database procedure and database function in as ABAP.
* The AMDP manages AMDP procedures and functions.
------------------------------------------------------------------------------------------------------------------------------
* AMDP is a global class that contains special tag interface that starts with IF_AMDP_MARKER_*.
* For HANA database IF_AMDP_MARKER_HDB.
-------------------------------------------------------------------------------------------------------------------------------
* Constructors can't be implemented as AMDP methods.
* There are two types of AMDP methods.
1. AMDP procedure implementation.
2. AMDP function implementation.
1. AMDP procedure implementation.
* Implementation must be flagged with BY DATABASE PROCEDURES.
* It can be static or instance method and can be declared in any section.
* Parameters must be declared using pass by value. (Pass by reference is not allowed).
* Return values can't be declared using RETURNING.
* Raising can only be used to specify the exception classes with - CX_AMDP_*.
* Method implementation.
- Can't be empty.
- No DDL statements like creating/changing/ Deleting database.
- No execution of transactional statements like COMMIT WORK/ROLLBACK WORK.
- Method don't have implicit enhancement option.
- WRITE can't be performed on database tables.
- Dynamic programming should not be used.
2. AMDP function implementation.
* Implementation must be flagged with BY DATABASE FUNCTION.
* AMDP functions are
1. AMDP table function.
* AMDP table functions for AMDP methods.
* AMDP table functions for CDS table functions.
2. AMDP scalar functions.
1. AMDP table function for AMDP methods.
* AMDP table function can be declared as static or instance method can be declared in any section.
* Must have return parameters can be declared using RETURNING.
* Return value must be tabular with a structured row type with elementary components.
* Can be elementary or tabular input parameters but can't have output parameters.
* Class based exceptions can't be declared using RAISING in method interface.
2. AMDP table functions for CDS table functions.
* It can be declared in the public section of static AMDP class.
-----------------------------------------Differences between normal and AMDP class------------------------------
* Normal Class.
- Code execution happens on the application server.
- Performance is slow when compared to AMDP class.
- Uses ABAP programming language.
- can be edited SAP logon and eclipse.
* AMDP class.
- Code execution happens on directly within the SAP HANA database.
- Performance is fast when compared to Normal class.
- Uses SQL script.
- can be edited only in eclipse.
********************************Thank You*****************************
Comments
Post a Comment