Skip to Content

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

Read dynamic internal table - addressing certain field

Hi experts,

I'm new to a dynamic itabs. How do I read a value of a particular field from such a table?

I've found the below code by which I'm able to read a name of the field and later on the value. The problem is, that I need to address all the values from the line directly from the field - e.g. <dyn_wa>-kokrs.

LOOP AT <dyn_table> INTO <dyn_wa>. "ASSIGNING

LOOP AT fields_table ASSIGNING <field>.

CONCATENATE '<dyn_wa>' <field>-name INTO w_field

SEPARATED BY '-'.

ASSIGN (w_field) TO <aux>.

  • WRITE: <aux>.

APPEND <aux> TO itab_fin.

write:/ <dyn_wa>.

Is it possible or do I need to copy the values into a non-dynamic itab with predefined structure - because in this case I quite lose the biggest advantage of dynamic itabs;)

Thanks,

Petr

Former Member
Not what you were looking for? View more on this topic or Ask a question