Skip to Content
author's profile photo Former Member
Former Member

What order are multiple statements in JDBC adapter executed in?

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2006 at 12:40 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2006 at 04:06 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • 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

  • Posted on Nov 30, 2006 at 03:28 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • 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

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2006 at 09:16 PM

    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 = &apos;0010000006&apos;) WHERE SDAN8 = 0010000006</access>

    </SALES_HISTORY_TABLE>

    </UPDATE>

    </ns0:MT_SALES_HISTORY_INSERT>

    Thanks all for your kind help.

    Points were awarded.

    Add a comment
    10|10000 characters needed characters exceeded

    • 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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.