<?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: Problem with report using DBCON multiconnect to MSSQL Server. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-report-using-dbcon-multiconnect-to-mssql-server/m-p/7850061#M1591866</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Joan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to use the [ADBC classes|http://help.sap.com/abapdocu_702/en/abenadbc.htm] to fulfill your requirement. using these classes it is possible to select the data dynamically. Please refer to the SAP Online documentation for details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the demo program ADBC_DEMO for your reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Apr 2011 11:46:28 GMT</pubDate>
    <dc:creator>SuhaSaha</dc:creator>
    <dc:date>2011-04-28T11:46:28Z</dc:date>
    <item>
      <title>Problem with report using DBCON multiconnect to MSSQL Server.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-report-using-dbcon-multiconnect-to-mssql-server/m-p/7850060#M1591865</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;I have created this report following OSS note 738371 and it works fine:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT z99bc_dbcon_test.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: dbn(128).&lt;/P&gt;&lt;P&gt;PARAMETERS: pconn TYPE dbcon_name DEFAULT 'TEST-CONN'.&lt;/P&gt;&lt;P&gt;ptab TYPE string DEFAULT 'MYSCHEMA.MYTABLE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXEC SQL.&lt;/P&gt;&lt;P&gt;CONNECT TO :pconn&lt;/P&gt;&lt;P&gt;ENDEXEC.&lt;/P&gt;&lt;P&gt;EXEC SQL.&lt;/P&gt;&lt;P&gt;SET CONNECTION :pconn&lt;/P&gt;&lt;P&gt;ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXEC SQL.&lt;/P&gt;&lt;P&gt;SELECT db_name() INTO :dbn FROM MYSCHEMA.MYTABLE&lt;/P&gt;&lt;P&gt;ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXEC SQL.&lt;/P&gt;&lt;P&gt;SET CONNECTION DEFAULT&lt;/P&gt;&lt;P&gt;ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: / 'current database name', dbn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DBCON entry has conn info very simple: 'MSSQL_SERVER=&amp;lt;IP Address&amp;gt; MSSQL_DBNAME=TEST'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This program connects to database TEST, and reads table MYTABLE in schema MYSCHEMA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would know if it is possible to select the table name in a dynamic way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT db_name() INTO :dbn FROM :ptab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this line fails with meesages:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dbdsmss: DBSL99 SQL1087&lt;/P&gt;&lt;P&gt;Must declare the table variable "@P1".&lt;/P&gt;&lt;P&gt;***LOG BY2=&amp;gt; sql error 1087 performing OPC dbds#2 @ 486 dbds 0486&lt;/P&gt;&lt;P&gt;***LOG BY0=&amp;gt; Must declare the table variable "@P1". dbds#2 @ 486 dbds 0486&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea ? It is possible at all ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Joan B. Altadill&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2011 11:13:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-report-using-dbcon-multiconnect-to-mssql-server/m-p/7850060#M1591865</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-28T11:13:26Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with report using DBCON multiconnect to MSSQL Server.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-report-using-dbcon-multiconnect-to-mssql-server/m-p/7850061#M1591866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Joan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to use the [ADBC classes|http://help.sap.com/abapdocu_702/en/abenadbc.htm] to fulfill your requirement. using these classes it is possible to select the data dynamically. Please refer to the SAP Online documentation for details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the demo program ADBC_DEMO for your reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2011 11:46:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-report-using-dbcon-multiconnect-to-mssql-server/m-p/7850061#M1591866</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2011-04-28T11:46:28Z</dc:date>
    </item>
  </channel>
</rss>

