<?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: slin check warning for select single statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/slin-check-warning-for-select-single-statement/m-p/5861287#M1321510</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if your motive is just to check if an entry is ther or not for your selection, then you can try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select count(*) from ztable where XXXXX&lt;/P&gt;&lt;P&gt;check sy-subrc = 0 for record availability.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select field1 upto 1 rows  (instead of select * to improve performance)&lt;/P&gt;&lt;P&gt;into w_field1&lt;/P&gt;&lt;P&gt;from ztable&lt;/P&gt;&lt;P&gt;where XXXXX.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single should be used only if you have all the key fields available in the where condition. else use select/endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Bikash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Jul 2009 11:58:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-07-10T11:58:09Z</dc:date>
    <item>
      <title>slin check warning for select single statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/slin-check-warning-for-select-single-statement/m-p/5861276#M1321499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;MY ztable contains 4 key fields bukrs,vkorg,vbeln,ertim .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SELECT SINGLE * FROM Ztable INTO  zitab&lt;/P&gt;&lt;P&gt;           WHERE BUKRS      = P_bukrs&lt;/P&gt;&lt;P&gt;           AND   VKORG      = P_vkorg&lt;/P&gt;&lt;P&gt;           AND   vbeln      = P_vblen&lt;/P&gt;&lt;P&gt;           AND   FLAG       = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here i am checking whether the record exist or not. but i am not including the key field ertim ie time field in the above query because i am not getting this as input to pass.&lt;/P&gt;&lt;P&gt;But my requirement is to check whether the record exists or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please gurus tell me how to correct it , is there any other way, can i use the  any alternative select statement or i need to compulsory add the ertim field also?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SLIN RESULTS :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax check warning&lt;/P&gt;&lt;P&gt;This warning is only displayed in SLIN.&lt;/P&gt;&lt;P&gt; In "SELECT SINGLE ...", the WHERE condition for the key field "ERTIM" does&lt;/P&gt;&lt;P&gt; not test for equality. Therefore, the single record in question may not be&lt;/P&gt;&lt;P&gt; unique.&lt;/P&gt;&lt;P&gt;(You can hide the message using "#EC *)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2009 17:24:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/slin-check-warning-for-select-single-statement/m-p/5861276#M1321499</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-09T17:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: slin check warning for select single statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/slin-check-warning-for-select-single-statement/m-p/5861277#M1321500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT distinct * FROM Ztable INTO zitab
