<?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: How to use  Aggregations Method generated by WIZARD in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-aggregations-method-generated-by-wizard/m-p/5966465#M1338507</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Patel,&lt;/P&gt;&lt;P&gt;               I am getting DUMP for this.&lt;/P&gt;&lt;P&gt;Its saying Access via 'NULL' object reference not possible.&lt;/P&gt;&lt;P&gt;Patel when I am double clicking the  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
aggregation = if_salv_c_aggregation=&amp;gt;total
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This if_salv_c_aggregation is not having any methods.&lt;/P&gt;&lt;P&gt;So may be the dump is coming.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The dump is &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
You attempted to use a 'NULL' object reference (points to 'nothing')
access a component (variable: "R_AGGREGATIONS").
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Prasad.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Dheeru Prasad on Aug 6, 2009 3:36 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Dheeru Prasad on Aug 6, 2009 3:39 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Dheeru Prasad on Aug 6, 2009 3:40 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Aug 2009 13:34:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-08-06T13:34:41Z</dc:date>
    <item>
      <title>How to use  Aggregations Method generated by WIZARD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-aggregations-method-generated-by-wizard/m-p/5966463#M1338505</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;          I used ABAP wizard to develop I report.&lt;/P&gt;&lt;P&gt;This wizard generated one class and method as below&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  zcl_bt_alv_template=&amp;gt;factory(
                 exporting  im_syrepid = sy-repid
                            im_lheader = gv_title
                            im_allowls = abap_true  " Allow layout save
                 importing  ex_alvo    = r_alv_template
                 changing   ch_datatab = it_efficiency ).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Inside this Factory Method there is one method for aggregations.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  ex_alvo-&amp;gt;r_aggregations = ex_alvo-&amp;gt;r_table-&amp;gt;get_aggregations( ).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;How to use this Method for getting aggregations for some fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Prasad.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2009 12:44:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-aggregations-method-generated-by-wizard/m-p/5966463#M1338505</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-06T12:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to use  Aggregations Method generated by WIZARD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-aggregations-method-generated-by-wizard/m-p/5966464#M1338506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like the attribute R_TABLE is an instance of the CL_SALV_TABLE and r_aggregations is an instance of the cl_salv_aggregations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get the total on any column using this aggregation object, you need to call method ADD_AGGREGATION. Like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*   Total for the Amount
    TRY.
        r_aggregations-&amp;gt;add_aggregation(
           columnname  = 'DMBTR'
           aggregation = if_salv_c_aggregation=&amp;gt;total ).
      CATCH cx_salv_data_error .                        "#EC NO_HANDLER
      CATCH cx_salv_not_found .                         "#EC NO_HANDLER
      CATCH cx_salv_existing .                          "#EC NO_HANDLER
    ENDTRY.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2009 13:09:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-aggregations-method-generated-by-wizard/m-p/5966464#M1338506</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2009-08-06T13:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to use  Aggregations Method generated by WIZARD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-aggregations-method-generated-by-wizard/m-p/5966465#M1338507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Patel,&lt;/P&gt;&lt;P&gt;               I am getting DUMP for this.&lt;/P&gt;&lt;P&gt;Its saying Access via 'NULL' object reference not possible.&lt;/P&gt;&lt;P&gt;Patel when I am double clicking the  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
aggregation = if_salv_c_aggregation=&amp;gt;total
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This if_salv_c_aggregation is not having any methods.&lt;/P&gt;&lt;P&gt;So may be the dump is coming.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The dump is &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
You attempted to use a 'NULL' object reference (points to 'nothing')
access a component (variable: "R_AGGREGATIONS").
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Prasad.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Dheeru Prasad on Aug 6, 2009 3:36 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Dheeru Prasad on Aug 6, 2009 3:39 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Dheeru Prasad on Aug 6, 2009 3:40 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2009 13:34:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-aggregations-method-generated-by-wizard/m-p/5966465#M1338507</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-06T13:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to use  Aggregations Method generated by WIZARD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-aggregations-method-generated-by-wizard/m-p/5966466#M1338508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Patel I used Normal ALV for this..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2009 15:38:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-aggregations-method-generated-by-wizard/m-p/5966466#M1338508</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-06T15:38:01Z</dc:date>
    </item>
  </channel>
</rss>

