Ansicht
Dokumentation

ABENABAP_OBJECTS_DIFF_SYNTAX - ABAP OBJECTS DIFF SYNTAX

ABENABAP_OBJECTS_DIFF_SYNTAX - ABAP OBJECTS DIFF SYNTAX

General Material Data   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.
SAP E-Book

Incorrect Syntax

Missing Separator

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

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

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) must never be written directly following another token. A valid separator must always separate them.

Incorrect Plus-Bracket Notation

In ABAP Objects and as of Release 7.0, even outside of classes, no emplty plus-bracket notations are allowed.

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 and, as of release 7.0, outside of classes, a literal can no longer occupy multiple 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 (&) sign.

Cannot Update Field Labels That Extend over More Than One Line

In ABAP Objects and, as of release 7.0, outside of classes, 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.






BAL Application Log Documentation   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.

Length: 4950 Date: 20240418 Time: 211522     sap01-206 ( 57 ms )