cancel
Showing results for 
Search instead for 
Did you mean: 

jdbc response

Former Member
0 Kudos

Hi

I have a sync proxy to jdbc scenario.

proxy inserts lets say 1000 records into the database table. Can a response be sent back to proxy from PI which says , the number of records inserted ?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Yes, it is possible in PI.

You have to make the receiving message interface of JDBC synchronous.

When records are inserted into databse, the response is given in terms of number of records inserted, by default.

Only thing is you have to cature this, and so the synchronous interface is required.

Let us say the request message for Synchronous interface is Insert_Request.

Then the response message type has to have the name Insert_Request_response.

In this message type(Insert_Request_response), you have to add the 1field say insert_count.

At runtime, the value of this field will have the number of rows inserted into database.

Then you can map this filed, as per your requirement and deliver it to SAP end.

-Supriya.

Answers (1)

Answers (1)

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

yes, it is possible,

you have to configure the proxy as Sync and make sure that the Store procedure you call return the response you need. it is a simple sync scenario.

lets say that the structure of the proxy is:

request:

<root>

record1

record2

record3

record4

....

record1000

</root>

response

<root>

<ResponseDetials>Numbers of records inserted 1000 </ResponseDetials>

<Root>

Edited by: Rodrigo Alejandro Pertierra on Sep 8, 2010 1:13 PM

Former Member
0 Kudos

hi

on receiving end there is no stored procedure ,it is a simple table. we are inserting proxy records into a table, but can an acknowledgment be sent to synchronous proxy that records 1000 records have been inserted so that sap could go to next step in its workflow ?

Thanks

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

why dont you create an SP that update this table and send a response back? there no complicated. also its provides abstraction from the table itself wich is recommended.

segguest that solution and lets us know

if not try with

action=UPDATE_INSERT

The statement has the same format as for the UPDATE action. Initially, the same action is executed as for UPDATE. If no update to the database table can be made for this action (the condition does not apply to any table entry), values of the table described in the <access> element are inserted in accordance with the description of the action INSERT. <key> elements are ignored in this case.

The response document has the following format; one of the two values is always 0 because either an UPDATE or an INSERT action is always executed:

<update_count>count</update_count>

<insert_count>count</insert_count>

Rodrigo P-.

Edited by: Rodrigo Alejandro Pertierra on Sep 8, 2010 1:35 PM

GabrielSagaya
Active Contributor