<?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: Problems adding subtotals in ALV grid in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-adding-subtotals-in-alv-grid/m-p/3486088#M838165</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;For testing purpose I could do it in SE11 itself (sorting and subtotaling), I think it should possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please provide me the code for sort and sutotaling.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sriram POnna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Feb 2008 14:00:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-29T14:00:52Z</dc:date>
    <item>
      <title>Problems adding subtotals in ALV grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-adding-subtotals-in-alv-grid/m-p/3486086#M838163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an internal table i_out, defined as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: 
BEGIN OF i_out OCCURS 0,
pernr      LIKE catsdb-pernr,  
catshours  LIKE catsdb-catshours, 
END OF i_out.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I display this internal table in an ALV grid. After I run the report, I try do add subtotal to the field &lt;STRONG&gt;catshours&lt;/STRONG&gt;  (sorted on &lt;STRONG&gt;pernr&lt;/STRONG&gt; ), but then I get the following message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Subtotals cannot be calculated over totalizable fields.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know why this happens? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All helpful answers will be rewarded! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;MV&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 13:49:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-adding-subtotals-in-alv-grid/m-p/3486086#M838163</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-29T13:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problems adding subtotals in ALV grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-adding-subtotals-in-alv-grid/m-p/3486087#M838164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Could be because the format of the field that you are tring to calculate is character or string (not numbers) try to convert them to a number ( quantity,amount)  first and then try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Himanshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 13:58:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-adding-subtotals-in-alv-grid/m-p/3486087#M838164</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-29T13:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: Problems adding subtotals in ALV grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-adding-subtotals-in-alv-grid/m-p/3486088#M838165</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;For testing purpose I could do it in SE11 itself (sorting and subtotaling), I think it should possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please provide me the code for sort and sutotaling.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sriram POnna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 14:00:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-adding-subtotals-in-alv-grid/m-p/3486088#M838165</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-29T14:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: Problems adding subtotals in ALV grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-adding-subtotals-in-alv-grid/m-p/3486089#M838166</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;Here is the complete definition of the internal table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: BEGIN OF i_out OCCURS 0,
pernr      LIKE catsdb-pernr,
ename      LIKE p0001-ename,
kostl      LIKE p0001-kostl,   
verak      LIKE csks-verak,
workdate   LIKE catsdb-workdate,
catshours  LIKE catsdb-catshours,  
END OF i_out.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And here is the code for sorting:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM set_alv_sorting .

* sort by personnel number

  CLEAR ln_sort.

  ln_sort-fieldname = 'PERNR'.
  ln_sort-spos      = '1'.
  ln_sort-up        = 'X'.

  APPEND ln_sort TO i_sort.

* sort by employee name

  CLEAR ln_sort.

  ln_sort-fieldname = 'ENAME'.
  ln_sort-spos      = '2'.
  ln_sort-up        = 'X'.

  APPEND ln_sort TO i_sort.

* sort by cost centre

  CLEAR ln_sort.

  ln_sort-fieldname = 'KOSTL'.
  ln_sort-spos      = '3'.
  ln_sort-up        = 'X'.

  APPEND ln_sort TO i_sort.

* sort by person responsible

  CLEAR ln_sort.

  ln_sort-fieldname = 'VERAK'.
  ln_sort-spos      = '4'.
  ln_sort-up        = 'X'.

  APPEND ln_sort TO i_sort.

* sort by work date

  CLEAR ln_sort.

  ln_sort-fieldname = 'WORKDATE'.
  ln_sort-spos      = '5'.
  ln_sort-up        = 'X'.

  APPEND ln_sort TO i_sort.

