2009 Apr 11 8:19 AM
hi friends,
my requirement is to capture carrid and sum seatsmax field and display at once.
for ex : 'LH' lufthansa we have a big list.
i need to capture carrid and sum seatsmax and display at once ...like wise all carrid with out any duplicates.
result should be LH 5500.
AA 6600.
thanks®ards
deepika.
2009 Apr 11 8:30 AM
Use DELETE ADJACENT DUPLICATES FROM ITAB COMPARUNG FIELD.
AND write---- AT LAST.
SUM.
END AT.
OR use collect statement.
2009 Apr 11 8:23 AM
HI ,
use DELETE ADJACENT DUPLICATES FROM for deleting the repeated entries in the internal table .
regards
chinnaiya
2009 Apr 11 8:30 AM
Use DELETE ADJACENT DUPLICATES FROM ITAB COMPARUNG FIELD.
AND write---- AT LAST.
SUM.
END AT.
OR use collect statement.
2009 Apr 11 9:41 AM
yes thanks for your reply.
i have done by using loop statements but im not getting required output.
thanks®ards
deepika.
2009 Apr 11 9:45 AM
Hi,
Don't use the DELETE DUPLICATE Statment.
SORT ITAB BY CARRID.
LOOP AT ITAB.
L_SEAT = L_SEAT + itab-seatsmax.
AT END OF CARRID.
WRITE:/ ITAB-CARRID, L_SEAT.
CLEAR L_SEAT.
ENDAT.
ENDLOOP.
2009 Apr 11 9:52 AM
2009 Apr 11 9:49 AM
you can use collect if yu are in a loop
Regards,
Lalit Mohan gupta.