<?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: Secondary database conections in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/secondary-database-conections/m-p/1061817#M92092</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Noemi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. As u said, you have a secondary database connection&lt;/P&gt;&lt;P&gt;   which is tested and working. (But giving&lt;/P&gt;&lt;P&gt;   error in ur Z program)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. SAP recommends that instead of using NATIVE Sql,&lt;/P&gt;&lt;P&gt;   use OPEN Sql.&lt;/P&gt;&lt;P&gt;   So that if there is any change in database,&lt;/P&gt;&lt;P&gt;   the R/3 system(Database Manager) will automatically&lt;/P&gt;&lt;P&gt;   take care of it)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. According to me, you should you OPEN Sql.&lt;/P&gt;&lt;P&gt;   To do this,&lt;/P&gt;&lt;P&gt;   you will have to create the same Z / Y table&lt;/P&gt;&lt;P&gt;   in your R/3 database, with the same structure.&lt;/P&gt;&lt;P&gt;   This can be a blank table or structure.&lt;/P&gt;&lt;P&gt;   SO THAT ABAP IDENTIFIES IT AS A DATABASE OBJECT&lt;/P&gt;&lt;P&gt;   IN DD DICTIONARY WHEN SYNTAX CHECKING THE SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.  One can use the following syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      DATA: mydbcon(30) TYPE c.  &lt;/P&gt;&lt;P&gt;      mydbcon = 'SAPPVF'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     Select * FROM YTABLE CONNECTION (mydbcon)&lt;/P&gt;&lt;P&gt;     into ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HOPE THIS HELPS&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;Amit M.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Nov 2005 06:48:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-11-17T06:48:36Z</dc:date>
    <item>
      <title>Secondary database conections</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/secondary-database-conections/m-p/1061815#M92090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i&amp;#146;m working in a proyect, that consist in send data to other db server that is not on the r3 database server, &lt;/P&gt;&lt;P&gt;both database server are running on SQL Server 2000.&lt;/P&gt;&lt;P&gt;The version of sap is 46b.&lt;/P&gt;&lt;P&gt;S.O. Windows 2000 SERVER &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;THe secondary database is in Windows 2000 Server too.&lt;/P&gt;&lt;P&gt; i found information in the notes: 313151,178949.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; i fill the table dbcon as follow:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Connection name : SAPPVF    &lt;/P&gt;&lt;P&gt;DBMS:MSS                    &lt;/P&gt;&lt;P&gt;User name: csappvf                                     &lt;/P&gt;&lt;P&gt;DB password *** / ********+&lt;/P&gt;&lt;P&gt;Conn. info: MSSQL_SERVER=NHUERTA MSSQL_DBNAME=PRU&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;csappvf, is the user with permision dbo in database PRU.&lt;/P&gt;&lt;P&gt;Where NHUERTA, is secondary server, where is the database PRU.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PRU, is the secondary database &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Code program abap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXEC sql.&lt;/P&gt;&lt;P&gt;  CONNECT TO 'SAPPVF' AS 'MIM'&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 'MIM'&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;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    EXEC SQL.&lt;/P&gt;&lt;P&gt;      SET CONNECTION 'MIM'&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 single * INTO :WA_RENTA FROM RENTA&lt;/P&gt;&lt;P&gt;    ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   but the program generate a dump:&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; ABAP/4 Program ZMX_BC_IN_CONEXION &lt;/P&gt;&lt;P&gt;vSource ZMX_BC_IN_CONEXION &lt;/P&gt;&lt;P&gt;Line 38.     &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Error Code DBIF_DSQL2_OBJ_UNKNOWN. &amp;lt;/b&amp;gt;                &lt;/P&gt;&lt;P&gt;Module  $Id: //bas/46D/src/krn/runt/abexsql.c#8 $ SAP.       &lt;/P&gt;&lt;P&gt; Function ExecuteCall Line 806        &lt;/P&gt;&lt;P&gt; Table does not exist in database....       &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   How i can identify if the problem is of basis&lt;/P&gt;&lt;P&gt;                                                             Someone have any suggestion about this !!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Noemi Huerta&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Noemi Huerta&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2005 00:13:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/secondary-database-conections/m-p/1061815#M92090</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-17T00:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: Secondary database conections</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/secondary-database-conections/m-p/1061816#M92091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem with bind variable in native SQL is that they can not accept mutiple rows. In your case, your select statement will be returning multiple rows, therefore it dumps out. The one option is use Open cursor and fetch next statements. You can find help on the following link.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/7b/0bdea252d746429420007a69bd06c7/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/7b/0bdea252d746429420007a69bd06c7/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2005 05:45:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/secondary-database-conections/m-p/1061816#M92091</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-17T05:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: Secondary database conections</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/secondary-database-conections/m-p/1061817#M92092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Noemi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. As u said, you have a secondary database connection&lt;/P&gt;&lt;P&gt;   which is tested and working. (But giving&lt;/P&gt;&lt;P&gt;   error in ur Z program)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. SAP recommends that instead of using NATIVE Sql,&lt;/P&gt;&lt;P&gt;   use OPEN Sql.&lt;/P&gt;&lt;P&gt;   So that if there is any change in database,&lt;/P&gt;&lt;P&gt;   the R/3 system(Database Manager) will automatically&lt;/P&gt;&lt;P&gt;   take care of it)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. According to me, you should you OPEN Sql.&lt;/P&gt;&lt;P&gt;   To do this,&lt;/P&gt;&lt;P&gt;   you will have to create the same Z / Y table&lt;/P&gt;&lt;P&gt;   in your R/3 database, with the same structure.&lt;/P&gt;&lt;P&gt;   This can be a blank table or structure.&lt;/P&gt;&lt;P&gt;   SO THAT ABAP IDENTIFIES IT AS A DATABASE OBJECT&lt;/P&gt;&lt;P&gt;   IN DD DICTIONARY WHEN SYNTAX CHECKING THE SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.  One can use the following syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      DATA: mydbcon(30) TYPE c.  &lt;/P&gt;&lt;P&gt;      mydbcon = 'SAPPVF'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     Select * FROM YTABLE CONNECTION (mydbcon)&lt;/P&gt;&lt;P&gt;     into ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HOPE THIS HELPS&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;Amit M.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2005 06:48:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/secondary-database-conections/m-p/1061817#M92092</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-17T06:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: Secondary database conections</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/secondary-database-conections/m-p/1061818#M92093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sharad !!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Thanks by your suggestion !!!&lt;/P&gt;&lt;P&gt;  I take note about this, but i think the problem that i have, is related with basis, i want supose, because the content of my table is only 1 row, i change the select&lt;/P&gt;&lt;P&gt;instruction by a single *, and the system throw the same &lt;/P&gt;&lt;P&gt;error  &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;, Do you know how i can check that the problem is not of basis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2005 17:56:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/secondary-database-conections/m-p/1061818#M92093</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-17T17:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: Secondary database conections</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/secondary-database-conections/m-p/1061819#M92094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amit !!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I created a ztable in the sapr3 with the same structure that i have in the other dabatase that is not in the r3.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  And try to put the instuction, but in the editor send a error, i think this no support the instrucction &lt;/P&gt;&lt;P&gt;that you suggest to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   the editor send a message &lt;/P&gt;&lt;P&gt; wrong expresion in from clause where condition.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  i look in the help and i don't found the instruction select with the option connection, i'm working with the &lt;/P&gt;&lt;P&gt;sql server 2000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  have you been do it in any time ? &lt;/P&gt;&lt;P&gt;  I think the problem could be are in the basis, but i don't know how i can identify this !!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2005 18:17:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/secondary-database-conections/m-p/1061819#M92094</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-17T18:17:46Z</dc:date>
    </item>
  </channel>
</rss>

