<?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: Alternative Loop avoid for collect in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alternative-loop-avoid-for-collect/m-p/11865280#M1959338</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess you're looking for a simple statement like SQL "select company_code sum(amount) from itab group by company_code", but unfortunately the new ABAP constructs in 7.40 (LOOP AT ... GROUP BY, and FOR GROUPS ... GROUP BY ...) have almost the same complexity/number of lines than your current code, so your current code is okay from my point of view.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 20 Aug 2016 20:54:54 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2016-08-20T20:54:54Z</dc:date>
    <item>
      <title>Alternative Loop avoid for collect</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alternative-loop-avoid-for-collect/m-p/11865279#M1959337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any alternative to avoid LOOP in this case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop itab to wa.&lt;/P&gt;&lt;P&gt;l_amount = l_amount + wa-amount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at end &amp;lt;Company_code&amp;gt;.&lt;/P&gt;&lt;P&gt;wa-amount = lv_amount.&lt;/P&gt;&lt;P&gt;append wa to itab_amount.&lt;/P&gt;&lt;P&gt;atend.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2016 06:12:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alternative-loop-avoid-for-collect/m-p/11865279#M1959337</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-08-19T06:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative Loop avoid for collect</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alternative-loop-avoid-for-collect/m-p/11865280#M1959338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess you're looking for a simple statement like SQL "select company_code sum(amount) from itab group by company_code", but unfortunately the new ABAP constructs in 7.40 (LOOP AT ... GROUP BY, and FOR GROUPS ... GROUP BY ...) have almost the same complexity/number of lines than your current code, so your current code is okay from my point of view.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Aug 2016 20:54:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alternative-loop-avoid-for-collect/m-p/11865280#M1959338</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2016-08-20T20:54:54Z</dc:date>
    </item>
  </channel>
</rss>

