Skip to Content
0
Former Member
Dec 02, 2008 at 11:42 AM

Assign a value to a feild in dynamic work area

16 Views

field-symbols: <dyn_table> type standard table,

<dyn_wa>,

<dyn_field>.

loop at <dyn_table> into <dyn_wa>.

do.

assign component sy-index

of structure <dyn_wa> to <dyn_field>.

if sy-subrc <> 0.

exit.

endif.

if sy-index = 1.

write:/ <dyn_field>.

else.

write: <dyn_field>.

endif.

enddo.

endloop.

In <Dyn_table> i have created feilds F1, F2,F3 dynamicly and so in <dyn_wa> . with this code i can read the feilds F1,F2,F3 from <Dyn_WA> but what if i want assign a value to it like

<Dyn_table> -F1 = 123 " This code is not working as feilds are added dynamicly to it ....

Please advice how we can do <Dyn_table> -F1 = 123 some thing like this