Inline Declaration – In a Loop statement
It is very similar to read statement. Here I will give an example of each – Looping in a work area and in field symbol.
Without inline declaration
DATA: s_matdoc TYPE ty_matdoc.
LOOP AT t_matdoc INTO s_matdoc.
ENDLOOP.
With inline declaration
LOOP AT t_matdoc INTO DATA(ls_matdoc).
ENDLOOP.
Field symbol example
LOOP AT t_matdoc ASSIGNING FIELD-SYMBOL(<lfs_matdoc>).
ENDLOOP.