<?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 connect to sql server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-connect-to-sql-server/m-p/4240810#M1012266</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello everyone!&lt;/P&gt;&lt;P&gt;my r/3 application server is unix os,versio is 620,I want to connect outer sql server,how can I make it?&lt;/P&gt;&lt;P&gt;thanks in advance!&lt;/P&gt;&lt;P&gt;if the suggest is helpfull,point will be rewarded.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Aug 2008 03:06:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-06T03:06:56Z</dc:date>
    <item>
      <title>native sql connect to sql server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-connect-to-sql-server/m-p/4240810#M1012266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello everyone!&lt;/P&gt;&lt;P&gt;my r/3 application server is unix os,versio is 620,I want to connect outer sql server,how can I make it?&lt;/P&gt;&lt;P&gt;thanks in advance!&lt;/P&gt;&lt;P&gt;if the suggest is helpfull,point will be rewarded.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Aug 2008 03:06:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-connect-to-sql-server/m-p/4240810#M1012266</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-06T03:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: native sql connect to sql server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-connect-to-sql-server/m-p/4240811#M1012267</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;Write your sql statement within &lt;/P&gt;&lt;P&gt;EXEC SQL.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Sql statement&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the above statement will directly in your database server. the sql statement should be compatable with your DB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for more info about native sql, check the below links&lt;/P&gt;&lt;P&gt;[native sql|http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3b8b358411d1829f0000e829fbfe/content.htm]&lt;/P&gt;&lt;P&gt;[Native SQL Example|http://www.sap-img.com/abap/sql-tool-for-abap-yes4sql-both-native-open-sql.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Boobalan S&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Boobalan Suburaj on Aug 6, 2008 6:58 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Aug 2008 03:58:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-connect-to-sql-server/m-p/4240811#M1012267</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-06T03:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: native sql connect to sql server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-connect-to-sql-server/m-p/4240812#M1012268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Bruce,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in R3 we can use SQL statements which are native to particular RDBMS (ie that too execute as it like on their  SQL server) we enclose them with &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXEC SQL [PERFORMING subr]. &lt;/P&gt;&lt;P&gt;  ... &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;Effect &lt;/P&gt;&lt;P&gt;These statements define an area in an ABAP program in which one or more Native SQL statements are to be carried out. The area between EXEC and ENDEXEC is not completely checked by the syntax check. The statements entered there are passed to the Native SQL interface and processed there as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Almost all SQL statements that are valid for the addressed database system can be included between EXEC and ENDEXEC, in particular the DDL statements. These SQL statements are passed from the Native SQL interface to the database system largely unchanged. The syntax rules are specified by the database system, in particular the case sensitivity rules for database objects. If the syntax allows a separator character between individual statements, you can include several Native SQL statements between EXEC and ENDEXEC. Generally, the semicolon (&lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt; is used as the separator character. &lt;/P&gt;&lt;P&gt;You can also include SAP-specific Native SQL language elements between EXEC and ENDEXEC. These statements are not passed directly from the Native SQL interface to the database, but are converted appropriately. These SAP-specific language elements are:: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Host variables &lt;/P&gt;&lt;P&gt;Statements for cursor processing &lt;/P&gt;&lt;P&gt;Database procedure calls &lt;/P&gt;&lt;P&gt;Statements for establishing database connections &lt;/P&gt;&lt;P&gt;All Native SQL statements bypass SAP buffering. Automatic client handling is not performed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;System fields &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The statement ENDEXEC sets the system fields sy-subrc and sy-dbcnt. When using the addition PERFORMING, note that implicit cursor processing is carried out and the system fields are set for every read process. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sy-subrc Meaning &lt;/P&gt;&lt;P&gt;0 The statements between EXEC and ENDEXEC were executed successfully. &lt;/P&gt;&lt;P&gt;4 The statements between EXEC and ENDEXEC were not executed. After implicit cursor processing with PERFORMING, sy-subrc always contains the value 4. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ENDEXEC statement sets sy-dbcnt to the number of table rows processed in the last Native SQL statement. After implicit cursor processing with PERFORMING, sy-dbcnt contains the total number of lines read. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;Programs with Native SQL statements are generally dependent on the database system used, so that they cannot be executed in all ABAP systems. This is especially true for the examples in this section, which was written for Informix database systems. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Inserting two rows in the database table SCARR. If neither of these rows exists, sy-subrc is set to 0 by ENDEXEC and sy-dbcnt to 1. Otherwise, an exception is raised and handled. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DATA: exc_ref    TYPE REF TO cx_sy_native_sql_error,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      &lt;STRONG&gt;error_text TYPE string.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TRY.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    &lt;STRONG&gt;EXEC SQL.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      &lt;STRONG&gt;INSERT INTO scarr&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                  &lt;STRONG&gt;(MANDT, CARRID, CARRNAME, CURRCODE, URL)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;        &lt;STRONG&gt;VALUES ('000', 'FF', 'Funny Flyers', 'EUR',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                &lt;STRONG&gt;'http://www.ff.com');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      &lt;STRONG&gt;INSERT INTO scarr&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                 &lt;STRONG&gt;(MANDT, CARRID, CARRNAME, CURRCODE, URL)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;        &lt;STRONG&gt;VALUES ('000', 'EF', 'Easy Flyers', 'EUR',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                &lt;STRONG&gt;'http://www.ef.com');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    &lt;STRONG&gt;ENDEXEC.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;CATCH cx_sy_native_sql_error INTO exc_ref.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    &lt;STRONG&gt;error_text = exc_ref-&amp;gt;get_text( ).&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    &lt;STRONG&gt;MESSAGE error_text TYPE 'I'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ENDTRY.&lt;/STRONG&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;Raju Mummidi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Aug 2008 04:35:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-connect-to-sql-server/m-p/4240812#M1012268</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-06T04:35:02Z</dc:date>
    </item>
  </channel>
</rss>

