ABAP Programming Language

Expressions, Functions and Assignments

LET expressions

LET expressions with format LET ... IN make it possible to define variables or field symbols as help fields in constructor expressions.

Component operator CORRESPONDING

The component operator CORRESPONDING allows assignments at component level between structures or between internal tables at operand positions. The mapping between the components is either made on the basis of identical names or can be defined by the user.

MOVE-CORRESPONDING for internal tables

With the MOVE-CORRESPONDING statement, it is now also possible to assign internal tables. A new addition EXPANDING NESTED TABLES makes it possible to expand tabular components from structures. Another addition KEEPING TARGET LINES causes target tables to be added to instead of being overwritten.

Table Comprehensions

Table comprehensions are based on FOR loops in constructor expressions with NEW or VALUE. They read internal tables and form a new internal table from them.

Meshes

Meshes and mesh paths

Meshes are special structures defined with TYPES BEGIN OF MESH - TYPES END OF MESH. Their components are internal tables that can be linked with one another using associations defined as ON conditions. These associations are evaluated by the entry of mesh paths mesh-node\assoc1[ ... ]\assoc2[ ... ]\... in suitable expressions and statements.

Open SQL

Lists separated by commas

All lists of operands in Open SQL can be entered as lists separated by commas. This means that entering lists separated by blanks is now obsolete.

Escape symbol for host variables

ABAP host variables can be flagged with the escape symbol @. This means that entering host variables without an escape symbol is now obsolete.

SQL expressions

SQL expressions can be entered after SELECT as column information. The result of this kind of expression is determined by the database system and passed on to the application server in the corresponding column in the result set.

Switching automatic client handling

Addition USING CLIENT switches automatic client handling to a specified client.

Less restrictions for joins

A right side can be used as a (compounded) join expression. In addition to LEFT OUTER JOIN, RIGHT OUTER JOIN can be used too. It is not necessary anymore for all comparisons of the ON condition to contain a column on the right.

Evaluation of INTO CORRESPONDING

If all required components can be statically recognised, the assignment of the fields in addition CORRESPONDING after INTO is now already determined during generation of the program instead of at runtime. If there is at least one name match, all columns for which there is no name match are removed from the result set.

Access to CDS views

With SELECT, it is possible to access CDS views that are defined with the DDL of Core Data Services (CDS) using DEFINE VIEW. In the case of client-dependent CDS views, automatic client handling is performed. If this is deactivated with addition CLIENT SPECIFIED, the client column is part of the result set, even though it is not an element of the CDS view. With the new addition CLIENT SPECIFIED of statement TYPES, a suitable target area can be declared. New additions to CLIENT SPECIFIED behind FROM make it possible to address the column in the SELECT statement.

ABAP Managed Database Procedures

AMDP Classes and AMDP Methods

ABAP Managed Database Procedures (AMDP) are a framework for managing and calling stored procedures and database procedures as AMDP procedures. In the first step, SAP HANA database procedures programmed in SQLScript are supported. The tag Interface IF_AMDP_MARKER_HDB labels a class as an AMDP class that can contain AMDP methods for the SAP HANA database. Addition BY DATABASE PROCEDURE FOR HDB LANGUAGE SQLSCRIPT to statement METHOD turns a method of an AMDP class into an AMDP method that is implemented in the SAP HANA database's SQLScript language rather than ABAP. The ABAP runtime environment creates a corresponding database procedure in the SAP HANA database. This procedure is executed when the AMDP method is called.

ABAP Channels

ABAP Message Channels and ABAP Push Channels

ABAP Messaging Channels (AMC) allow communication between programs of an AS ABAP beyond the boundaries of an application server. ABAP Push Channels (APC) allow bi-directional communication between an AS ABAP and the Internet using WebSocket protocol.

Security Checks

Security checks in the extended program check

The security checks in the extended program check search for security problems in ABAP programs. The security checks perform a static analysis of the ABAP source text and report any security risks encountered. The security checks are a separate product that has to be purchased separately. Using the security checks in customer systems incurs additional license fees. Program RSLIN_SEC_LICENSE_SETUP can be used to activate the option of running security checks in a system.