on 11-30-2006 12:19 AM
Hello,
If I put multiple statements in an XML message sent to the JDBC receiver adapter, are they executed sequentially? or in parallel???
In this case I have several inserts followed by a stored procedure execute. I am getting a couple of inserts done then the stored procedure is executed. I would need all the inserts executed before the SP is called.
Would specifying EOIO service level achieve this? Is there a configuration parameter in adapter, driver or somewhere else to achieve serial execution of the statements???
Thank you!
-Sam
Sam,
Please go through the following link. It should be helpful.
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
reg,
-Naveen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok Guys,
So the tests were successful, I made a statement with an insert, and another with an update instead of executing the SP which would just perform the update statement.
The insert and the update were correctly executed in the same sequence as they appear in the message.
I still don't know if separate statements are in the same transactional context. Maybe more on that soon.
Sample message output from the mapper: (For this POC I included just the key field in the insert statement). The constant for comparisons is generated dynamically by the mapper.
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_SALES_HISTORY_INSERT xmlns:ns0="urn:com.mxx.Controlling.invoicehistory">
<INSERT>
<SALES_HISTORY_TABLE action="INSERT">
<table>F42119</table>
<access>
<SDAN8>0010000006</SDAN8>
</access>
</SALES_HISTORY_TABLE>
</INSERT>
<UPDATE>
<SALES_HISTORY_TABLE action="SQL_DML">
<access>UPDATE F42119 SET SDAN8 = (SELECT ABAN8 FROM V7JPRCOMM.F0101 WHERE ABURRF = '0010000006') WHERE SDAN8 = 0010000006</access>
</SALES_HISTORY_TABLE>
</UPDATE>
</ns0:MT_SALES_HISTORY_INSERT>
Thanks all for your kind help.
Points were awarded.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sam,
I am working on a scenario in which i need to UPDATE_INSERT data into a temporary DB table and need to execute the stored procedure, will using multi statement with Statement1 for UPDATE_INSERT and Statement2 for EXECUTE work?
I am using PO 7.5
Waiting for your quick response
Regards,
Akash Chauhan
Hi,
As Bhavesh said i also think they are executed sequentially.
If you are inserting in a single table then You can create a single "statement" element for all those inserts. Create one "access" element for each insert within that "statement".
Then create a "satement" element for the Stored procedure.
Regards,
P.Venkat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Venkat,
Any idea what the difference between having multiple ACCESS level tags is and multiple STATEMENT level tags?
For multiple insertions into the same table, we can have multiple ACCESS level tags under ONE STATEMENT or we can have multiple STATEMENT level tags itself. Both of them work fine, but , what is the internal difference in the wayt they work? Do you have any idea?
Regards,
Bhavesh
Hi Bhavesh,
Sorry, Me too have no idea on that. But what i think is, that might be useful in case of failures. If inserts are specified in a single statement, then if a single insert statement fails then all the inserts might be rolled back.
Me too need some more info on this. Experts please give the real working.
Regards,
P.Venkat
Hi Bhavesh/Venkat,
Any idea what the difference between having multiple ACCESS level tags is and multiple STATEMENT level tags? For multiple insertions into the same table, we can have multiple ACCESS level tags under ONE STATEMENT or we can have multiple STATEMENT level tags itself. Both of them work fine, but , what is the internal difference in the wayt they work? Do you have any idea?
- Were you able to find the proper difference? Because, I need to use update_insert to update/insert into table. But, the problem is with the error handling part. Say if I try to update 100 records in a table and assume 50th record fails. In that case, will all other records be updated except for 50th? Or all will get rolled back if I use multiple ACCESS level tags??
Please clarify.
Thanks,
Hussain
Hi Venkat,
I am working on a scenario in which i need to UPDATE_INSERT data into a temporary DB table and need to execute the stored procedure, will using multi statement with Statement1 for UPDATE_INSERT and Statement2 for EXECUTE work?
I am using PO 7.5
Waiting for your quick response
Regards,
Akash Chauhan
Hi,
AFAIK, the statements will get exectuted sequentially. For every insertion you want , just create the STATEMENT level tag for the same sequentially.
Regards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bhavesh,
I am working on a scenario in which i need to UPDATE_INSERT data into a temporary DB table and need to execute the stored procedure, will using multi statement with Statement1 for UPDATE_INSERT and Statement2 for EXECUTE work?
I am using PO 7.5
Waiting for your quick response
Regards,
Akash Chauhan
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.