cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC Syncron message whit Update and select

Former Member
0 Kudos

Hi.

I'm trying to make an syncron (RFC <==> JDBC) message where I got an request from an RFC. This request should update an DB and then return with the updated fields.

The updata works fine, but I did not get the changed fields back in my responsmessage.

I use two mappingprogram. One for the update(RFC => JDBC and one for the respons JDBC = > RFC.

But my respons like like this.:

- <InsertStatement_response>

<update_count>1</update_count>

<insert_count>0</insert_count>

</InsertStatement_response>

I will be very happy if someone could give me an link to an exampel which describe this scenario.

Thanks/ perarne

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Thank's to all. I solved my problem with two syncronus message. One with the UpdateInsert and one with select.

former_member200962
Active Contributor
0 Kudos
But my respons like like this.:
- <InsertStatement_response>
<update_count>1</update_count> 
<insert_count>0</insert_count> 
</InsertStatement_response>

The response is quite valid.

This request should update an DB and then return with the updated fields.

Do a normal RFC_Req --> JDBC_Req mapping.....in the response mapping (JDBC_Resp to RFC_Resp) inlcude a JDBCLookup which will lookup (select) for the updated fields....then you can use the output of the lookup to send to RFC_Resp.

former_member208856
Active Contributor
0 Kudos

Take the help from below link :

/people/luis.melgar/blog/2008/05/13/synchronous-soap-to-jdbc--end-to-end-walkthrough

Use Stored Procedures at JDBC side for response.

OR

you can use 2 Asynchronous interfaces RFC - JDBC (INSERT DATA in table) & JDBC - RFC (SELECT DATA from Table).

Former Member
0 Kudos

I agree with Sandeep, usually i prefer to use a stored procedure to simplify management & better performance

Former Member
0 Kudos

Thanks for the response. You too spantaleoni.

This interface is trigged from the web( => SAP => PI =>JDBC) and I have trid with two Asynchronous interfaces but I have a problem when there is busy trafic in PI and the first message queue up.

Therefore I ment an synchronous message will be better.

Stored Procedures will be difficult/costly to set up on the on the AS400/iSeries.

/perarne

Former Member
0 Kudos

With stored procedure you have also better performance in db queue/sessions.

If you need an help to write the SP, don't hesitate to ask!

ps. why do you want to setup SP in AS400? What is your dbms software?

Former Member
0 Kudos

Hi again.

I do not want to do any changes in AS400.

The DB in AS400 is DB400.

I just want to make an SQL-call to DB and than return with the changes I did, as a receipt .

My sync message works, but I dont get back the changes.

/perarne

baskar_gopalakrishnan2
Active Contributor
0 Kudos

You cannot create Synchronous scenario using Update and respone as Select. One way is doing stored procedure. Other option is feasible too. Here it is...

RFC (Sender Request )---> JDBC (UDF) does update ---> JDBC ( Receiver Select Request) --> JDBC Select Response --> mapping --> RFC Response.

PI 7.1 Jdbc graphical lookup might not support insert , so you can use UDF for inserting data.

Refer this link too

/people/arpil.gupta/blog/2008/11/03/workaround-for-jdbc-scenarios