Application Development and Automation 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: 
Read only

Can we insert data into an SQL Table (which is outside SAP) from SAP

Former Member
0 Likes
905

Hi all,

I have a requirement. We have a SQL Server in our Network and it has an SQL table.

Now From SAP can I write a report program which pulls data from SAP and inserts in this external SQL table present in SQL Server which is out side of SAP?

Is this technically possible in ABAP? If so how? Please help me understand if some one has encountered this similar situation earlier.

Regards,

Jessica Sam

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
838

Yeah , you can do that using all DML commands in Native SQL

eg.



exec.
  Use SQL commands like update, insert etc.

endexec.

However you have to define the SQL database link while using the above commands.

Hope it helps,

Raj

5 REPLIES 5
Read only

Former Member
0 Likes
838

You can access the database using SQL native. In the reports you cam embed sentences with SQL code for manipulating an external database.

Read only

Former Member
0 Likes
839

Yeah , you can do that using all DML commands in Native SQL

eg.



exec.
  Use SQL commands like update, insert etc.

endexec.

However you have to define the SQL database link while using the above commands.

Hope it helps,

Raj

Read only

0 Likes
838

Thanks Rajat and Jorge,

So...we can access an external database outside of SAP from an ABAP Program...right?

So Rajat..you said i can use


exec.
  Use SQL commands like update, insert etc.
 
endexec.

And you also mentioned that I have to define the SQL databse link...how can i do it? do you have any sap documenattion link or some other place where all these steps have been detailed.

I am very knew to this and I have to write a program to insert data into an external database..

can you help me with the links to step by step procedure...

Regards,

Jessica Sam

Read only

0 Likes
838

Hello.

First, you need to connect to database:

EXEC SQL.

CONNECT TO dbs [AS con]

ENDEXEC.

And you need condigure the database in DBCO. Talk with your system administration to create the entry for the database.

Read only

former_member194669
Active Contributor
0 Likes
838