"
Supported by

ABAP Code PushDown in HANA

[Guest post by Artur Moreira]

From ABAP version 7.4, SAP introduced the code pushdown concept, which means using more database for calculations (data aggregation, sums and previous calculations).

These new ABAP capabilities arise associated with recent database SAP HANA, which is owned by SAP AG.

With these tools, we can do JOINs and aggregations, which can optimize our ABAP code in terms of performance.
We intend to know how this can be achieved in ABAP:

For this purpose can be created CDS Views (Core Data Services Views) or can be performed procedures HANA database (AMDP – ABAP Managed Stored Procedure).

CDS Views are simply SQL DDL code that give rise to views that can be found in SE11 transaction and still be consumed by ABAP code.

The AMDPs are procedures that can be called in ABAP programs by calling the appropriated method, which runs the code directly in HANA.

CDS Views and AMDPs are created and modified by HANA Studio tool, but may latter be found in SAP through the well know SAP GUI (cannot however be modified via SAP GUI).

The code of CDSs and AMDPs is written in the database language to which SAP called SQL Script. The base of the language is SQL AINSI plus some specific features of SAP HANA.

For those who want to learn more about SQLScript, SAP provides the following document:
http://help.sap.com/hana/SAP_HANA_SQL_Script_Reference_en.pdf

About CDS Views:
http://scn.sap.com/docs/DOC-70385

About AMDPs:
http://scn.sap.com/docs/DOC-51146

SQL Script language can also be used directly in the SAP HANA database, through HANA Studio in various perspectives and levels, but in this case, outside the ABAP scenario.

Thank you, Artur Moreira, for this interesting post.

Photo credit: MysteryBee via VisualHunt / CC BY-SA

3 comentários a “ABAP Code PushDown in HANA”

  1. Custodio de Oliveira Diz:

    Ola amigos,

    O artigo nos da uma boa ideia, mas permitam-me fazer algumas observacoes:

    1 – O conceito de “code pushdown” nao foi introduzido no ABAP na 740, e sim na 731 com o comando CALL DATABASE PROCEDURE . A diferenca eh que na 740 foram introduzidos, ai sim, CDS views e AMDP alem das melhorias no openSQL, que sim, sao consideradas code pushdown, que permitem que voce faca seu code pushdown a partir do ABAP server (top down approach) e nao do HANA DB (bottom up).

    2 – CDS Views nao sao escritas em SQLScript, mas em DDL. Sao linguagens copletamente diferentes.

    3 – O HANA Studio, como uma instalacao separada, nao eh mais necessario (acredito que nem seja mais distribuidas novas versoes). Ao contrario, pode-se usar Eclipse com os plug ins necessarios.

    Vale lembrar que tanto as melhorias no openSQL quanto as CDS Views sao disponiveis para qualquer banco de dados. AMDP, hoje, apenas para HANA.

    Alem dos documentos/links ja listados, sugiro mais esses dois:
    http://scn.sap.com/community/abap/hana/blog/2014/02/03/abap-for-hana-code-push-down
    http://scn.sap.com/docs/DOC-73512

    Grande abraco,

    Custodio

  2. Artur Moreira Diz:

    Olá Custodio,

    Obrigado pelos comentários, sugestões e informação adicional.
    Este é um tema bastante novo, onde toda a informação é bem vinda.

    Grande Abraço,
    Artur

  3. Raju Diz:

    Nice article to point to the right links and resources for ABAP on HANA.

    In some cases we need Bottom Up Approach too (but SAP does not recommend). Top Down is always the first choice.

    We have a similar series on SAP ABAP for HANA. Please check at your convenience.

    http://www.sapyard.com/category/tutorial/hana/sap-abap-on-hana/

    Regards,
    Raju.

Deixe um comentário


About Abapinho
Abapinho runs on WordPress
Articles (RSS) e Comments (RSS).