Skip to Content
0
Former Member
Nov 12, 2008 at 03:47 PM

Moving values from one internal table to another internal table

31 Views

Hi friends,

i have a reeuirement.

In my internal table ITAB1 in that i have the followind data.

EBELN EBELP MATNR

2000 10 100

2000 20 200

2000 30 100

3000 10 100

3000 20 200

3000 20 300

4000 10 200

4000 20 100

4000 20 300

now my requirement is when iam looping that ITAB1

the ist line should go into one internal table ITAB2

And now since the ebeln is same for next 2 records the next 2 records incluiding the ist record shuld go into another internal table itab3.

ie :

my itab2 and itab3 should be in this format.

itab2

2000 10 100

3000 10 100

4000 10 200

itab3

2000 10 100

2000 20 200

2000 30 100

3000 10 100

3000 20 200

3000 20 300

4000 10 200

4000 20 100

4000 20 300

How can i do that.

can any one suggest me.

Regards

Priyanka.