cancel
Showing results for 
Search instead for 
Did you mean: 

R3 --> XI --> DB (JDBC)

Former Member
0 Kudos

Hello Everybody,

This is my first post, so please forgive me for any mistakes.

I am working on a project which requires for me to write a report which connects to an external database, I would like to use XI to create this connection.

Is there any detailed information on how to go about doing this? I mean I have read plenty of blogs and articles but I have gone so far as to installing the Oracle drivers, created data types and message types for a test connection. but I am not able to get past that.

Can somebody please help?

Thanks so much in advance and I will keep researching.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi,

for connection to the JDBC .. Oracle database you would need to configure the reciver JDBC Channel with the following parameters

URL: jdbc:oracle:thin:@<hostname>:<port no><by default1521>:orcl

Username: <Username to connect>

Password: <password>

Rgds

Aditya

Former Member
0 Kudos

I have done that, is there any way of testing that this Communication Channel works?

Former Member
0 Kudos

Hi,

if you want to test the connection only you can do so by just write a java code so that u can test the connection

import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.ResultSet;

import java.sql.SQLException;

import java.sql.Statement;

public class TestClassForNameNewInstanceApp {

public static void main(String args[]) {

try {

Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();

} catch (ClassNotFoundException e) {

System.out.println("Oops! Can't find class oracle.jdbc.driver.OracleDriver");

System.exit(1);

} catch (IllegalAccessException e) {

System.out

.println("Uh Oh! You can't load oracle.jdbc.driver.OracleDriver");

System.exit(2);

} catch (InstantiationException e) {

System.out

.println("Geez! Can't instantiate oracle.jdbc.driver.OracleDriver");

System.exit(3);

}

Connection conn = null;

Statement stmt = null;

ResultSet rset = null;

try {

conn = DriverManager.getConnection(

"jdbc:oracle:thin:@dssw2k01:1521:orcl", "scott", "tiger");

stmt = conn.createStatement();

rset = stmt

.executeQuery("select 'Hello '||USER||'!' result from dual");

while (rset.next())

System.out.println(rset.getString(1));

rset.close();

rset = null;

stmt.close();

stmt = null;

conn.close();

conn = null;

} catch (SQLException e) {

System.out.println("Darn! A SQL error: " + e.getMessage());

} finally {

if (rset != null)

try {

rset.close();

} catch (SQLException ignore) {

}

if (stmt != null)

try {

stmt.close();

} catch (SQLException ignore) {

}

if (conn != null)

try {

conn.close();

} catch (SQLException ignore) {

}

}

}

}

Rgds

Aditya

Former Member
0 Kudos

>>write a report which connects to an external database

Could you please explain what type of report is this?

Thanx

Aamir

Former Member
0 Kudos

Ok, this report (Program) will query an Oracle database get data from the tables and then process this data comparing it to our SAP records, and then display results.

Former Member
0 Kudos

>>this report (Program) will query an Oracle database get data from the tables

This is what i wanted to know:)

So your scenario is R/3 to JDBC(Sync)

You can either use RFC or Proxy on R/3 side,and for receiver side create a synchronous inbound message interface,no outbound interface is required in case you are using RFC as a sender,for proxy you need to define a Outbound interface.

Then do the regular ID steps.and you are done

Thanx

Aamir

Former Member
0 Kudos

Hi

is this two senarios?

is it only one syncronous senario?

if data has to be taken from DB and then sent to SAP for checking then it would be a Sender JDBC channel u need to configure

Please confirm on wht the real senario is?

As per my understanding you need to pick values from a table and then compare it in the SAP R/3

get the response and then make the necessary changes to the tables

This would require a sender JDBC and is one synchronous senario

Rgds

Aditya

Former Member
0 Kudos

Thanks Aamir

I think I am on the right path since I am doing exactly what you described. I guess my question is that I wanted to know if there is any step by step guide I could follow for this scenario?

Thanks so much for the help.

Former Member
0 Kudos

Is just one scenario, a synchronous call to the database I don't need to do any updates to the oracle db, just read data

Former Member
0 Kudos

Hey

yeah,its one single scenario.

You can have a look at the below blog,its HTTP to JDBC but is pretty much the same as RFC to JDBC

Thanx

Aamir

Former Member
0 Kudos

I do not need a BPM for this right?

Former Member
0 Kudos

No, You don't need to use BPM for this.