SAP® Documentation

Single view

ABAPFIELD-SYMBOLS - FIELD-SYMBOLS

BAL_S_LOG - Application Log: Log header data   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.
SAP E-Book

FIELD-SYMBOLS

Short Reference



Syntax

FIELD-SYMBOLS <fs> ${ typing $| obsolete_typing $}.

Addition:

... typing

Effect

The statement FIELD-SYMBOLS declares a field symbol<fs>. The naming conventions apply to the name fs. The angle brackets of the field symbols distinguish them from data objects and are obligatory. Field symbols can be declared in any procedure and in the global declaration part of an ABAP program, but not in the declaration part of a class or an interface. A field symbol can be used in any operand position in which it is visible and which matches the typing defined using typing.

A field symbol is initial directly after its declaration (with the exception of obsolete typings without an explicit type) , which means that it does not reference a memory area. A memory area must be assigned to it (normally using the statement ASSIGN) before it can be used as an operand. Otherwise an exception is raised.

Notes

  • An inline declaration of field symbols can be made using the declaration operator FIELD-SYMBOL.
  • The angle brackets are a part of the name, which means that a field symbol could potentially be called <> (but this is not recommended).


Addition

... typing

Effect

The addition typing is used to type the field symbol. The syntax of typing is described under Typing. The typing specifies which memory areas can be assigned to the field symbol and in which operand positions it can be used.

Note

Alongside the typings that use typing, an obsolete typing obsolete_typing is also possible (outside of methods).

Example

Types a field symbol <itab> as an internal table and a field symbol <wa> with a fully generic type.

FIELD-SYMBOLS: <itab> TYPE ANY TABLE,
               <wa>   TYPE any.

...

ASSIGN <itab>[ KEY primary_key ('...') = '...' ] TO <wa>.






CPI1466 during Backup   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.

Length: 4149 Date: 20200126 Time: 032715     sap01-206 ( 59 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.