Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Obsolete Language Elements →  Obsolete Declarations →  Data Types and Data Objects 

Anonymous Components

Other versions: 7.31 | 7.40 | 7.54

Obsolete Syntax

DATA: BEGIN OF struc,
        ...
        '...',
        ...
        space(len) [TYPE c],
        ...
      END OF struc.

Effect

If text field literals or the constant space (the latter also with a length specified in parentheses) are specified within the definition of a structure using DATA, CONSTANTS, or STATICS, nameless text fields are included at this position as anonymous components. For literals, the initial value and the length of these components correspond to the content. For space, the system creates a text field filled with spaces. These anonymous text fields cannot be addressed explicitly in programs. In particular, structures never contain components with the name space. You can only access anonymous components using the structure name and offset/length addressing.


Notes

  • You are not permitted to specify anonymous components in classes or interfaces.

  • You can easily replace these anonymous components with named components. Named components increase the function of anonymous components by allowing them to be accessed explicitly, without limiting their role as, for example, filler fields.