ABAP Keyword Documentation →  ABAP - Release-Specific Changes →  Changes in Releases 7.5x →  Changes in Release 7.53 → 

ABAP SQL in Release 7.53


1. Open SQL renamed as ABAP SQL


2. Hierarchy functions


3. Secondary connections


4. Relational expression IS INITIAL


5. Date/time functions


6. Publishing associations of common table expressions


7. Numeric literals in the SELECT list


8. Enhanced cast matrix


9. Client handling in subquery of the statement INSERT


10. Subquery as data source of MODIFY


11. USING CLIENT and session variable client


12. Null values in the table buffer


13. Restrictions removed


14. Weaker check


15. New check


16. Replacement service in program calls


17. GROUP BY addition GROUPING SETS


18. Aggregate function GROUPING


19. Stricter checks for syntax rules



Modification 1

Open SQL Renamed as ABAP SQL

The existing name Open SQL has been changed to ABAP SQL. This renaming reflects that some parts of ABAP SQL now only support certain database platforms, specifically SAP HANA database, and hence that it is no longer fully platform-independent.



Modification 2

Hierarchy Functions

Hierarchy functions are table functions that can be specified as data sources in queries.



Modification 3

Secondary Connections

On an AS ABAP with a SAP HANA database as its standard database, only those secondary connections should be used from the database table DBCON whose secondary database is also a SAP HANA database. Alongside the CONNECTION addition in , this also applies to ABAP SQL and Native SQL (ADBC and EXEC SQL).

SAP HANA Smart Data Access (SDA) should be used instead. In SDA, secondary databases are addressed from the SAP HANA database using special qualified names or by using virtual tables. If a SAP HANA database is used as a standard AS ABAP database, ABAP programs can use these names across the standard connection. This is only possible in AMDP and Native SQL. Database Shared Libraries (DBSL) are no longer required here.



Modification 4

Relational Expression IS INITIAL

The relational expression IS [NOT] INITIAL can now be used in a condition sql_cond to compare operands with their type-dependent initial value.

When used, this expression requires the strict mode from Release 7.53.



Modification 5

Date/Time Functions

ABAP SQL now supports the following new date/time functions:

When used, these functions require the strict mode from Release 7.53.



Modification 6

Publishing Associations of Common Table Expressions

When CDS views are accessed within a common table expression, the addition WITH ASSOCIATIONS of the statement WITH can now be used to publish associations of these views for use in path expressions of the current WITH statement. The addition REDIRECT TO can also be used to replace the target data source of the published association with a previous CTE or the current CTE.

When used, this addition requires the strict mode from Release 7.53.



Modification 7

Number Literals in the SELECT List

Until now, only those numeric literals whose value matched the value range of the type INT4 could be specified as elementary SQL expressions in the SELECT list of a query. Now numeric literals of up to 31 digits can be specified, which are interpreted as numbers of the type DEC if the value range of INT4 is exceeded.



Modification 8

Enhanced Cast Matrix

A cast expression can now be used to convert the data types INT1, INT2, INT4, and INT8 to DEC.



Modification 9

Client Handling in Subquery of the Statement INSERT

The addition USING CLIENT of the statement INSERT can now be specified in a subquery. This means that the client specified for the target table of the insert operation can be different from the client specified for the data source of the subquery.

If USING CLIENT is not specified in the subquery, the current client ID is now always applied to automatic client handling. Before Release 7.53, the client ID specified after INSERT using USING CLIENT was also used in the subquery.

The FROM clause of the subquery can now access the database table or classic view filled using the INSERT statement. This makes it possible to copy the data from one client to another.

In the subquery, using USING CLIENT or accessing the database table or classic view filled by the INSERT statement enables strict mode from Release 7.53.



Modification 10

Subquery as Data Source of MODIFY

In the ABAP SQL write statement MODIFY, a parenthesized subquery SELECT subquery_clauses can now be specified as a data source after FROM. The rows of the results set of the subquery are modified or inserted in the target table directly on the database. No data transport is required between the database and AS ABAP. When used in MODIFY, a subquery demands strict mode from Release 7.53.



Modification 11

USING CLIENT and Session Variable client

In an ABAP SQL read in which multiple queries access client-specific CDS views and the client handling method is defined using the annotation @ClientHandling.algorithm:#SESSION_VARIABLE, the session variable client (which corresponds to the ABAP-specific session variable CDS_CLIENT on the SAP HANA database) must be set to the same value in all of these queries. The runtime error SAPSQL_DIFFERENT_CLIENT_VALUES occurs if USING CLIENT is used to specify a different client ID in one of these queries. This situation can occur in the statement WITH or when using UNION.



Modification 12

Null Values in the Table Buffer

The table buffer now supports real null values. In table buffering, null values are no longer transformed to type-dependent initial values. When the buffer is accessed, the same results are produced as when the database is accessed directly. The corresponding restrictions now no longer apply. The following are some of the aspects affected:

Modification 13

Restrictions Removed

Modification 14

Weaker Check

ABAP SQL statements that exploit a database property not supported by all database platforms no longer produce a syntax check warning and produce a syntax warning in the extended program checks instead.



Modification 15

New Check

If the data of the internal table needs to be transported to the database in cases where the internal table is used as a data source of the ABAP SQL statement SELECT, a syntax check warning occurs that can be hidden using the pragma ##itab_db_select.



Modification 16

Replacement Service in Program Calls

The method ACTIVATE_REPLACEMENT of the class CL_OSQL_REPLACE has the new parameter FLG_SURVIVE_SUBMIT, which now also permits redirections in called programs.



Modification 17

GROUP BY Addition GROUPING SETS

In a SELECT statement, the GROUP BY addition GROUPING SETS can now be used. The addition GROUPING SETS makes it possible to group multiple aggregations under one SELECT statement. This can also be done by specifying the same SELECT statement with different GROUP BY clauses and using the addition UNION to group them in a single statement. This approach is more work, however, is error prone and is harder for the database to optimize. The addition GROUPING SETS also makes it easier to interpret and maintain the SELECT statement.

Modification 18

Aggregate Function GROUPING

The aggregate function GROUPING can now be used in a SELECT statement. An aggregate expression with the aggregate function GROUPING acts as a grouping function for grouping sets GROUPING SETS in a GROUP BY clause. The grouping function GROUPING makes it possible to identify whether a specific column in the results set in question was aggregated or not. A grouping function can be used only if the GROUP BY clause contains a GROUPING SETS addition.



Modification 19

Stricter Checks on Syntax Rules

A violation of the following rules now always produces a syntax error. In the strict modes of the syntax check, these violations already produced a syntax error. Outside the strict modes, they produced a syntax check warning and in most cases a runtime error when the program was executed.