This blog summarizes various option to use ABAP on HANA, Traditional ABAP developers would learn ways to enhance their current program to enjoy the in-memory features of the HANA appliance.

 

Traditional Open SQL is decent but it has many limitations, so the true potential of HANA could not be utilized.  Starting from ABAP 7.4 SP05, the new Open SQL add in new syntax and features to make it more robust.  Arithmetic expression could now be used in the SELECT loop, as well as standard SQL syntax such as CASE, COALESCE could now be used in new SQL.   The JOIN statements are now more powerful, like RIGHT OUTER JOIN and UNION statements are now available.

 

Core Data Services (CDS) further improves the ABAP SQL by introducing DDL and DCL features to the ABAP layer.   CDS DDL allow developers to define database tables and views on top of the HANA layer, and DCL are used to define authorizations for CDS entities, which further enhance the current ABAP authorization features that read too many unauthorized records from the database and then filter in ABAP layer.

 

Native SQL are not recommended by SAP, but it could help to execute and use the HANA SQL script features which could not be attained by Open SQL.  If Native SQL need to be used, SAP recommend to use ABAP Database Connectivity API (ADBC), for all the native SQL Calls, which contains 3 main classes: CL_SQL_CONNECTION, CL_SQL_STATEMENT, and CL_SQL_RESULT_SET.

 

ABAP could now be used to create HANA database procedures directly in the coding, known as ABAP Managed Database Procedure (AMDP).  ABAP classes and methods are used to achieved.   Classes could be used as a contained for AMDPs by implemented a so-called Marker interface IF_AMDP_MARKER_HDB, and an AMDP method is called like any other ABAP method.

Existing HANA views, also known as calculation view in HANA, could now be represented as a normal Dictionary view by defining an External view. In the ABAP Dictionary, it would look like any other dictionary view, which could be read directly from Open SQL.

Existing HANA stored procedures could also represented as an HANA Proxies an call by ABAP methods.  The proxies are created via the ABAP development tool, and then utilized in ABAP by the statement CALL DATABASE PROCEDURE.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s