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

Similar Messages

  • 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

  • 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

  • Receiver JDBC adapter to SELECT is null records?

    Hi,
    I have an interface with an Oracle database and I need to read only the records that have a null value in a field.
    I have created the mappings and all work fine except the selection for this records, in other words I need simulate in the where clausule an 'is null'.
    Select field1 field2 from table tab1 where field1 = 'A' and field2 = 'B' and boldfield3 is nullbold
    I have try with attributes isNULL and hasQuot but doesn't works
    Could somebody help me?

    Try this...
    Select field1,field2 from tab1 where field1='A'  and field2='B'  and field3 IS NULL;

  • Sender JDBC Adapter : Fetch records from multiple tables

    Hi Friends,
    I am using sender JDBC adapter to select few records from DB2 database table.
    This scenario is working fine.
    Now my requirement is to fetch records from 3 tables. These table are independent to each other. There is no primary key or foreign key.
    Please let me know how to write the sql in sender JDBC adapter to fetch records from these 3 tables.
    Thanks,
    Sandeep Maurya

    hi sandeep...
    if the tables are completely independent and do not share any primary / foreign key relation ship...
    why dont u think towards creating a seperate interface for each of them..
    or if u still want to select from multiple table at once..the best way would be to write a stored procedure on the sender side which do all the fetching n processing and pass the final resultset to PI
    or u can think towards fetching the data from 1 table and then in UDF do lookup from other tables..which again is tricky and performace intensive

  • Configuring sender jdbc adapter

    Hi all,
    I have a requirement in which i have to select certain data from Oracle table and send it to an IDOC via SAP XI.
    Problem is the select can happen from several tables. For example:
    SELECT col1,col2,col3 FROM <tablename>
    The <tablename> has to be variable. I do not need to do any JOIN. At a time select will be only from a single table i.e. col1, col2, col3 will all belong to the same table. But the adapter should poll multiple tables.
    One more requirement is that once a particular record from a particular table has been selected some UPDATE also need to be done on the same record.
    Pls can anybody provide me with a proper solution.
    This requirement is a bit urgent.
    Thanks in advance.
    Regards
    Neetu

    Neetu,
    You need to have the Table name dynamic in the Sender JDBC adapter's Select Query . This is not possible
    You can consider using a Reciver JDBC adapter for which you can have a look at this blog ,
    /people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-150-step-by-step
    Or, you need a Separate sender JDBC adapter for every table to be polled.
    >><i>One more requirement is that once a particular record from a particular table has been selected some UPDATE also need to be done on the same record.</i>
    If you are using the Sender JDBC adapter, this would be simple using the UPDATE field of the Sender JDBC adapter .
    If you are planning to use Receiver JDBC adapter, then You need a separate Send Step for this Update.
    Better way to go would be to have separate sender JDBC adapters.
    Regards,
    Bhavesh

  • Jdbc adapter table's name in chinese

    hi everyone:
    I have configured the 'JDBC-XI-RFC' secnario, my trouble is that both the name of database table and table's fields are chinese, so the JDBC adapter can not get the datas from the DB table.
    Any good idears? except changing the table' name in english.
    B/R
    amanda

    hi,Bhaumik
      Thank you for your answer.
      Now the JDBC Adapter can select the data from DB table in chinese, but i think the mapping is impossible to be completed,because it's impossible to define the field name in chinese in data types.
      As what you said,develop adapter in java,i think it is difficult for me.
      thanks a lot.
      Amanda

  • JDBC Adapter Doubts

    Hi Guys,
                Could u tell me whata are the operations that can be done using JDBC adapter?
    What are stored procedure calls?
    can there be more than one update statement in JDBC interface?
    Regards,
    Ashish

    Hi,
    >>>>Could u tell me whata are the operations that can be done using JDBC adapter?
    select, insert, update, delete
    >>>What are stored procedure calls?
    http://en.wikipedia.org/wiki/Stored_procedure
    >>>can there be more than one update statement in JDBC interface?
    yes
    Regards,
    michal

  • Do we have any Acknowledgement concept At receiver side of JDBC Adapter

    Helo,
    Do we have any Acknowledgement concept At receiver side of JDBC Adapter?
    Thanks,
    Soorya

    Hi venkat,
    For receiver JDBC adapter message can be sent synchronously and asynchronously.
    In case of SELECT  statement only synchronous makes sense..since the JDBC adapter will select some rows/columns and return it.
    In case of other statements (UPDATE,INSERT,DELETE) if the message is sent synchornously.. u will get only the no of rows affected..so these can be treated as acknowledgement...
    Regards
    Biplab
    **Reward points if it helps u**

  • JDBC adapter to SAP: select & join from multiple tables ???

    Hello,
    I have a task to get an aggregating information from two tables and send it into SAP.
    I use XI JDBC sender adapter to access to MSSQL DB.
    I know how to construct SQL quiery:
    (something like that)
    SELECT  table1.Date  SUM(table1.sum) from table1
    INNER JOIN table2
    ON table1.Number = table2.Number
    But I don't understand how to construct  Data Type for this complex select operator?
    How does it look like?
    Where to store and how to map the selected data?
    Please give me an example or an advice.
    Thank You.

    Hi,
    Use your structure like this.
    <StatementName4>
    <dbTableName action=”SELECT”>
    <table>realDbTableName</table>
    <access>
    <col1/>
    <col2/>
    <col3/>
    </access>
    <key1>
    <col2>val2old</col2>
    <col4>val4</col4>
    </key1>
    <key2>
    <col2>val2old2</col2>
    </key2>
    </dbTableName>
    </StatementName4>
    action=SELECT
    Statements with this action cause existing table values to be selected. Therefore, the statement corresponds to an SQL SELECT statement.
    The <access> block contains the column names to be selected, a <key> element contains the columns whose values must be identical with the specified value to get the new column values. The name of the <key> element is arbitrary. Column values within a <key> element are combined with a logical AND; different <key> elements are combined with a logical OR.
    A statement with the action SELECT must have exactly one <access> element. The number of <key> elements with arbitrary names is not restricted.
    The corresponding SQL statement for StatementName4 in the example above is as follows:
    SELECT col1,col2,col3 FROM dbTableName WHERE ((col2=’val2old’ AND col4=’val4’) OR (col2=’val2old2’))
    If there is no <key> element, or if there is a <key> element but it is empty, then no condition is specified and the entire table is to be selected. This may not be permitted by the configuration of the JDBC adapter for security reasons and will therefore result in an error during message processing and an appropriate error message.
    The response document contains the result of the action in XML format as follows:
    <row>
    <column1>value11</column1>
    <column2>value12</column2>
    </row>
    <row>
    <column1>valueN1</column1>
    <column2>valueN2</column2>
    </row>
    This will help you.
    regards
    Aashish Sinha
    PS : reward points if helpful

  • Multiple tables In JDBC ADapter

    Hi All,
             Can we access more than 1 table in one JDBC adapter? If yes how?
    XIer

    Hey
    on receiver side create multiple STATEMENT Level tags, one for each table and the appropriate access level tags.
    on sender side you can only have one select Query.
    so try to use a JOIN SQL Statement .
    Thanx
    Aamir
    Message was edited by:
            Aamir Suhail

  • In reciever jdbc adapter config sending data to multiple tables

    Hi Masters,
          Can u help me with examples step by step procedure of sending data to multiple tables in reciever jdbc adapter .. configuration....
    thanks in advance,
    jp.

    Hi,
    My understanding is you are  trying to use one scenario for ex a file to jdbc and want to post data into multiple tables.
    If you are using Message Prortocol XML SQL format then once you define the data type for one structure then juz right click on the statement name and select Duplicate. This will create another statement in the same data type change the table name and the parameters in the duplicates strucutre.
    <b>Document Formats for the Receiver JDBC Adapter</b>
    http://help.sap.com/saphelp_nw70/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    All the other configurations are same simple file to jdbc scenario.
    Cheers,
    *RAJ*

  • 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.

  • Dynamic select querry in sender jdbc adapter

    Hi,
          We are working on a scenario where in we will be using different source database tables , we were trying to see if it is possible that the select querry can be made dynamic so that the same communication channel can be used for all the different source tables.
         Request all to come up with suggestions as to if this is possible.
    Thanks ,
    Pravesh Puria.

    Hi All,
    Thanks VJ for your reply.
    Let me reframe my question.
    I have multiple database instances at source side. On all instances I have same table name.
    My requirement is to poll all these instances table and fetch data.
    Do I need to create multiple sender agreements or there is a way to dynamically change the datbase name in sender Communication channel.
    Any other solution is also appreciated.
    Same is the case with JMS adapter, Multiple instances of JMS are there at source side sending similar structure data in there own queue.
    Request you to kindly response.
    Regards,
    Pravesh

  • Inserting Multiple Rows into Database Table using JDBC Adapter - Efficiency

    I need to insert multiple rows into a database table using the JDBC adapter (receiver).
    I understand the traditional way of repeating the statement multiple times, each having its <access> element. However, I am just wondering whether this might be performance-inefficient, as it might insert records one by one.
    Is there a way to ensure that the records are inserted into the table as a block, rather than record-by-record?

    Hi Bhavesh/Kanwaljit,
    If we have multiple ACCESS tags then what happens is that the connection to the database is made only once. But the data is inserted row by row.
    Why i am saying this?
    If we add the following in JDBC Adapter..logSQLStatement = true. Then incase of multiple inserts we can see that there are multiple
    <i>Insert into tablename(EMP_NAME,EMP_ID) VALUES('J','1000')
    Insert into tablename(EMP_NAME,EMP_ID) VALUES('J','2000')</i>
    Doesnt this mean that rows are inserted one by one?
    Correct me if i am wrong.
    This does not mean that the transaction is not guaranted. Either all the rows will be inserted or rolled back.
    Regards,
    Sumit

Maybe you are looking for

  • How to delete the duplicate records in a table without promary key

    I have a table that contains around 1 million records and there is no promary key or auto number coulums. I need to delete the duplicate records from this table. what is the simple effective way to do this.

  • Array Of Random Alphabetic Characters?

    Hi, How would I populate an array with random alphabetic characters? Is there a java defined method for achieving this? The approach I was going to take was to use Math.random to create numbers between 1 - 26 and use a double scripted array to link t

  • 1409 Error opening .mov file

    I just upgraded to Quicktime Pro so that I could convert some .mov files I created with iMovie into .mp4 format. Every time I try to open any of the .mov files created by iMovie I get a 1409 error. The files are all located on my local system, not on

  • How to use templatebinding from DataTemplate

    I have the following code: <Style TargetType="local:LabelledList"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="local:LabelledList"> <ListView DataContext="{TemplateBinding ListSource}" ItemsSource="{Binding}"> <ListView.I

  • Get element values on 1.5

    as per 1.5 documentation AnnotationMirror.getElementValues : "Only those elements and values explicitly present in the annotation are included, not those that are implicitly assuming their default values" 1.6 javadoc says: "To fill in default values,