10-11-2005 4:11 PM
Hi,
In my ABAP program I need to retrieve 3 fields from one table of DB2 database. I have tried creating an RFC connection in SM59 and then using native SQL in abap code but could not succeed.
I have also maintained an entry in DBCON table but am unable to connect through program.
Pls suggest.
Thanx in advance.
10-11-2005 4:20 PM
10-11-2005 4:24 PM
Hi,
Thanx for your prompt response. Our R3 is running on Oracle. I think 'connect' syntax should work but I am not sure where the error is.
10-11-2005 4:40 PM
Preeti-
DBCON may not work for you because your target is DB2. You SAP system should have the suitable driver files for connecting to DB2 and I don't think currently this is supported.
However, there are other ways of doing it. One ofcourse is to use a middleware tool, which I guess you don't have in your landscape.
If investing on a middleware tool is out of scope, here are other options
1) If you are a microsoft shop, use .NET connector (freely downlaodable from SAP service market place). You can develop a .NET component which will use .NET connector for connecting to SAP and OBDC to connect to your AS400 system. The OBDC drivers can be obtained from IBM.
2) If you are a java shop, you can develop a java code which can run on your AS400 system or a separte server (windows,unix..).
This java code will use JRFC/JCO (again downloadable for free from SAP service market place) to connect to SAP while it will use Client access ODBC drivers or JT400 drivers (google JT400) to connect to your DB2 database.
Though developing this is not a great deal, could be bit challenging if done for the first time. Let me know which way you wanna go and I can guide with more information/code samples.
KK