The Code-to-Data Paradigm

To make the ABAP code truly benefit from the potential of SAP HANA, a paradigm shift is necessary. High-performance applications delegate data-intensive operations to the SAP HANA layer, such that they really profit from how SAP HANA can make use of parallelism and optimized data storage and transfer on the database server. The new paradigm, therefore, is Code-to-Data instead of the old way, data-to-code.
Open SQL

Open SQL Overview
- Uniform syntax and semantics for all database systems are supported by SAP.
- ABAP Programs that only use Open SQL work in any ABAP system, regardless of the database system in use.
- Open SQL only works with database tables that are defined in the ABAP Dictionary.
- Using secondary database connections is possible
To some extent, Open SQL allows the execution of logic in the SAP HANA data layer to improve performance, provided the performance recommendations are kept in mind. Using Open SQL as much as possible is desirable because it has the following advantages:
- It provides a unified syntax across the different SQL dialects and a common semantics for constructs where the SQL standard is not fully precise.
- An ABAP program that only uses Open SQL statements works in any SAP system, regardless of the database system in use.
- Open SQL is embedded in the ABAP language. Consider, for example, variable binding, software logistics, and automatic client handling.
Reminder: SQL Overview
- Structured Query Language
- Data Manipulation Language
- Data Definition Language
- Data Control Language
ABAP Database Integration in Nutshell
- Database-independent interface
- Automatic client handling, ABAP table buffer
- Database-specific library
- Translates Open SQL to Native SQL
- Connects to database
- Different remote databases are possible with multiple DB clients
- ABAP database users and schemas
- One database account used, by default SAP<SID> or SAPR3
- Database is stored in an account’s schema
An ABAP system interacts with its database using the following two layers: -
- The database interface (DBI) provides a database independent interface and additional services, such as automatic client handling or the ABAP table buffer.
- The database specific library (DBSL) connects to the respective database and translates Open SQL statements.

Limitations of classical Open SQL
Open SQL in ABAP < 7.4 SPS05 does not support everything possible with standard SQL DML or SAP HANA SQL
SQL DML
|
SAP HANA SQL
|
Fixed-Value and Computed columns
|
Using SAP HANA built-in functions
|
Sub-queries in the SELECT or FORM Clauses
|
Accessing SAP HANA views
|
UNION
|
|
CASE expression
|
|
Additional Join types
|
|