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

Re: Quantity calculation not exceeding a value

$
0
0

data l_sum type I.

 

sort itab1 by code.

loop at itab1 into wa.

  at new code.

    clear l_sum.

  endat.

 

  l_sum = l_sum + wa-qty.

 

  if l_sum LE 5.

  collect wa into itab2.

  endif.

endloop.

 

delete itab2 where qty LT 3. -->itab2 will now just have all the records you need.

 

credit points if helpful. thanks.


Viewing all articles
Browse latest Browse all 9369

Trending Articles



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