Skip to Content
0
Former Member
Apr 10, 2014 at 11:00 AM

Dynamic assignment of fields in structure

33 Views


Hi experts,

I would like to do something like this with the use of field symbols:

LOOP AT lt_test INTO ls_test.

<field1> = ls_test-variant.

*Field variant contains name of the field which also exists in the structure ls_test and that field have a value which should be assigned to other structure with the same field name

ls_other_structure-<field1> = value from field which name is specified in field ls_test-variant.

ENDLOOP.

Hope it is clear😊. Please advice me how to do this, I tried with field symbols, but when I try: <fs1> (with name: ls_other_structure-<field1>) = <fs2> (value which should be assigned) it dosen't work. Thank you in advance.

BR

Paul