Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

summing

Former Member
0 Kudos
142

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&regards

deepika.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
108

Use DELETE ADJACENT DUPLICATES FROM ITAB COMPARUNG FIELD.

AND write---- AT LAST.

SUM.

END AT.

OR use collect statement.

6 REPLIES 6

Former Member
0 Kudos
108

HI ,

use DELETE ADJACENT DUPLICATES FROM for deleting the repeated entries in the internal table .

regards

chinnaiya

Former Member
0 Kudos
109

Use DELETE ADJACENT DUPLICATES FROM ITAB COMPARUNG FIELD.

AND write---- AT LAST.

SUM.

END AT.

OR use collect statement.

0 Kudos
108

yes thanks for your reply.

i have done by using loop statements but im not getting required output.

thanks&regards

deepika.

0 Kudos
108

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.

0 Kudos
108

thank you very much.

thanks&regards

deepika.

Former Member
0 Kudos
108

you can use collect if yu are in a loop

Regards,

Lalit Mohan gupta.