Skip to Content
0
Jun 04, 2012 at 12:21 PM

Assignment of a structure to field symbol possible?

13938 Views

Dear all,

I use a method with the following parameters:

Parameters:

DATA_STRUCTURE TYPE ANY (contains a data structure)

DATA_LINE TYPE ANY (is one row of a table)

The following does work:

FIELD-SYMBOLS:
<name> TYPE ANY.

ASSIGN COMPONENT 'myname' OF STRUCTURE DATA_LINE TO <name>.

<name> = 'Clinton'.

Now my question:

Is it possible to cast the complete structure to a field symbol (to change the line) instead of addressing each element explicit:

e.g.:

DATA_LINE-name = 'Clinton'.


or

<fs_DATA_LINE>-name = 'Clinton'.

?

All my efforts to address one field without the ASSIGN COMPONENT did not work. The method itself should be flexible - without any fix structure.