Skip to Content

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

Declaration of field in internal table

Hi all,

The bold words are the problem i have. I want the it_vbak-<dyn_field> to take in any value from the parameter

eg. PARAMETERS:field1(30).

it_vbak-<dyn_field> become like it_vbak-field1

How to do it?

DATA: it_vbak TYPE TABLE OF ZSTUDGARY WITH HEADER LINE.

SELECT <dyn_field>

INTO CORRESPONDING FIELDS OF TABLE it_vbak

FROM ZSTUDGARY.

LOOP AT it_vbak.

write: <b>it_vbak-<dyn_field>.</b>

ENDLOOP.

Tags:
Former Member
Former Member replied

You can try this for one field

field-symbols : <fs> type any.
data : field(50).

loop at itab.
concatenate 'ITAB-' p_field into field.
assign (field) to <fs>.
write : / <fs>.
clear field.
unassign <fs>.
endloop.

regards

shiba dutta

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