ABAP Keyword Documentation → ABAP - Reference → Declarative statemnts
Field Symbols
Field symbols are placeholders or symbolic names for existing data objects (or parts of existing data
objects), declared by the statement FIELD-SYMBOLS
.
A memory area is assigned to a field symbol at program runtime. A field symbol does not reserve any
physical space for a field, but is a type of dynamic label for a memory area hosting a particular data
object (or part of the object). A field symbol can be used instead of data objects at operand positions
of statements. When a statement of this type is executed, a memory area must be assigned to the field
symbol by the statement ASSIGN
or the addition ASSIGNING
when
processing internal tables.
Field symbols can point to almost any data object. A field symbol is the equivalent of a
data reference variable dereferenced using ->*
. Unlike data reference variables,
value semantics are
used to access a field symbol Accessing a field symbol is like accessing the named data object (or part of the object). For data reference variables, however,
reference semantics apply.
Field symbols are implemented both for generic work with data objects and for explicit casting of data objects (only possible using field symbols).
Other versions: 7.31 | 7.40 | 7.54
Programming Guideline
Use field symbols and data references in appropriate ways
Note
Field symbols to which data objects or parts of data objects are assigned in the heap are memory-preserving, like heap references.