<?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: Get Sum for multiple field in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-sum-for-multiple-field/m-p/12645590#M2014666</link>
    <description>&lt;P&gt;Hello &lt;SPAN class="mention-scrubbed"&gt;pramod.pathirana&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;pramod.pathirana&lt;/SPAN&gt;Have a look at control level processing when working with internal tables:&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.sap.com/doc/saphelp_nw73ehp1/7.31.19/en-US/fc/eb381a358411d1829f0000e829fbfe/frameset.htm" target="_blank"&gt;Processing Table Entries in Loops&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.sap.com/doc/saphelp_nw73ehp1/7.31.19/en-US/fc/eb381a358411d1829f0000e829fbfe/frameset.htm" target="_blank"&gt;&lt;/A&gt;&lt;A href="https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapat_itab.htm" target="_blank"&gt;AT - Control Level Processing&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapat_itab.htm" target="_blank"&gt;&lt;/A&gt;Best regards&lt;/P&gt;&lt;P&gt;Dominik Tylczynski&lt;/P&gt;</description>
    <pubDate>Tue, 03 Jan 2023 08:11:05 GMT</pubDate>
    <dc:creator>Dominik_Tylczynski</dc:creator>
    <dc:date>2023-01-03T08:11:05Z</dc:date>
    <item>
      <title>Get Sum for multiple field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-sum-for-multiple-field/m-p/12645589#M2014665</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;
  &lt;P&gt;I have below internal table.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2123996-image.png" /&gt;&lt;/P&gt;
  &lt;P&gt;I need to get Date wise, Category wise total duration.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2123997-image.png" /&gt;&lt;/P&gt;
  &lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2023 07:00:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-sum-for-multiple-field/m-p/12645589#M2014665</guid>
      <dc:creator>former_member203806</dc:creator>
      <dc:date>2023-01-03T07:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: Get Sum for multiple field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-sum-for-multiple-field/m-p/12645590#M2014666</link>
      <description>&lt;P&gt;Hello &lt;SPAN class="mention-scrubbed"&gt;pramod.pathirana&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;pramod.pathirana&lt;/SPAN&gt;Have a look at control level processing when working with internal tables:&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.sap.com/doc/saphelp_nw73ehp1/7.31.19/en-US/fc/eb381a358411d1829f0000e829fbfe/frameset.htm" target="_blank"&gt;Processing Table Entries in Loops&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.sap.com/doc/saphelp_nw73ehp1/7.31.19/en-US/fc/eb381a358411d1829f0000e829fbfe/frameset.htm" target="_blank"&gt;&lt;/A&gt;&lt;A href="https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapat_itab.htm" target="_blank"&gt;AT - Control Level Processing&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapat_itab.htm" target="_blank"&gt;&lt;/A&gt;Best regards&lt;/P&gt;&lt;P&gt;Dominik Tylczynski&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2023 08:11:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-sum-for-multiple-field/m-p/12645590#M2014666</guid>
      <dc:creator>Dominik_Tylczynski</dc:creator>
      <dc:date>2023-01-03T08:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: Get Sum for multiple field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-sum-for-multiple-field/m-p/12645591#M2014667</link>
      <description>&lt;P&gt;It could be something close to this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;itab_with_sum = VALUE #(
                FOR GROUPS &amp;lt;group&amp;gt; OF &amp;lt;line&amp;gt; IN source_itab
                GROUP BY ( category = &amp;lt;line&amp;gt;-category )
                ( category     = &amp;lt;group&amp;gt;-category
                  sum_duration = REDUCE #(
                                 INIT sum = VALUE decfloat16( ) IN
                                 FOR &amp;lt;line&amp;gt; IN GROUP &amp;lt;group&amp;gt;
                                 NEXT sum = sum + &amp;lt;line&amp;gt;-duration ) ) ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;or if you have HANA (simpler but should be slower):&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT category, SUM( duration ) AS sum_duration
FROM @source_itab
GROUP BY category
INTO TABLE @DATA(itab_with_sum).&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Jan 2023 08:47:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-sum-for-multiple-field/m-p/12645591#M2014667</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-01-03T08:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: Get Sum for multiple field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-sum-for-multiple-field/m-p/12645592#M2014668</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;LOOP.
  COLLECT wa INTO itab 
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Jan 2023 15:09:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-sum-for-multiple-field/m-p/12645592#M2014668</guid>
      <dc:creator>Eduardo-CE</dc:creator>
      <dc:date>2023-01-03T15:09:26Z</dc:date>
    </item>
  </channel>
</rss>

