<?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 Select Statement Doubt in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-doubt/m-p/2876167#M675115</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Please let me know after below select statement will be executed, will t_kdst table will have duplicate records. After this select statement do i need to sort the table and add delete adjacent statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT VBELN VBPOS MATNR WERKS STLAN STLNR STLAL FROM kdst INTO CORRESPONDING FIELDS OF TABLE t_kdst &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE vbeln in order&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and matnr in matnr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and vbpos in item&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND werks IN plant.&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;Preeti&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Sep 2007 20:40:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-28T20:40:31Z</dc:date>
    <item>
      <title>Select Statement Doubt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-doubt/m-p/2876167#M675115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Please let me know after below select statement will be executed, will t_kdst table will have duplicate records. After this select statement do i need to sort the table and add delete adjacent statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT VBELN VBPOS MATNR WERKS STLAN STLNR STLAL FROM kdst INTO CORRESPONDING FIELDS OF TABLE t_kdst &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE vbeln in order&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and matnr in matnr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and vbpos in item&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND werks IN plant.&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;Preeti&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2007 20:40:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-doubt/m-p/2876167#M675115</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-28T20:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement Doubt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-doubt/m-p/2876168#M675116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Preeti,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since you are selection all key fields (primary table key) you won't have duplicate entries in the internal table because the primary table key is always unique.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only if you leave out one or more key fields on the selected fields list, you could get duplicate entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2007 21:16:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-doubt/m-p/2876168#M675116</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-28T21:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement Doubt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-doubt/m-p/2876169#M675117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Preeti,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there won't be any duplicate records since your where claue is based on KEY fields...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so no need of sorting and adding adjacent duplicates...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this may be usefl...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please reward...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Sep 2007 06:47:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-doubt/m-p/2876169#M675117</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-29T06:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement Doubt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-doubt/m-p/2876170#M675118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Preeti,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the KDST table, a combination of 7 fields forms the primary key. In the Select query's where clause, u have taken only 4 fields of the primary key. Due to the rest of 3 fields, there is a possibility for existing of duplicate entries. Hence you have to use SORT as well as DELETE ADJACENT statement (if you are concerned about records with univque values of the where clause's 4 fields alone).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Sep 2007 08:55:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-doubt/m-p/2876170#M675118</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-29T08:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement Doubt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-doubt/m-p/2876171#M675119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Preeti,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you are selecting all 7 primary keys, there is no chance of having duplicate entries in your internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each entry in the internal table would have a unique primary key combination.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pankaj Sharma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Sep 2007 10:14:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-doubt/m-p/2876171#M675119</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-29T10:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement Doubt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-doubt/m-p/2876172#M675120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem is not &amp;lt;u&amp;gt;duplicate&amp;lt;/u&amp;gt; entries; it is &amp;lt;u&amp;gt;missing&amp;lt;/u&amp;gt; entries. But the answer is the same; if you are selecting all fields in the primary key, you will have no problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Sep 2007 15:50:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-doubt/m-p/2876172#M675120</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-29T15:50:04Z</dc:date>
    </item>
  </channel>
</rss>

