10-16-2008 10:57 AM
Hi,
I need to get some data from an external database (sql server).
--> I must make some request from my abap program to the sql server
Is there some RFC or ADO equivalent in sap ?
Any idea ? : )
Thx,
10-16-2008 11:18 AM
Hi,
Check these.
[http://www.sapfans.com/sapfans/forum/intface/messages/4013.html]
and one solution with code here.
[http://sap.ittoolbox.com/groups/technical-functional/sap-dev/connecting-sql-server-from-abap-627539]
Rhea.
10-16-2008 11:18 AM
Hi,
Check these.
[http://www.sapfans.com/sapfans/forum/intface/messages/4013.html]
and one solution with code here.
[http://sap.ittoolbox.com/groups/technical-functional/sap-dev/connecting-sql-server-from-abap-627539]
Rhea.
10-16-2008 11:36 AM
I heard about table DBCON which could be usqed with an EXCED SQL statement.
->Someone know how to configure DBCON to connect to an external database (mss) ?
It would be the better solution for my program but I ve never seen any sample use it 😕
10-16-2008 11:43 AM
Read this
[HELP|http://help.sap.com/saphelp_nw70/helpdata/en/9c/d736b880c34f76b507bac7751a0474/content.htm]
[http://www.sapfans.com/forums/viewtopic.php?t=53626&highlight=dbcon+aix]
[http://www.sapfans.com/forums/viewtopic.php?f=13&t=257505&p=935274]
Rhea.
10-16-2008 2:41 PM
Thx for replies,
I have data in an MicrosoftSqlServer and I must import them into my SAP system.
I would like to get the data with native SQL like this way :
tables: dbcon.
data: FLAG_CONNECTED(1),
v_conn like dbcon-CON_NAME.
*v_conn = 'MAR62'.
select single con_name from dbcon into v_conn where DBMS = 'MSS'.
EXEC SQL.
set connection :v_conn
ENDEXEC.
-> I have made an entry in DBCON and i ve try to add it in DBACOCKPIT but I get an error :
function unit: DB6_DIAG_GET_SYSTEM_BASICS
method : SYNCHRONIZE_SYSTEM_DATA
REASON : ADBC ERROR
What is the excact way to run my sample ?
thx for replies : )
10-17-2008 10:00 AM
Hi,
Follow these notes 323151 and 178949. And search in SAP Market place there are many notes to help you.
Rhea.
10-17-2008 11:27 AM
Hi,
Try This
EXEC SQL.
CONNECT TO 'FP_CONNECT'
ENDEXEC.
IF sy-subrc NE 0.
WRITE / 'CONNECTION FAILED' COLOR COL_NEGATIVE.
ENDIF.
EXEC SQL PERFORMING READ_DATA.
SELECT *
FROM TABLE
INTO STRUCTURE.
ENDEXEC
FORM READ_DATA.
WRITE : / STRUCTURE.
ENDFORM
Hope this will read data from External Data base table or view.
Thanks,
Kishore