cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronous JDBC Call Commit

Former Member
0 Kudos

Hi All,

I have a Synchronous RFC(SAP) to Database(Oracle) scenario, the call to Database is via Stored Procedure in which i am inserting some data in database and returning a status flag back. I have two queries here:

1. What if the stored procedure is executed successfully, I get a status flag as "Success" from database and just before the response was sent back to SAP there is some comunication failure or any error while connecting XI to SAP. What will happen to the data inserted in table. Will it be still commited or rollback? As it is Synchronous process the data should not be commited untill the requestor system gets back the response. Any clues on this?

2. I need to pass a table type(basically a dyncamic array) as one of the parameters while invoiking Stored procedure. How it can be done?

I am connecting to Oracle 10g.

Looking for some quick answers.

Thanks

Amit

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

1. This will work in two ways either the call will be completed even if the connectivity failure due the the Queue instance maintained for message transition OR the message will be recalled back stating with the error in XI as communciation failure on response side.

2. You can pass it as string from XI and then Modifiy it in Stored procedure or use SQL data type

refe

http://help.sap.com/saphelp_nw04s/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm

Thanks

Swarup

Edited by: Swarup Sawant on Jun 11, 2008 7:42 PM

Former Member
0 Kudos

Hi,

My question is what will happen to the data in the database. Will it be commited or rollback? As I got the response back from Stored procedure but just before sending the response back to the SAP the connection failed.

Regarding second query I need to pass values dynamically, for ex i am passing employee Id to SP, I am not sure how many records of employee id will come from source system, it can come twice, thrice or n times for which I have to define a parameter of type table in SP. Now how can I pass the same from XI. How the structure will look like? It is something like Array of record which I need to pass.

Former Member
0 Kudos

To be more clear, lets say my procedure looks like this.

create or replace type emp_typ as object(id VARCHAR2(10),name varchar2(20));

create or replace type emp_typ_arr as table of emp_typ ;

create or replace procedure create_emp_array(arr in emp_Id_typ_arr ,isSuccess out varchar2 )

begin

--- insert statement

end

How can I invoke this Procedure from XI?

Former Member
0 Kudos

Hi,

Does anyone have any updates on the same? To me it looks like not possible.

Thanks

Amit

Former Member
0 Kudos

As per my knowledge its not possible.

Since your adapter call is over it executed the store procedure successfully and it got errored out which sending response back to RFC.

In single call its not possible.

Gaurav Jain

GabrielSagaya
Active Contributor
0 Kudos

1) You can set Transaction Isolation Level=Serializable

To avoid data inconsistencies in the database when the isolation level is lowered, ensure that multiple database transactions cannot access the database simultaneously.

2)

<StatementName5>

<storedProcedureName action=u201D EXECUTEu201D>

<table>realStoredProcedureeName</table>

<param1 [isInput=u201Dtrueu201D] [isOutput=true] type=SQLDatatype>val1</param1>

</storedProcedureName >

</StatementName5>

http://help.sap.com/saphelp_nw04s/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm