<?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: Open sql &amp; native sql in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-native-sql/m-p/2772148#M645978</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ankita,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Open SQL allows you to access database tables declared in the ABAP Dictionary regardless of the database platform that you R/3 System is using. Native SQL allows you to use database-specific SQL statements in an ABAP program. This means that you can use database tables that are not administered by the ABAP Dictionary, and therefore integrate data that is not part of the R/3 System.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a rule, an ABAP program containing database-specific SQL statements will not run under different database systems. If your program will be used on more than one database platform, only use Open SQL statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Sep 2007 06:12:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-04T06:12:36Z</dc:date>
    <item>
      <title>Open sql &amp; native sql</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-native-sql/m-p/2772146#M645976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;What is the differenec b/w open sql &amp;amp; native sql?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2007 06:07:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-native-sql/m-p/2772146#M645976</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-04T06:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: Open sql &amp; native sql</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-native-sql/m-p/2772147#M645977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Open SQL - ABAP specific SQL&lt;/P&gt;&lt;P&gt;Native SQL - DB specific SQL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sameer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2007 06:09:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-native-sql/m-p/2772147#M645977</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-04T06:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: Open sql &amp; native sql</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-native-sql/m-p/2772148#M645978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ankita,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Open SQL allows you to access database tables declared in the ABAP Dictionary regardless of the database platform that you R/3 System is using. Native SQL allows you to use database-specific SQL statements in an ABAP program. This means that you can use database tables that are not administered by the ABAP Dictionary, and therefore integrate data that is not part of the R/3 System.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a rule, an ABAP program containing database-specific SQL statements will not run under different database systems. If your program will be used on more than one database platform, only use Open SQL statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2007 06:12:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-native-sql/m-p/2772148#M645978</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-04T06:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: Open sql &amp; native sql</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-native-sql/m-p/2772149#M645979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;Open SQL&amp;lt;/b&amp;gt; allows you to access database tables declared in the ABAP Dictionary, regardless of the database platform you are using. &amp;lt;b&amp;gt;Native SQL&amp;lt;/b&amp;gt; allows you to use database-specific SQL statements in an ABAP program. This means that you can use database tables that are not managed by the ABAP Dictionary, and therefore integrate data that is not part of the SAP Web AS ABAP System.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a rule, an ABAP program containing database-specific SQL statements will not run under different database systems. If your program will be used on more than one database platform, only use Open SQL statements&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To use a Native SQL statement, you must precede it with the EXEC SQL statement, and follow it with the ENDEXEC statement as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXEC SQL [PERFORMING form].&lt;/P&gt;&lt;P&gt;  Native SQL Anweisung&lt;/P&gt;&lt;P&gt;ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT demo_native_sql.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF wa,&lt;/P&gt;&lt;P&gt;        connid   TYPE spfli-connid,&lt;/P&gt;&lt;P&gt;        cityfrom TYPE spfli-cityfrom,&lt;/P&gt;&lt;P&gt;        cityto   TYPE spfli-cityto,&lt;/P&gt;&lt;P&gt;      END OF wa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA c1 TYPE spfli-carrid 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 connid, cityfrom, cityto&lt;/P&gt;&lt;P&gt;  INTO   :wa&lt;/P&gt;&lt;P&gt;  FROM   spfli&lt;/P&gt;&lt;P&gt;  WHERE  carrid = :c1&lt;/P&gt;&lt;P&gt;ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM loop_output.&lt;/P&gt;&lt;P&gt;  WRITE: / wa-connid, wa-cityfrom, wa-cityto.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Open SQL statement for reading data from database tables is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT      result &lt;/P&gt;&lt;P&gt;  INTO      target&lt;/P&gt;&lt;P&gt;  FROM      source &lt;/P&gt;&lt;P&gt;  [WHERE    condition]&lt;/P&gt;&lt;P&gt;  [GROUP BY fields] &lt;/P&gt;&lt;P&gt;  [HAVING   cond]&lt;/P&gt;&lt;P&gt;  [ORDER BY fields].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please go through the link:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb3b8b358411d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb3b8b358411d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb3b8b358411d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb3b8b358411d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward the helpful entries.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raman.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2007 06:17:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-native-sql/m-p/2772149#M645979</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-04T06:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: Open sql &amp; native sql</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-native-sql/m-p/2772150#M645980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ..&lt;/P&gt;&lt;P&gt;Here are some of the differences.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Open SQL , native SQL are the interfaces to create the database applicatons. &lt;/P&gt;&lt;P&gt;Open SQL is consistant across different types of existing Databases. &lt;/P&gt;&lt;P&gt;Native SQL is the database language specific to database.Its API is specific to the databse. &lt;/P&gt;&lt;P&gt;Open SQL API is consistent across all vendors  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Open SQL allows you to access all database tables known to the SAP system, regardless of the database manufacturer. Sometimes, however, we may want to use database-specific SQL statements called Native SQL in your ABAP/4 program. &lt;/P&gt;&lt;P&gt;To avoid incompatibilities between different database tables and also to make ABAP/4 programs independent of the database system in use, SAP has created a set of separate SQL statements called Open SQL. Open SQL contains a subset of standard SQL statements as well as some enhancements which are specific to SAP. &lt;/P&gt;&lt;P&gt;A database interface translates SAP's Open SQL statements into SQL commands specific to the database in use. Native SQL statements access the database directly &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward if useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2007 06:19:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-native-sql/m-p/2772150#M645980</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-04T06:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: Open sql &amp; native sql</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-native-sql/m-p/2772151#M645981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ankita , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Native SQL is the one which is Database understandable and &lt;/P&gt;&lt;P&gt;Open SQL is language specific SQL like ABAP Java etc . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A query is served in the following steps . &lt;/P&gt;&lt;P&gt;1. User requests for some data in the form of query from ABAP that is Open SQL . &lt;/P&gt;&lt;P&gt;2. That query goes to &amp;lt;i&amp;gt;database interpreter&amp;lt;/i&amp;gt; which converts the Open SQL to DB/Native SQL  which is understandable to data base only  .&lt;/P&gt;&lt;P&gt;3. after retrieving data from DB Query is replied back to the user and hence the query is served . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;Reward points if helpful .&amp;lt;/i&amp;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;Regards &lt;/P&gt;&lt;P&gt;Amber S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2007 06:19:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-native-sql/m-p/2772151#M645981</guid>
      <dc:creator>former_member198270</dc:creator>
      <dc:date>2007-09-04T06:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: Open sql &amp; native sql</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-native-sql/m-p/2772152#M645982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ankita,&lt;/P&gt;&lt;P&gt;              Native SQL allows you to use databasespecific&lt;/P&gt;&lt;P&gt;SQL statements in an ABAP program. This means that you can use database tables that&lt;/P&gt;&lt;P&gt;are not administered by the ABAP Dictionary, and therefore integrate data that is not part of the R/3 System.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Open SQL consists of a set of ABAP statements that perform operations on the central database&lt;/P&gt;&lt;P&gt;in the R/3 System. The results of the operations and any error messages are independent of the&lt;/P&gt;&lt;P&gt;database system in use. Open SQL thus provides a uniform syntax and semantics for all of the&lt;/P&gt;&lt;P&gt;database systems supported by SAP. ABAP programs that only use Open SQL statements will&lt;/P&gt;&lt;P&gt;work in any R/3 System, regardless of the database system in use. Open SQL statements can&lt;/P&gt;&lt;P&gt;only work with database tables that have been created in the ABAP Dictionary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In other words, OPEN SQL is ABAP specific and NATIVE SQL is database specific.&lt;/P&gt;&lt;P&gt;I think that open sql is translated to nativeSQL. Open is much safer but it is somehow limited.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Open SQL refers to commands that can be translated into statements of any other SQL language.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Example :&lt;/P&gt;&lt;P&gt;MS-SQL Server and Oracle both are databases. There are two different languages that are used to query these databases and get results. Somme commands exist only in MS-SQL and some only in Oracle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Open SQL is used when we want tp write queries that will work on any underlying database. It contains only those commands which can be translated into any underlying databases command.&lt;/P&gt;&lt;P&gt;Open SQL is a subset of native SQL . SQL has been divided into two parts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Open SQL can recognized by the ABAP program.&lt;/P&gt;&lt;P&gt;&amp;gt; They are 10 SQL statements out of which we use only 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Select.&lt;/P&gt;&lt;P&gt;2. Insert.&lt;/P&gt;&lt;P&gt;3. Delete.&lt;/P&gt;&lt;P&gt;4. Modify.&lt;/P&gt;&lt;P&gt;5. Update.&lt;/P&gt;&lt;P&gt;6. Fetch.&lt;/P&gt;&lt;P&gt;7. Open Cursor.&lt;/P&gt;&lt;P&gt;8. Close Cursor.&lt;/P&gt;&lt;P&gt;9. Roll Back.&lt;/P&gt;&lt;P&gt;10. Commit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;out of which we use only the first 5.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Native SQL. cannot be recognized by the ABAP program.&lt;/P&gt;&lt;P&gt;&amp;gt; To execute Native SQL &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exec SQL.&lt;/P&gt;&lt;P&gt;.......&lt;/P&gt;&lt;P&gt;.......&lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;End Exec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as it cannot be recognized by the ABAP we go for Open SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hemant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2007 06:22:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-native-sql/m-p/2772152#M645982</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-04T06:22:43Z</dc:date>
    </item>
  </channel>
</rss>

