Hello there,
i'm looking for a solution of the following Problem:
I have a structure STRUC with several fields e.g. Name, Street, City
In my program i get dynamically the fieldname and the corresponding value.
With these information i like to do the following assignment:
STRUC-<fieldname> = 'Hello world'. (which is not working in ABAP)
How can i do an assignment like this? I only found a way to read colums dynamically from a structure but not the oppside way.
ASSIGN COMPONENT <fieldname> of structure <STRUC> to <fieldvalue>.
I need something like this
ASSIGN <fieldvalue> to COMPONENT <comp> of structure <STRUC>.
Does anybody has an idea?
Many thanks in advance!
Josef