Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

retrieve data into ABAP program from external Oracle database

Former Member
0 Kudos

Gurus,

I reviewed bunch of links regarding DBCON, tnsnames.ora settings and all that and still could not get the connection working:

Need is to connect from within SAP (SAP_ABA and SAP_BASIS = 640) to a imaging system called Filenet (oracle database). I got the Basis folks to put in tnsnames.ora entry with the SID, server name and Port number.

IDB =

(DESCRIPTION =

(SDU = 4096)

(ADDRESS_LIST =

(ADDRESS =

(COMMUNITY = sap.world)

(PROTOCOL = TCP)

(Host = <Server name>)

(Port = 1521)

)

)

(CONNECT_DATA =

(SID = IDB)

(GLOBAL_NAME = IDB.world)

)

)

I configued an entry in DBCON table:

CON_NAME = 'FILENET'.

DBMS = ORA

User name and password

CONV_ENV = <Server name>

DB_reco = space.

and zeros in max_connections and opt_connections

Then I used this straight forward code in a program:

DATA con_name LIKE dbcon-con_name VALUE 'FILENET'.

EXEC SQL.

CONNECT TO 'FILENET' as 'C1'

ENDEXEC.

EXEC SQL.

SET CONNECTION 'C1'

ENDEXEC.

and I have been getting sy-subrc = 4 on both statements. I didnt write the real SQL code to connect to the tables yet, as I guess there is no point at this time.

My basis folks are lost on this and they are not able to resolve the problem. Can you guys help me with tools to find the problem out.

Do I need any entries in DBCONUSR?

Are Basis guys missing something - some settings?

How do I trace whats happening to the request. The basis guy showed me the log and I wasnt able to grep the server name or the alias (FILENET). Please help me get to the bottom of this.

Thanks

Sri

1 ACCEPTED SOLUTION

former_member181966
Active Contributor
0 Kudos

Well .. According to my understanding. Under the following possibilities you can read the data from external data base

- SAP connectors

- RFC function which listen both sides!!

Like we did it in one project with egate , we have an RFC which connect to egate server and on e*gate they have register our SAP server with SAP gateway parameters .

After that we are able to see the connection if its establish or not in t-code !!SMGW .

try to see in SMGW . Any connection you see there ?

Hope this’ll give you some idea.

Thanks

Message was edited by: Saquib Khan

2 REPLIES 2

former_member181966
Active Contributor
0 Kudos

Well .. According to my understanding. Under the following possibilities you can read the data from external data base

- SAP connectors

- RFC function which listen both sides!!

Like we did it in one project with egate , we have an RFC which connect to egate server and on e*gate they have register our SAP server with SAP gateway parameters .

After that we are able to see the connection if its establish or not in t-code !!SMGW .

try to see in SMGW . Any connection you see there ?

Hope this’ll give you some idea.

Thanks

Message was edited by: Saquib Khan

0 Kudos

Saquib,

Thanks for the response. We finally figured out that the conv_env in the dbcon table should have the same alias 'IDB.world' as in the tns.ora file. This solved the problem. I appreciate your time and the suggestion for alternate solution.