Skip to Content
0
Former Member
Oct 25, 2005 at 12:28 PM

Accessing a structure dynamical

48 Views

Hi,

I hope someone knows a solution for the following problem:

I want to access a table. I know the tablename and create a structure to access the values, but the table and therfore also the fieldnames of the structure can differ everytime.

Thats why i want to access the structure dynamical. I get the fielsnames of the structure with the Function:

'RFC_GET_STRUCTURE_DEFINITION'

But when i program the following code:

...

LOOP AT lt_fields INTO ls_fields.

lv_fieldname = ls_fields-fieldname.

Append <b>ls_Table-lv_fieldname</b> TO serializedTable.

ENDLOOP.

...

the compile is saying: no such fieldname exists.

How can i make him clear, to use the content of the variable during runtime?????

Thanks for ure help or hint!