Hi all,

Introduction

I was currently doing some research on an ABAP 7.4 system with the new ALV IDA. The ABAP7.4 system uses HANA as a sidecar. So the primary database connection is a classic database and the secondary database connection goes to HANA.

In this ABAP 7.4, there is already the ALV IDA available. So I thought, why not use it and try to find a way use the secondary database connection to use HANA.

I could use the ALV IDA without trying to use the secondary database connection, but that will not help! I’ll tell you why.

ALV IDA vs “Classic” ALV

When using the “Classic” ALV, you’ll first get your data. Next you’ll intantiate your ALV and pass all the data to it. But only some parts of your data are visible on the UI. This is perfectly described by this image. Of course everyone knows this, just trying to make my point 🙂 .

/wp-content/uploads/2014/12/salv_606560.png

The ALV IDA will wok a bit different. It will only load the data that will be visible on the UI. This will replace your logic to your database which makes the ALV IDA optimized for HANA.

ida alv.png

But what will happen if you use the ALV IDA on a not HANA database? The ALV IDA will check your database and dependent on your database it will work differntly. When using HANA it will work as described on the left part of the image and explained above. For non-HANA database, it will work the same as the “Classic” ALV as you can see on the right plart of the image and the first image above. So whatever database you are using, ALV IDA will take care of it 🙂

ida working.png

For more information about the ALV IDA: SAP List Viewer with Integrated Data Access (ALV with IDA) – SAP GUI – SAP Library

ALV IDA on HANA as a Secondary database

So what I tried to do was to use the ALV IDA in an ABAP7.4 system and use the secondary database to HANA.I created a small ABAP program where I’ve used the ALV IDA to show the table HRP1001. This table was replicated by the SLT system to HANA. Because HANA was not the primary database, the ALV IDA worked just the same as the “Classic” ALV. But I would like to use ALV IDA on the HANA database. So I started looking in the core of the ALV IDA classes and check what I’ve found:

ida alv 2.png

“GET PARAMETER ID” to get the database connection. Normally this will be empty and it wil use the default connection ( see statement line 61 ).

Knowing this, I tried to set this parameter id with my secondary database connection right before I created my ALV IDA:

/wp-content/uploads/2014/12/ida1_607270.png

Now ALV IDA will use HANA !

To be completely sure, I’ve used ST01 and did a trace on my user. In this trace I could see that ALV IDA will go to HANA for every scroll or every sort!

You’ll have to be carefull with this parameter because it stays in the user memory. So it will use this value in every program that uses the ALV IDA if you don’t clear it.

Besides this you can also use the HANA Accelerator SWT2DB Add On (SWT2DB) and configure your program to use HANA.

Maybe it could be helpfull in some cases.

Kind regards,

Wouter

To report this post you need to login first.