Skip to Content
0
Former Member
Feb 07, 2008 at 06:46 PM

Populating internal table , column wise

10 Views

Hi friends,

I have an important requirement regarding internal table population.

I have two internal tables. Both are being processed in a single loop.

ITAB1 has 1 field. ITAB2 has 5 fields.

ITAB1 ITAB2

-


-


Fld1 F1 F2 F3 F4 F5

1

2

3

4

5

let's assume that in the first loop iteration, ITAB1 has 5 records as shown above.

In the same loop pass I want to populate ITAB2 column wise. That is after the first loop pass ITAB2 should look like something below.

ITAB2

-


F1 F2 F3 F4 F5

1

2

3

4

5

In the second loop pass I want to populate ITAB2-F2 ONLY and i the third loop pass I want to populate ITAB2-F3 ONLY and so on.

Again assume that after the second loop pass ITAB1 has been populated again. And ITAB1 looks like

ITAB1

-


Fld1

11

22

33

44

55

So after the second loop pass ITAB2 should look like below.

ITAB2

-


F1 F2 F3 F4 F5

1 11

2 22

3 33

4 44

5 55

do 5 times.

Process ITB1..

Process ITB2..

enddo.

How can I go ahead with this development? Your helps will be highly appreciated with points.