ABAP - Keyword Documentation →  ABAP - ABAP Release News →  News for ABAP Release 7.5x →  News for ABAP Release 7.53 → 
Mail Feedback

ABAP SQL in ABAP Release 7.53


1. Open SQL Renamed as ABAP SQL

2. Access to Hierarchy Data

3. Secondary Connections

4. Relational Expression IS INITIAL

5. Date/Time Functions

6. Exposing CDS 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 on 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  

Access to Hierarchy Data

In queries, both

can be specified as data sources. Accessing hierarchy data triggers the strict mode from ABAP release 7.53.



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 ABAP SQL, this also applies to 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 leads to the strict mode from ABAP 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 ABAP release 7.53.



Modification 6  

Exposing CDS 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 REDIRECTED 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 leads to the strict mode from ABAP release 7.53.



Modification 7  

Numeric 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 ABAP 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 ABAP 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 ABAP 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

The following restrictions were 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 grouping sets under one GROUP BY clause. This is the same as specifying UNION ALL with different GROUP BY clauses. The addition GROUPING SETS has an advantage over a UNION clause grouping because the SELECT clause only needs to be specified once.

Using GROUPING SETS triggers strict mode from ABAP release 7.53.



Modification 18  

Aggregate Function GROUPING

The aggregate function GROUPING can now be used in a SELECT statement. The grouping function GROUPING can be used to verify whether a specific column is part of the aggregation. The grouping function can be used only if the GROUP BY clause contains the addition GROUPING SETS.



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.