For Loop in ABAP-1

d9Q4e1470048781 For LOOP in ABAP!

 

 

 

CODE- A simple use of FOR loop for filling internal table rows


TYPES:BEGIN OF line,
        col1 TYPE i,
        col2 TYPE i,
      END OF line,
      ty_itab TYPE STANDARD TABLE OF line WITH EMPTY KEY.

DATA(lt_itabVALUE ty_itabFOR THEN j + 10 WHILE j < 100
                                                             col1 j col2 j + 1  )                                .

LOOP AT lt_itab ASSIGNING FIELDSYMBOL(<fs_itab>).
  WRITE:/ <fs_itab>col1,
                  <fs_itab>col2.
ENDLOOP.


CODE

1


 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s