‎2009 Feb 20 2:52 PM
Hi guys,
searched a long time, but didn't find anything. My problem:
I receive a table with following structure:
ls_struc-tabname
ls_struc-fieldname
ls_struc-value
Now, i need to save this value in given tab and field, e.g. the table consists this data
ls_struc-tabname = 'SFLIGHT'.
ls_struc-fieldname = 'CARRID'.
ls_struc-value = 'AA'.
ls_struc-tabname = 'SFLIGHT'.
ls_struc-fieldname = 'CONNID'.
ls_struc-value = '1234'.
With this data i have to fill the structure ls_sflight (type sflight) (table name is known, only field/value can be different/change):
ls_sflight-carrid = 'AA'.
ls_sflight-connid = '1234'.
How to get this data in this structure? Tried it with field symbols, but can't define the field dynamically
assign value of structure ls_struc to <fs_sflight>-[ls_struc-fieldname] ??? something like this possible?
‎2009 Feb 20 3:27 PM
Hi Christopher
data: ls_sflight type sflight,
field(50) type c.
field-symbols <fs> type any.
concatenate 'LS_SFLIGHT-' ls_struc-fieldname into field.
condense field.
assing (field) to <fs>.
<fs> = ls_struc-value.
Regards
Marcin
‎2009 Feb 20 3:27 PM
Hi Christopher
data: ls_sflight type sflight,
field(50) type c.
field-symbols <fs> type any.
concatenate 'LS_SFLIGHT-' ls_struc-fieldname into field.
condense field.
assing (field) to <fs>.
<fs> = ls_struc-value.
Regards
Marcin