2009 Apr 15 11:09 PM
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
2009 Apr 16 10:28 AM
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
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
2009 Apr 16 10:24 AM
You can access the database using SQL native. In the reports you cam embed sentences with SQL code for manipulating an external database.
2009 Apr 16 10:28 AM
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
2009 Apr 16 4:58 PM
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
2009 Apr 16 5:20 PM
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.
2009 Apr 16 5:19 PM
You need to use DBCON
Please check this link
https://forums.sdn.sap.com/search.jspa?threadID=&q=dbcon&objID=f50&dateRange=all&numResults=15
a®