<?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 Native SQL in ABAP in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-in-abap/m-p/4316437#M1028765</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi , &lt;/P&gt;&lt;P&gt;I have to bring in data from a view created in FIDO into my ABAP program . The database is oracle. I am trying to use basic forms of native sql embedded in my code to retrieve the data , but I get a short dump stating that the table does not exist. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the following code : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF wa,&lt;/P&gt;&lt;P&gt;        field_id(32) type c,&lt;/P&gt;&lt;P&gt;        field_common_name(100) TYPE c,"spfli-cityfrom,&lt;/P&gt;&lt;P&gt;      END OF wa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA c1(32) TYPE C VALUE 'LH'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXEC SQL PERFORMING loop_output.&lt;/P&gt;&lt;P&gt;  SELECT field_id, field_common_name&lt;/P&gt;&lt;P&gt;  INTO   :wa&lt;/P&gt;&lt;P&gt;  FROM   v_field&lt;/P&gt;&lt;P&gt;  WHERE  field_id = :c1&lt;/P&gt;&lt;P&gt;ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM loop_output.&lt;/P&gt;&lt;P&gt;  WRITE: / wa-field_id, wa-field_common_name.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Aug 2008 14:00:13 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-20T14:00:13Z</dc:date>
    <item>
      <title>Native SQL in ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-in-abap/m-p/4316437#M1028765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi , &lt;/P&gt;&lt;P&gt;I have to bring in data from a view created in FIDO into my ABAP program . The database is oracle. I am trying to use basic forms of native sql embedded in my code to retrieve the data , but I get a short dump stating that the table does not exist. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the following code : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF wa,&lt;/P&gt;&lt;P&gt;        field_id(32) type c,&lt;/P&gt;&lt;P&gt;        field_common_name(100) TYPE c,"spfli-cityfrom,&lt;/P&gt;&lt;P&gt;      END OF wa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA c1(32) TYPE C VALUE 'LH'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXEC SQL PERFORMING loop_output.&lt;/P&gt;&lt;P&gt;  SELECT field_id, field_common_name&lt;/P&gt;&lt;P&gt;  INTO   :wa&lt;/P&gt;&lt;P&gt;  FROM   v_field&lt;/P&gt;&lt;P&gt;  WHERE  field_id = :c1&lt;/P&gt;&lt;P&gt;ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM loop_output.&lt;/P&gt;&lt;P&gt;  WRITE: / wa-field_id, wa-field_common_name.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Aug 2008 14:00:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-in-abap/m-p/4316437#M1028765</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-20T14:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: Native SQL in ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-in-abap/m-p/4316438#M1028766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Because "V_FIELD" is not a valid table&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
EXEC SQL PERFORMING loop_output.
SELECT field_id, field_common_name
INTO :wa
FROM v_field  " &amp;lt;&amp;lt;&amp;lt;&amp;lt; -----
WHERE field_id = :c1
ENDEXEC.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Aug 2008 14:12:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-in-abap/m-p/4316438#M1028766</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2008-08-20T14:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: Native SQL in ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-in-abap/m-p/4316439#M1028767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I checked and the table exists , is it because I have to connect to the external database first. I do not know how to connect to an external database. Is that some code segment I have to add to my abap program . &lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Aug 2008 20:46:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-in-abap/m-p/4316439#M1028767</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-20T20:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: Native SQL in ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-in-abap/m-p/4316440#M1028768</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;First of all you have to define a database connection to the external database you want to use. Database connections are stored in table DBCON. Use transaction DBCO or DBACOCKPIT to maintain them. The latter offers much more help and a test if all parameters are set correctly. Search SDN for details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you have to open the connection you want to use before you do your EXEC SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;EXEC SQL.&lt;/P&gt;&lt;P&gt;CONNECT TO &amp;lt;con_name&amp;gt; AS &amp;lt;alias_name&amp;gt;&lt;/P&gt;&lt;P&gt;ENDEXEC. &lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please search the forums for further details. Or browse the online docu / F1 help. You will find a lot of further information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Jan Stallkamp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Aug 2008 21:07:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-in-abap/m-p/4316440#M1028768</guid>
      <dc:creator>JanStallkamp</dc:creator>
      <dc:date>2008-08-20T21:07:39Z</dc:date>
    </item>
  </channel>
</rss>

