cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC-> RFC - > JDBC How to send result set to rfc ?

former_member189387
Active Contributor
0 Kudos

Hi Friends ,

I am working on scenario like .

<b> I have to read data from a sql server using select statement and send same data to r3 ( using RFC we are inserting the same as a copy ) .

Then i have have get confirmation from R3 as data inserted succesfully - Flag .Then we have to come back to same table and update one field flag as 'U'.</b>

For this I am using JDBC Sender Adapter and RFC Receiver Adapter .Will i use as Synchronous Interface ?

I think i have to use JDBC Receiver Adapter also to Complete the cycle .

Can you please clarify the following....

1. how is that whole selected data will send to R3 . If i use Select statement in JDBC Sender Adapter it will as resultset .It will contain Multiple Rows right ? Our RFC Will accept the parameter as string .

2. If we use the synchronous Interface will it send row by row from the result send Then get back the result from R3 and come back again to JDBC ( Database ) and update the required field ?

3. In JDBC Sender Adapter , the Update Parameter doing the Updation Part prior to get the status from R3. How to handle this ?

4. Do i need to configur teh separate JDBC Receiver adpater for this updation part ? Then We cann't use Synchronous Interface right ?

5 . Will JDCB Sender Adapter get the result set (by select statement ) and send to r3 as row by row and get the confirmation message as inserted ?

Best Regards .,

V.Rangarajan

Accepted Solutions (1)

Accepted Solutions (1)

udo_martens
Active Contributor
0 Kudos

Hi Rangarajan,

the JDBC adapter will give you the result as XML message, not row by row. To transfer the JDBC output, for example into RFC, is a mapping task.

BPM is required, your sceario could be:

JDBC (sender) -> BP

BP <-> RFC (synchronous)

BP -> JDBC (receiver)

Regards,

Udo

former_member189387
Active Contributor
0 Kudos

Hi Udo ,

Thanks for your reply . If i have used the synchronnous RFC Calls , that RFC will return the flag as 'Y' or 'N' , for Either succesfully inserted or Not successful .

In this synchronous how can i use the JDBC Receiver adapter ?

If 'Y' or 'N' I have to update the<b> same table ,same row</b> which have sent to RFC . My doubt , we are wrirtng the SQL select query as " <b>select * from table name where UpdateStatus is null</b> " .

So it will return multiple rows right ? I have to uses the synchronous response form RFC to update the row of the same table using JDBC Adapter right ?

Can you please explain me little bit more ? I am new to xi .

Best Regards .,

V.Rangarajan

former_member189387
Active Contributor
0 Kudos

Hi Udo ,

Is it possible to update the Same table after all data is inserted seccesfully by RFC ?

Then how the synchronization play a role here ?

Can you please explain me in detail ?

Thanks for sparing your valuable time

Expecting your reply asap .

Best Regards .,

V.Rangarajan

justin_santhanam
Active Contributor
0 Kudos

Rajan,

As I said in my previous reply, why can't u split the messages for each row and send to RFC, and get back the response and update the table for particular record.

Best regards,

raj.

former_member189387
Active Contributor
0 Kudos

Hi Raj ,

Thanks for youer reply . I am working on that .I will let you know as soon as i finished .

Regards .,

V.Rangarajan

Answers (2)

Answers (2)

justin_santhanam
Active Contributor
0 Kudos

Rajan,

Check whether the below design fits ur scenario.

I'm using BPM.

Step1 : Receive data using sender JDBC adapter.

Step2 : Transformation (Mapping program for splitting the multiple rows into each single message).

Step3 :Block (For Each - Here we have to get each rows )

Step4: Transformation (Mapping program to map row to RFC request).(Inside block)

Step 5: Send synhronously(Inside Block)

Step 6 : Switch (Check condition response from RFC , say flag =U)

Step 7: Switch Branch 1 - Send Asynch( To update database for this particular record).

Step 8: Switch Otherwise branch (? - what condition u want)

Best regards,

raj.

Former Member
0 Kudos

Hey

>>I think i have to use JDBC Receiver Adapter also to Complete the cycle

NO ,you only have to use use one message interface,outbound sync for JDBC,for RFC u dont need to create any Message interface.

then do the request and response mapping and create one interface mapping.

next in ID you need to create a JDBC sender CC and a RFC receiver CC.

and then the usual pipeline steps.

have a look at the following

/people/community.user/blog/2006/12/12/http-to-rfc--a-starter-kit

/people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-150-step-by-step

/people/siva.maranani/blog/2005/09/16/xi-how-to-on-jdbc-receiver-response

/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30

thanx

ahmad