‎2009 Apr 09 4:53 AM
I am working on 4.6C. How can i connect to SQL Sever database ? I am new to this type of concept. Kindly do provide some suggessions !!!
‎2009 Apr 09 5:27 AM
I came across the SAP Note 178949. Has anyone implemented this type of connection ?
‎2009 Apr 09 5:00 AM
Hi,
In general, if we want to hit database directly, we use..
EXEC.
ENDEXEC.
ex:
DATA: BEGIN OF wa,
connid TYPE spfli-connid,
cityfrom TYPE spfli-cityfrom,
cityto TYPE spfli-cityto,
END OF wa.
DATA c1 TYPE spfli-carrid VALUE 'LH'.
EXEC SQL PERFORMING loop_output.
SELECT connid, cityfrom, cityto
INTO :wa
FROM spfli
WHERE carrid = :c1
ENDEXEC.
FORM loop_output.
WRITE: / wa-connid, wa-cityfrom, wa-cityto.
ENDFORM.
‎2009 Apr 09 5:09 AM
HI RamMohan,
I agree with your code of connecting to the database of ours. How to connect to the external SQL Server database ?
‎2009 Apr 09 5:09 AM
‎2009 Apr 09 5:27 AM
I came across the SAP Note 178949. Has anyone implemented this type of connection ?
‎2009 Apr 09 5:51 AM
Check SAP Note 323151 Several DB connections with Native SQL
‎2009 Apr 09 5:51 AM
Manjunath CN
Hi,
Your didnu2019t separately install SQL Server database, only for SAP recommend SQL server dada base connected ,
Regards,
Ansari.
‎2009 Apr 09 5:57 AM
Hi,
Refer this post, steps are mentioned regarding establishing connection to external database. Transaction DBCO will be used for that. Ask your BASIS guy to do this.
Example code is also mentioned which also help.
[https://forums.sdn.sap.com/click.jspa?searchID=-1&messageID=7272587]
Hope this one helps you alot.
Regards,
Brajvir
‎2009 Apr 09 6:50 AM
Hi,
from the sequence of replies, I would like to say a word like,
Instead of using the EXECUTE statements to connect to that database, get their data, cant we Create a BOR object(BAPI) and give them so as to pass the data. Based on that data, we will do the transactions in SAP.
Kindly let me know the comments.
‎2009 Apr 09 6:53 AM
i go with ur idea, infact SAP do the same with other instances.
thanq
Edited by: SAP ABAPer on Apr 9, 2009 7:53 AM