Hi,
I have a table in which there are eight field with this name:
COLOR1, COLOR2,.....COLOR8
In order to improve the code I would like to do a loop which will execute 8 times and will get the value of the eight fields.
I think the code would be somethig like this.
DATA : MYSUM TYPE I.
DATA : MYSTR(30) TYPE C.
CLEAR MYSUM.
DO 8 TIMES.
CLEAR MYSTR.
CONCATENATE "MYTABLE-COLOR" SY-INDEX INTO MYSTR.
MYSUM = MYSUM + MYSTR.
ENDDO.
And my question is whether it is possible to get the value of MYSTR in each loop (MYTABLE-COLOR1, MYTABLE-COLOR2....)?
Thanks a lot.