Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Access column of an internal table dynamically.

Hi All,

How can I access the column of a table dynamically?

Ex: Data : columnname type string.

columnname = 'name'.

itab-columnname = 'test'.

Kind regards.

Karim.

Tags:
Former Member
Former Member replied

Hi Karim,

That is possible through field symbols. Try the following way

field-symbols <fs> type any.

Data : columnname type string,

columnname = 'name',

s_itab like line of itab.

assign component columnname of structure s_itab to <fs>.

Now <fs> Contains the value of the dynamic field 'name'.

Cheers,

Kothand

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question