WHERE BUKRS = P_bukrs
AND VKORG = P_vkorg
AND vbeln = P_vblen
AND FLAG = 'X'.
if sy-subrc eq 0.
  write: record exists.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2009 17:28:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/slin-check-warning-for-select-single-statement/m-p/5861277#M1321500</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2009-07-09T17:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: slin check warning for select single statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/slin-check-warning-for-select-single-statement/m-p/5861278#M1321501</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;Gofor ..SELECT * UPTO 1 ROWS.....ENDSELECT. Instead of SELECT SINGLE...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2009 17:29:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/slin-check-warning-for-select-single-statement/m-p/5861278#M1321501</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-09T17:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: slin check warning for select single statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/slin-check-warning-for-select-single-statement/m-p/5861279#M1321502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * &lt;/P&gt;&lt;P&gt;             FROM Ztable &lt;/P&gt;&lt;P&gt;             INTO zitab&lt;/P&gt;&lt;P&gt;upto 1 rows&lt;/P&gt;&lt;P&gt;WHERE BUKRS = P_bukrs&lt;/P&gt;&lt;P&gt;     AND VKORG = P_vkorg &lt;/P&gt;&lt;P&gt;     AND vbeln = P_vblen&lt;/P&gt;&lt;P&gt;    AND FLAG = 'X'.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;  write: record exists.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2009 17:47:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/slin-check-warning-for-select-single-statement/m-p/5861279#M1321502</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-09T17:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: slin check warning for select single statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/slin-check-warning-for-select-single-statement/m-p/5861280#M1321503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it not necessary to include the key field to check whether the record exists or not?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and my another question is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to hide the message in slin (You can hide the message using "#EC *)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so i included "#EC * as shown below , but still showing the same message in slin , please correct me if i used it wrongly &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE * FROM Ztable INTO zitab         "#EC *&lt;/P&gt;&lt;P&gt;WHERE BUKRS = P_bukrs&lt;/P&gt;&lt;P&gt;AND VKORG = P_vkorg&lt;/P&gt;&lt;P&gt;AND vbeln = P_vblen&lt;/P&gt;&lt;P&gt;AND FLAG = 'X'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2009 18:00:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/slin-check-warning-for-select-single-statement/m-p/5861280#M1321503</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-09T18:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: slin check warning for select single statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/slin-check-warning-for-select-single-statement/m-p/5861281#M1321504</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;U can try to hide the messages in slin by writing extended check off/on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET EXTENDED CHECK OFF.&lt;/P&gt;&lt;P&gt;SELECT SINGLE * FROM Ztable INTO zitab &lt;/P&gt;&lt;P&gt;WHERE BUKRS = P_bukrs&lt;/P&gt;&lt;P&gt;AND VKORG = P_vkorg&lt;/P&gt;&lt;P&gt;AND vbeln = P_vblen&lt;/P&gt;&lt;P&gt;AND FLAG = 'X'.&lt;/P&gt;&lt;P&gt;SET EXTENDED CHECK ON.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sravnthi Chilal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2009 04:34:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/slin-check-warning-for-select-single-statement/m-p/5861281#M1321504</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-10T04:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: slin check warning for select single statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/slin-check-warning-for-select-single-statement/m-p/5861282#M1321505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data:r_ERTIM type range of ertim.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE * FROM Ztable INTO zitab&lt;/P&gt;&lt;P&gt;WHERE ertim in r_ertim&lt;/P&gt;&lt;P&gt;BUKRS = P_bukrs&lt;/P&gt;&lt;P&gt;AND VKORG = P_vkorg&lt;/P&gt;&lt;P&gt;AND vbeln = P_vblen&lt;/P&gt;&lt;P&gt;AND FLAG = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try to pass empty ranges,this will clear the Slin check.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2009 04:55:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/slin-check-warning-for-select-single-statement/m-p/5861282#M1321505</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-10T04:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: slin check warning for select single statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/slin-check-warning-for-select-single-statement/m-p/5861283#M1321506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it not necessary to include the key field to check whether the record exists or not?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2009 04:57:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/slin-check-warning-for-select-single-statement/m-p/5861283#M1321506</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-10T04:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: slin check warning for select single statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/slin-check-warning-for-select-single-statement/m-p/5861284#M1321507</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;It is not always possible to add all the key fields of a table.. It depends on your requirement.. But when you are using SELECT SINGLE it is always safe to use all key fields to get a unique record..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using key fields ensure performance..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2009 05:02:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/slin-check-warning-for-select-single-statement/m-p/5861284#M1321507</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-10T05:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: slin check warning for select single statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/slin-check-warning-for-select-single-statement/m-p/5861285#M1321508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i need to check whether a record exists or not in the table ,then i need to input all the key fields or not? if yes then what is the correct select statement to use it if two key fields are missing?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2009 08:56:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/slin-check-warning-for-select-single-statement/m-p/5861285#M1321508</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-10T08:56:40Z</dc:date>
    </item>
    <item>
      <title>Re: slin check warning for select single statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/slin-check-warning-for-select-single-statement/m-p/5861286#M1321509</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;As i have already mentioned it is not always essential that you have to use all the key fields.. It depends entirely on your requirement..  If you miss any of the key fields it wil still fetch records for you.. KEY FIELDS ensure performance.. If you mention all key fields then the data fetch from the table will be faster.. But you dont use all key fields, even then the records will be fetched but the performance will be lowered..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, if in your requirement two key fields are missing do not use SELECT SINGLE.. It will not fetch unique record always.. For this as already suggested you can use either &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT DISTINCT or  ..SELECT * UPTO 1 ROWS.....ENDSELECT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope i am clear now..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2009 09:23:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/slin-check-warning-for-select-single-statement/m-p/5861286#M1321509</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-10T09:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: slin check warning for select single statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/slin-check-warning-for-select-single-statement/m-p/5861287#M1321510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if your motive is just to check if an entry is ther or not for your selection, then you can try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select count(*) from ztable where XXXXX&lt;/P&gt;&lt;P&gt;check sy-subrc = 0 for record availability.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select field1 upto 1 rows  (instead of select * to improve performance)&lt;/P&gt;&lt;P&gt;into w_field1&lt;/P&gt;&lt;P&gt;from ztable&lt;/P&gt;&lt;P&gt;where XXXXX.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single should be used only if you have all the key fields available in the where condition. else use select/endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Bikash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2009 11:58:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/slin-check-warning-for-select-single-statement/m-p/5861287#M1321510</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-10T11:58:09Z</dc:date>
    </item>
  </channel>
</rss>

