AMDP Class
An AMDP (ABAP Managed Database Procedure) class is used to write complex logic directly in the SAP HANA database using SQL Script, instead of writing everything in ABAP.
This helps to:
Open Eclipse.
Step 1: Create a package.
Give basic properties.
Select Transpost request.
STEP2 : Create AMDP class
The class will be like below.
To convert the normal class into the AMDP class, use the interface IF_AMDP_MARKER_HDB
Create class attributes, and to implement the method, click on CTRL+1.
The AMDP procedure will run on HANA DB. The memory location is not available at the database level. It is only available at the application level, so we have to pass the parameter with a pass-by value.
Two Types of AMDP Methods :
In AMDP, we can write two types of methods:
Here we will see Database Procedure.
To convert the method to the AMDP method.
Specify the target database in which you want to create the database procedure, along with the database language to be used. Additionally, list all the objects (such as tables, views, procedures, etc.) that need to be accessed within the specified schema.
An error will occur when using the Database table in the AMDP method.
Step 3:
Create a program to consume the AMDP class.
Search PROGRAM and select ABAP program.
Write the below code.
Output :
Conclusion:
AMDP procedures are a powerful way to push complex logic to the SAP HANA database, allowing you to handle large volumes of data more efficiently.
Use AMDP procedures when:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
3 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 |