‎2006 Nov 20 10:10 PM
Hi,
I have an Internal table ITAB with following records.
REC1 10
REC1 20
REC2 15
REC2 25
REC2 35
and I need an output
REC1 30
REC2 75
I tried like this
LOOP AT ITAB.
COLLECT ITAB.
MODIFY ITAB.
ENDLOOP.
Am i doing something wrong?? I am still getting 5 records in output..
regards
Praveen
‎2006 Nov 20 10:14 PM
Hi Praveen,
You create another internal table with te same table type.
Then you write collect on the internal table.
define Itab1 like itab. and write logic like below.
LOOP AT ITAB.
ITAB1 = ITAB.
COLLECT ITAB1.
ENDLOOP.
Thanks,
Ramakrishna
‎2006 Nov 20 10:14 PM
Hi Praveen,
You create another internal table with te same table type.
Then you write collect on the internal table.
define Itab1 like itab. and write logic like below.
LOOP AT ITAB.
ITAB1 = ITAB.
COLLECT ITAB1.
ENDLOOP.
Thanks,
Ramakrishna
‎2006 Nov 20 10:14 PM