Ask the Expert

Reading data from remote, non-SAP SQL 2000

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.

    Requires Free Membership to View


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).


This was first published in April 2003

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: