<?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: Open sql sum up issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-sum-up-issue/m-p/1875002#M368046</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use Count Function and group by Message type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output the number of passengers, the total weight and the average weight of luggage for all Lufthansa flights on 28.02.2001: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:  count TYPE I, sum TYPE P DECIMALS 2, avg TYPE F. &lt;/P&gt;&lt;P&gt;DATA:  connid TYPE sbook-connid. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT connid COUNT( * ) SUM( luggweight ) AVG( luggweight ) &lt;/P&gt;&lt;P&gt;       INTO (connid, count, sum, avg) &lt;/P&gt;&lt;P&gt;       FROM sbook &lt;/P&gt;&lt;P&gt;       WHERE &lt;/P&gt;&lt;P&gt;         carrid   = 'LH'       AND &lt;/P&gt;&lt;P&gt;         fldate   = '20010228' &lt;/P&gt;&lt;P&gt;       GROUP BY connid. &lt;/P&gt;&lt;P&gt;  WRITE: / connid, count, sum, avg. &lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Amit Tyagi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Jan 2007 06:54:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-08T06:54:52Z</dc:date>
    <item>
      <title>Open sql sum up issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-sum-up-issue/m-p/1874998#M368042</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;I need to sum up the action message of MRP List, but in MDKP the action message is char type, Once i use select sum( AUSZ1, AUSZ2, AUSZ3... ), the complier not allow me to do that. Can I sum up in open sql? because i need to use internal table to export to ALV Format, if i cannot sum up at open sql, i need to loop the internal table and update it. The performance seems not good. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jan 2007 01:59:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-sum-up-issue/m-p/1874998#M368042</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-08T01:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: Open sql sum up issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-sum-up-issue/m-p/1874999#M368043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry i cant get your actual requirement. But one thing you can not sum for character field in open sql . and it seems to me you want to COUNT the occurances. If it is so then use count fn instead of sum. Pls rectify me if i am wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jan 2007 03:31:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-sum-up-issue/m-p/1874999#M368043</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-08T03:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: Open sql sum up issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-sum-up-issue/m-p/1875000#M368044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your help first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, I would like to get the total number of action message in MRP List by each material, Using MD06, we can see that which separate 1-8 group for each action message,&lt;/P&gt;&lt;P&gt;for example, there have 2 action message under group 1 and 3 action message under group 6. In data dictionary, the type is char, i want to get the result is 5 (2+3). So, can i using open sql to retrieve the result. Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jan 2007 06:42:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-sum-up-issue/m-p/1875000#M368044</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-08T06:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: Open sql sum up issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-sum-up-issue/m-p/1875001#M368045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what can i understand ferom your qery that you want the total no of   rows for diferent message type.&lt;/P&gt;&lt;P&gt;if it is so&lt;/P&gt;&lt;P&gt;use count fn instead and give group by message type .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jan 2007 06:52:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-sum-up-issue/m-p/1875001#M368045</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-08T06:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: Open sql sum up issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-sum-up-issue/m-p/1875002#M368046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use Count Function and group by Message type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output the number of passengers, the total weight and the average weight of luggage for all Lufthansa flights on 28.02.2001: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:  count TYPE I, sum TYPE P DECIMALS 2, avg TYPE F. &lt;/P&gt;&lt;P&gt;DATA:  connid TYPE sbook-connid. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT connid COUNT( * ) SUM( luggweight ) AVG( luggweight ) &lt;/P&gt;&lt;P&gt;       INTO (connid, count, sum, avg) &lt;/P&gt;&lt;P&gt;       FROM sbook &lt;/P&gt;&lt;P&gt;       WHERE &lt;/P&gt;&lt;P&gt;         carrid   = 'LH'       AND &lt;/P&gt;&lt;P&gt;         fldate   = '20010228' &lt;/P&gt;&lt;P&gt;       GROUP BY connid. &lt;/P&gt;&lt;P&gt;  WRITE: / connid, count, sum, avg. &lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Amit Tyagi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jan 2007 06:54:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-sum-up-issue/m-p/1875002#M368046</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-08T06:54:52Z</dc:date>
    </item>
  </channel>
</rss>

