2009 Jul 29 1:53 PM
Hi expert,
i'm trying to connect my sap system(in UNIX platform) to a sql server.
I tried to do this by ODBC connection with dbmssslib.dll in a sap system on windows and it works.
The customer have a sap system on UNIX, so the connection by ODBC doesn't work, i would like to connect it using abap statement(JDBC getconnection).
Someone can help me?
thanks in advance.
ciao
Hi expert,
i'm trying to connect my sap system(in UNIX platform) to a sql server.
I tried to do this by ODBC connection with dbmssslib.dll in a sap system on windows and it works.
The customer have a sap system on UNIX, so the connection by ODBC doesn't work, i would like to connect it using abap statement(JDBC getconnection).
Someone can help me?
thanks in advance.
ciao
2009 Jul 29 2:20 PM
Hi,
Put your Query on Database and OS Platform instead of ABAP Development, I think you get some positive reply by that.
Thanks.
Edited by: Sarbajit Majumdar on Jul 29, 2009 6:50 PM
Edited by: Sarbajit Majumdar on Jul 29, 2009 6:50 PM
2009 Jul 29 2:28 PM
Hi,
i need to get the query data in SAP system, for example in a Function Module.
Regards.
Claudio.
2009 Jul 29 5:45 PM
My suggestion is like this:
1. Have your basis team create a connection to the sql server. They do it with transaction DBCO.
2. In your ABAP program you need to use native SQL to connect to the database and select data. For example the code below works for an external Oracle database.
DATA: conn like dbcon-con_name.
conn = 'SRV001'.
EXEC SQL.
connect to :conn
ENDEXEC.
EXEC SQL.
set connection :conn
ENDEXEC.
EXEC SQL.
OPEN C FOR
SELECT * from TBLA
WHERE ....
ENDEXEC.
DO.
EXEC SQL.
FETCH NEXT C INTO :wa
ENDEXEC.
IF sy-subrc NE 0.
EXIT.
ENDIF.
APPEND wa TO itbl.
ENDDO.
EXEC SQL.
CLOSE C
ENDEXEC.
Cheers, Gabriel
2009 Jul 29 7:21 PM
Hi Gabriel,
i have a system on Unix so i think to miss any libraries for use a DBCO connection.
this is the errore if i try your suggestion:
As well as the standard connection, an attempt was made to set up
another database connection, under the specified ID. The Shared Library
for this second database could not be found.
The Shared Library is usually found in the the Executable
directory (profile parameter DIR_LIBRARY) under the name dbs
<dbs>slib<os_ext>. <dbs> stands for the database type and <os_ext>
stands for the operating system-specific extension of the Shared
Libraries.
The database type is determined from the entry that corresponds to the
specified DB ID in the table DBDCON. Check whether the data in this
entry is correct.
do you have an idea how can i connect by JDBC ?
thanks a lot.
Claudio
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |