Ansicht
Dokumentation

ABAPASSIGN_MEM_AREA - ASSIGN MEM AREA

ABAPASSIGN_MEM_AREA - ASSIGN MEM AREA

RFUMSV00 - Advance Return for Tax on Sales/Purchases   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.
SAP E-Book

ASSIGN, mem_area

Short Reference



... static_dobj
 $| dynamic_dobj
  $| dynamic_components
  $| dynamic_access
  $| writable_exp ...

Alternatives:


Static Specification

1. ... static_dobj

Dynamic Specifications

2. ... dynamic_dobj

3. ... dynamic_components

4. ... dynamic_access

Specifying an Expression

5. ... writable_exp

Effect

mem_area is used to specify the memory area that is assigned to the field symbol.

  • 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 and third variants are dynamic. The variants dynamic_dobj are used for general dynamic access to data objects; the variants dynamic_access are used for dynamic access to the attributes of classes.

In an inline declaration of the field symbol with FIELD-SYMBOL(<fs>), its typing takes place for the static variant and when specifying an expression with the data type mem_area. In the dynamic variants, the typing is performed with the generic type data.

The variants differ as to how the system behaves after a successful assignment:

  • The return code sy-subrc is not set for the static variant.
  • In dynamic variants and when a table expression is specified, the statement ASSIGN sets the return code sy-subrc.

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(<fs>), the data type of the assigned memory area determines its typing.






BAL_S_LOG - Application Log: Log header data   ABAP Short Reference  
This documentation is copyright by SAP AG.

Length: 4599 Date: 20240328 Time: 153503     sap01-206 ( 61 ms )