Comments

Normal comments

The * character in the first position in a line in a program indicates that the line is a comment line. A comment line can contain any content you wish and is ignored when the program is generated by the ABAP Compiler.

If you enter " in any position in a line, the remaining content to the end of the line is a comment (line end comment), which is also ignored when the program is generated by the ABAP Compiler. This rule does not apply to " in character literals.

Pseudo comments

The character string "#EC after a statement defines that the content following it is a pseudo comment. Pseudo comments influence the extended program check or define test properties for test classes (as of release 7.0). "#EC can either be followed by a text documented during the extended program check to stop the corresponding check for this line, or by a test property after the CLASS statement with the addition FOR TESTING.

Note

In non-Unicode systems, no characters should be used in lines that are not available in all code pages supported by SAP. In the worst case scenario, a program used with a different code page to that in which it was created can no longer be executed. SAP recommends that you only use 7-bit ASCII characters.

Example

The first line is a comment line. The pseudo comment "#EC NEEDED suppresses the report from the extended program check that f is not subject to read access. The last line contains a comment after ".

* Demo extended check
DATA: f TYPE string,   "#EC NEEDED
      g TYPE string.
f = g.                 "Value assignment