2006 Mar 27 12:48 PM
Hello;
I'm SAP to connect oracle server. And 3.party application database to prepare query and call procedure.
I'm know use to native sql. But Not connect SAP to oracle server. Please help me.
Thanks.
2006 Mar 27 12:54 PM
AFAIK you have to use the ABAP statement EXEC / ENDEXEC to execute an sql statement like 'set connection' ...
2006 Mar 27 12:54 PM
AFAIK you have to use the ABAP statement EXEC / ENDEXEC to execute an sql statement like 'set connection' ...
2006 Mar 27 1:13 PM
Hi,
Check this sample.
Displaying an Extract from the Table AVERI_CLNT:
DATA: BEGIN OF WA,
CLIENT(3), ARG1(3), ARG2(3),
END OF WA.
DATA F3(3).
F3 = ' 1 '.
EXEC SQL.
SELECT CLIENT, ARG1 INTO :WA FROM AVERI_CLNT
WHERE ARG2 = :F3
ENDEXEC.
WRITE: / WA-CLIENT, WA-ARG1.Regards
Vijay
2006 Mar 27 1:39 PM
Ive already known the Native SQL; but i dont know how to connect to the oracle server or requirements for this connection.
2006 Mar 27 1:45 PM
2006 Mar 27 1:47 PM
hi,
you need to have some dll file , if you need to connect to the external server. check it .
Regards
Vijay
2006 Mar 27 1:55 PM
Hi,
Step 1: Create an entry for the External database in DBCON table using Trxn: DBCA.
Table: DBCON (Description of Database Connections)
Field Name Description Value (For: E.g.:)
CON_NAME Logical name RAJ
DBMS Database system MSS
USER_NAME Database user <username>
PASSWORD Password <pwd>/<pwd>
CON_ENV Database-specific information
connection
MSSQL_SERVER=depotserver MSSQL_DBNAME=HOF_INDORE
DB_RECO Availability type for an open database connect
Step 2: Now you can write code to connect to the external database
Your Sample code can be something like this
EXEC SQL.
CONNECT TO 'RAJ' AS 'V'
ENDEXEC.
EXEC SQL.
SET CONNECTION 'V'
ENDEXEC.
*- Get the data from MS-SQL Server
EXEC SQL.
open C1 for
select
loc_id,
loc_name,
loc_state
from ho_loc_mast
ENDEXEC.
Regards,
Raj
2006 Mar 28 12:31 PM
Is it necessary to make a configuration about dll or tnsnames in SAP or in the other database ?
If yes, how must be the configuration like?
2010 Dec 08 9:52 AM