cancel
Showing results for 
Search instead for 
Did you mean: 

Change Field names in loop

tom_darsy
Participant
0 Kudos

Hi

I have 4 info objects zmat1, zmat2, zmat3 and zmat4.

I need to populate data for these in 1 row.

The internal table I have populated have got data in below format

zmat1

zmat2

zmat3

zmat4

All are separate row. I want to do the below example

loop at result_package assigning <result_fields>.

loop at internal table into wa.

c =c +1

<result_fields>zmat + c = wa value.

endloop.

endloop.

Any ideas?

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Sandra_Rossi
Active Contributor
0 Kudos

Use ASSIGN COMPONENT ('ZMAT1') OF STRUCTURE <result_fields> TO <zmat_dobj>

Instead of 'ZMAT1', use a variable to define the name at runtime.