cancel
Showing results for 
Search instead for 
Did you mean: 

fundamnental question on jdbc sender adapter

Former Member
0 Kudos

Hi ,

I have a scneario like

DB System „³ JDBC Adapter „³ XI -„³ RFC Adapter „³ SAP R/3 --„³ True „³ response thru same RFC adapter „³ XI BPM will call JDBC Apdapter with Update statement

False „³ response thru same RFC Adapter „³ XI BPM will call File adapter with Append

now when i use send jdbc adapter , i wld need to have a status flag in my database which would be update when ever data is transmitted sucessfully else the same data would always be picked up .

i want to know do i need to create a reciever jdbc adapater too for this . because when ever i use sender jdbc adapter and this must be a very common situation . that i have to update the table so that the rows are not picked up again . jdbc senser has an update statement . writtng an updtae query will it not solve my problem.

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Amit,

If you do not want the rows once picked by your JDBC adapter to be picked up again, then you can write another query in the Update of your JDBC sender adapter. This will update the values in the table , so that the same row is not selected again.

Eg

SELECT QUERY

select * from table where flag ='true'

UPDATE QUERY

Update table set flag = 'false'

Regards,

Bhavesh

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Amit,

I would also suggest that you go through this link for JDBC adapter. It contains answers to your problems,

<a href="http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm">JDBC Sender Adapter</a>

Regards,

Bhavesh

Former Member
0 Kudos

but this update ie Update table set flag = 'false' would happen only when i dont get an error message from RFC .

Thats the way i would be sure that my messgae was posted sucessfully by the RFC program .

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Amit,

I guess in this case, you can give <b><TEST></b> for the update statement. You will have to make sure that the polling interval for your Jdbc Sender Adapter is is such that it is greater than the time it would take for your entire message to be processed by your BPM, including the update to your database.

Regards,

Bhavesh

Former Member
0 Kudos

so even in my scneario also dont i need to use sender jdbc adapater

bhavesh_kantilal
Active Contributor
0 Kudos

Amit,

<i>so even in my scneario also dont i need to use sender jdbc adapater</i>

I dont understand this interpretation of yours. you need to have a Sender JDBC adapter as it the adapter that is going to poll over your database and select the rows from your Database.

Regards,

Bhavesh

Former Member
0 Kudos

Sorry for the typo . wht i meant was Reciever jdbc adapater . You guys are very quick . You replied faster than i could coorect my mistake . Thanks for all your help and suggestion that i am getting

Former Member
0 Kudos

bavesh ,

what happens when i do a

SELECT QUERY

select * from table where flag ='true'

UPDATE QUERY

Update table set flag = 'false'

for my jdbc sender adapater and in between the select and the update query to be executed a new row is inserted into the database .

so the new row without being picked by the XI would also get update .

Plz share your thoughts on it

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Amit,

While configuring your JDBC adapter, you can set

<b>Database Transaction Isolation Level</b> wherein, you can lock your Database for updations when the Database is being accessed by your JDBS adapter.

by default, the transaction isolation is set to that of the Database, so, if your Database has been configured such that when one client is read / writing the table, the table gets write loacked, then there will be no issue.

For more info, chek the topic DATABASE TRANSACTION ISOLATION LEVEL in this link, <a href="http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm">Transcation Isolation</a>

Regards,

Bhavesh

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Amit,

A JDBC sender adapter has 2 essential fields,

1. SQL Statement

2. Update Statement

Your SQL statement will contain your SELECT statement and once your SQL statement is executed, UPDATE statement is executed. This is done so that records that have been selected by the SQL statement should not be selected again as the JDBC sender adapter will poll over the database for every poll interval.

If you want to SELECT something from your Database, then you will have to go for a JDBC sender adapter.

But, if you want to insert/update your Database, then you can go for a JDBC receiver adapter.

Multiple insertions are possible for a JDBC receiver, but multiple Selection queries (different select queries) are not possible for a single JDBC sender adapter.

Just check these links to understand how JDBC adapters work,

<a href="http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm">Configuring the Sender JDBC Adapter</a>

<a href="http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm">Configuring the Receiver JDBC Adapter</a>

A few initial steps required to be followed for your Scenario are:

1. Then create a sender agreement using jdbc o/b interface.

In receiver determination specify ur bpm as receiver.

In interface determination specify the abstract interface tht u created for jdbc.

(u should copy the jdbc interface and then create abstarct interfce of it)

No receiver agreement required for BPM.

2. Create receiver determination, using BPM and the abstract interface for legacy tht u created,

Receiver as legacy system.

Create Interface determination and receiver agreements.

Also see through this blog which talks about <a href="/people/saravanakumar.kuppusamy2/blog/2005/01/19/rdbms-system-integration-using-xi-30-jdbc-senderreceiver-adapter sender and receiver adapters</a>

Regards,

Abhy