How to update row by row  in   Jdbc Adapter sender  ?

Hi friends ,
                  No i am reading data from a table using select query and resulting data i am keeping in the FTP folder as XML File.
                  I want to
                 1. to  know how many rows i read ? 
                 2. Update the  read completed time in each row of the sender side table . 
           (   I am  using <b>select * from a table where tag='n'  </b> . I am giving this in <b>Query SQL Statement</b> of JDBC Sender adapter processing parameter .
I am writing update query as update table set tag='y' where tag='n' .
                     Will it perform row by row ?
                 3. Insert in to another R3 System  table  the rows which i read  as a log  .
                      Can  you please give  procedure to do that .
                    Expecting your reply asap .
                    Thank you
Best Regards.,
V.Rangarajan

Hi raj ,
             Thanks for ur reply .   I am new to xi . Just i am doing a scenario . I can able to read  the ms-sql server table data using jdbc Sender  adapter .
               Can i use RFC Adapter to insert the values to R3 table ?   
                If  i have mapped  to rfc fields will it store into the table once we read  the data from ms_sql server table using select query of JDBC Sender  Adapter ?
Best Regards
V.Rangarajan

Similar Messages

  • Update in JDBC-Adapter (Send)

    Hallo,
    I´m trying to execute a Update in the JDBC-Adapter (Sender). When a Select-Statement results in exactly one entry back from the data-base I wont to Update this entry.
    How refrencing to the enty (for example by an primary key)? I found only documentation for Receive-JDBC-Adapter...
    Thanks in advance,
    Frank

    Hi Frank,
    At last I get your scenario..
    One solution to your problem can be the following though i am not sure if this is a perfect soultion or a viable solution but, it is a workaround solution which you can surely try.
    1. To update the status of your database on the basis on the events that have taken place, you can configure a JDBC Adapter as a receiver.This JDBC adapter will contain the event and the flag value as well as Update condition.
    Just check this blog and SAP help to understand how JDBC receiver adapter works,
    /people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30
    http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    2. In your JDBC sender adapter that is polling over your DB table, you can give the value for UPDATE as <test>. This means that you are not changing anything even after the adapter has picked up intfo from the table. Ofcourse, you would have to increase the polling interval time as the JDBC receiver has to update the DB.
    I know this solution is a long shot and an added headache but if nothing works out, you can always do it this way.
    Hope this helps,
    Regards,
    Bhavesh.

  • How to increase the thread count for JDBC adapter

    Hi ALL,
                Could someone advice me on how to increase the thread count for JDBC Adapter in Visual Admin:
    JDBC_http://sap.com/xi/XI/System.Call.maxConsumers 5
    JDBC_http://sap.com/xi/XI/System.Recv.maxConsumers 5
    JDBC_http://sap.com/xi/XI/System.Rqst.maxConsumers 5
    JDBC_http://sap.com/xi/XI/System.Send.maxConsumers 5
    I need to increase them to 10.
    Regards,
    Xier

    hi check the below links:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/806e75a0-0e01-0010-2587-fc518de8ac1a
    admin manual:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/fdb09490-0201-0010-e09e-a76388646ad0
    note:reward points if solution found helpfull.....
    regards
    chandrakanth.k

  • How to configure JDBC Adapter(Sender & Receiver)

    How to configure JDBC Adapter(Sender & Receiver)
    Rgds
    Ruchitha

    Hi ruchitha thakur ,
    These r the following web-sites which give u detailed information about configuring of JDBC Adapter(Sender & Receiver)
    JDBC is a technical Adapter provided by SAP.
    Configuring the Sender JDBC Adapter
    http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/1d/756b3c0d592c7fe10000000a11405a/content.htm
    Configuring the Receiver JDBC Adapter
    http://help.sap.com/saphelp_nw2004s/helpdata/en/b0/676b3c255b1475e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/6d36d51d-0b01-0010-b3aa-9cb313b63cf4
    SAP XI Utilize SAP Adapters to connect to heterogenous systems
    https://wwwn.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3fc4bd90-0201-0010-68bd-ab931b06f9c2
    cheers!
    gyanaraj
    ***Pls reward points if u find this useful

  • How to update a single row of data table

    How we can update a single row of the data table by clicking the button in the same row.
    Thanks in Advance.

    Hi!
    What do You mean 'update'? Get fresh data from DB or change data and commit it in DB?
    If commit, try to read here:
    http://developers.sun.com/jscreator/learning/tutorials/2/inserts_updates_deletes.html
    Thanks,
    Roman.

  • How to eliminate inserting  Duplicate rows into database using JDBC Adapter

    File->Xi->JDBC
    In above Scenario if the file has two rows their values are identical, then how can we eliminated inserting  Duplicate rows into database using JDBC Adapter

    Database is a consumer of a SERVICE (SOA!!!!!!).
    Database plays a business system role here!!!!
    Mapping is part of an ESB service
    Adaptor is a technology adapted to ESB framework to support specific protocol.
    ESB accomplish ESB duties such as transformation, translation, routing. Routing use a protocol accepted by the consumer. In a JDBC consumer it is JDBC protocol and hence it a JDBC adaptor.
    There is clear separation on responsibilities among business system and ESB. ESB do not participate in business decision or try to get into business system data layer.
    So who ever are asking people to check duplicate check as part of mapping (an ESB service) may not understand integration practice.
    Please use an adaptor module which will execute the duplicate check with business system in a plug and play approach and separate that from ESB service so that people can build integration using AGILE approach.
    Thanks

  • How to update  the restricted rows that were selcted using fetch

    Hi
    I have to fetch  one row at a time from my staging table using JDBC Sender Adapter,  which is configured against AS400 DB2 and push it to R/3.
    The select  SQL looks like this in JDBC Sender Adapter
         <b>select  jedata, oxruns from fxjrnep2 where oxsts=' '   fetch first 1 rows only</b>
                                       and
    update sql is
         <b>update suplib.FXJRNEP2 set OXSTS='SUC' where OXSTS=' ' </b>
    The problem here is my select gets one row, which is what i want, but my update actually updates all the rows that satisfied the where condition oxsts=' ' instead of one.
      I couldn't  use <b>fetch first 1 rows only</b> at the end of the update sql to update the selected row. DB2 does not allow  fetch in update sql.
    Can anyone suggest solution here or recommend alternative?
    Best Regards
    Venkat

    check for update query where u can club the select stmt u had used with udpate like:
    update suplib.FXJRNEP2 set OXSTS='SUC' where OXSTS = (select jedata, oxruns from fxjrnep2 where oxsts=' ' fetch first 1 rows only
    just need to try combinations of this type.
    if still this is not working use a bpm and get all the records where OXSTS is null and process record one by one within a block

  • How to update all the rows of table using stored procedures

    Hi,
    I want to update all the rows of a table of a specific column
    sp_a  male
    sp_b female
    sp_c  male
    sp_d female
    in above table 
    gender of all the columns has to be interchanged.

    Sir table is like this detail(name varchar(10),gender varchar(10))
    Where Details  are like this 
    Name  Gender
    sp_a 
    male
    sp_b
    female
    sp_c 
    male
    sp_d
    female
    I want to create a stored procedure which automtically updates gender from male to female and female to male
    for all the rows . i.e., all the rows are updated for column gender by just running a stored procedure.
    So after execution of stored proc the above table looks
    Name  Gender
    sp_a 
    female
    sp_b
    male
    sp_c 
    female
    sp_d
    male

  • How to handle the BOLB column Using JDBC adapter

    Hi,
      I want to sending of a BOLB column from a DB2 database table to another DB2 database, and the sender and receiver both by using JDBC adapter. The two tables in each other database have the same columns.
      Here is the table's structure:
      <ID>string type</ID>
      <PDF>blob type</PDF>
      Also, i haved create two DataTypes in PI system.
      Sender DataType:
      ns:DT_PDF_Req xmlns:ns="http://XXXXX.com/sap/xi">
       <row>
         <ID>1</ID>
         <PDF></PDF>
       </row>
      </ns:DT_PDF_Req>
      Receiver DataType:
      <ns0:DT_PDF_Res xmlns:ns0="http://XXXX.com/sap/xi">
      <STMT>
      <dbtable action="INSERT">
      <table>tablename</table>
      <access>
       <ID></ID>
       <PDF></PDF>
      </access>
      </dbtable>
      </STMT>
      </ns0:DT_PDF_Res>
    When test this interface, i found the that we can get the data, but when execute the insert stms  the follow errors occured  in RWB :
    <ERROR>
    Could not execute statement for table/stored proc. "DBDPUSER.pdf" (structure "STMT") due to com.ibm.db2.jcc.b.nm: DB2 SQL Error: SQLCODE=-103, SQLSTATE=42604, SQLERRMC=255044462d312e330a25c7ec8fa20a352030206f626a0a3c3c2f4c656e677468203620, DRIVER=3.50.153
    JDBC Message processing failed, due to Error processing request in sax parser: Error when executing statement for table/stored proc. 'DBDPUSER.pdf' (structure 'STMT'): com.ibm.db2.jcc.b.nm: DB2 SQL Error: SQLCODE=-103, SQLSTATE=42604, SQLERRMC=255044462d312e330a25c7ec8fa20a352030206f626a0a3c3c2f4c656e677468203620, DRIVER=3.50.153
    </ERROR>
    Can anybody tell me how to resolve the problems?
    And tell me about how to deal BOLB column using PI.
    Best Regards
    Terry

    Hi Terry Qin,
    I understand, you are getting below XML from sender JDBC channel. But when you getting SAX parser error, in receiver JDBC.
    <ns:DT_PDF_Req xmlns:ns="http://XXXXX.com/sap/xi">
    <row>
    <ID>1</ID>
    <PDF></PDF>
    </row>
    </ns:DT_PDF_Req>
    I think it is because the XML which is going to receiver JDBC channel is not well formed (because pdf can containg < & characters).
    You can achive this sceanrio, by selecting receiver JDBC channel as Message Protocol "Native SQL Format" [Link1|http://help.sap.com/saphelp_nwpi711/helpdata/en/44/7c24a75cf83672e10000000a114a6b/frameset.htm] you can send non XML to receiver channel.
    Before that, you have convert above input XML into SQL statement, using Java Mapping.
    Regards,
    Raghu_Vamsee

  • How to handle BLOB field in receiver JDBC adapter into ABAP table

    Dear Experts,
    I am working in a synchronous scenario with Sender ABAP Proxy to Oracle Database as receiver via SAP PO 7.4.I will be calling a stored procedure view with fields ID, NAME,Age,*** and BLOB (Image binary).
    1. The response from Oracle Database field BLOB is to be stored in ABAP table.Would I have to write any JAVA program to read the BLOB or the receiver JDBC adapter will handle it and store in a table by using ABAP proxy once it reaches ECC.
    2. If yes, would the JAVA program have to deal with other 4 fields.
    3. Can I use a UDF mapping to this BLOB field.
    Regards
    Rebecca...

    Dear Praveen,
    Thanks for your response...
    Please correct me if I am wrong.
    1. For 1-1 response mapping for BLOB field, I will use just use the below UDF code.
    public static byte[] hexStringToByteArray(String s) { 
                int len = s.length(); 
                byte[] data = new byte[len / 2]; 
                for (int i = 0; i < len; i += 2) { 
                            data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4) 
                                                                                         + Character.digit(s.charAt(i+1), 16)); 
                return data; 
    2. ===Using the byte data, create binary attachment in mapping for abap proxy response===
    Could you please share how to create the binary attachment.. I am not clear
    Regards...

  • Updateing oracle table Emp usering JDBC Adapter

    Hi,
    IS any one can help me what is the Format of JDBC Driver and Connection type.When we update a oracle table useing JDBC Adpater.
           Thanks in advance
    Regd's
    Raj

    Hi Raj,
    To access any Database from XI, you will have to install the corresponding Driver on your XI server.
    To install oracle driver, just check this link,
    http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3867a582-0401-0010-6cbf-9644e49f1a10
    The details that have to be entered while adapter configuration if you are using the OJDBC14.jar
    The parameters should be mentioned as follows.
    Connection : <b>jdbc:oracle:thin:@<IP adress>:<listener port>:<instance name (database name)></b>
    Driver : <b>oracle.jdbc.driver.OracleDriver</b>
    Also go through these links for more information regarding the same:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/80/4f34c587f05048adee640f4c346417/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/1d/756b3c0d592c7fe10000000a11405a/frameset.htm
    Regards,
    Abhy

  • How to call Packaged Stored Procedure in JDBC Adapter?

    hello frnds,
    I m working on a SAP R/3 -> XI -> Oracle scenario. Here on receiver side i m using JDBC Adapter in which i m using a stored procedure.
    I have my stored procedure in a Package. Example : package "PKG_SPARES_VOR_UPLOAD" and in that stored procedure "pr_spares_vor_po_hdr_upload".
    i have checked that if i write this stored procedure outside the package then it works fine... but if i put it into the package then it is giving me error that ....
    " Receiver Adapter v2112 for Party '', Service 'BS_ORADEV':
    Configured at 2006-08-16 10:12:14 GMT+05:30
    History:
    - 2006-08-16 11:02:04 GMT+05:30: Error: TransformException error in xml processor class: Error processing request in sax parser: Error when executing statement for table/stored proc. 'PR_SPARES_VOR_PO_HDR_UPLOAD' (structure 'statement'): java.sql.SQLException: ORA-06550: line 1, column 7:
    PLS-00201: identifier 'PR_SPARES_VOR_PO_HDR_UPLOAD' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored ".
    please help me out with this problem.
    Thankx,
    Regards,
    Audumbar

    Hi,
    I have the same problem to call a stored Procedure in a Package.
    If my procedure is not in a package, everything is right.
    And I musn't indicate all the name, because I musn't put '.' in the name (of the procedure), in my DT on XI.
    It would be so nice to have an answer.
    Rémi

  • JDBC Adapter - Sender - Stored Procedure - SQLException Error

    Hi,
         I have created one stored procedure in our Oracle database. I give below that stored procedure.
    CREATE OR REPLACE PROCEDURE sp_stud
    IS
        l_row student%ROWTYPE;
        TYPE t_ref_cursor IS REF CURSOR RETURN l_row%TYPE;
        c_cursor t_ref_cursor;
    BEGIN
        OPEN c_cursor FOR
         SELECT *
         FROM student where readflag= ' ';
        LOOP
         FETCH c_cursor into l_row;
            EXIT WHEN c_cursor%NOTFOUND;
            DBMS_OUTPUT.PUT_LINE(l_row.id || ' : ' || l_row.name);
        END LOOP;
    close c_cursor;
    END;
    This is a procedure to retreive rows from the table student which is having the field read_flag = ' '; (Student table contains the fields ID, NAME, BIRTHYEAR, BIRTHMONTH, READFLAG).
    In JDBC Sender Adapter, I set the values for the following fields under Parameters tab.
    Query SQL Statement: EXECUTE sp_stud
    Update SQL Statement: UPDATE student SET readflag = 'Y' where readflag = ' '
    The scenario is every 5 minutes JDBC adapter checks the table whether any new row is inserted, if it is inserted and commit, it will send that record to File. This is the Scenario.
    In Runtime Workbench, Communication Channel Monitoring, it shows the following error, when JDBC Polls the table.
    Database-level error reported by JDBC driver while executing statement 'EXECUTE sp_stud'. The JDBC driver returned the following error message: 'java.sql.SQLException: ORA-00900: invalid SQL statement '. For details, contact your database server vendor.
    Note : If we execute the Stored Procedure ad SQL command level, it works fine.
    Kindly help friends to solve this, where the error is happened.
    Thanking you,
    Kind regards,
    Jegatheeswaran P.

    Hi,
    Not a Database expert. But , in case you have not seen the note pointed by Deepu,
    <i> The JDK 1.1.x, 1.2 and 1.3 versions (classes111. zip, classes12.zip, classes12.jar) of the driver are not compatible with the SAP XI JDBC Adapter. Use the JDK 1.4 driver (ojdbc14.jar) instead. For details, refer to Oracle MetaLink note # 203849.1.
               <b>Invoking Oracle stored procedures from within a JDBC sender channel is only possible for Oracle DBMS versions >= 10.2.x using so-called table functions:</b>
               Example:
    pkg1 -
    CREATE PACKAGE pkg1 AS
      TYPE numset_t IS TABLE OF NUMBER;
      FUNCTION f1(x NUMBER) RETURN numset_t PIPELINED;
    END pkg1;
    CREATE PACKAGE BODY pkg1 AS
    -- FUNCTION f1 returns a collection of elements (1,2,3,... x)
    FUNCTION f1(x NUMBER) RETURN numset_t PIPELINED IS
      BEGIN
        FOR i IN 1..x LOOP
          PIPE ROW(i);
        END LOOP;
        RETURN;
      END;
    END pkg1;
    pkg1 -
            <b>   This function has to be invoked from the sender channel configuration (SELECT statement) as follows:
               SELECT * FROM TABLE(pkg1.f1(5));</i></b>
    Check this, confirm your Oracle DB version and then use the Table Functions as described in this note.
    A Database Expert wil be able to crack this for sure.
    Regards
    Bhavesh

  • JDBC ADAPTER SENDER ORACLE7.2.3

    HI ALL,
    We have to read data from an Oracle 7.2.3, but we are having problems In the inbound payload I can see that we have the data but is not building the xml properly, because the tags are empty. Someone haa experiencied this issue before?
    Many thanks in advance!
    Regards
    Noelia

    Hi Mario,
    the SQL is correct. I have checked it in Toad. I thinks this is something relative to the driver for oracle, because the jdbc adapter recover the data of the query but the info that I can see in the payload is the following:
    <ns:MT_XXXXXX xmlns:ns="http://XXXX.es/xi/XXX">
         <row>
              <b><></b>123<b></></b>
              <b><></b>PEPITO<b></></b>
              <b><></b>01/01/2006<b></></b>
         </row>
    </ns:MT_XXXXXX>
    And thats drive me to think that this is an issue with the driver, but Im not sure.
    Any idea?
    Many thanks
    Regards
    Noelia
    Message was edited by: Noelia Fernandez

  • [Help]JDBC adapter- sender/receiver

    Hello Gurus,
    I have a scenario but can not find a solution.
    We have a ECC and a database.
    The scenario is to run a report from ECC, sending the selection criteria to the database, and get the result from the SQL statement.
    How can i configure in PI?
    Thanks a lot in advance!
    Best regards,
    Charlie

    Hi,
        This can be done using sync client proxy call.
        On the ECC side we need to make a sync call to PI using client proxy, the input parameters to this proxy will be the
        selection criteria, on the receiver side in PI use JDBC adapter.
        For receiver side use the data type for "Select" statement :
        (http://help.sap.com/saphelp_nw70/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm)
         and in mapping use the values received from ECC and map them as <key> elements.
        The returned value will be part of the output parameters of the client proxy.
    Pravesh.

Maybe you are looking for

  • How to revert mid 2010 macbook pro to snow leopard

    I have a mid 2010 15" macbook pro which I want to sell.  It is currently running Mavericks.  It has a self-installed 1T disk upgrade. I believe it came with Leopard but I can't seem to find those os/x disks.  I do have the Snow Leopard disks which I

  • Missing 3d tools in Photoshop CS6 extended

    Hi everyone, I thought that I would seek help here before I endure the agony of Adobe technical help. I just installed the upgrade to CS6 Design and Web Premium yesterday. Received my email for the free upgrade yesterday morning and all went fine for

  • Print profiles no longer working correctly with CS6 64bit to my Epson R2880

    Hi, until recently, my print profiles were working correctly  with CS6 64bit (Win 7 ultimate 64) to my Epson R2880, they now print washed out/desaturated  but the same profiles still print correctly using Lightroom 4. has there  been an update that c

  • I upgraded to 7.0.1 and now my library is gone. . . Please help

    I am using a PC, and updated to iTunes 7.0.1. My music and iTunes are stored on an external hard drive, but I think that the upgrade was written to my regular drive. I still have all the files and library files. Is there a way to restore this with ou

  • Why is 1 album split up in itunes?

    i have an album with 11 tracks and it shows up as 6 seperate albums in itunes? i have checked the info and it looks the same for the album name.