<?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 Function for Average in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-for-average/m-p/5108626#M1185140</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We can get subtotal from SET_SORTS and SET_AGGREGATIONS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to get the average like subtotals. Is there any function for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Material     Date               Quantity

A              01-01-2009         20
                03-01-2009         10
                04-01-2009         30
-----------------------------------------------------
                                         20
-----------------------------------------------------
B             05-01-2009          100
               06-01-2009            50
----------------------------------------------------
                                           75
-----------------------------------------------------&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Feb 2009 14:04:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-02-09T14:04:26Z</dc:date>
    <item>
      <title>Function for Average</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-for-average/m-p/5108626#M1185140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We can get subtotal from SET_SORTS and SET_AGGREGATIONS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to get the average like subtotals. Is there any function for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Material     Date               Quantity

A              01-01-2009         20
                03-01-2009         10
                04-01-2009         30
-----------------------------------------------------
                                         20
-----------------------------------------------------
B             05-01-2009          100
               06-01-2009            50
----------------------------------------------------
                                           75
-----------------------------------------------------&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2009 14:04:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-for-average/m-p/5108626#M1185140</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-09T14:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: Function for Average</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-for-average/m-p/5108627#M1185141</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;you can use..........AT END OF MATERIAL&lt;/P&gt;&lt;P&gt;                            SUM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-RICK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2009 05:53:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-for-average/m-p/5108627#M1185141</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-10T05:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Function for Average</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-for-average/m-p/5108628#M1185142</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 your output in ALV format then you have to make use of DO_SUM= 'X' and SUB_TOTAL = 'X',&lt;/P&gt;&lt;P&gt;and if you want your outout in classical report then you have to make use of statements AT END OF and then SUM of your Quantity field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regrds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mansi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Feb 2009 07:10:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-for-average/m-p/5108628#M1185142</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-11T07:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: Function for Average</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-for-average/m-p/5108629#M1185143</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;PRE&gt;&lt;CODE&gt;

1. Just use :

ls_fieldcat-do_sum = 'C'.


(use 'C', and not 'X')



&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Feb 2009 08:24:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-for-average/m-p/5108629#M1185143</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-12T08:24:24Z</dc:date>
    </item>
  </channel>
</rss>

