JDBC Adapter - Multiple Table Update - Sequence Number

I have to design a integration scenario where I will be updating 4 tables in a oracle database. One of these tables is a header table and the rest are detail tables. I have to generate a sequence number using Oracle Sequence number object which is one of the columns in the header table.
How can i use the Oracle SEquence number object to get the next value with JDBC Adapter?

Use an Enhancement Spot

Similar Messages

  • Update sequence number in PLAF table.

    Hi
    There is a requirement where I have to update sequence number for Planned Order in ECC.
    Sequence Data is stored in PLAF-SEQNR field [Seq. number order].
    BAPI_PLANNEDORDER_CHANGE did not work for me. There are only 27 field which i think we can edit (ie field in import parameters BAPIPLAF_I2).
    So can someone help me to find a way to update PLAF-SEQNR.
    Thanks
    Bhavesh

    Use an Enhancement Spot

  • How to set default value of a table using sequence number

    Dear all,
    Does any body know that how to set default value of a table
    using sequence number.
    But I don't want to use trigger to do that.
    Please help!!!!
    Eldon

    Andrew is essentially correct. You can get around the trigger,
    but not the sequence, if (and this may be a very big if) you can
    guarantee that every time an insert is done into the table, from
    whatever source, the statement looks something like
    INSERT INTO tbl VALUES (sequence.nextval,other_columns_values)

  • JDBC Adapter - Multiple Resultsets

    Hello,
    Does anyone know if the JDBC adapter can return multiple resultsets?
    So something like the following JDBC Code:
    CallableStatement cstmt;
    ResultSet rs;
    int i;
    String s;
    cstmt.execute();       //Call the stored procedure      
    rs = cstmt.getResultSet(); //Get the first resultset
    while (rs.next()) {
    i = rs.getInt(1);                          System.out.println("Value from first set = " + i); 
    cstmt.getMoreResults();//Point to the second resultset  rs = cstmt.getResultSet();// Get the second resultset
    while (rs.next()) {
    s = rs.getString(1);                 
    System.out.println("Value from second resultset = " + s);
    Greetings,
    Bart

    Hi Bart,
    sure you can select more than one table either with Stored Procedue or with Query Statement for example (also if you concate more than one SQL statement) like:
    update table1 set STATUS = 4 where STATUS = 3 select *
    from table1 bk inner join table2 on (KEY = BZ_KEY) where KEY = 449070
    - or you create an View onb DB side that makes all of your Data selection:
    select * from view where status = 4
    - but you also can use stored procedure - in my opinion the most powerfuel tool...
    If their is something left -keep asking
    Regards Matt

  • How to create Parent and Children is a tree table / trigger sequence number

    How to create Parent and Children is a tree table when the primary key of the parent is generated via a trigger and a sequence number in the database?
    My problem is when I create a parent and then right away a children. The parent still not have a primary key until the transaction get to the database. I get a error when trying the create the children, cannot insert null in the foreign key field of the children.
    Please help.
    Stephane

    You should have the parent key be marked as a DBSequence type.
    Then you should have the association between the master and detail defined as composite association to make sure that the posting order to the database is correct.
    http://download.oracle.com/docs/cd/E24382_01/web.1112/e16182/bcentities.htm#BABFECDJ

  • JDBC Receiver - Multiple rows Update

    I have an interface the incoming message contain multiple columns and it has to be updated using a JDBC Receiver Adapter with its key values.
    Can we send multiple rows in a single JDBC Update Statement.
    Please advise.

    Sebin,
    No ,it's not possible to have multiple rows in single update statement. Rather you can duplicate the segment at Statement level and do the update.
    Please refer http://help.sap.com/saphelp_nw70/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    raj.

  • JDBC Adapter multiple Selects

    Hi all,
    we have multiple select statements in one message.
    like this:
      <?xml version="1.0" encoding="UTF-8" ?>
    <ns1:SP10530T_MT xmlns:ns1="urn:lsv.de/TEST/SP10530T/SAPIDMS">
    <ChangeCustomer>
    <TPLSVXI_SP10530T action="SELECT">
      <table>TPLSVXI.SP10530T</table>
    <access>
      <ADSMSG />
      <SSRC />
      <EL_MES_CODE />
      </access>
    <key1>
      <MITARBEITER_ID>1111111</MITARBEITER_ID>
      </key1>
      </TPLSVXI_SP10530T>
      </ChangeCustomer>
    <ChangeCustomer>
    <TPLSVXI_SP10530T action="SELECT">
      <table>TPLSVXI.SP10530T</table>
    <access>
      <ADSMSG />
      <SSRC />
      <EL_MES_CODE />
      </access>
    <key1>
      <MITARBEITER_ID>12232323</MITARBEITER_ID>
      </key1>
      </TPLSVXI_SP10530T>
      </ChangeCustomer>
    <ChangeCustomer>
    <TPLSVXI_SP10530T action="SELECT">
      <table>TPLSVXI.SP10530T</table>
    <access>
      <ADSMSG />
      <SSRC />
      <EL_MES_CODE />
      </access>
    <key1>
      <MITARBEITER_ID>33333333</MITARBEITER_ID>
      </key1>
      </TPLSVXI_SP10530T>
      </ChangeCustomer>
      </ns1:SP10530T_MT>
    the problem ist if statement 2 produce an error statement 3 will never execute!
    i think the adapter have to send statement 3 too??
    regards
    ralf

    Hi Ralf,
    you should divide your statements via message split.
    Regards,
    Udo

  • Urgent help in multiple table update query

    TABLE1
    NAME
    RATE
    TABLE2
    NAME RATE1 DATE1
    NAME RATE2 DATE2
    NAME RATE3 DATE3
    Can anyone help me to write a query which can update RATE in TABLE1 based on
    following criteria ?
    We have same column 'NAME' in both the tables.
    First Find maximum Date from the TABLE2 and then take correspoinding rate from TABLE2 and update with the RATE column in TABLE1.

    Works as expected for me:
    SQL> CREATE TABLE TABLE1 (
      2   NAME VARCHAR2(10),
      3   RATE NUMBER
      4  );
    Tabelle wurde erstellt.
    SQL> CREATE TABLE TABLE2 (
      2   NAME VARCHAR2(10),
      3   RATE NUMBER,
      4   DT DATE
      5  );
    Tabelle wurde erstellt.
    SQL> INSERT INTO TABLE1 VALUES ('NAME1', NULL);
    1 Zeile wurde erstellt.
    SQL> INSERT INTO TABLE1 VALUES ('NAME2', NULL);
    1 Zeile wurde erstellt.
    SQL> INSERT INTO TABLE1 VALUES ('NAME3', NULL);
    1 Zeile wurde erstellt.
    SQL>
    SQL> INSERT INTO TABLE2 VALUES ('NAME1', 1, SYSDATE);
    1 Zeile wurde erstellt.
    SQL> INSERT INTO TABLE2 VALUES ('NAME1', 2, SYSDATE-1);
    1 Zeile wurde erstellt.
    SQL> INSERT INTO TABLE2 VALUES ('NAME1', 3, SYSDATE-2);
    1 Zeile wurde erstellt.
    SQL>
    SQL> INSERT INTO TABLE2 VALUES ('NAME2', 1, SYSDATE+1/1440);
    1 Zeile wurde erstellt.
    SQL> INSERT INTO TABLE2 VALUES ('NAME2', 2, SYSDATE+2/1440);
    1 Zeile wurde erstellt.
    SQL> INSERT INTO TABLE2 VALUES ('NAME2', 3, SYSDATE+3/1440);
    1 Zeile wurde erstellt.
    SQL> update table1 t1 set
      2    rate = (select t2.rate
      3              from table2 t2
      4             where t2.dt  = (select max(t3.dt)
      5                                from table2 t3
      6                               where t3.name=t2.name
      7                             )
      8               and t2.name=t1.name
      9           );
    3 Zeilen wurden aktualisiert.
    SQL> select name, rate from table1;
    NAME             RATE                                                          
    NAME1               1                                                          
    NAME2               3                                                          
    NAME3                                                                          
    SQL> INSERT INTO TABLE2 VALUES ('NAME3', 1, TRUNC(SYSDATE));
    1 Zeile wurde erstellt.
    SQL> INSERT INTO TABLE2 VALUES ('NAME3', 2, TRUNC(SYSDATE));
    1 Zeile wurde erstellt.
    SQL> update table1 t1 set
      2    rate = (select t2.rate
      3              from table2 t2
      4             where t2.dt  = (select max(t3.dt)
      5                                from table2 t3
      6                               where t3.name=t2.name
      7                             )
      8               and t2.name=t1.name
      9           )
    10  ;
      rate = (select t2.rate
    FEHLER in Zeile 2:
    ORA-01427: Unterabfrage für eine Zeile liefert mehr als eine Zeile

  • Oracle jdbc creating a table, sequence and trigger

    I'm trying to create a table with a sequence and with a trigger for that sequence. When I do this within Oracle Express edition I have the following SQL statements. Which DO run correctly inside Oracle Express using the same user I log in with JDBC.
    CREATE table "TEST" (
    "ID" NUMBER(10) NOT NULL,
    "NAME" VARCHAR2(20),
    constraint "TEST_PK" primary key ("ID")
    CREATE sequence "TEST_SEQ"
    CREATE trigger "BI_TEST"
    before insert on "TEST"
    for each row
    begin
    if :NEW."ID" is null then
    select "TEST_SEQ".nextval into :NEW."ID" from dual;
    end if;
    end;
    So now what I do is put each of these into a List of Strings and execute 1 by one like this:
    List<String> commands = new ArrayList<String>(4);
    commands.add("Create table ...");
    commands.add("Create sequence ...");
    commands.add("Create trigger...");
    st = con.createStatement();
    for (String command : commands) {
    st.execute(command);
    etc...
    But I get an error with the trigger statement. "Error with Oracle command: ORA-00942: table or view does not exist"
    It seems to me that Oracle has not yet seen the new table at this point. or maybe my user can create tables but not triggers? If that's the case why did it work in the express application itself?
    TIA

    SproketBoy wrote:
    But I get an error with the trigger statement. "Error with Oracle command: ORA-00942: table or view does not exist"Keep in mind: Oracle is not lying to you.
    >
    It seems to me that Oracle has not yet seen the new table at this point. or maybe my user can create tables but not triggers? If that's the case why did it work in the express application itself?No, DDL commands cause an explicit commit. As soon as you invoke them, the change is permanent. If it was a rights problem, you'd get a different ORA error stating that, it won't silently fail.
    Lets not assume it is anything difficult, perhaps there is simply a typo in a name somewhere?

  • Sender JDBC Adapter in a synchronous szenario

    Hi,
    i am trying to set up following szenario:
    A JDBC Sender Adapter is polling data from a database, this data is beeing mapped to a synchronous RFC-Call to the R/3 backend. The result from the RFC-Call contains an order-number, which should be stored in the database.
    The query of the DB and the rfc-call works fine. The query is also doing the UPDATE statement to the DB, marking this line of data as beeing processed.
    The QOS in the sender-jdbc-adapter is set to "Best Effort", which should allow a synchronous communication.
    I am mapping the response of the rfc-call to a jdbc-receiver-like structure, in the monitoring i can see the rfc-result and also the message to update the databae. There are no errors in the adapter-monitoring and everything looks fine, except that the database is not beeing updated.
    Is there another messageformat for the synchronous answer to a sender-jdbc-adapter?  Or is it possible, that the commit for the answer is not beeing sent?
    We have an XI3.0 with SP16 installed.
    Thanks for your help.
    Ingo

    hi,
    you cannot use the Sender JDBC adapter to Upate.
    Create a receibver JDBC adapter with the format as mentioned and use it to update the DB.
    the steps in BPM wil be ,
    1. Receive -- for Sender JDBC adapter
    2- Send Synchronous -- RFC call synchrnous
    3 - Send -- using Receievr JDBC adapter to Insert / Update the DB.
    Do let me know if u need further info,
    regards,
    Bhavesh

  • Multiple record update extension issue (felixone

    I just purchased the Multiple Records at Once Extension by
    Felixone. I have put it to good use but have noticed an issue with
    it. PHP MySQL.
    I am using Dreamweaver 8 with the Repeat Region behaviour,
    and the Recordset Navigation Bar, along with the extension to
    update multiple values at once from a recordset.
    If there are more records than can be displayed on the first
    page of navigation. E.g. Showing records 1-10 of 15, when doing a
    multiple table update (in this case changing a single value from 0
    to 1 and vice versa) a MYSQL error comes up. The operation is still
    completed but it doesn't go to the page specified after the update
    in the extension, but stays on the current page with the following
    error at the top:
    You have an error in your SQL syntax. Check the manual that
    corresponds to your MySQL server version for the right syntax to
    use near '' at line 1
    In the mean time, to overcome the issue, I am able to display
    all records on a single page, however once the records build up it
    won't be acceptable to have a potentialy very long list of records
    when I would like to display only 15 at a time.
    Has anyone had any experience of this, and if so would you be
    willing to help me. I have emailed felixone but I need this sorting
    out ASAP.
    Notice I have changed the show results to 5000, as going into
    the repeat region behaviour and saying 'show all' would not do
    anything. It always put it back to ten.

    Thank you Anurag,
    I have already the db created ,
    My question is how best to get the users local time
    availability into the
    database, what is the best method to use, should I use list
    menus, etc, has
    any one had to do this in a project before.
    and then when some one comes to my site i want them to be
    able to compare
    the time stored with the time of the site users country
    locally using an if
    else statement. i am using asp vb and sql server
    regards
    kenny
    "Anurag" <[email protected]> wrote in message
    news:e58mta$kbg$[email protected]..
    > Well basically first you have to collect:
    > a, the users phone number
    > b, the "display times"
    >
    > and store those values in a database - don't even think
    about NOT using
    > one
    >
    > Then you simply check when the page is called whether
    the current time
    > is within the display time...
    >
    > Oh, btw you probably have to think about which time you
    are talking about:
    >
    > the mobile phone owner's local time, the viewer's local
    time, your
    > server time...
    >
    > That should do the trick...
    >
    > Anurag
    >
    >
    >
    > twocans wrote:
    >> hello,
    >> I am looking to give my user a "show my phone
    number" option to show his
    >> mobile phone number online and at selected times by
    that user, I need to
    >> create a page that will allow my user to apply this
    as best and as easy
    >> as
    >> possible, my users are unaversial based. how best
    can I do this, is thre
    >> a
    >> snippet out there that anyone knows that may help. I
    am willing to pay if
    >> any one knows of such suitable code.
    >>
    >> regards
    >>
    >> kenny
    >>
    >>

  • JDBC Adapter (Receiver)

    Hi All,
    Am using a scenario where in Receiver is "JDBC Adapter" , it should update my Acess.mdb file placed in the XI Server path
    But after config i get below error :
    Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: JDBC Adapter configuration not initialized: null
    Any clue where it went wrong
    Thanks in advance
    srini

    Have you deployed these drivers (msbase.jar, mssqlserver.jar, msutil.jar) and provider.xml file in Visual admin corectly??
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3867a582-0401-0010-6cbf-9644e49f1a10
    You can check in the following path if the drivers are installed correctly:
    usrsap<SID>DVEBMGS<Instance Number>j2eeclusterserver0 inextcom.sap.aii.af.jmsproviderlib

  • Significance Sequence Number in PO delivery confiramtions

    significance Sequence Number in PO delivery confiramtions.
    I know its the sequence in which vendor confirms his goods to be delivered.
    But, I want to know how the number gets generated. If i go to EKES table for 1 perticular PO with delivery confirmations.
    I am not able to find the "Sequence number" in series. Number will be jumbled.. its ok...but say number 3 will be missing out of series.
    Refer to last column in below table for Sequence number.
    CC DDelivery DTimeQuantiReference Created onInb. DelItmHL IteBatch   Quantity RedM  MPN Materl C     Seq. Number                        
    ZH D11.03.2010    1,00  7008557420  14.12.2009        0  0             0,00                      1     2                                  
    AB D11.03.2010    1,00  7008557420  18.12.2009        0  0             0,00                      3     6                                  
    ZH D11.03.2010    1,00  7008557420  18.12.2009        0  0             0,00                      1     7                                  
    ZH D31.03.2010    1,00  7008557420  18.12.2009        0  0             0,00                      1     4

    Hi ,
    Could be some of the confirmations have been deleted

  • JDBC Adapter - Connection Pooling

    Does anybody know if we can specify a Connection Pool to the JDBC Adapter? I mean the number of connections that the Adapter can have open to say Oracle Data.
    Regards
    Mike

    Hi Michael,
    Some of the specifications that are given while configuring the JDBC adapter, especially regarding the number of connections that you acn have...is given clearly in this documentation for JDBC adapter:-
    http://help.sap.com/saphelp_nw04/helpdata/en/1d/756b3c0d592c7fe10000000a11405a/frameset.htm
    Specifically check for the following parameters :-
    <i>db.transactionIsolation=0|1|2|4|8
    db.autoCommit=NO|YES
    db.pollInterval=
    db.retryInterval=
    db.logPollInterval=NO|YES</i>
    Regards,
    Sushumna

  • Updating multpile tables and multiple rows - JDBC adapter

    Hi,
    The scenario is like this. i receive an Idoc which has header information and various line items (multiple occurrance of a segment). the hearder details have to be sent to one table, TableA, and all line items has to go to another table, TableB, and for each line item, a new row has to be inserted in TableB.
    How can i acheive this using JDBC adapter? how should my data type look like? what are the settings i need to do in adapter config?
    Thanks and Regards,
    Rashmi

    Hi Rashmi,
    You can use the following link for the JDBC adapter call :
    http://help.sap.com/saphelp_nw04/helpdata/en/ae/d03341771b4c0de10000000a1550b0/frameset.htm
    You need to provide the JDBC Driver, Connection,User Name and the password.
    The data type structure you can take from the Bhavesh blog:
    JDBC Receiver Adapter -- Synchronous Select – Step by Step
    Since you just need to update the tables, take only the sender side of the blog, i.e. the request part and configure the scenario accordingly.
    Regards,
    Sanjeev.

Maybe you are looking for