cancel
Showing results for 
Search instead for 
Did you mean: 

DB2-XI-R/3 synchronous

Former Member
0 Kudos

Hello All,

We are building XI scenario for the synchronous communication between database and R/3.

<b>Our requirement is :</b>

i. Select database records from table " CROSSLINK" and update in R/3 using RFC.

ii. After the successful update in the R/3 we want to update a flag in same table in DB2 i.e "CROSSLINK".

1. Do we need to use BPM in this case ?

2. Could some body guide me best approach for this scenario with steps in brief.

I am specifically looking design steps for the flag update in DB2 table.

Thank you all,

RV.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi ravi,

follow these steps in BPM

Receive -


send(synch)----


send(Asynch)

(JDBC sender) R/3 (JDBC

Receiver Update|Insert)(for updating db2.

These steps might be helpful in your scenario

Thanks and Regards

Kausik

Answers (2)

Answers (2)

Former Member
0 Kudos

Ravi,

Do you need data from the RFC call response to update the flag in the DB table, or are you just updating a "Record Processed" flag in the DB table?

If you are just updating a "Record Processed" flag then you can avoid using BPM and use the 'Update SQL Statement' parameter in the JDBC Sender Adapter. It will execute a SQL statement after XI has successfully received the data from the database.

Also, be sure to use the default DB transaction level (SERIALIZABLE) in the JDBC Sender Adapter so that the update statement only updates records that were present in the DB at the time the Select SQL statement was executed.

I'm not sure if this is your scenario, but if it is you can simplify your interface using this method.

Thanks,

Jesse

Former Member
0 Kudos

Jesse,

Even though I have update statement which I can use, we want to get data from R/3 and update the data DB2.

Thanks for your reply,

RV

Former Member
0 Kudos

Hi Bhavesh,

I am alomost done with my design for this scenario. After I completing the interface mapping I have "1 in source" and "1...unbounded" in the target and tryied to read the interfaces I am only getting request interfaces, but when I changed the target occurances to "1" I am able to see both request and response.

The occurances in the <b>message</b> tab of message mappings are:

1. For DB2 to RFC : Source (1) and Target (1 ...unbounded)

2. For RFC to DB2 : Source(1.. unbounded) to Taget 1

Please let me know where I have to change here.

Thanks for your help.

Ravi

bhavesh_kantilal
Active Contributor
0 Kudos

hi ravi,

<i>1. Do we need to use BPM in this case ?</i>

Yes, we do need a BPM in this case.

Steps:

1. Sender JDBC adapter -- Selects rows from your DB2 Database table CROSSLINK.

2. RFC SYNCHRONOUS call -- Updates the R3 table, and then gets the response back so that the DB2 Table can be updated.

3. Receiver JDBC adapter making an UPDATE call on the DB2 table , to set the flag.

2 mappings are needed.

1. map the JDBC sender data to RFC request message.

2. map the rfc response to create the DB2 table updation data.

In your BPM,

1. Receive Step -- Transform Step -- Send Synchrnously -- Transform -- Send Step.

Regards,

Bhavesh

Former Member
0 Kudos

Bhavesh,

As per your suggetion, I started working on this scenario and I have a question regarding the message mapping occurances in the <b>"messages"</b> tab of message mapping editor.

1. For Sender of DB2 I chosen 1 and for Receiver RFC 1 ..Unbounded ( due to mutiple rows from db2).

2. Similarly from RFC to DB2 do I need to choose "1..unbounded" and "1" respectly as I will be getting multiple status messages from RFC response ?

In this case I will have to change my interface mapping as well right ?

Thanks

RV

bhavesh_kantilal
Active Contributor
0 Kudos

hi ravi,

As you will have multiple rows selected from your Database table, RFC request will be 1.. unbounded , and so, your SEND SYNCHRONOUSLY step has to be in a BLOCK with either for each or PAR FOR EACH.

Also, as RFC will return Multiple response, response occurence will be 1.. unbounded. The JDBC Datatype occurcence will be 1..1 , just change the occurence of the STATEMENT in your JDBC insert to 0 to UNBOUNDED and it should work fine.

Do let me know if you have any further clarifications,

Bhavesh

Former Member
0 Kudos

Bhavesh,

Currently I have the BPM as bellow based on earlier messages from you. Do I need to put the "send Synchrnous" in a block and use for each ? Could you give me more details on this ?

<b>BPM :</b>

Receive Step -- Transform Step -- Send Synchrnously -- Transform -- Send Step.

I do not think I need to create abstract interfaces for RFC for the R/3, please clarify.

Message mapping occurances:

I have changed the occurances as you said in the message mapping and looks good now. Do I need to make any changes in the "interface mapping" occurances after this ?

Thanks

RV

bhavesh_kantilal
Active Contributor
0 Kudos

hi ravi,

yes, you need to define a BLOCK and use either for each or PAR for each to send the RFC request message.

When doing the transformation step from JDBC request to RFC request, make sure that RFC request is a multiline element and then give the BLOCK with the SEND SYNCHRONOUS step.

You will also need to make the change in the INTERFACE MAPPING to change the occurance to 0 to unbounded.

BPM interacts only with ABSTRACT IBNTEFACES and so, all interfaces for BPM including RFC request and response interface needs to be ABSTRACT.

Also, even though the RFC call is synchronous, ASYNCHRONOUS ABSTRACT interfaces needs to be created to request and response RFC messages.

Regards,

bhavesh

Former Member
0 Kudos

Bhavesh,

Regarding the RFC synchronous I am little confused when I looked at this web log

/people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit .

In the above weblog Arpith Did not create ABSTRACT intefaces for synchrnous calls to SAP using RFC calls in BPM. Ofcourse I am using the JDBC calls instead of file in my case.

Could you clarify me on this ? So in my scenario how many ABSTRACT interfaces I have to create then ?

Thanks

RV