SAP ABAP SQL LISTS - Obsolete



Get Example source ABAP code based on a different SAP table
  



Blank-Separated Lists
The following lists of an AB-SQL statement can still be specified with blanks as separators instead of commas, unless one of the strict modes of the syntax check applies from ABAP_RELEASE ABAP_740_SP05 .
In the statement SELECT.
When columns or aggregation functions are specified in the SELECT list.
... ${col_spec1 $[AS a1$] col_spec2 $[AS a2$] ... $}
When columns are specified after GROUP BY
... GROUP BY col1 col2 ...
When columns are specified after ORDER BY
... ORDER BY ${col1$|a1$} $[ASCENDING$|DESCENDING$]
${col2$|a2$} $[ASCENDING$|DESCENDING$]
...
In the statement UPDATE:
When change expressions are specified after SET
... SET set_expression1 set_expression2 ...
These specifications are obsolete. Lists should always be separated by commas.



Example ABAP Coding

SELECT statement with blank-separated lists. SELECT carrid connid
FROM spfli
INTO (carrid, connid)
WHERE carrid = carrid AND
connid = connid
ORDER BY carrid connid.
Recommended format with comma-separated lists, which forces the use of the escape character @ in front of host variables. SELECT carrid, connid
FROM spfli
WHERE carrid = @carrid AND
connid = @connid
ORDER BY carrid, connid
INTO (@carrid, @connid).
ABAP_EXAMPLE_END