The AMDP framework developed to integrate the HANA capabilities in ABAP applications. AMDP allows ABAP developers to create and execute database procedures in the ABAP NW 7.4 SP 5 using ABAP methods and ABAP data types. We can SQL script which can seamlessly integrate into recent ABAP development.
The new coding paradigm released in ABAP NW 7.4 with AMDP, where we can push down the code to the database level. We can use only data intensive calculation in AMDP and not all calculations.
As a result of the calculation in the database layer, the significant increase in the processing time.
Syntax:
METHOD BY DATABASE PROCEDURE
FOR
LANGUAGE
[OPTIONS ]
[USING ].
< Insert SQLScript code here >
ENDMETHOD.
Case Study:
In a network media company, there was a report developed to visualize the each TV programs profit. The media company is one of the leader in the country which running hundreds of programs. In their project system, each project has more than hundred episodes and each episode has multiple accounts tied to it. As we need to capture the profit of each program and each episode with granular detail of the expense and revenues. This leads huge data retrieving and complex calculations. This report ran for 16 hrs and it was a background processing report as shown below.
We suggested the company to unleash the power of HANA to run the report in seconds. As we promised the customer, we were able to run the report within seconds with the help of AMDP in foreground.
AMDP Method:
METHOD get_Programs BY DATABASE PROCEDURE
FOR HDB
LANGUAGE SQLSCRIPT
OPTIONS READ-ONLY
USING PRPS COEP MLST.
lv_pro = Select PSPNR POSID POST1 OBJNR PSPHI PRAR
From PRPS
Where PSPHI IN PA_PRO AND POSID IN LT_EPI AND PRART IN PR_TY
Group by POSID.
ENDMETHOD.
And consumed this method in the ALV report.
Output Runtime for Background:
Output in Frontend:
Hi, this is a comment.
To delete a comment, just log in and view the post's comments. There you will have the option to edit or delete them.