Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8468

Re: find max value from internal table

$
0
0

The logic is not complete. If the max value is the first one, it will not be saved to maxval. This would be the proper solution:

 

loop at itab into wa1.

     maxval = wa1-cumquantity.

     read table itab into wa2 index sy-index + 1.

          if wa2-CUMQUANTITY > wa1-CUMQUANTITY.

               maxval = wa2-CUMQUANTITY.

          endif.

endloop.


Viewing all articles
Browse latest Browse all 8468

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>