Incorrect Syntax

Missing Separator

Separators (spaces, commas, colons, periods or new lines) are required in ABAP objects following literals and offset/length definitions.

There is an error message in ABAP objects for:

CONCATENATE 'fgfdg'f INTO g.

WRITE AT /off(len)'...'.

Correct syntax:

CONCATENATE 'fgfdg' f INTO g.

WRITE AT /off(len) '...'.

Reason:

Unification of the statement syntax. The next part of a statement (token) may never be written directly following another token. A valid separator must always separate them.

Incorrect Plus-Bracket Notation

You cannot use empty plus-bracket notation in ABAP Objects

In ABAP Objects, the following statements cause an error message:

DATA: f1() TYPE ...,
      f2+  TYPE ...,
      f3   LIKE f1+().

SELECT SINGLE ... FROM +(f1) INTO (f2+off(), f3+(len)).

WRITE AT +(len) f3().

Correct syntax:

DATA: f1 TYPE ...,
      f2 TYPE ...,
      f3 LIKE f1.

SELECT SINGLE ... FROM (f1) INTO (f2+off, f3(len)).

WRITE AT (len) f3.

Cause:

You can only use the plus symbol for arithmetical operations and offset/length addressing. In the latter, the plus symbol without a subsequent offset value is superfluous. At present, the system ignores a single plus sign directly after a field name or directly before a parenthesis. This allows you to insert the plus symbol in places in which offset/length addressing. is not available - for example, before dynamic expressions or in data declarations where only length addressing is possible. The system also ignores empty parentheses after the plus sign, offset value, or field name.

Cannot Process a Literal over Several Lines

In ABAP Objects, a literal can no longer stretch over several program lines

In ABAP Objects, the following statement causes an error message:

WRITE 'Start...
                   ...end'.

Correct syntax:

WRITE 'Start...           ' &
      '             ...end'.

Cause:

The number of spaces inserted depends on the length of the line in the Editor. The line length of the Editor is not of fixed length, since it may increase in a future release. Literals that are longer than one line in the Editor can be made up from several literals put together, if you use the ampersand (&) character.

Cannot Update Field Labels that Extend over More Than One Line

In ABAP Objects, field labels enclosed in parentheses in a list cannot extend over more than one line.

In ABAP Objects, the following statements cause an error message:

SELECT SINGLE col1 col2 ... coln
  FROM dbtab
  INTO (wa-col1, wa-col2, ................ , wa-c
oln)
WHERE col1 IN (f1, f2, ..................... , f
n).

Correct syntax:

SELECT SINGLE col1 col2 ... coln
  FROM dbtab
  INTO (wa-col1, wa-col2, ................ ,
        wa-coln)
WHERE col1 IN (f1, f2, ..................... ,
                fn).

Cause:

Field labels cannot extend over more than one line on principle. If the line length in the Editor is increased in a future release, these split field labels will cause syntax errors. The behavior of lists is exceptional and is being adapted to general behavior.