Application Development and Automation 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: 
Read only

Access form ABAP to external MySQL-Database (read/write)

edvdm
Participant
0 Likes
2,921

Hello!

We have an external MySQL-DB (running on Linux). Now we should read this database from our SAP-System (running on Linux with Oracle-DB) to create a purchase order. After creating this order in our SAP we should update the dataset in the MySQL-DB (creating order was succesfully).

How can we create the Connection to the MySQL-DB?

Thank you.

Best Regards

Markus

Hello!

We have an external MySQL-DB (running on Linux). Now we should read this database from our SAP-System (running on Linux with Oracle-DB) to create a purchase order. After creating this order in our SAP we should update the dataset in the MySQL-DB (creating order was succesfully).

How can we create the Connection to the MySQL-DB?

Thank you.

Best Regards

Markus

10 REPLIES 10
Read only

Former Member
0 Likes
1,898

Hello,

how is your MySQl-DB filled?

Wouldn't it be easier to create something like a file (for example .csv file) from the non-sap side and just import the data from the file into your sap-database.

ive never heard about an option to directly access a foreign database from sap.

Regards

Nico

Read only

0 Likes
1,898

Hello!

To Export the database inot a CSV-File seems to be a solution but we must also update the dataset.

We Need a Connection in both ways.

Best regards

Markus

Read only

raphael_almeida
Active Contributor
0 Likes
1,898

Hi Markus !

First you must configure the acess to MySQL, read this: http://scn.sap.com/docs/DOC-20271

After you make the connection, you can use the Native SQL (ADBC API) for query your MySQL tables

Regards,

Read only

0 Likes
1,898

Adding to what I said above, why is not made an RFC program? I believe it is a safer solution as directly call MySQL

Regards.

Read only

0 Likes
1,898

Hi Raphael!

Do you have an example for me? Maybe for the solution with native SQl or for the second solution with RFC.

Thanks for your help.

Regards

Markus

Read only

0 Likes
1,898

Hi Markus!

Sorry for the delay, the day was well filled


For example of ADBC, as Kennet said, you can use ADBC_DEMO.


About RFC, I advise you to take a read on the SAP JCo (SAP Java Connector), this is a SAP middleware component that enables the development of SAP-compatible components and applications in Java. From this you can send what you want interfacing to SAP.


As said above in my last post, I would advise creating an RFC instead Native SQL. Not sure how the scenario you have to develop this solution, but I believe will be a more secure.


Regards.

Read only

Former Member
0 Likes
1,898

do you have any middleware like SAP PI or Tibco ?? you could build an interface between ABAP and SQL database to fetch data.

Read only

0 Likes
1,898

Hi!

No, we have not any middleware. We want to connect directly from SAP to the external database.

Both systems are in the same Network.

Regards

Markus

Read only

0 Likes
1,898

you can try to create a database link for non-oracle database and create a synonym for the remote table in SAP user's schema. check the link below

Configuring Oracle Database Gateway for ODBC

But i would still think this is an Integration scenario easily solved by middleware tool rather than a direct connection between two individual systems.

Read only

kmoore007
Active Contributor
0 Likes
1,898

Have you looked into using the ADBC API?  ABAP Database Call Interface.  There is a configuration table DBCON which would need to be configured by your Basis person.  There is a demo program called ADBC_DEMO.