What does it do? mem_area> is used to specify the memory area that is assigned to a field symbol with the statement ASSIGN>>:
The first variant static_dobj >> is a static variant in which a statically known data object or part of such an object is assigned.
The second, third and fourth variants are dynamic.
The variants dynamic_dobj> > are used for general dynamic access to data objects.
The variants dynamic_components >> are used for dynamic access to components of structures.
The variants dynamic_access >> are used for dynamic access to the attributes of classes.
The fifth variant assigns the result of a writable expression >. For an inline declaration of the field symbol with FIELD-SYMBOL(<(><)>)>>, its typing is done with the data type of mem_area> for the static variant and when specifying a writable expression. For the dynamic variants the typing is done with the generic type data>>. The variants differ as to how the system behaves after an unsuccessful assignment:
For the static variant, the return code sy-subrc> is not set. The addition ELSE UNASSIGN>> is used implicitly and cannot be specified.
For the dynamic variants, the statement ASSIGN> sets the return code sy-subrc> or can raise an exception. The addition ELSE UNASSIGN>> can be specified.
When a ABAP Alternative 3@3@>table expression> is specified, the statement ASSIGN> sets the return code sy-subrc>. The addition ELSE UNASSIGN>> can be specified.
When assigning constructor operators:
ABAP Alternative 1@1@>NEW >> the return code sy-subrc> is set by the constructor operator.
ABAP Alternative 2@2@> CASE>> the return code sy-subrc> is not set. The addition ELSE UNASSIGN>> must not be specified because an assignment of a constructor operator is either successful or raises an exception.
Latest notes:
In an internal table with a header line>, either the header line or the table body> can be assigned to a field symbol. In the statement ASSIGN>, the name of an internal table with a header line addresses the header line. To address the table body, []> must be appended to the name as usual. A field symbol to which a table body is assigned behaves in the same way in operand positions as a table without a header line.
Field symbols to which data objects or parts of data objects are assigned in the heap> act in a memory-preserving way, like heap references>.
In an inline declaration of the field symbol with FIELD-SYMBOL(<(><)>)>>, the data type of the assigned memory area determines its typing. NON_V5_HINTS ABAP_HINT_END