<?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 SQL statement to determine if record exists in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-statement-to-determine-if-record-exists/m-p/3715329#M894394</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know the SQL-statement to determine if a record in a table exists? I don't want to read any data into the working-storage, I just need the returncode. I think it's something like, "transfer no data...." but I can't find the&lt;/P&gt;&lt;P&gt;exact syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And yes....points for good/helpful answers guaranteed!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Ivo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 May 2008 09:40:53 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-07T09:40:53Z</dc:date>
    <item>
      <title>SQL statement to determine if record exists</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-statement-to-determine-if-record-exists/m-p/3715329#M894394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know the SQL-statement to determine if a record in a table exists? I don't want to read any data into the working-storage, I just need the returncode. I think it's something like, "transfer no data...." but I can't find the&lt;/P&gt;&lt;P&gt;exact syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And yes....points for good/helpful answers guaranteed!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Ivo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2008 09:40:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-statement-to-determine-if-record-exists/m-p/3715329#M894394</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-07T09:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: SQL statement to determine if record exists</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-statement-to-determine-if-record-exists/m-p/3715330#M894395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u cant use transporting no fields addition with db tables.its used with internal tables to chack whether a record exits or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u've to use simple select statment like..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select single......from ..into ... where...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;"record exists.&lt;/P&gt;&lt;P&gt;elseif sy-subrc eq 4.&lt;/P&gt;&lt;P&gt;"record doesnt exit.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2008 10:21:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-statement-to-determine-if-record-exists/m-p/3715330#M894395</guid>
      <dc:creator>former_member188827</dc:creator>
      <dc:date>2008-05-07T10:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: SQL statement to determine if record exists</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-statement-to-determine-if-record-exists/m-p/3715331#M894396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select single * from zark_alv_test where grade = 'G'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0 .&lt;/P&gt;&lt;P&gt;write : / 'Exists'.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;write : / 'Does not Exists'.&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;in this SELECT query u are jst checking and not fetching data into workarea this is one of the way and also performance wise advisable to use....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check the SY_SUBRC And then u will know whether the record exists in DB table .....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;award points if useful &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2008 10:34:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-statement-to-determine-if-record-exists/m-p/3715331#M894396</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-07T10:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: SQL statement to determine if record exists</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-statement-to-determine-if-record-exists/m-p/3715332#M894397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ivo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check FM TABLECOUNT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Lakshman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2008 10:59:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-statement-to-determine-if-record-exists/m-p/3715332#M894397</guid>
      <dc:creator>Lakshmant1</dc:creator>
      <dc:date>2008-05-07T10:59:21Z</dc:date>
    </item>
  </channel>
</rss>

