What is column in the structure

Dynamic column of a structure

Object orientation with ABAP®: inheritance, dynamic programming, GUI controls (including ALV in OO).
3 posts • Page 1 of 1
Contribution from dawns (ForumUser / 99/0/0) »
To the description of the situation:
I have a variable string which is assigned the column name once and then the column content within a loop.
now I would like to save the content of the individual columns in an internal table.

The problem is that the content should be saved in the header / internal table and I don't know how to address it ...

I had thought of the following:
1. if the variable string the column name contains:
structure name + column name:
concatenate 'wa_xml_data-' string into gv_struc.

2. when the variable string then contains the content of the corresponding column I know the value too: gv_struc = string

unfortunately it does not recognize the gv_struc as a header (e.g. wa_xml_data-object), but as a simple variable ...

how do I do it now that he the content gv_struc 's sees it as a header and saves the data?

mfg olli and thx in advance

Contribution from ereglam (Top Expert / 1826/0/6) »
Hello dawns,

to do this, put GV_STRUC in brackets. However, you must then first generate a field symbol with ASSIGN, which then contains the 'pointer' to your field.

Code: Select all.


Code: Select all.


May the force be with your code
|| .| |.|| | .... . ..|. ||| .|. |.|. . |... . .|| .. | .... |.|| ||| ..| .|. |.|. ||| |.. .
Member of XING

Contribution from dawns (ForumUser / 99/0/0) »
great, really great! ^^
joar the one with the field symbol and the assign, I tried that in vain for the whole time ...

I decided on your first variant, radio 1 A! thank you, also for the quick response, great
when you see it isses goose ... but first come to it

SAP®, ABAP®, ABAP / 4®, R / 3® and other SAP products and services mentioned on this site as well as the corresponding logos are trademarks or registered trademarks of SAP AG in Germany and other countries worldwide. Java ™ is a registered trademark of SUN Microsystems, Inc.