Structured Query Language (SQL)
All relational database systems use a variant of Structured Query Language (SQL) to allow you to work with them. Standard SQL consists of three main components:
ABAP SQL Architecture
In the past, SAP systems had to support a range of database platforms, and each platform had a slightly different implementation of the SQL standard. This meant that each platform needed slightly different commands to achieve a particular task. To avoid the ABAP code being database-specific, SAP invented ABAP SQL - or Open SQL as it was called originally.
Open SQL or ABAP SQL is an abstract set of SQL commands implemented at ABAP level and integrated into the ABAP language. At runtime, ABAP SQL is translated into a variant of SQL that the database understands. This variant is called Native SQL to distinguish it from the database independent ABAP SQL. The translation from ABAP SQL to Native SQL takes place in the database interface, a component of the ABAP system that consists of a general part and a database-specific library.
Even though today many ABAP-based SAP products only support SAP HANA as DDBMS, SAP has still retained the concept of ABAP SQL and the database interface. This is because of the following reasons:
- Architecture compatibility
- ABAP SQL and the database interface are an integral part of the system architecture
- Code compatibility
ABAP SQL coding from previous SAP products (including customer-specific development) should run free of side-effects in the modern, SAP-HANA-only ABAP environments.
Built-in features of the database interface are as follows: the database interface does not just translate statements; it is also responsible for ABAP specific tasks like, for example, automatic client-handling.