<?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: query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/3909450#M937447</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The result is same it selects the 1st row.&lt;/P&gt;&lt;P&gt;But performance wise is diift&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you specify full keys to select single it will give you a better performance &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Jun 2008 06:52:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-06T06:52:08Z</dc:date>
    <item>
      <title>query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/3909449#M937446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is the difference between Select single* from tablename..and select upto one rows&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jun 2008 06:50:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/3909449#M937446</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-06T06:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/3909450#M937447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The result is same it selects the 1st row.&lt;/P&gt;&lt;P&gt;But performance wise is diift&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you specify full keys to select single it will give you a better performance &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jun 2008 06:52:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/3909450#M937447</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-06T06:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/3909451#M937448</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;&lt;/P&gt;&lt;P&gt;Select Single and the Select up to 1 rows is used to extract the single row from the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The exact diff is:&lt;/P&gt;&lt;P&gt;If we know In mara table has a primary key field has a matnr, that for each material number only one record exists,&lt;/P&gt;&lt;P&gt;duplicates not allowed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If use Select Single Command to get that one record . It will not again go tot check for if there is another record available for same matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we use select up to 1 rows it will extarct the 1 row from the &lt;/P&gt;&lt;P&gt;dbtable and again it will go and check if there is another record availble or not for same material no.&lt;/P&gt;&lt;P&gt;It will take one extra rotattion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Keep in mind if use select single u make to populate all the key fields. Otherwise it will extract the first row from the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: it_mara like mara occurs 1 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select single * from mara into it_mara where matnr = '000000000100000174'.&lt;/P&gt;&lt;P&gt;append it_mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from mara into it_mara&lt;/P&gt;&lt;P&gt;up to 1 rows&lt;/P&gt;&lt;P&gt;where matnr = '000000000100000174'.&lt;/P&gt;&lt;P&gt;append it_mara.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at it_mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U can execute above code put break point feel the diff.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;pavan,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jun 2008 06:54:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/3909451#M937448</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-06T06:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/3909452#M937449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi check this links&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-basis-abap.com/abap/difference-between-select-single-and-up-to-1-row.htm" target="test_blank"&gt;http://www.sap-basis-abap.com/abap/difference-between-select-single-and-up-to-1-row.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.blurtit.com/q628318.html" target="test_blank"&gt;http://www.blurtit.com/q628318.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jun 2008 06:54:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/3909452#M937449</guid>
      <dc:creator>former_member216668</dc:creator>
      <dc:date>2008-06-06T06:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/3909453#M937450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT SINGLE * returns the first record which was satisfied from the data base&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT UPTO n ROWS returns the first 'n' records which satisfies the condition from the data base. 'n' should be integer value. If 'n' is 0, it is like select *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Siva.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jun 2008 06:57:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/3909453#M937450</guid>
      <dc:creator>sivasatyaprasad_yerra</dc:creator>
      <dc:date>2008-06-06T06:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/3909454#M937451</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;   The 'SELECT SINGLE' statement selects the first row in the database that it finds that fulfils the 'WHERE' clause If this results in multiple records then only the first one will be returned and therefore may not be unique. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   The 'SELECT .... UP TO 1 ROWS' statement is subtly different. The database selects all of the relevant records that are defined by the WHERE clause or lack of, applies any aggregate, ordering or grouping functions to them and then returns the first record of the resultant result set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jun 2008 07:06:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/3909454#M937451</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-06T07:06:27Z</dc:date>
    </item>
  </channel>
</rss>

