SAP ABAP SQL STRICTMODE 740 SP05



Get Example source ABAP code based on a different SAP table
  



AB_SQL - Strict Mode in ABAP Release 7.40, SP05
ITOC @

Conditions for the Strict Mode
The strict mode of the syntax check in ABAP_RELEASE 7.40, SP05 applies to all AB-SQL statements that use one of the following features introduced in ABAP_RELEASE 7.40 SP05 :
Lists of operands as comma-separated lists
Escape character @ in front of host variables
SQL expressions except for columns specified individually or aggregate expressions specified individually.
Addition USING CLIENT
Joins:
ON conditions without a column from a DDIC database table or DDIC view specified on the right side as an operand.
Multiple consecutive joins where a join expression and not a database table or view is on the right side of a join expression.
Use of RIGHT OUTER JOIN
Fields from the right side specified in LEFT OUTER JOIN or from the left side in RIGHT OUTER JOIN in the WHERE condition.
Access to CDS entities using SELECT.

Rules for the Strict Mode
The strict mode of the syntax in ABAP_RELEASE 7.40, SP05 checks whether the following additional rules are followed:
Any errors that would normally be reported as syntax warnings are reported as syntax errors.
All lists of operands must be comma-separated lists. This affects the following:
In the statement SELECT, columns, aggregate expressions, or SQL expressions specified in the SELECT list and columns specified after GROUP BY and ORDER BY.
In the statement UPDATE, change expressions specified after SET.
Host variables must be prefixed with the escape character @.
If an explicit comma-separated list is specified without the addition DISTINCT in the SELECT list, all columns of the result set defined here must exist as identically named components in a structure or table specified after INTO CORRESPONDING FIELDS.
The client column of a data source of a read statement or a target of a write statement must not be accessed in ON and WHERE conditions without implicit client handling being disabled using CLIENT SPECIFIED first. In strict mode, this applies in particular when using dynamic conditions , alias names defined using AS, or joins.
The addition CLIENT SPECIFIED can only be used for client-dependent DDIC database tables or DDIC views.
If the addition FOR ALL ENTRIES is used, no database fields of the built-in types STRING, RAWSTRING, and GEOM_EWKB plus LCHR and LRAW can occur in the SELECT list.
BEGIN_SECTION VERSION 5 OUT
If DDIC database views that contain the same number of key fields and view fields are accessed in a dynamic FROM clause combined with the addition ORDER BY PRIMARY KEY, the exception CX_SY_DYNAMIC_OSQL_SEMANTICS is raised.
END_SECTION VERSION 5 OUT
Blanks behind literals and blanks after opening or before closing brackets cannot be omitted in conditions sql_cond .
Like in classes, the obsolete short forms are forbidden.
Comma-separated lists of operands and the escape character @ can only be used in programs in which the program property fixed point arithmetic is activated.