Application Development and Automation 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: 
Read only

accumulate amount

Former Member
0 Likes
430

hi,

i have internal table with waers, wrbtr.

i need to sort by waers and accumulate wrbtr.

for example :

from this

waers wrbtr

USD 50

USD 70

EUR 30

EUR 80

to this

waers wrbtr

USD 120

EUR 110

thanks

rgds

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
381

Hi,

use collect statement.

it will add numeric fields if ur non numeric unique key fields get repeated...

2 REPLIES 2
Read only

Former Member
0 Likes
381

To accumulate use collet

u will have one itab right..

then do like this

loop at itab into fs_itab.

collect fs_itab into itab_new.

endloop.

loop at itab_new into fs_itab.

write: / fs_itab-wears, ....

endloop.

plzz reward if it is useful.....

Read only

Former Member
0 Likes
382

Hi,

use collect statement.

it will add numeric fields if ur non numeric unique key fields get repeated...