ENDFORM.                    " SET_ALV_SORTING&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have not added any code for sub totals, I have only tried to use the sub total-button in the list display. I get the error message even if I don't sort the output in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any ideas? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt; &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;MV&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Feb 29, 2008 4:13 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 14:14:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-adding-subtotals-in-alv-grid/m-p/3486089#M838166</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-29T14:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problems adding subtotals in ALV grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-adding-subtotals-in-alv-grid/m-p/3486090#M838167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi check this ex program,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report  ZALVTESTFORSUBTOTAL&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZALVTESTFORSUBTOTAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables:pa0008.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type-pools:slis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types:begin of ty_pa0008,&lt;/P&gt;&lt;P&gt;      pernr like pa0008-pernr,&lt;/P&gt;&lt;P&gt;      begda like pa0008-begda,&lt;/P&gt;&lt;P&gt;      endda like pa0008-endda,&lt;/P&gt;&lt;P&gt;      ansal like pa0008-ansal,&lt;/P&gt;&lt;P&gt;      lga01 like pa0008-lga01,&lt;/P&gt;&lt;P&gt;      bet01 like pa0008-bet01,&lt;/P&gt;&lt;P&gt;      end of ty_pa0008.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:it_pa0008 type standard table of ty_pa0008 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:it_fieldcat type SLIS_T_FIELDCAT_ALV,&lt;/P&gt;&lt;P&gt;     wa_fieldcat type slis_fieldcat_alv,&lt;/P&gt;&lt;P&gt;     it_layout type slis_layout_alv,&lt;/P&gt;&lt;P&gt;     WA_events TYPE slis_alv_event,&lt;/P&gt;&lt;P&gt;     it_events TYPE slis_t_event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options:s_pernr for pa0008-pernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform getD_data.&lt;/P&gt;&lt;P&gt;perform disp_alv.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  getD_data&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; --&amp;gt;  p1        text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;lt;--  p2        text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form getD_data .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select pernr&lt;/P&gt;&lt;P&gt;       begda&lt;/P&gt;&lt;P&gt;       endda&lt;/P&gt;&lt;P&gt;       ansal&lt;/P&gt;&lt;P&gt;       lga01&lt;/P&gt;&lt;P&gt;       bet01&lt;/P&gt;&lt;P&gt;       from pa0008&lt;/P&gt;&lt;P&gt;       into table it_pa0008&lt;/P&gt;&lt;P&gt;       where pernr in s_pernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort it_pa0008 by pernr begda descending.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " getD_data&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  disp_alv&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; --&amp;gt;  p1        text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;lt;--  p2        text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form disp_alv .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_fieldcat-fieldname = 'PERNR'.&lt;/P&gt;&lt;P&gt;wa_FIELDCAT-REPTEXT_DDIC = 'Personnel no'.&lt;/P&gt;&lt;P&gt;*WA_FIELDCAT-no_subtotals = 'X'.&lt;/P&gt;&lt;P&gt;append wa_fieldcat to it_fieldcat.&lt;/P&gt;&lt;P&gt;clear wa_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_fieldcat-fieldname = 'BEGDA'.&lt;/P&gt;&lt;P&gt;wa_FIELDCAT-REPTEXT_DDIC = 'Start date'.&lt;/P&gt;&lt;P&gt;append wa_fieldcat to it_fieldcat.&lt;/P&gt;&lt;P&gt;clear wa_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_fieldcat-fieldname = 'ENDDA'.&lt;/P&gt;&lt;P&gt;wa_FIELDCAT-REPTEXT_DDIC = 'End date'.&lt;/P&gt;&lt;P&gt;append wa_fieldcat to it_fieldcat.&lt;/P&gt;&lt;P&gt;clear wa_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_fieldcat-fieldname = 'ANSAL'.&lt;/P&gt;&lt;P&gt;wa_FIELDCAT-REPTEXT_DDIC = 'Annula salary'.&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;clear wa_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_fieldcat-fieldname = 'LGA01'.&lt;/P&gt;&lt;P&gt;wa_FIELDCAT-REPTEXT_DDIC = 'Wage Type'.&lt;/P&gt;&lt;P&gt;append wa_fieldcat to it_fieldcat.&lt;/P&gt;&lt;P&gt;clear wa_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_fieldcat-fieldname = 'BET01'.&lt;/P&gt;&lt;P&gt;wa_FIELDCAT-REPTEXT_DDIC = 'Amount for wagetype'.&lt;/P&gt;&lt;P&gt;append wa_fieldcat to it_fieldcat.&lt;/P&gt;&lt;P&gt;clear wa_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: sort TYPE slis_sortinfo_alv,&lt;/P&gt;&lt;P&gt;it_sort TYPE slis_t_sortinfo_alv.&lt;/P&gt;&lt;P&gt;sort-fieldname = 'PERNR'.&lt;/P&gt;&lt;P&gt;sort-subtot = 'X'.&lt;/P&gt;&lt;P&gt;SORT-UP = 'X'.&lt;/P&gt;&lt;P&gt;APPEND sort TO it_sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*sort-fieldname = 'BEGDA'.&lt;/P&gt;&lt;P&gt;*SORT-NO_SUBTOTS = 'X'.&lt;/P&gt;&lt;P&gt;*APPEND sort TO it_sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IT_layout-totals_text = 'total text'.&lt;/P&gt;&lt;P&gt;IT_layout-subtotals_text = 'Subtotal text'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*WA_EVENTS-NAME = 'SUBTOTAL TEXT'.&lt;/P&gt;&lt;P&gt;*WA_EVENTS-FORM = 'SUBTOTAL TEXT'.&lt;/P&gt;&lt;P&gt;*APPEND WA_EVENTS TO IT_EVENTS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   I_CALLBACK_PROGRAM             = sy-repid&lt;/P&gt;&lt;P&gt;   IS_LAYOUT                      = it_LAYOUT&lt;/P&gt;&lt;P&gt;   IT_FIELDCAT                    = IT_FIELDCAT&lt;/P&gt;&lt;P&gt;   it_sort                        = it_sort&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  it_events                      = it_events&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   TABLES&lt;/P&gt;&lt;P&gt;    t_outtab                       = it_pa0008 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " disp_alv&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;venkat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Feb 29, 2008 4:13 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 14:16:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-adding-subtotals-in-alv-grid/m-p/3486090#M838167</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-29T14:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problems adding subtotals in ALV grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-adding-subtotals-in-alv-grid/m-p/3486091#M838168</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;Change your code as below :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FORM set_alv_sorting .
 
* sort by personnel number
 
  CLEAR ln_sort.
 
  ln_sort-fieldname = 'PERNR'.
  ln_sort-spos      = '1'.
  ln_sort-up        = 'X'.
ln_sort-subtot = 'X'. "Code chnaged here
 
  APPEND ln_sort TO i_sort.
"Don't chnage the rest of the code.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;While building fieldcatalog, for CATSHOUR you have to use gt_fieldcat-do_sum = 'X'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sriram Ponna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 14:19:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-adding-subtotals-in-alv-grid/m-p/3486091#M838168</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-29T14:19:26Z</dc:date>
    </item>
  </channel>
</rss>

