cancel
Showing results for 
Search instead for 
Did you mean: 

through jdbc driver connect to sap

Former Member
0 Kudos

hi guys,

in java we writing program to connect to oracle using jdbc driver...

to get the data from the table like that

any way is there to connect to sap and retrieve the data... from the sap table...

without using bapi or idoc ........

with regards,

swathi

Accepted Solutions (1)

Accepted Solutions (1)

MartinHastik
Active Participant
0 Kudos

Hi,

you have to configure in your SAP J2EE server a DATA SOURCE ( with oracle jdbc driver) with Visual Administrator. This data source points to the Oracle database. Here you need the oracle database logon credentials. Then you can call this DATA SOURCE with JNDI in your java code and fire SQL statements. That is the standart in java/sql programming.

An other way to get data from a R/3 Table is to create a function module (type remote) that fetches the data with obensql (z.B. SELECT * FROM TABLE INTO TABLE IT_TABLE WHERE field =?????.)With JCo you can call this function module and get the internal table as interface. You can call this function module with Java WebDynpro and Adaptive RFC Model as well.

have a nice day

Message was edited by:

Martin Hastik

Answers (1)

Answers (1)

Former Member
0 Kudos

Dear Swathi,

You cannot directly commumicate R/3 tables directly without using JCo. You have to use BAPI or RFC's to get the data.

BAPI's are remote enabled and can be accesed in Java

where as RFC has limited usage i.e. within SAP environment only.

regards

Anil Dichpally

Former Member
0 Kudos

hi Anil Dichpally,

ok fine ,, in oracle we have queries like...

select * from emp; like that any queries are there to do manipulate the sap table

can i use this query in bapi via jco.. if yes, means plz give me coding lines....

with regards,

swathi

Former Member
0 Kudos

No Swathi, you dont write any kind of queries in SAP. You just call a BAPI and that BAPI will fetch the data from the database.

In BAPI's(ABAP Programming) we write the queries to fetch data.

please give points you are satisfied with the answer.

Former Member
0 Kudos

hi,

tell me the procedure .... to reward the points.....

thanks

Former Member
0 Kudos

Dear Swathi,

Next to the answers that i have sent to you'll find three radio botton's with diffrent options namely 10 points, 6 points and 2 points.you can select any of the above options to allocate the reward poins.

thanks and regards

Anil Dichpally