Skip to Content
0
Former Member
Mar 28, 2006 at 03:16 PM

How to create dynamic internal table?

21 Views

Hi All,

I am working on an ALV report which consist of several section. Each section(layout) is different internal table. But if user want to display two section at the same time, the result layout should be the combination of two layout. Let me explain by one example.

Section 1: itab1 ( if user want only section 1)

itab1

- field1

- field2

- field3

- field4

Section 2: itab2 ( if user want only section 2)

-field1

-field2

-field5

-field6

So, now if user want to display both section 1 and 2, i have to dynamically create an internal table in the program such at

Final layout: itab3 ( user want both section )

- field1

- field2

- field3

- field4

- field5

- field6

Is there any way to dynamically create an internal table based on two or more tables. What is the best way to do this ( i have maximum of 6 section )?

If anybody has any idea, please let me know.

Thanks,

Pratik