title: Sum Using Reduce Syntax ABAP
body: <p>I am stuck at a problem that I want to solve with REDUCE syntax.</p>
  <p>I have this this internal table
  <a href="https://i.stack.imgur.com/D3FZH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/D3FZH.png" alt="Purchase Orders" /></a></p>
  <p>I need to sum the values of the column &quot;quantity&quot; and update column called &quot;Totals quantity&quot;</p>
  <p>And the same thing with column price in column &quot;Total Price&quot;.
  This is for each Purchase order.</p>
  <p>I have this code right now</p>
  <pre><code>    Loop at it_numpos Into Data(ls_numpos).
       lv_valort = lv_valort + ls_numpos-netpr. &quot; Purchase Order Total Price 
       lv_cantt  = lv_cantt  + ls_numpos-menge. &quot; Purchase Total Quantity
      At end of ebeln.
       ls_numpos-zmenge3 = lv_cantt.
       ls_numpos-znetpr6 = lv_valort.
       Modify it_numpos From ls_numpos Transporting zmenge3 znetpr6 Where ebeln = ls_numpos-ebeln.
       Clear:  lv_cantt, ls_numpos, lv_valort.
      Endat.
  EndLoop.
  </code></pre>
  <p>It is possible to transform this code to abap new syntax?</p>