cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC Adapter:- How does it work??

Former Member
0 Kudos

Dear Friends,

I would like to know the nuts and bolts of JDBC adapter.

1.)How does it work internally?Internally what does sap use?

2.)In my scenario i just need to access a sap table so Can i write my Java JDBC program to access it.?

3.)Is there any other way to sent data from Idocs to map to a external database with out using XI.?

thx,

jeevan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Jeevan,

As far as the JDBC adapter goes, internally it uses, obviously JDBC (Java DataBase Connectivity). Thus all the calls from this adapter are internally SQL Queries (Either Select, Insert, Update, Delete, Execute Stored Procedure) that are sent using Java JDBC API.

In Sender Configuration, it needs a Select and an Update query to be configured into it. It polls the External Database at specific intervals (Polling Interval in the Channel Configuration),i.e., it connects to the Database via a JDBC Connection and runs the select query. The data from the query is sent to XI as an XML Document. The update query is used to update the DB such that the same data is not picked again in the next poll. This is generally done through a status field. The select query's Where clause should pick records with one status and the update should change all those statuses so that the select does not pick them again. Click [Here|http://help.sap.com/saphelp_nw70/helpdata/EN/22/b4d13b633f7748b4d34f3191529946/frameset.htm|SAP Help on JDBC Sender Adapter] for more details, including the format of the XML file sent.

In receiver configuration, the channels creates SQL statements from the XML Document it receives. This can be either Select, Insert, Update, Delete or Stored Procedure Call Statements. This requires you to give the receiver channel an XML Document in a pre-defined Schema. Click [Here|http://help.sap.com/saphelp_nw70/helpdata/EN/22/b4d13b633f7748b4d34f3191529946/frameset.htm|SAP Help on JDBC Receiver Adapter] for more details including correct XML Schemas. Note that the kind of SQL Statement generated (Select, Update, etc) is dependent on the schema provided.

Hope this was helpful!!!

Thanks,

Guru

Former Member
0 Kudos

Hai Guru,

thx for ur reply.

Now the idea is bit clear.

Someone told me that we can write a JDBC program and access SAP r/3 database and get data out of that .

Do u think this is POSSIBLE.If yes then what is the need of BAPIs and IDocs.

thx,

jeevan

prateek
Active Contributor
0 Kudos

Someone told me that we can write a JDBC program and access SAP r/3 database

Usually SAP does not allow or recommend this. RFC, idocs are proper way.

Regards,

Prateek

Former Member
0 Kudos

Hi Prateek,

Thanks for the reply .Do u say someone knowing our DDIC password can access SAP database using a JDBC program .

Then Can you pls list the advantages and disadvantages of such a approach.

thanks,

jeevan

prateek
Active Contributor
0 Kudos

Actually u should even think of direct update options on SAP systems. This is simply not recommended bcoz usually the SAP tables are cross referenced and manual update may lead to overall database inconsistancy. Y to invite problems :).

Regards,

Prateek

Former Member
0 Kudos

Hi,

Prateek you are right, ""Y to invite problems.""

The only reason I started this thread is ..I was astonished by such a proposal .

anyways thx for ur replies...

Regards,

jeevan

Answers (4)

Answers (4)

former_member192295
Active Contributor
0 Kudos
Former Member
0 Kudos

Hi Kumar,

1.)How does it work internally?Internally what does sap use?

a)The JDBC adapter enables you to connect database systems to the Integration Server or the PCK. The adapter converts database content to XML messages and the other way around.

Database content can be read with any SQL statement, including stored procedures. A special XML format is defined for content coming from the Integration Server or PCK. This format enables SQL INSERT, UPDATE, SELECT, DELETE, or stored procedure statements to be processed. A message is always processed in exactly one database transaction.

2.)In my scenario i just need to access a sap table so Can i write my Java JDBC program to access it.?

A) No it is not possible there should some interface so that it can understand that format

3.)Is there any other way to sent data from Idocs to map to a external database with out using XI.?

a) Yes u can go with ALE

Thanx

Sampath

Former Member
0 Kudos

Hi,

1. How does it work internally?Internally what does sap use?

Ans: I am not sure about this, but according to my knowledge by using the derivers only it connects to the Jdbc.

2. In my scenario i just need to access a sap table so Can i write my Java JDBC program to access it.?

Ans: No in the sender Jdbc communication channel you mention the drivers and write the select statement.

3. Is there any other way to sent data from Idocs to map to a external database with out using XI.?

Ans: If the receiver side is SAP R/3 then by using the ALE we can send.

For sender side Jdbc adapter

http://help.sap.com/saphelp_nw2004s/helpdata/en/1d/756b3c0d592c7fe10000000a11405a/frameset.htm

For Receiver side Jdbc adapter

http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm

Former Member
0 Kudos