SAP ABAP SQL PATH RESTRICTIONS



Get Example source ABAP code based on a different SAP table
  



AB_SQL - Restrictions for Path Expressions
In principle, the same restrictions apply to path expressions in AB_SQL and the CDS associations or CTE expressions used there as to using a corresponding join expression. For example, a path expression cannot be used together with the addition ORDER BY PRIMARY KEY. These restrictions are documented in the corresponding clauses. The following restrictions currently apply:
Requirements for the CDS entities or common table expressions
The association targets of the associations of a path expression cannot be DDIC database tables or DDIC database views with replacement objects.
No literals with prefixed #domain or :domain can be used in the CDS associations of the path expression to check the fixed value in the value range of a domain.
Due to implicit client handling, no associations can be used whose ON condition accesses the client columns of their association source or association target.
BEGIN_SECTION VERSION 5 OUT This cannot be bypassed using the obsolete addition CLIENT SPECIFIED either.
END_SECTION VERSION 5 OUT
Requirements for AB_SQL
If a value greater than to one is defined for the cardinality of an association of a path expression in the FROM clause, the identical path expression must also be specified in the SELECT list.
If the addition CORRESPONDING or an inline declaration @DATA$|@FINAL(...) is used in the INTO clause of a SELECT statement, columns of the SELECT list specified using a path expression must have an alias name alias defined using AS.
A data source specified as a path expression in the FROM clause can be used in the SELECT statement only by using an alias name tabalias defined using AS in front of the column selector ~.
BEGIN_SECTION VERSION 5 OUT
The obsolete addition CLIENT SPECIFIED cannot be used together with path expressions that contain CDS associations if the association target is client-dependent. In path expressions in the FROM clause, the association sources of the associations cannot be client-dependent either.
END_SECTION VERSION 5 OUT
The addition USING CLIENT
BEGIN_SECTION VERSION 5 OUT and the obsolete addition CLIENT SPECIFIED
END_SECTION VERSION 5 OUT cannot be combined with path expressions that contain CDS associations or CTE associations if they are exposed by common table expressions.
If the alias name tabalias is specified statically using AS while the FROM clause source_syntax is specified dynamically, no path expressions can be used here.
Path expressions cannot be used in the ON condition of a join expression.
In SELECT statements, path expressions cannot be used together with the additions FOR ALL ENTRIES or WITH PRIVILEGED ACCESS .



Latest notes:

Fewer restrictions apply to the path expressions path_expr in the ABAP CDS CDS DDL. If CDS association reads are required that are possible in ABAP CDS but not in AB_SQL , they can be moved to a CDS view entity.
NON_V5_HINTS
ABAP_HINT_END