New ABAP Syntax

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

error

Enjoy this blog? Please spread the word :)

Follow by Email
Twitter
LinkedIn
LinkedIn
Share