sapdev logo background
sapdev logo sapdev logo
Comments

SAP OO OBS PLUS PAREN 1 documentation, setup help and example usage



Return to SAP documentation index


INCLUDE
ARTICLE

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.
    Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved




    OO_OBS_PERFORM_1
    OO_OBS_PROCEDURE_1




    comments powered by Disqus