Our SAP in running Oracle on a Unix server. We want to connect to a Windows 2000 server, accessing a SQL 2000 database
(non-SAP). The objective is to view both databases (SAP R/3 and SQL non-SAP) to extract and combine data for an external interface. We are having problems with the connection. It abends and doesn't seem to connect. Any suggestions or examples would be helpful. What is needed in the system setup? What is needed in terms of ABAP?
To connect to an external database you need to have a tool that allows being called via RFC. This agent will then execute the required command on behalf of your application and return the result. I do not know if there is a ready-to-use RFC-compliant agent for SQL Server. If you have a tool that does it for you, you might have to check your network connections (ping), permissions etc. and see if you can execute an rSQL from the remote machine on the SQL server.
There is a general solution to connect to nearly any kind of modern server application from a remote site by using simple HTTP requests. I use this in nearly every remote application now, benefiting from the wealth of features and programming and security goodies provided by such an HTTP server. Suitable HTTP server for your needs would be:
1. Microsoft IIS
2. Java Tomcat or IBM WebSphere
3. SAP WebAS
In your case, the IIS would probably be the one as it is installed on the Windows 2000 server anyway. I continue to assume that the scenario is built on the IIS.
Define an Active Server Page (ASP.NET) and insert the necessary code in your favorite language to extract the data from the SQL server. Some fragmental (cave!) examples on how to do this using an ODBC or JDBC connection is shown on my homepage http://idocs.de in the mySAP or Netweaver section.
Your ASP.NET page would pack the result in the HTTP response object to be returned. In order to call the page from SAP you call the function modules HTTP_POST (using a HTTP POST request) or HTTP_GET (for HTTP GET request) on the standard RFC destination SAPHTTPA. (Pointing to a SAP utility program saphttp that resides in the SAP binary directory of your SAP database server and can be called from the command line in order to test its functionality without RFC).
Dig deeper on SAP ABAP
Related Q&A from Axel Angeli
An SAP user is having difficulty with PERNR iDoc while transporting data from SAP to an external system.continue reading
An SAP user wants to know how to upload data into SAP R/3 when SAP Scripting is not enabled.continue reading
An SAP user is receiving an error message while integrating SAP iDoc PORDCR1 for a purchase order.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.