<?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: passing data from abap-program to mssql database table thro native sql in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-data-from-abap-program-to-mssql-database-table-thro-native-sql/m-p/6051643#M1352441</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Closing this thread...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Sep 2009 09:41:19 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-09-18T09:41:19Z</dc:date>
    <item>
      <title>passing data from abap-program to mssql database table thro native sql</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-data-from-abap-program-to-mssql-database-table-thro-native-sql/m-p/6051640#M1352438</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; To pass the data from abap-program to mssql server,i have created database connection through dbco t.code.&lt;/P&gt;&lt;P&gt;now i am trying to get connection thro native sql but am not able to get it .Am working in ECC 5.0.&lt;/P&gt;&lt;P&gt;Could anyone help me on this.Did i miss anything?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have tried Native-sql like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: CON_NAME LIKE DBCON-CON_NAME VALUE 'BIW'.&lt;/P&gt;&lt;P&gt;EXEC SQL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;CONNECT TO :con_name AS 'C1'&lt;/P&gt;&lt;P&gt;ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2009 11:47:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-data-from-abap-program-to-mssql-database-table-thro-native-sql/m-p/6051640#M1352438</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-13T11:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: passing data from abap-program to mssql database table thro native sql</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-data-from-abap-program-to-mssql-database-table-thro-native-sql/m-p/6051641#M1352439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;could anyone give  some ideas on this pls?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2009 07:30:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-data-from-abap-program-to-mssql-database-table-thro-native-sql/m-p/6051641#M1352439</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-17T07:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: passing data from abap-program to mssql database table thro native sql</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-data-from-abap-program-to-mssql-database-table-thro-native-sql/m-p/6051642#M1352440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Trying to do the same here, only using Oracle DB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
....
DATA:     dbc TYPE DBCON_NAME VALUE 'BI'

....
TRY.
  EXEC SQL.
    CONNECT TO :dbc
  ENDEXEC.

  IF sy-subrc NE 0.
    RAISE EXCEPTION TYPE cx_sy_native_sql_error.
  ENDIF.
CATCH cx_sy_native_sql_error INTO oref_native_sql_error.
  sql_emsg = oref_native_sql_error-&amp;gt;get_text( ).
  MESSAGE sql_emsg TYPE 'I'.
ENDTRY.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I keep getting the message 'Native SQL exception has occured' (because of the RAISE statement, I wonder how we can get a meaningfull error description).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course this can be a result of a number of network issues, so I'm trying to resolve this together with my BC admin.&lt;/P&gt;&lt;P&gt;I suggest the same to you..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the meantime, if anyone can help out, it will be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;SD&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2009 13:13:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-data-from-abap-program-to-mssql-database-table-thro-native-sql/m-p/6051642#M1352440</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-19T13:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: passing data from abap-program to mssql database table thro native sql</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-data-from-abap-program-to-mssql-database-table-thro-native-sql/m-p/6051643#M1352441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Closing this thread...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2009 09:41:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-data-from-abap-program-to-mssql-database-table-thro-native-sql/m-p/6051643#M1352441</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-18T09:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: passing data from abap-program to mssql database table thro native sql</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-data-from-abap-program-to-mssql-database-table-thro-native-sql/m-p/6051644#M1352442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have solved this, with the help of the BC.&lt;/P&gt;&lt;P&gt;BC needs to make changes to a configuration file, to enable listeners, according to the address and port.&lt;/P&gt;&lt;P&gt;In DBCO, make sure you test your connection (for example: my_dbc) and verify it's working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In ABAP, &lt;/P&gt;&lt;P&gt;Define my_dbc, like it is, in the post above.&lt;/P&gt;&lt;P&gt;use CONNECT TO :my_dbc, and it should work!&lt;/P&gt;&lt;P&gt;Instead of RAISE exception, use CATCH cx_native_sql_exeption (or something like that, I can't verify at the moment) INTO oref&lt;/P&gt;&lt;P&gt;In CATCH block, use method get_text() of the oref, to fetch the error description into a string variable..then just write it out via list, or message, etc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2009 10:22:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-data-from-abap-program-to-mssql-database-table-thro-native-sql/m-p/6051644#M1352442</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-18T10:22:41Z</dc:date>
    </item>
  </channel>
</rss>

