Skip to Content
Author's profile photo Former Member

ABAP new Open SQL and CDS runtime

   With the introduction of NW AS ABAP 740 SPS5, the New enhanced extended Open SQL was introduced. The new enhanced open sql has some good features such introduction of aggregate functions, right outer join, casting, etc making it a starting step for Code-Push down paradigm.

The Code push down techniques (CDS and New SQL) are compared in the demo here. Below is a demo program of data retrieval from BKPF and BSEG.


1) ABAP program using inner join between BKPF and BSEG

2) ABAP program using CDS view entity

3) ABAP program using enhanced Open SQL features

So its Old SQL vs CDS views vs New Open SQL

The objective of this demo is to determine the run time difference in microseconds.


1) Lets start with the ABAP program using open sql syntax and check the run time.

old sql syntax.JPG

The Output

old sql result.jpg

2) Next, lets move to program using CDS views. Not going to elaborate on the CDS views as the intention here is to measure the run time.

CDS Views

CDS view.JPG


The ABAP program using the CDS view

ABAP with CDS.JPG

The Output

ABAP CDS output.JPG




3) Lastly lets move to program using enhanced open sql syntax.

Open sql syntax.JPG



The Output

open sql output.JPG



Here is Run time comparisons in micorseconds.

result matrix.JPG

Since the system resources load differ at times, multiple run times are recorded.

conclusion matrix.JPG

These findings may vary depending on the system load.  Between CDS and New SQL, both stand atop for the new code paradigm.

From the Code-push-down perspective, CDS and New SQL refer to the Top to Bottom approach. However there is Bottom to Top approach which is via HANA views.

Assigned Tags

      4 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Ivo Vollrath
      Ivo Vollrath

      The screenshot suggests that ZDEMO_CODE_PD_OPEN_SQL only uses one join condition for the inner join, while the other examples use three conditions.If your screen shot is accurate I suggest to add the missing conditions and repeat the measurements.

      Author's profile photo Ajaykumar bendi
      Ajaykumar bendi

      Thanks for the useful document.

      Author's profile photo Vasilios Lianos
      Vasilios Lianos

      Also selects 10 records instead of 100 from the other examples

      Author's profile photo Former Member
      Former Member

      CDS is considered good for reuse scenario. And not to forget buffering annotation available in CDS which has potential to dramatically improve reuse cases.

      Thanks,

      Sumit