Quantcast
Channel: SCN: Message List - ABAP Development
Viewing all articles
Browse latest Browse all 10425

Re: issue regarding collect statement

$
0
0

You can use the below code. I checked and got the output as per your requirement.

 

read table itab into wa index 1.

 

   loop at itab into wa1 from 2.

          if wa1 <> wa.

             append wa to it_final.

          else.

             wa-quantity = wa-quantity + wa-quantity.

             wa-rate     = wa-rate     + wa-rate.    "Probably rate will be constant If required do it

             append wa to it_final.

          endif.

     wa = wa1.

   endloop.


Thanks,

Venkadesh


Viewing all articles
Browse latest Browse all 10425

Trending Articles