<?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: native sql &amp;&amp; BUT000 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-but000/m-p/6371682#M1401913</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;just check from SE11 if the table but000 exists....&lt;/P&gt;&lt;P&gt;also just check if you have declared the variable &lt;/P&gt;&lt;P&gt;first_name in the data declaration...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sid&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Nov 2009 14:30:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-11-30T14:30:00Z</dc:date>
    <item>
      <title>native sql &amp;&amp; BUT000</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-but000/m-p/6371679#M1401910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my function I am using the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: lv_message TYPE string.
DATA: sql_error  TYPE REF TO cx_sy_native_sql_error.
DATA: dbcursor   TYPE c.

TRY.
  EXEC SQL.
    open :dbcursor for
    SELECT partner
    FROM but000
    WHERE UPPER(name_first) LIKE :name_first
  ENDEXEC.
  CATCH cx_sy_native_sql_error INTO sql_error.
    lv_message = sql_error-&amp;gt;get_text( ).
    MESSAGE lv_message TYPE 'E'.
ENDTRY.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is giving the error message: "You tried to work with the name of a table or view that does not exist in the database".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Same error message occurs when I add the declaration: TABLES but000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can this be solved?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lieselot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Nov 2009 12:18:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-but000/m-p/6371679#M1401910</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-30T12:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: native sql &amp;&amp; BUT000</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-but000/m-p/6371680#M1401911</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;this is what the documentation says:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Open the database cursor C1 in the database table SFLIGHT for a SELECT statement 

DATA: C1 TYPE CURSOR. 

OPEN CURSOR C1 FOR 
     SELECT * FROM SFLIGHT WHERE CARRID = 'LH '.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, you have an error when opening the database cursor, in the way how you declared the instruction.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Nov 2009 12:54:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-but000/m-p/6371680#M1401911</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-30T12:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: native sql &amp;&amp; BUT000</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-but000/m-p/6371681#M1401912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this a syntax error? What version of R/3 are you on?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Nov 2009 14:17:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-but000/m-p/6371681#M1401912</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-30T14:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: native sql &amp;&amp; BUT000</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-but000/m-p/6371682#M1401913</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;just check from SE11 if the table but000 exists....&lt;/P&gt;&lt;P&gt;also just check if you have declared the variable &lt;/P&gt;&lt;P&gt;first_name in the data declaration...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sid&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Nov 2009 14:30:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-but000/m-p/6371682#M1401913</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-30T14:30:00Z</dc:date>
    </item>
  </channel>
</rss>

