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: 

Sending and Receiving data to/from SQL server

Former Member
0 Kudos

Hi,

I am developing a custom dialog programming screen in SAP.

The user will enter Sales Order number on the screen and clicks on a button.

The Sales order details should be passed to Microsoft SQL server and saved in a table. An event runs immediately in SQL server to process this data passed from SAP and saves the results in second table in SQL server. Then SAP has to pull the data from this second table in SQL server and display the results on the second screen in the custom screen in SAP.

All of this should happen when the user clicks the button on the first screen of SAP transaction.

How can I send data to SQL server and wait in the same transaction to get back the results from SQL server?

Your thoughts are greatly appreciated.

Thanks,

Ashok.

4 REPLIES 4

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

You need to write to SQL server which is not the underlying database of the SAP system? If so, you can use Native SQL to connect to the other SQL server.

Search forum for Native SQL

Regards,

Rich Heilman

0 Kudos

Thanks Rich.

After sending the data to SQL server from SAP, the data is processed in SQL server and the results are stored in a table in SQL server.

I want to get send the data from SAP and get back the results from SQL server in the same transaction/program.

How do I do that in ABAP program?

Thanks,

Ashok.

Former Member
0 Kudos

Hi,

After sending the data to SQL server from SAP, the data is processed in SQL server and the results are stored in a table in SQL server.

I want to get send the data from SAP and get back the results from SQL server in the same transaction/program.

How do I do that in ABAP program?

Thanks,

Ashok.

Former Member
0 Kudos

Hi Ashok !!

You can do this only if you have yor sap installed on Windows platform. Then you shoul create connection do SQL Server in DBCO transaction, and tehen use native sql in abap program. If you have Sap installed in non-windows platofrm you should install Busiines Connector or XI.

Bussiness Connector is free !!

BR, Jacek