Supposed you have a Microsoft SQL Server that is separates from your SAP Server, and you need to insert several data from SAP. Luckily in SAP System have the feature to create connection to external database using DBCO Transaction code.

The required prerequisite before you can make query to separate database you need to create database connection using DBCO transaction code.


You need to create new DBCON, click Change/Display toolbar button and click New Entries. the new screen will shown and you can entered the required DBCON parameters such as password, description, and conn info contain IP Address Database Server , Conn Info is different depends on your database, for this sample we need to create connection to Microsoft SQL Server.


After you’ve finished create DBCON, Now you can develop ABAP Program and use that’s connection. for example i create ABAP Program to get some data from SAP and insert into the Microsoft SQL Server.

To use DBCON you need to use native SQL using EXEC SQL .

Type the CONNECT TO <name_your_dbcon> to connect to your DBCON. You can see the following full ABAP source code.

After you declare connection to your DBCON you can write your SQL and create connection as default on the ABAP Code – SET CONNECTION DEFAULT.

Incoming search terms: