Introduction

First thing’s first. If you are not competent with SAP’s programming, please consult to your fellow ABAP’er, they know this job better than we do. This way, you’ll not mess up the whole software you are using. I am not encouraging you to change the code of your development.

All the data selection is pretty painful for all kinds of massive data. As we the functional consultants who are also responsible for user satisfaction, we always need to provide the users best experience we can.

Massive data means longer data selection processing in ABAP. Due to the fact that we need to use more inner joins in selections, we end up with longer buffering times, which beheads the user experience.

In this case CDS (Core Data Services) run for our help. With the introduction of HANA based selections, SAP has given us opportunity to minimize the selection process time with CDS. Even though this is a good way to improve the performance, just because of the view we create with CDS loads the data on RAM, we can end up with crashes if we overuse the logic. It depends on the hardware specs of course. With the CDS view we create, we can just directly make a selection thoughout ABAP from that view.

Also BW consultants commonly use CDS to interpret the big data due to their excessive data load. This situation open a window for us too.

If you tend to use CDS for minor load of data ABAP select can give you better results. So if you have larger amount of data (~> 50.000 rows, which can change depending on the fields anyway)

How?

Well this part a little bit tricky. Because CDS requires to be compiled in a 3rd party compiler rather than SAP’s own GUI, aka ADT (ABAP Development Tools). If you try to change the attributes of a view created in CDS, GUI will tell you;

So in this case, how do we handle it?

We need Eclipse. It’s a well-known state-of-the-art software for developers. With the HANA move of SAP, Eclipse hugged ABAP into its arms by introducing new techniques. Currently (by the time I am writing this post) there’s 2019-03 version is available for download. Which binds SAP’s development tools from:https://tools.hana.ondemand.com/

After installing Eclipse, you should use Help > Install New Software pathway in it. Provide the link you get from
https://tools.hana.ondemand.com dedicated to your version.

If you’ve installed Eclipse, we need one more step to make.

You need to run the transaction STC01 with tasklist SAP_BASIS_EPM_OIA_CONFIG. This will make sure your connections are properly made. Otherwise you CDS view will return empty.

Let’s Do It

So, to join a server you already have, just create a ABAP Project from the following images’ pathway.




After you’ve created the connections to the servers, you’ll need to define your first view. Hit new, then choose “Data Definition”.


Afterwards, Eclipse will expect you to choose a transport request. You can create a new one if you have the authorization, or you can choose from the list of available workbench requests.

So… What’s the difference?

To see the difference, I’ve written a CDS code as presented down below.

I’ll make the same selection in ABAP too, with the SELECT for CDS view too.

When’ve run the code to see the results, trace will show the difference.

Even though this is a short falling example for the performance, when you’ll try to make harder SQL’s with more amount of data, CDS will provide you selections with significantly better performance.

Thank you.
Levent

Leave a Reply

Your email address will not be published. Required fields are marked *

10 + ten =