<?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 subtotal calculation in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-calculation/m-p/8082441#M1614653</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to calculate the subtotal through ABAP OOPS method.&lt;/P&gt;&lt;P&gt;The Subtotal needs to be changed to custom value. For eg: if there are values +m, -n, +o&lt;/P&gt;&lt;P&gt;The subtotal should include only m and o. (m+o). The calculated subtotal needs to be changed to desired valued based on condition.&lt;/P&gt;&lt;P&gt;please provide the solution &amp;lt;&amp;lt; priority normalized &amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on Jul 12, 2011 2:41 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Jul 2011 18:14:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-07-12T18:14:27Z</dc:date>
    <item>
      <title>subtotal calculation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-calculation/m-p/8082441#M1614653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to calculate the subtotal through ABAP OOPS method.&lt;/P&gt;&lt;P&gt;The Subtotal needs to be changed to custom value. For eg: if there are values +m, -n, +o&lt;/P&gt;&lt;P&gt;The subtotal should include only m and o. (m+o). The calculated subtotal needs to be changed to desired valued based on condition.&lt;/P&gt;&lt;P&gt;please provide the solution &amp;lt;&amp;lt; priority normalized &amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on Jul 12, 2011 2:41 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2011 18:14:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-calculation/m-p/8082441#M1614653</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-12T18:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: subtotal calculation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-calculation/m-p/8082442#M1614654</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;Just to make sure, I have understood the problem correctly. You want to change the value of the totals or subtotals in ALV output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

data : go_grid_mark  TYPE REF TO cl_gui_alv_grid,
          lv_totals TYPE REF TO data.

CALL METHOD go_grid_mark-&amp;gt;get_subtotals
      IMPORTING
        ep_collect00 = lv_totals.

ASSIGN lv_totals-&amp;gt;* TO &amp;lt;ft_totals&amp;gt;.

   LOOP AT &amp;lt;ft_totals&amp;gt; ASSIGNING &amp;lt;fs_total&amp;gt;.
      ASSIGN COMPONENT 'SOME_FIELD' OF STRUCTURE &amp;lt;fs_total&amp;gt; TO &amp;lt;fv_total&amp;gt;.
&amp;lt;fv_total&amp;gt; = "SOME VALUE".
modify &amp;lt;ft_totals&amp;gt; from &amp;lt;fs_total&amp;gt;
    ENDLOOP.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sagar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2011 06:39:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-calculation/m-p/8082442#M1614654</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-14T06:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: subtotal calculation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-calculation/m-p/8082443#M1614655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As you said , I am able to change the subtotal. But total is not getting changed.&lt;/P&gt;&lt;P&gt;How to calculate the Total based on subtotal. As of now, the total is based on the values of the column.&lt;/P&gt;&lt;P&gt;Total field needs to be changed to custom value(sum of changed subtotals)&lt;/P&gt;&lt;P&gt;please let me know the solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2011 18:21:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-calculation/m-p/8082443#M1614655</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-14T18:21:33Z</dc:date>
    </item>
  </channel>
</rss>

