Description:
A declaration expression using the FIELD-SYMBOL operator declares a field symbol <fs>, which is assigned to a memory area at the current operand position.
- The declared field symbol <fs> is statically visible from the point of FIELD-SYMBOL(<fs>) and remains valid within the current context.
- This declaration occurs at compile time, even if the statement is never executed at runtime.
- The FIELD-SYMBOL declaration operator can be used in any valid declaration position.
- An inline-declared field symbol <fs> cannot be read from within the same statement where it is declared.
Syntax:
LOOP AT lt_vbap ASSIGNING FIELD-SYMBOL(<lfs_line>).
"
ENDLOOP.
For structure:
ASSIGN COMPONENT 'VBELN' OF STRUCTURE ls_vbak TO FIELD-SYMBOL(<lfs_field>).
IF <lfs_field> IS ASSIGNED.
WRITE: <lfs_field>.
ENDIF.
Thanks for visiting!
Sangeeta Singh

Leave a Reply