首页 > SAP > ABAP > ABAP ALV with Integrated Data Access on HANA
2019
08-29

ABAP ALV with Integrated Data Access on HANA

Hello everyone, in this ABAP in Eclipse tutorial, we are going to learn about new version of SAP ABAP List Viewer called ALV with Integrated Data Access. In sort we call it as ALV with IDA.To leverage the capabilities of in-memory computing in SAP HANA, SAP has revamped the classical ALV to this version.

In classical ALV we write SELECT queries to get the set of data from database to application layer.All the data processing logic happens in application layer and finally the data is stored in Internal table and then this final internal table is used in ALV to display the data.All UI operations like grouping,sorting,aggregation and paging are done in application layer itself on selected data.

But, in ALV with Integrated Data Access( aka ALV with IDA ) only selected data is sent to the UI to display the data. All other operations like grouping,sorting,aggregation and paging are performed in SAP HANA database, by this the data sent to the application layer is reduced.

To start developing the abap alv report using ALV with IDA we need to get familiar with class CL_SALV_GUI_TABLE_IDA. There are 3 methods available in this class.

CREATE    –   Create ALV with integrated data access (IDA)
CREATE_FOR_CDS_VIEW  – Create ‘ALV with IDA’ for Core Data Services(CDS)
DB_CAPABILITIES  – Capabilities supported by current DB

In this tutorial we use the method CREATE to display the ALV. So lets get started. We assume you know how to create an ABAP program in Eclipse, if you don’t please click here to know and a prerequisite to go with this tutorial.

1. Create an ABAP program in Eclipse by providing the Name and Description.Click on Next.

2. In the Selection of Transport Request window, choose the transport request. As we are saving the program in $TMP package in our case no transport request is required.Click on Finish.

ABAP ALV with Integrated Data Access on HANA - 第3张  | 优通SAP

3. In this tutorial, i am displaying the data of products in ALV using ALV with IDA from single table. Below is the ABAP code to create and display ALV with IDA.

[adsenseyu1][adsenseyu1]

4. What we have written in the above step.If you clearly look at the code, i have not used any SELECT query and Internal table to get the data from database into application layer.Instead we pushed this code to HANA database with Integrated Data Access class and this way of development paradigm is called Code Push Down.

5. Copy and paste the code. Save and activate the ABAP program.Now execute the ABAP program to see the output.The output will look like below.

Using ALV with IDA,  we can display the ALV in two ways

Full Screen  – We showed this method in this tutorial
In-Container display – Create a custom container and display the ALV inside the container.You can use the importing parameter IO_GUI_CONTAINER in the CREATE method to achieve this.

1.Know Constraints

Hierarchical or Tree structures, Sequential lists is not possible with ALV with IDA.

You have successfully created an ALV using ALV with Integrated Data Access on HANA. In our next tutorial we will explore the full features of ALV with IDA.

Please stay tuned to us for ABAP on HANA and ABAP in Eclipse tutorials.Please feel free to comment and let us know your feedback. You feedback will keep us alive.

Thank you.

最后编辑:
作者:yangsen
有需要可在文章留言或者邮件yan252@163.com给我。