<?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: select and count in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-and-count/m-p/12227426#M1984147</link>
    <description>&lt;P&gt;so why don't inner join those table?&lt;/P&gt;</description>
    <pubDate>Thu, 06 Aug 2020 00:15:50 GMT</pubDate>
    <dc:creator>DoanManhQuynh</dc:creator>
    <dc:date>2020-08-06T00:15:50Z</dc:date>
    <item>
      <title>select and count</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-and-count/m-p/12227422#M1984143</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;
  &lt;P&gt;I need codding to process VBAK table and get information for KNUMVs wchich appears more than 1.&lt;BR /&gt;KNUMV is not key field here and im processing data to KONV where KNUMV is a key field, and I need check it before processing to not get any errors about duplicates.&lt;/P&gt;
  &lt;P&gt;Anyone can help?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 09:32:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-and-count/m-p/12227422#M1984143</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-08-05T09:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: select and count</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-and-count/m-p/12227423#M1984144</link>
      <description>&lt;P&gt;Hi Beata,&lt;/P&gt;&lt;P&gt;Distinct Column:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT COUNT( DISTINCT carrid )  FROM spfli  WHERE cityto = 'NEW YORK'  INTO @DATA(count).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Distinct Row:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT DISTINCT cityto&lt;BR /&gt;  FROM spfli&lt;BR /&gt;  WHERE carrid = 'LH' AND&lt;BR /&gt;  cityfrom = 'FRANKFURT'&lt;BR /&gt;  INTO TABLE @DATA(destinations).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Gaurav&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 09:39:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-and-count/m-p/12227423#M1984144</guid>
      <dc:creator>GK817</dc:creator>
      <dc:date>2020-08-05T09:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: select and count</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-and-count/m-p/12227424#M1984145</link>
      <description>&lt;P&gt;Would you please share an example where you have more than one entry in VBAK for a specific VBAK-KNUMV?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 09:48:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-and-count/m-p/12227424#M1984145</guid>
      <dc:creator>VeselinaPeykova</dc:creator>
      <dc:date>2020-08-05T09:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: select and count</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-and-count/m-p/12227425#M1984146</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;plmalekbe&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;I don't think that is necessary because every sales order in VBAK table will have unique Condition record numbers.&lt;/P&gt;&lt;P&gt;If you still need to check you can use below code, after the delete statement if you still have any entries left in table GT_VBAK then those are the KNUMV entries which are assigned to multiple VBELN values. &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT knumv,
       COUNT( vbeln ) AS count
FROM vbak
INTO TABLE @DATA(gt_vbak)
GROUP BY knumv.
IF sy-subrc EQ 0.
  DELETE gt_vbak WHERE count EQ 1.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards!&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 09:54:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-and-count/m-p/12227425#M1984146</guid>
      <dc:creator>former_member1716</dc:creator>
      <dc:date>2020-08-05T09:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: select and count</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-and-count/m-p/12227426#M1984147</link>
      <description>&lt;P&gt;so why don't inner join those table?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 00:15:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-and-count/m-p/12227426#M1984147</guid>
      <dc:creator>DoanManhQuynh</dc:creator>
      <dc:date>2020-08-06T00:15:50Z</dc:date>
    </item>
    <item>
      <title>Re: select and count</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-and-count/m-p/12227427#M1984148</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank you all for help, Satish your codding its very nice,&lt;/P&gt;&lt;P&gt;I will use it for sure. You may be right with VABK because I was checking it for many tables and this is true that VABAK was fine, but for example in VFKONV i found duplicates in KNUMV and I had to change approchach. Thanks again!&lt;/P&gt;&lt;P&gt;Example from se16h:&lt;/P&gt;&lt;P&gt;&lt;A href="https://answers.sap.com/storage/temp/1831729-przechwytywanie.png"&gt;przechwytywanie.png&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 13:01:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-and-count/m-p/12227427#M1984148</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-08-06T13:01:10Z</dc:date>
    </item>
  </channel>
</rss>

