<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Sum value without using collect in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sum-value-without-using-collect/m-p/3358666#M805833</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you saying that you want to find the sum and then replace the individual entries with just a sum entry?  If that is the case, you could use something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab INTO wa_itab.&lt;/P&gt;&lt;P&gt;  ADD wa_itab-field1 to field1_sum.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_itab-field1 = field1_sum.&lt;/P&gt;&lt;P&gt;APPEND wa_itab TO itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you just want to add a record for the sum (without deleting the others), just remove the CLEAR statement.  I hope this helps.&lt;/P&gt;&lt;P&gt; - April King&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Jan 2008 20:08:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-30T20:08:22Z</dc:date>
    <item>
      <title>Sum value without using collect</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sum-value-without-using-collect/m-p/3358665#M805832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have records and i have to sum them up modify the table by inserting the sum value without using collect. how can i do it ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example&lt;/P&gt;&lt;P&gt;table itab contains &lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have to modify this table and insert the sum value like itab shud contain 15 only but without using the collect statemnt . could somebody write me a sample code for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rock&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Jan 30, 2008 3:13 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2008 19:57:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sum-value-without-using-collect/m-p/3358665#M805832</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-30T19:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Sum value without using collect</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sum-value-without-using-collect/m-p/3358666#M805833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you saying that you want to find the sum and then replace the individual entries with just a sum entry?  If that is the case, you could use something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab INTO wa_itab.&lt;/P&gt;&lt;P&gt;  ADD wa_itab-field1 to field1_sum.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_itab-field1 = field1_sum.&lt;/P&gt;&lt;P&gt;APPEND wa_itab TO itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you just want to add a record for the sum (without deleting the others), just remove the CLEAR statement.  I hope this helps.&lt;/P&gt;&lt;P&gt; - April King&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2008 20:08:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sum-value-without-using-collect/m-p/3358666#M805833</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-30T20:08:22Z</dc:date>
    </item>
  </channel>
</rss>

