UPDATE statement in Receiver JDBC adapter

Hi all,
I would like to use UPDATE statement in my receiver JDBC adapter and would like to know how this UPDATE statement works in following case.
1) If i have 10 records to be updated in database, whether Commit happens at the end of all 10 records updation OR it will be for every record update?
Regards

Hi,
Then let me construct my query this way...
i have 10 records that needs to be updated to database, say For Ex: 7 records are updated successfully and 8th record has issue in updating the table.
In this case i would like to ROLLBACK entire 10 records with out committing any thing.
So if i use your 2nd option, it should perform as i expected right?
Regards

Similar Messages

  • How to examine the generated SQL statement in Receiver JDBC Adapter

    I have been searching this forum how to display te generated sql statement (by the jdbc receiver adapter).
    The only suggestion is to use RWB, but I was unable to find any details about how to do so.
    Any help is appreciated

    Hi,
    To add, u can see the SQL Statements in Audit log of RWB.
    Select Message Monitoring-> Adapter Engine. choose ur entry and click on Details option button, u can see the SQL Statements in Audit Log.
    Regards,
    Sudharshan
    Message was edited by:
            Sudharshan Aravamudan

  • Update statement problem for jdbc adapter

    Hi all
    In the jdbc sender adapter, I configured as follows:
    Query statement
    select * from pickdiff where tid is null
    Update statement
    delete from pickdiff where tid is null
    I got following error message:
    Database-level error reported by JDBC driver while executing statement 'delete from pickdiff where tid is null'. The JDBC driver returned the following error message: 'java.sql.SQLException: [SQLServer 2000 Driver for JDBC][SQLServer]Die Unterabfrage gab mehr als einen Wert zurück. Das ist ungültig, wenn die Unterabfrage auf =, !=, <, <= , >, >= folgt oder als Ausdruck verwendet wird.'. For details, contact your database server vendor.
    If I change the Update statement to
    update pickdiff set tid = 'sapxi' where tid is null
    Then everything is ok.
    Doese any one have some idea about this problem?
    Regards
    Hui

    Hi,
    The below statements are from SAP help...
    http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/frameset.htm
    The UPDATE statement must alter exactly those data records that have been selected by the SELECT statement. You can ensure this is the case by using an identical WHERE clause. (See Processing Parameters, SQL Statement for Query, and SQL Statement for Update below).
    &#9679;      Processing can only be performed correctly when the isolation level for transaction is set to repeatable_read or serializable.
    SQL statement for query: SELECT * FROM table WHERE processed = 0;
    SQL statement for update: UPDATE table SET processed = 1 WHERE processed = 0;
    processed is the indicator in the database.
    please see if setting the isolation level would help....Also are you getting this error always or is it intermitent ?
    Thanks,
    Renjith

  • Receiver jdbc adapter:how to implement the insert or update action in a sql

    Hi,gurus:
    I'm using receiver jdbc adapter now.
    You know, we have to gave the action the value 'update' or 'insert',but in our case,the action is variant--update or insert.It decides whether the record exists in the outer database.
    Can stored procedure do this?If I use stored procedure,then must I create a stored procedure in the outer database?
    Or some other ways to solute my issue?
    THanks in advance.

    Hi
    Use Action UPDATE_INSERT .
    This action check if a record exist with same key value then update that record. In case no record with key value found in database then record inserted to database.
    look receiver structure
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm

  • Messages are in hold state due to one message at receiver JDBC adapter

    Hello,
    I am using a receiver JDBC adapter and trying to send an XML file which has an insert query to insert some data into the database i.e., Oracle 9i.
    Here at the receiver side due to one message (  which is in to be delivered state) all other messages are got hold and waiting for long time.
    I am getting the exceptions as this,
    JDBC Adapter processing failed with Error processing request in sax parser: Error when executing statement for table/stored proc. 'FSASMGR.XTBL_KL06_IINQUIRY' (structure 'REC01'): java.sql.SQLException: ORA-12899: value too large for column "FSASMGR"."XTBL_KL06_IINQUIRY"."CASE_TITLE" (actual: 81, maximum: 80)
    Exception caught when executing statement for table/stored proc. 'FSASMGR.XTBL_KL01_ISTAFF_MST' (structure 'REC1'):
    java.sql.SQLException: ORA-00001: unique constraint (FSASMGR.XTBL_KL01_ISTAFF_MST) violated
    Can anyone help me out in solving this issue.
    THanks,
    Soorya

    hi surya,
    jdbc channel tries a request for n number of times(no of rettries),if that request fails it will take up the following requests,its not like it will process a request forever.
    to be delivered will be resulting if reciever is down or network between XI and database server is bad.
    try to ping databse server from XI host system.
    if everything is fine then look at the channel configuration->advanced->no of retries of database transaction on sql server.
    just redue the count to 1 and recheck.
    Regards,
    rama Krishna

  • When would you write a stored procedure in sender/receiver jdbc adapter

    Hi Everybody
    Can you tell any situation where you would need to write a stored procedure in the query sql statement of sender/ receiver jdbc adapter instead of writing SELECT statement there
    why do we need to write stored procedures
    thanks and regards,
    Anitha

    Hi Anitha,
    why do we need to write stored procedures
    Some times a single SQL statement will not suffice for ur transactions....
    Say u want to access from 2 tables and update based on some condition..
    or nested select statement...
    or u want to update a 2 nd table based on the values from 1st table... etc..
    In those places it's preferable for going for a Stored Procedure.
    The Stored Procedure can be used in both Sender and Receiver JDBC Adapter.
    Still nt clarified do post..
    Babu

  • Problem in Receiver JDBC Adapter

    Hello Gurus,
    I am trying SAP -> Oracle Database Scenario.
    Where i am passing Id and Email address into the Oracle.
    In Runtime workbench, Receiver JDBC adapter Channel, i am able to see that message is in Success.
    But if i am going into the Database and looking for that Record, it is not updating that record.
    I am not able to understand what is happening.
    Please help me out in this issue.
    Thanks,
    Akhil

    HI Akhil,
    I know you might have verified alll datat hat will be passing to JDBC...but may I kindly request you to confirm about the table name that was passed in the Mapping once again.
    While inserting or Updating are you using all the Key fields..that will allow you to create the unique entry..as if in case if the record is already exists then there may be problem of Indexing...of adding duplicate entry...and due to partial key fields Update statement will not work properly..
    Also verify the ORACLE  Database log...to get anymore details.
    Thanks
    Swarup

  • Specify Keys in Data Type for receiver JDBC adapter

    Hi guys,
    I have the following issue:
    In a proxy to JDBC scenario, I want to specify somehow the key values for the SQL statement in the data type that I define for the receiver JDBC adapter. Thus, I am using the following structure in data type:
    root
        Statement
               dbTable
               action
               table
               access
                      CustomerID
                      Name
                      HouseNo
               Key
                      CustomerID
    But in the SQL statement that is produced (I can see that in RWB, CC Monitoring, Audit Log), the "Key" segment is translated into "OR". E.g. UPDATE_INSERT ("A100" "Evaggelos Gkatzios" "El Alamein 19") OR ("A100")
    Do you have any ideas ?

    Hi,
    Its clear from the statement in RWB (in CC monitoring's auditlog) you are using UPDATE_INSERT as the action.
    Please correct me if this is OK. Now the interpretation of input xml file will be like this,
    If the input XML is in the following format
    <root>
    <Statement>
    <dbTable action=UPDATE_INSERT>
    <table>EXAMPLE</table>
    <access>
      <CustomerID>ABC</CustomerID>
      <Name>xyz</Name>
      <HouseNo>123</HouseNo>
    </access>
    <key>
      <CustomerID>DEF</CustomerID>
    </key>
    </dbTable>
    </Statement>
    </root>
    Resultant SQL after parsing the XML file will be,
    1. It will first check with the condition WHERE CustomerID = DEF. If it finds the record with this condition then it will update the record with CustomerID=ABC, Name =xyz & HouseNo=123.
    2. If it doesn't find any record with that CustomerID then, it will insert a new record with the same details.
    In auditlog, you will find two SQL statements like,
    1.UPDATE EXAMPLE SET CustomerID=ABC, Name =xyz & HouseNo=123 WHERE CustomerId=DEF
    2.INSERT INTO EXAMPLE VALUES(ABC,xyz,123)
    hope this has given clear information about your query,
    Regards,
    Soorya

  • RECEIVER JDBC ADAPTER----ROLLBACK IN XI

    Hi Gurus,
    I have a scenario with the receiver as JDBC adapter.If there is any error in updating to Database during the interface flow,how do Rollback occurs in XI???
    Please help......
    Regards,
    Sriparna

    Hi Sripam1,
    select SQL statement 'batch mode' ,
    i.e,
    see
    8. Defining Parameters in Advanced Mode
       6. If you want to collect SQL statements in a batch, select Batch Mode.
    of the SAP online help
    [Configuring the Receiver JDBC Adapter|http://help.sap.com/saphelp_nwpi711/helpdata/en/48/465581929734d9e10000000a42189d/content.htm]
    Also ensure that 'Database Auto-Commit-Enabled (No Transaction Handling)' is not enabled.
    Regards
      Kenny

  • Joins implementation receiver Jdbc Adapter

    Hi All
    I need  some suggestions on the following scenario
    Updation of a flag in a table where the column names in the WHERE clause are from two different tables in the same database.
    i.e
    UPDATE T1
    Set T1.flag =1
    where T1.columnA=value1 and T2.columnB=value2
    where T1 and T2 are two different tables in the same database,
    I want to accomplish this directly using UPDATE in JDBC receiver by using JOIN query in the structure.
    kindly reply
    thanks
    sd

    Hi Sd,
    You can execute an SQL statement directly in your Receiver JDBC adapter.
    Check this link for that,
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    Check the part for STATEMENTNAME6 and also the example for that in the same link,
    Regards,
    Bhavesh

  • Structure for Receiver Jdbc adapter for multiple tables

    Hi,
    For Receiver JDBC adapter,Standard structure
    structure as
    Statement
       Tablename(TABLE1)
            Action
            Access
    Can i make a structure like
    Statement
         Tablename(TABLE1)
            Action
            Access
                fields....
         Tablename(TABLE2)
            Action
            Access
                fields......
    As i am using tables and I want to insert or update both of them or one based on some conditions.
    Will Insert be possible in single Statement or I have to create separate statements for each table. Can you please help me on this?
    Thanks in advance
    Best Regards,
    Harleen Kaur Chadha

    Hi Harleen,
            As already said by Dharanveer, all that you need to do is replicate the Statement level, so, istead of using this structure:
    Statement
    Tablename(TABLE1)
       Action
       Access
         fields....
    Tablename(TABLE2)
       Action
       Access
         fields......
            You will construct something like this:
    Statement1
    Tablename(TABLE1)
       Action
       Access
         fields....
    Statement2
    Tablename(TABLE2)
       Action
       Access
         fields......
           And this structure will be created in a single Data Type, that will be used to create a single Message Type, that you will use in your Message Mapping, and, the 2(or more tables that you need to manipulate) will be inserted/updated without problems using this approach.
           Thank you, and best regards,
           Wilson

  • Sync Receiver JDBC Adapter

    Hi All,
    I was trying to make a synchronous call to a receiver jdbc adapter with the help of
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3928. [original link is broken] [original link is broken] [original link is broken] [original link is broken]
    I am getting the following error in jdbc adapter.
    <i>com.sap.aii.af.ra.ms.api.DeliveryException: ERROR:Processing request: Error when executing statement for table/stored proc. 'MISDetails': java.sql.SQLException: FATAL ERROR document format: structure 'STATEMENT', key element 'FiscalYear' contains no values</i>
    My Source message is
    <i><?xml version="1.0" encoding="UTF-8"?>
    <ns:MT_FILE_OUT xmlns:ns="urn:ters">
      <REQUEST>
        <FISCALYEAR>2007</FISCALYEAR>
        <YEARMONTH>1</YEARMONTH>
        <OPERATION>EQ</OPERATION>
      </REQUEST>
    </ns:MT_FILE_OUT></i>
    And JDBC request message is ..
    <i><?xml version="1.0" encoding="UTF-8"?>
    <ns:MT_JDBC_REQ xmlns:ns="urn:ters">
    <STATEMENT>
    <TABLENAMEACTION="SELECT">
    <TABLE>MISDetails</TABLE>
    </TABLENAME>
    <ACCESS>
    <FiscalYear> </FiscalYear>
    <YearMonth> </YearMonth><ProductCode> </ProductCode><TargetVolume> </TargetVolume>
    </ACCESS>
    <KEY>
    <FiscalYear compareOperation="EQ">2007</FiscalYear>
    </KEY>
    </STATEMENT>
    </ns:MT_JDBC_REQ></i>
    Regards,
    Sumit

    Sumit, the problem is that </TABLENAME> is closed ealier than necessary.
    This is how the JDBC datatype should be,
    <?xml version="1.0" encoding="UTF-8"?>
    <ns:MT_JDBC_REQ xmlns:ns="urn:ters">
    <STATEMENT>
    <TABLENAME ACTION="SELECT">
    <TABLE>MISDetails</TABLE>
    <ACCESS>
    <FiscalYear> </FiscalYear>
    <YearMonth> </YearMonth>
    <ProductCode> </ProductCode>
    <TargetVolume> </TargetVolume>
    </ACCESS>
    <KEY>
    <FiscalYear compareOperation="EQ">2007</FiscalYear>
    </KEY>
    <b></TABLENAME></b>
    </STATEMENT>
    </ns:MT_JDBC_REQ>
    The TABLE, ACCESS and KEY come under the TABLENAME tag.
    Regards,
    Bhavesh

  • Multiple table insert using receiver jdbc adapter

    Hi,
    I am trying to insert data in to two tables in a single structure using receiver jdbc adapter. I am not using any stored procedure to insert data instead directly inserting the data using PI. Please see the structure I am using.
    SOURCE side:
    DT_ABC_SENDER
    --IT_HEADER_TEXT
      -- EBELN
      -- LINENO
      --TDTEXT
    --IT_ITEM_TEXT
      -- EBELN
      -- LINENO
      --TDLINE
    TARGET side:
    DT_ABC_RECEIVER
    --InsertStatement
         --HEADER_TEXT
                -- action                         (insert)
                -- Table                          (Table 1)
                --access
                     -- IDS_ENQ_NO
                     -- IDS_DESC
                     -- IDS_TEXT
       --ITEM_TEXT
                -- action                         (insert)
                -- Table                          (Table 2)
                --access
                     -- IIS_ENQ_NO
                     -- IIS_DESC
                     -- IIS_TEXT
    Using the above structure I am able to successfully insert the data in Table 1 but data is not getting inserted in Table 2.
    In sxmb_moni it is saying message successfully delivered but I but there is data insertion took place in Table 2.
    Please help me urgently.
    Thanks in advance.
    Neeeraj

    Hi Neeraj,
    Add --InsertStatement statement for the second table structure in the same level of first InsertStatement.
    Target structure like this:
    DT_ABC_RECEIVER
    --InsertStatement
         --HEADER_TEXT
                -- action                         (insert)
                -- Table                          (Table 1)
                --access
                     -- IDS_ENQ_NO
                     -- IDS_DESC
                     -- IDS_TEXT
    --InsertStatement
       --ITEM_TEXT
                -- action                         (insert)
                -- Table                          (Table 2)
                --access
                     -- IIS_ENQ_NO
                     -- IIS_DESC
                     -- IIS_TEXT

  • Using Stored procedure in sender or receiver jdbc adapter

    Hi All,
    Please let me know simple blogs for Stored procedure used in sender or receiver jdbc adapter to get data from 2-3 tables
    Thanks

    Hi
    To work with Store proceudres (SP) you have to create the SP's in database like Oracle, Mssql or Msaccess.
    Ususally the SP creations are done by database experts. For more info about "SP" try Googling!
    The below blog is about SP but not the one you expect!
    /people/itisha.alok/blog/2009/03/23/jdbc-stored-procedure-returning-multiple-resultsets
    Executing an Oracle Stored Procedure from Sender JDBC adapter
    Sender Adapter - -
    SP will contain the select Query alone or with it will contain insert, delete statement too.
    Receiver:
    SP will have insert or delete satement.
    Adapter
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/frameset.htm
    The below details are required  to configure the adapters
    Driver details
    database name
    Procedure name
    user name
    password,
    Regards
    Ramg

  • Dml in Receiver JDBC ADAPTER

    Dear all,
    By putting action=Insert in the Receiver Structure ,I could able to insert the data.
    When I am Trying Delete or Update in the Same way I could not see the data modified in the table.
    Please Let me know how to achieve the same.
    Thanks,
    Srinivas

    Hi,
    go thru these links:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    /people/alessandro.berta/blog/2005/10/04/save-time-with-generalized-jdbc-datatypes
    http://help.sap.com/saphelp_nw2004s/helpdata/en/4d/8c103e05df2e4b95cbcc68fed61705/frameset.htm
    Also have alook at this
    Receiver JDBC
    /people/sameer.shadab/blog/2005/10/24/connecting-to-ms-access-using-receiver-jdbc-adapter-without-dsn
    /people/ajay.kumar/blog/2005/03/24/writing-bsp-for-sap-r3-version-46
    /people/sugree.phatanapherom/blog/2005/08/14/configuring-sld-in-sneak-preview-sap-netweaver-04-sneak
    /people/sanyam.kapur/blog/2005/04/30/custom-fields-and-bw-extractors-making-a-mixed-marriage-work-part-ii
    Regards,
    Akshay Jamgaonkar.
    Reward points if find useful.
    Message was edited by:
            Akshay Jamgaonkar

Maybe you are looking for

  • Reading in text file

    I have a text file that contains something like this: <setting name="ip_address" serializeAs="String">                 <value>239.0.0.1</value> I want to be able to search through the text file and based upon finding <setting name="ip_address" serial

  • /System/Library/Extensions/System.kext/PlugIns/BSDKernel.kext

    I get an error box reading:  The system extension "/System/Library/Extensions/System.kext/PlugIns/BSDKernel.kext" was installed improperly and cannot be used. please try reinstalling it, or contact the product's vendor for an update.  Is there any wa

  • Exporting best quality for HDV

    Hi - I've been editing for the first time on HDV 1080i50 in FCP - I want to export as a Quicktime in the best setting possible but not sure what it is. When I go export quicktime hdv1080i it only lets me do medium quality - in the past when I've expo

  • How do I change primary login e-mail to an address previously used as recovery e-mail?

    Hi all, I'm moving away from my former ISP and is trying to change my primary login e-mail (supplied from the ISP in question) for my Apple ID to a Gmail address. The problem is that I have registered the Gmail address as one of my recovery e-mail ad

  • Mounting directories in RAM to load apps instantly

    I saw this on the gentoo forums. http://forums.gentoo.org/viewtopic-t-296892.html Can we do anything like this in arch? I've got 4gigs of ram, so plenty to spare. I'm also pretty nooby, so please be specific if you can about what commands to run and