<?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: Appropriate select querry needed in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/appropriate-select-querry-needed/m-p/7907321#M1597421</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;replace &lt;STRONG&gt;MIN( act_due )&lt;/STRONG&gt; with &lt;STRONG&gt;act_due&lt;/STRONG&gt; and you will get duplicates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sort your result table lt_zdrgsrnrr by &lt;STRONG&gt;/bic/zcdcy&lt;/STRONG&gt;   and &lt;STRONG&gt;act_due&lt;/STRONG&gt; ascending and use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE ADJACENT DUPLICATES FROM  lt_zdrgsrnrr COMPARING /bic/zcdcy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to get your wanted results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Klaus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 May 2011 07:42:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-05-02T07:42:11Z</dc:date>
    <item>
      <title>Appropriate select querry needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/appropriate-select-querry-needed/m-p/7907320#M1597420</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;f lt_/bic/qzcdcy[] is not initial.&lt;/P&gt;&lt;P&gt;SELECT  /bic/zcdcy MIN( act_due )&lt;/P&gt;&lt;P&gt;        FROM /bi0/mcdcy_act&lt;/P&gt;&lt;P&gt;        INTO TABLE lt_zdrgsrnrr&lt;/P&gt;&lt;P&gt;    FOR ALL ENTRIES IN lt_/bic/qzcdcy&lt;/P&gt;&lt;P&gt;       WHERE /bic/zcdcy eq lt_/bic/qzcdcy-/bic/zcdcy&lt;/P&gt;&lt;P&gt;            AND act_type = '9055'&lt;/P&gt;&lt;P&gt;            AND act_end NE '00000000'&lt;/P&gt;&lt;P&gt;            AND act_stat = 1&lt;/P&gt;&lt;P&gt;            GROUP BY /bic/zcdcy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using above query but what i got the error write bellow&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The addition "FOR ALL ENTRIES" excludes all aggregate functions with &lt;/P&gt;&lt;P&gt;the exception of "COUNT( * )" as the single element of the SELECT clause.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dhanu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 May 2011 07:12:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/appropriate-select-querry-needed/m-p/7907320#M1597420</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-02T07:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: Appropriate select querry needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/appropriate-select-querry-needed/m-p/7907321#M1597421</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;replace &lt;STRONG&gt;MIN( act_due )&lt;/STRONG&gt; with &lt;STRONG&gt;act_due&lt;/STRONG&gt; and you will get duplicates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sort your result table lt_zdrgsrnrr by &lt;STRONG&gt;/bic/zcdcy&lt;/STRONG&gt;   and &lt;STRONG&gt;act_due&lt;/STRONG&gt; ascending and use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE ADJACENT DUPLICATES FROM  lt_zdrgsrnrr COMPARING /bic/zcdcy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to get your wanted results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Klaus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 May 2011 07:42:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/appropriate-select-querry-needed/m-p/7907321#M1597421</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-02T07:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: Appropriate select querry needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/appropriate-select-querry-needed/m-p/7907322#M1597422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can not combine aggregates with FOR ALL ENTRIES  (the COUNT(*) expample is a dummy problem).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So do the SELECT and then calculate the MIN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You don't need the DELETE ADJACENT DUPLICATES, as this is anyway done by the FAE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 May 2011 08:34:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/appropriate-select-querry-needed/m-p/7907322#M1597422</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-02T08:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: Appropriate select querry needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/appropriate-select-querry-needed/m-p/7907323#M1597423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry Siegfried, you're wrong, the DELETE is for calculation of the MIN() and it is necessary! Duplicates from FAE only will be deleted for duplicate combinations of both fields. Here DELETE is needed to find the one and only right combination of both fields after the SORT!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Klaus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 May 2011 09:40:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/appropriate-select-querry-needed/m-p/7907323#M1597423</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-02T09:40:27Z</dc:date>
    </item>
  </channel>
</rss>

