<?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: COLLECT&amp;DO_SUM in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/collect-do-sum/m-p/6769583#M1462978</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DO_SUM='X' can be used in the field catalog definition if the column data type is numeric.  check data type of your column&lt;/P&gt;&lt;P&gt;Eg: &lt;/P&gt;&lt;P&gt;clear wa_fieldcat.&lt;/P&gt;&lt;P&gt;  wa_fieldcat-fieldname = 'DMBTR'.&lt;/P&gt;&lt;P&gt;  wa_fieldcat-seltext_m = 'Doc Amount'.&lt;/P&gt;&lt;P&gt;  wa_fieldcat-do_sum    = 'X'.&lt;/P&gt;&lt;P&gt;  append wa_fieldcat to it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vinod&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Apr 2010 05:58:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-04-01T05:58:57Z</dc:date>
    <item>
      <title>COLLECT&amp;DO_SUM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/collect-do-sum/m-p/6769582#M1462977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;               in my internal table i have one field i.e number of times initially thats value is 1 if all vales(row) in the table are same then it will be incremented by 1 . my requriemnet is instead of  using COLLECT i use  DO_SUM = 'X'  in that final table field cat , it shows dump , so can any one explain how to use DO_SUM instead of COLLECT.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards &lt;/P&gt;&lt;P&gt;Siva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Apr 2010 05:48:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/collect-do-sum/m-p/6769582#M1462977</guid>
      <dc:creator>sivakrishna_boddapati</dc:creator>
      <dc:date>2010-04-01T05:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: COLLECT&amp;DO_SUM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/collect-do-sum/m-p/6769583#M1462978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DO_SUM='X' can be used in the field catalog definition if the column data type is numeric.  check data type of your column&lt;/P&gt;&lt;P&gt;Eg: &lt;/P&gt;&lt;P&gt;clear wa_fieldcat.&lt;/P&gt;&lt;P&gt;  wa_fieldcat-fieldname = 'DMBTR'.&lt;/P&gt;&lt;P&gt;  wa_fieldcat-seltext_m = 'Doc Amount'.&lt;/P&gt;&lt;P&gt;  wa_fieldcat-do_sum    = 'X'.&lt;/P&gt;&lt;P&gt;  append wa_fieldcat to it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vinod&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Apr 2010 05:58:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/collect-do-sum/m-p/6769583#M1462978</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-01T05:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: COLLECT&amp;DO_SUM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/collect-do-sum/m-p/6769584#M1462979</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;if you want to do a subtotal in alv , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;follow these steps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) sort on the field which u require subtotal&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REFRESH it_sort.
  wa_sort-spos = '1'.                               "sort position
  wa_sort-fieldname = 'ORGEH'.              " field on which u want the subtotal
  wa_sort-down        = 'X' .                      " ascending or descending
  wa_sort-subtot    = 'X'.
  APPEND wa_sort TO it_sort.
  CLEAR wa_sort.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the example i want a subtotal for each organisation unit ( orgeh) is afield in my internal table here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;wa_fcat-col_pos   = '12'.
  wa_fcat-tabname = 'IT_OUTPUT'.
  wa_fcat-fieldname = 'BET02_NET_PAY'.
  wa_fcat-seltext_m = 'NET PAY'.
  wa_fcat-do_sum =   'X'.
append wa_Fcat To it_fcat
clear wa_Fcat&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want the total for this field in the internal table (BET02_NET_PAY)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just pass do_sum = 'X' in the fieldcatalog in your alv.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Apr 2010 06:03:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/collect-do-sum/m-p/6769584#M1462979</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-01T06:03:10Z</dc:date>
    </item>
  </channel>
</rss>

