SAP NEWS-751-ABAP SQL



Get Example source ABAP code based on a different SAP table
  



AB_SQL in ABAP Release 7.51
ITOC

ABAP_MODIFICATION_NN Common Table Expressions

The new AB-SQL statement WITH enables common table expressions (CTEs) to be defined for use in the WITH statement. A common table expression creates a results set that is used in the queries of the WITH statement as a data source. The main query of the WITH statement has an INTO clause and transfers its results set to ABAP data objects.

ABAP_MODIFICATION_NN Cross Join

As well as an inner and outer join, it is now possible to use a cross join in a SELECT statement.

ABAP_MODIFICATION_NN New Addition OFFSET in SELECT

In the additions named under additional_options in the statement SELECT , an addition OFFSET can now be specified to specify the first row of the results set.

ABAP_MODIFICATION_NN SQL Functions

The following changes have been made:
The new numeric function DIVISION enables divisions with decimal places.
The new string functions LOWER and UPPER implement uppercase and lowercase.
The new string functions LEFT, CONCAT_WITH_SPACE, INSTR, and RPAD perform operations on strings.
In the string functions LPAD, LTRIM, and RTRIM, arguments passed as constants or literals can now contain special characters.
The new date functions DATS_IS_VALID, DATS_DAYS_BETWEEN, DATS_ADD_DAYS and DATS_ADD_MONTHS execute operations with date fields.
An addition AS dtype can now be specified in the aggregate function AVG to define the data type of the result.

ABAP_MODIFICATION_NN Extended Result

The new addition EXTENDED RESULT of an INTO clause can be used to provide an extended result for an object of the class CL_OSQL_EXTENDED_RESULT, which can be queried using methods of the class.

ABAP_MODIFICATION_NN New Additions in DELETE dbtab

In the variant DELETE FROM target of the statement DELETE, the additions ORDER BY, OFFSET, and UP TO can now be specified to restrict the number of rows to delete.

ABAP_MODIFICATION_NN Inline Declaration for OPEN CURSOR

An inline declaration with the declaration operator DATA can now also be specified at the operand position for dbcur of the OPEN CURSOR statement.

ABAP_MODIFICATION_NN Strict Mode in the Syntax Check

If one the new features listed above is used in an AB-SQL statement, the syntax check is performed in a ABAP_STRICT_763 strict mode / , which handles the statement more strictly than the regular syntax check.

ABAP_MODIFICATION_NN Access to Cached Views of the SAP HANA Database

Under certain conditions, a query can read data from the cache when accessing a cached view of the SAP HANA database . This can be checked using the addition EXTENDED RESULT of an INTO clause.

ABAP_MODIFICATION_NN Session Variables in the SAP HANA Database

A new ABAP-specific session variable CDS_CLIENT for the client ID is modified by the addition USING CLIENT in AB_SQL reads. The CDS session variable client is now linked to this HANA session variable.

ABAP_MODIFICATION_NN Restrictions Removed

The following restrictions were removed:
The addition ORDER BY PRIMARY KEY of the SELECT statement can now also be specified if a column is specified multiple times in the SELECT list, without the same name being blocked by alternative names.
The components of a replacement object must no longer be in the same order as the associated components of the replaced database table or classic view.
When accessing CDS views that use session variables, the addition USING CLIENT can now be used. When accessing CDS views that do not use the session variable client, the addition CLIENT SPECIFIED can now be used.