Code: Alles auswählen.
DATA: feldname1 TYPE string,
feldname2 TYPE string,
index(2) TYPE c.
FIELD-SYMBOLS: <quelle> TYPE ANY,
<ziel> TYPE ANY.
DO 50 TIMES.
index = sy-index.
CONCATENATE 'wa_test-feld' index INTO feldname1.
CONCATENATE 'wa_rows-field' index INTO feldname2.
ASSIGN (feldname1) TO <ziel>.
ASSIGN (feldname2) TO <quelle>.
<ziel> = <quelle>.
ENDDO.
Code: Alles auswählen.
Data: inc type i.
FIELD-SYMBOLS: <quelle> TYPE ANY,
<ziel> TYPE ANY.
DO 50 times.
inc = sy-index - 1.
ASSIGN wa_rows-field1 INCREMENT inc TO <quelle> RANGE wa_rows.
ASSIGN wa_test-feld1 INCREMENT inc TO <ziel> RANGE wa_test.
<ziel> = <quelle>.
ENDDO.