Use of field symbols in SAP ABAP programming, using field symbols in SAP ABAP
Use of field symbols in SAP ABAP programming, using field symbols in SAP ABAP the declaration operator FIELD-SYMBOL declares a field symbol <fs> to which a memory area is assigned in the current operand position. The declared field symbol is visible statically in the program from FIELD-SYMBOL (<fs>) and is valid in the current context. The declaration is made when the program is compiled, regardless of whether the statement is actually executed. The syntax for declaring a field symbol. FIELD-SYMBOLS: <FIELD_SYMBOL> TYPE MARA-MATNR. "here MARA-MATNR is a variable type FIELD-SYMBOLS: <FIELD_SYMBOL> TYPE MARA. "here MARA is a structure FIELD-SYMBOLS: <FIELD_SYMBOL> TYPE REF TO DATA . "here DATA is a reference type ASSIGNING and ASSIGN are the keywords that are used to assign a value to the field symbol. Example of using field symbol as a work area In the below example we are going to use the field symbol as a work area. REPORT ZS...