SAP® Documentation

Single view

ABAPASSIGN_MEM_AREA - ASSIGN MEM AREA

BAL_S_LOG - Application Log: Log header data   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.
SAP E-Book

ASSIGN - mem_area

Short Reference



Syntax

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

Alternatives:


Static Specification

1. ... static_dobj

Dynamic Specifications

2. ... dynamic_dobj

3. ... dynamic_access

Specifying an Expression

4. ... 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 that is assigned a statically defined data object or part of one of these objects.
  • 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.
  • The result of a writable expression is assigned in the fourth variant.

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

The variants differ in the way that 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 in the usual way. 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 are memory-preserving, like heap references.
  • In an inline declaration of the field symbol with FIELD-SYMBOL(<fs>), the data type of the assigned memory area determines the typing of the field symbol.







Addresses (Business Address Services)   ABAP Short Reference  
This documentation is copyright by SAP AG.

Length: 4971 Date: 20200126 Time: 033344     sap01-206 ( 23 ms )

Our Service

Looking for Support? Questions?

The

Consolut

Callback-Service

Leave us your contact details and we will call you back. Panels marked with * are mandatory.