Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Extern connection to B.D. (MultiBase) by ODBC throught ABAP

Former Member
0 Kudos

Hi Experts.

I have some data that I need to consult to extern B.D.. This D.B. is a MultiBase D.B. (http://www.transtools.com). I have installed in the operative system of the development SAP machine the ODBC driver that I need to connect with this database. (I have a web applications in PHP in other machine in which I have installed the same ODBC driver in the operative system to allow connect with the DataBase... and the ODBC it's OK because I can access to database without problems )

Then I have seen that to access remote DB. in SAP I have to use EXEC SQL statements..., but I don't know how I can establish the connection with this special D.B.

I have seen that normally with the transaction DBCO I can establish the connect with remote D.B. but none the options of the D.B. that appear in this transaction it's the MultiBase D.B....

What can I do???... There is another form without create the connection previously in SAP to allow access to remote D.B., ... How can I use the ODBC installed in the operative system to connect with the external D.B.??

Can you give me some idea??

Thank you.

5 REPLIES 5

Former Member
0 Kudos

Hi Pedro,

You must use the ODBC driver of SAP (actually pat of the SAP MaxDB configuration).

Here's the manual:

[ODBC Manual SAP DB|http://www.sapdb.org/pdf/usmanodbc_eng.pdf]

Regards,

Robbie.

Former Member
0 Kudos

Dear Robbie.

Thks for your reply, but after read this manual I don't know what I need to do.

In my server, in Administrative Tools, ODBC drivers, If I try to add ..., I see that de SAP DB ODBC appear..., but I cannot connect with my external D.B.

Other question... the Core API functions... how can I call it???..

I'm very, very confuse and lost... I don't have a lot of experience in this.

Can you indicate to me the steps that I need to follow.

Thank you.

0 Kudos

Pedro,

That will take a lot of explaning.

The best manner to approach this is to first create an external program (f.i. a C program) and let this connect to your external database and do some SQL with it.

You will then see how the connection should be made (via ODBC to that database).

Remember: Not only the ODBC driver for SAP must be in place but also the ODBC driver of your external database. In the ODBC.INI file the connection details should be available (only for your external database, NOT for SAP). You ONLY have to install the ODBC driver of SAP, but since you are not connecting from outside SAP to the SAP database via ODBC, an entry for SAP is not needed.

Once your external program has a stable connection and can use SQL correctly, you will have confirmation that your external database can be accesed with ODBC.

You must use an SQL command OPEN DATASOURCE statement to open the connection in SQL.

Next in SAP you will need to setup the connection.

Most likely you will need NATIVE SQL inside an ABAP program.

Use the command EXEC SQL.

Put your SQL statements into it, starting with OPEN DATASOURCE.

Close it with ENDEXEC.

See [SAP Help|http://help.sap.com/saphelp_nw70/helpdata/EN/b3/277974713411d194c20000e8353423/frameset.htm] for more details on this.

Regards,

Robbie.

Former Member
0 Kudos

Dear Robbie,

I think I understand the key points that you tell me:

1.- Test the connection by ODBC to my external DB --> I have a PHP web program, and this program it's connected to this D.B. using the ODBC special driver installed in Web Server. And I can operate with this DB. showing data, and doing insert, delete ... etc.

In PHP program I established connection with this external DB, because I indicate the connection ODBC that I have created in the Web Server, and in this ODBC connection are all the parameters that I need to connect.

2.- ODBC.INI --> I search this file and this is the content: (I marked in bold type the connection that I use)

[ODBC 32 bit Data Sources]

MS Access Database=Microsoft Access Driver (*.mdb) (32 bits)

Excel Files=Microsoft Excel Driver (*.xls) (32 bits)

dBASE Files=Microsoft dBase Driver (*.dbf) (32 bits)

alliance=MySQL ODBC 3.51 Driver (32 bits)

afis=MultiBase 3.0/ODBC32 (Multiway) (32 bits)

[MS Access Database]

Driver32=C:\WINDOWS\system32\odbcjt32.dll

[Excel Files]

Driver32=C:\WINDOWS\system32\odbcjt32.dll

[dBASE Files]

Driver32=C:\WINDOWS\system32\odbcjt32.dll

[alliance]

Driver32=C:\WINDOWS\system32\myodbc3.dll

[afis]

Driver32=C:\WINDOWS\system32\mbn32_30.dll

In Administrative Tools / Data Sources ODBC, in the ODBC that I have created called --> afis, I have inserted the next parameters:

Data Source Name: afis

DataBase Name : afis

Environment:

DBDATE=DMY4/

DBHOST=192.168.1.19

DBPASSW=cosmos

DBPATH=/opt/cosmos

DBSERVICE=ctsql

DBUSER=ctl

3.- in SAP you will need to setup the connection. --> I think that it's the problem... how I do the connection?? When I go to DBCO, the only types of connection that I can see are:

ADA --> SAP DB (ADABAS/D)

DB2 --> DB2 UDB for OS/390

DB4 --> DB2 UDB for AS/400

DB6 --> DB2 UDB for UNIX and Windows

INF --> Informix

MSS --> Microsoft SQL Server

ORA --> Oracle

What don't appear the Multibase ODBC??... Or I can use other type??...

Thank you very much for your help.

Edited by: Pedro Gallardo Guzman on Mar 18, 2009 9:15 AM

0 Kudos

-

Edited by: Pedro Gallardo Guzman on Jul 22, 2010 9:26 AM