JDBC Adapter - transaction handling

Hi,
I have a question. I use graphical Message Mapping and standard documents formats for Receiver JDBC Adapter.
Now I need to push a delete call and insert calls in one message looks like that one f.e.:
  <?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_CostcentreUpdate xmlns:ns0="http://rtl.de/xi/TransCostcenter">
- <StmName>
- <dbTableName action="DELETE">
  <table>KOSTENSTELLEN</table>
  </dbTableName>
- <dbTableName action="INSERT">
  <table>KOSTENSTELLEN</table>
- <access>
  <KOSTL>0000001000</KOSTL>
  <GUELTVON>2005-09-01</GUELTVON>
  <GUELTBIS>9999-12-31</GUELTBIS>
  <ABTEI>Test1</ABTEI>
  <VERAK>Name1</VERAK>
  <KHINR>K1000_1010</KHINR>
  <KTEXT>Test1</KTEXT>
  </access>
- <access>
  <KOSTL>0000001001</KOSTL>
  <GUELTVON>2005-03-01</GUELTVON>
  <GUELTBIS>9999-12-31</GUELTBIS>
  <ABTEI>Test1</ABTEI>
  <VERAK>Name2</VERAK>
  <KHINR>K1000_1010</KHINR>
  <KTEXT>Test2</KTEXT>
  </access>
- <access>
  <KOSTL>0000001006</KOSTL>
  <GUELTVON>2006-04-01</GUELTVON>
  <GUELTBIS>9999-12-31</GUELTBIS>
  <ABTEI>Test1</ABTEI>
  <VERAK>Name3</VERAK>
  <KHINR>K1000_1010</KHINR>
  <KTEXT>Test3</KTEXT>
  </access>
  </dbTableName>
</StmName>
</ns0:MT_CostcentreUpdate>
Because I need to do both (delete & insert) in one transaction mode. But i will not work at the moment
I always get error:
com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'KOSTENSTELLEN' (structure 'StmName'): java.sql.SQLException: FATAL ERROR document format: invalid level 5' found (structure 'StmName')
Thanks for any help
Matt

Hi Matthias,
you need to have two statements (StmName), one for delete, one for insert.
Regards,
Udo

Similar Messages

  • Multiple Stored Procs in Receiver JDBC with transaction handling

    Hi All,
    We have a requirement to call  two Stored procedured in Receiver JDBC -- such that if any one of those procedure fails it should rollback the transaction/ or in other words commit only when both are successful.
    Is this handled in Receiver JDBC adapter?
    Thanks,
    Himadri

    Hello KK,
    Combining is not an option available for us.
    Our requirement is there are two SPs. --  SP1 and SP2. SP1 is mapped from the header segment and called only once. SP2 is from Item segment and called multiple times based on number of items. If anyone of those calls fails the transaction should be rolled back.
    Is it possible in the standard JDBC call in PI?
    Thanks and Regards,
    Himadri Chakraborty

  • Database adapter transaction handling

    I am assuming that when one writes (insert/update/delete) to a database via the appropriate adapter that each write action does an auto-commit, or rollback. I want to have control of this commit/rollback transaction for both sync and async database adapter interactions. How do I turn off 'auto' transactions and I issue an appropriate commit/rollback.
    Thanks - Casey

    Hi Venajamin,
    If you have selected the option NO TRANSACTION HADLING, it implies that the Transaction Handliong of your Database has been truned off.
    <i>Set the indicator if you want to deactivate the logical unit of work, which the JDBC adapter requires to guarantee that data in the database is consistent.
    <b>This option is required for JDBC drivers that do not support transactions.</b> To avoid data inconsistencies in the database when the isolation level is lowered, ensure that multiple database transactions cannot access the database simultaneously.</i>
    From the link,
    http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm
    Regards,
    Bhavesh

  • JDBC Adapter - Error Handling

    Hi,
    I have a question with JDBC Sender Adapter. In my scenario, SAP XI will retrieve input data using JDBC Sender Adapter. Here is my question, What would happen if input data is wrong and cannot pass mapping in XI? Would XI send success record to target system?
    For example, If XI retrieves 50 records from JDBC sender adapter and 3 records are identified as error record in XI mapping, would XI send 47 records(success records) to target system or all 50 records will be marked as error and no data will be sent to target system?
    Regards,
    Pavin

    Hi,
    I'm using select query in Integration Directory to select input data from staging database. How would XI process input data? Would it see input data as one message or many messages according to no of records in staging database?
    p.s. Currently, I don't have an access to XI system. So, I need help from someone who has been through this scenario before. Thank you.
    Regards,
    Pavin

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

  • Transaction Handling - JDBC Receiver Adapter - Multiple SP Calls

    Hello,
    I have the following scenario:
    I send an XML-SQL structure with multiple statment elements (each of them calling a different stored procedure). A stored procedure raises an error back to the JDBC Receiver Adapter in case of error.
    Is it possible to have transaction handling in the JDBC Receiver to ensure:
    - Commit only after ALL stored procedures where succesful (no error risen during calls)
    - Rollback of ALL already called stored procedures in case an error has been risen
    How can I implement these requirements in the JDBC Receiver Adapter?

    One more comment, I have found the following info for JDBC Drivers:
    <i> "JDBC driver's default is to autocommit, meaning that the result of every SQL statement is permanent as soon as it is executed. This is why the course hasn't had to be concerned with transactions so far, and is perfectly acceptable in many cases."</i>
    So I think that each SP-Call is automatically commited in case autocommit on JDBC Driver Level is set to "true". Does anyone know where I can change these settings? Directly on JDBC Receiver Adapter or do I have to go to Visual Admin for those changes?

  • Transaction handling in sender JDBC adapter

    Hello,
    In a scenario where a third party application updates a field (counting it up) and we pick up these counts and zero out the field with the sender JDBC adapter, we would like that the third party application is not able to update while the JDBC sender adapter is processing.
    We were under the assumption that the select and update statements of the sender JDBC adapter where executed within the same DB transaction and set the isolation level to "repeatable read" to make sure the third party app. could  not update while the adapter is processing.
    This had no effect.
    Do the select and update statement occur within the same transaction?
    Thanks,
    Dan
    Edited by: Dan Hansen on May 5, 2008 9:58 AM

    Thanks for the answers so far, I have looked through this and can find no reason why the current set up with "repeatable_read" should not work... a little more info. We are running against a MSSQL 2005 database using a table with the following structure.
    CREATE TABLE [dbo].[OPERATION] (
         [WERKS] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
         [AUFNR] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
         [VORNR] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
         [SSAVD] [datetime] NULL ,
         [ARBPL] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
         [MGVRG] [bigint] NULL ,
         [LMNGA] [bigint] NULL ,
         [LTXA1] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
         [ZCONFQTY] [numeric](18, 0) NULL ,
         [ZTIMESTAMP] [datetime] NULL ,
         [ZSTATUS] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
         [STAT] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
         [SSEVD] [datetime] NULL ,
         [FSEVD] [datetime] NULL ,
         [FSAVD] [datetime] NULL ,
         [XMNGA] [bigint] NULL ,
         [RMNGA] [bigint] NULL ,
         [RUECK] [bigint] NULL ,
         [ZPACKQTY] [bigint] NOT NULL ,
         [STEUS] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
         [ZSCRAPQTY] [numeric](18, 0) NULL ,
         [ZREWORKQTY] [numeric](18, 0) NULL ,
         [BEARZ] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
         [BEAZE] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
         [RUEST] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
         [RSTZE] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
    ) ON [PRIMARY]
    GO
    We read information about the quantities per primary key combination with the select statement where the ZSTATUS field is "CONF" and then zero out the quantity field and set the ZSTATUS to CONF2SAP with the update statement.
    Another app counts up the quantities and sets the ZSTATUS to CONF as needed.
    Sometimes we see that we miss a count because we read before someone has increased the quantity but update back after they did and thereby zero out their entry.

  • DatabaseTransaction Handling--JDBC Adapter

    Hi,
    I am on XI 3,SP9. We are trying to delete all the records from the table first and then Insert Records into the table.
    I have definted seperate Statements for the Database Table Delete and INSERT in my XML Schema for the Receiver JDBC Adapter.
    The Problem: After Deleting if there is an Error in the INSERT the Adapter does NOT do a Rollback but it Auto-commits.
    Can someone tell me how do I stop this? I want to bundle both the Delete and Insert into 1 transaction. Any help would be appreciated.
    Here is the output XML from the adpater:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns:root xmlns:ns="urn:genentech:xi:fin_int_056:costcenters:sap_to_adaytum">
    - <StatementName1>
    <FI_OUT_COST_CENTER action="DELETE" />
    </StatementName1>
    + <StatementName2>
    - <FI_OUT_COST_CENTER action="INSERT">
    - <access>
    <COST_CENTER_ID>0001</COST_CENTER_ID>
    <COST_CENTER_NAME>Standard Hierarchy CO Area 0001</COST_CENTER_NAME>
    <PARENT_ID />
    <ELEMENT_LEVEL>0</ELEMENT_LEVEL>
    <TYPE>G</TYPE>
    <START_DATE>19970101</START_DATE>
    <CLIENT>200</CLIENT>
    </access>
    </FI_OUT_COST_CENTER>
    </StatementName2>
    - <StatementName2>
    + <FI_OUT_COST_CENTER action="INSERT">
    - <access>
    <COST_CENTER_ID>0001-1</COST_CENTER_ID>
    <COST_CENTER_NAME>Administration</COST_CENTER_NAME>
    <PARENT_ID>0001</PARENT_ID>
    <ELEMENT_LEVEL>1</ELEMENT_LEVEL>
    <TYPE>G</TYPE>
    <START_DATE>19970101</START_DATE>
    <CLIENT>200</CLIENT>
    </access>
    </FI_OUT_COST_CENTER>
    </StatementName2>
    - <StatementName2>
    - <FI_OUT_COST_CENTER action="INSERT">
    + <access>
    <COST_CENTER_ID>0001-1-1</COST_CENTER_ID>
    <COST_CENTER_NAME>Executive</COST_CENTER_NAME>
    <PARENT_ID>0001-1</PARENT_ID>
    <ELEMENT_LEVEL>2</ELEMENT_LEVEL>
    <TYPE>G</TYPE>
    <START_DATE>19970101</START_DATE>
    <CLIENT>200</CLIENT>
    </access>
    </FI_OUT_COST_CENTER>
    </StatementName2>
    + <StatementName2>
    - <FI_OUT_COST_CENTER action="INSERT">
    - <access>
    <COST_CENTER_ID>SAP-DUMMY</COST_CENTER_ID>
    <COST_CENTER_NAME>SAP dummy</COST_CENTER_NAME>
    <PARENT_ID>0001-1-1</PARENT_ID>
    <ELEMENT_LEVEL>3</ELEMENT_LEVEL>
    <TYPE>C</TYPE>
    <START_DATE>19970101</START_DATE>
    <CLIENT>200</CLIENT>
    </access>
    </FI_OUT_COST_CENTER>
    </StatementName2>
    Thanks
    Ashish

    Hi,
    I have XI 3.0 with SP10 Installed.
    We do not have the JDBC Transaction handling enabled.
    So how did it work for you? I do not have the Auto-Commit  checkbox enabled.
    Here is my sample xml:
    If there is any error in the INSERT, THE DELETE does NOT rollback. Please advice.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns18:root xmlns:ns18="urn:genentech:xi:fin_int_010:wbs:sap_to_adaytumroot">
    - <statement1>
    - <db_fi_out_wbs action="DELETE">
      <table>FI_OUT_WBS</table>
      </db_fi_out_wbs>
      </statement1>
    - <statement2>
    - <db_fi_out_wbs action="UPDATE_INSERT">
      <table>FI_OUT_WBS</table>
    - <access>
      <OBJECT_TYPE>P</OBJECT_TYPE>
      <PROJECT_TYPE />
      <ELEMENT_ID>100</ELEMENT_ID>
      <ELEMENT_NAME>ASHISH SINGH</ELEMENT_NAME>
      <PARENT_ID />
      <SEARCH1 />
      <SEARCH2 />
      <KRON />
      <LABR />
      <CLIENT>200</CLIENT>
      <DATE_CREATED>28-Feb-2005</DATE_CREATED>
      </access>
    - <key>
      <OBJECT_TYPE>P</OBJECT_TYPE>
      <ELEMENT_ID>100</ELEMENT_ID>
      <CLIENT>200</CLIENT>
      </key>
      </db_fi_out_wbs>
      </statement2>
    - <statement2>
    - <db_fi_out_wbs action="UPDATE_INSERT">
      <table>FI_OUT_WBS</table>
    - <access>
      <OBJECT_TYPE>P</OBJECT_TYPE>
      <PROJECT_TYPE />
      <ELEMENT_ID>1000</ELEMENT_ID>
      <ELEMENT_NAME />
      <PARENT_ID />
      <SEARCH1 />
      <SEARCH2 />
      <KRON />
      <LABR />
      <CLIENT>200</CLIENT>
      <DATE_CREATED>28-Feb-2005</DATE_CREATED>
      </access>
    - <key>
      <OBJECT_TYPE>P</OBJECT_TYPE>
      <ELEMENT_ID>1000</ELEMENT_ID>
      <CLIENT>200</CLIENT>
      </key>
      </db_fi_out_wbs>
      </statement2>
    - <statement2>
    - <db_fi_out_wbs action="UPDATE_INSERT">
      <table>FI_OUT_WBS</table>
    - <access>
      <OBJECT_TYPE>P</OBJECT_TYPE>
      <PROJECT_TYPE />
      <ELEMENT_ID>10000</ELEMENT_ID>
      <ELEMENT_NAME>SY Test</ELEMENT_NAME>
      <PARENT_ID />
      <SEARCH1 />
      <SEARCH2 />
      <KRON />
      <LABR />
      <CLIENT>200</CLIENT>
      <DATE_CREATED>28-Feb-2005</DATE_CREATED>
      </access>
    - <key>
      <OBJECT_TYPE>P</OBJECT_TYPE>
      <ELEMENT_ID>10000</ELEMENT_ID>
      <CLIENT>200</CLIENT>
      </key>
      </db_fi_out_wbs>
      </statement2>
    - <statement2>
    - <db_fi_out_wbs action="UPDATE_INSERT">
      <table>FI_OUT_WBS</table>
    - <access>
      <OBJECT_TYPE>W</OBJECT_TYPE>
      <PROJECT_TYPE>01</PROJECT_TYPE>
      <ELEMENT_ID>10000</ELEMENT_ID>
      <ELEMENT_NAME>SY Test</ELEMENT_NAME>
      <PARENT_ID />
      <SEARCH1 />
      <SEARCH2 />
      <KRON />
      <LABR />
      <CLIENT>200</CLIENT>
      <DATE_CREATED>28-Feb-2005</DATE_CREATED>
      </access>
    - <key>
      <OBJECT_TYPE>W</OBJECT_TYPE>
      <ELEMENT_ID>10000</ELEMENT_ID>
      <CLIENT>200</CLIENT>
      </key>
      </db_fi_out_wbs>
      </statement2>
    - <statement2>
    - <db_fi_out_wbs action="UPDATE_INSERT">
      <table>FI_OUT_WBS</table>
    - <access>
      <OBJECT_TYPE>W</OBJECT_TYPE>
      <PROJECT_TYPE>01</PROJECT_TYPE>
      <ELEMENT_ID>10000.01</ELEMENT_ID>
      <ELEMENT_NAME>SY Test</ELEMENT_NAME>
      <PARENT_ID>10000</PARENT_ID>
      <SEARCH1>U Field 2</SEARCH1>
      <SEARCH2 />
      <KRON />
      <LABR />
      <CLIENT>200</CLIENT>
      <DATE_CREATED>28-Feb-2005</DATE_CREATED>
      </access>
    - <key>
      <OBJECT_TYPE>W</OBJECT_TYPE>
      <ELEMENT_ID>10000.01</ELEMENT_ID>
      <CLIENT>200</CLIENT>
      </key>
      </db_fi_out_wbs>
      </statement2>
    - <statement2>
    - <db_fi_out_wbs action="UPDATE_INSERT">
      <table>FI_OUT_WBS</table>
    - <access>
      <OBJECT_TYPE>W</OBJECT_TYPE>
      <PROJECT_TYPE>01</PROJECT_TYPE>
      <ELEMENT_ID>10000.01.0001</ELEMENT_ID>
      <ELEMENT_NAME>SY Test</ELEMENT_NAME>
      <PARENT_ID>10000.01</PARENT_ID>
      <SEARCH1>U Field 2</SEARCH1>
      <SEARCH2 />
      <KRON />
      <LABR />
      <CLIENT>200</CLIENT>
      <DATE_CREATED>28-Feb-2005</DATE_CREATED>
      </access>
    - <key>
      <OBJECT_TYPE>W</OBJECT_TYPE>
      <ELEMENT_ID>10000.01.0001</ELEMENT_ID>
      <CLIENT>200</CLIENT>
      </key>
      </db_fi_out_wbs>
      </statement2>
    - <statement2>
    - <db_fi_out_wbs action="UPDATE_INSERT">
      <table>FI_OUT_WBS</table>
    - <access>
      <OBJECT_TYPE>W</OBJECT_TYPE>
      <PROJECT_TYPE>01</PROJECT_TYPE>
      <ELEMENT_ID>10000.01.0001.0001</ELEMENT_ID>
      <ELEMENT_NAME>SY Test</ELEMENT_NAME>
      <PARENT_ID>10000.01.0001</PARENT_ID>
      <SEARCH1>U Field 2</SEARCH1>
      <SEARCH2 />
      <KRON />
      <LABR />
      <CLIENT>200</CLIENT>
      <DATE_CREATED>28-Feb-2005</DATE_CREATED>
      </access>
    - <key>
      <OBJECT_TYPE>W</OBJECT_TYPE>
      <ELEMENT_ID>10000.01.0001.0001</ELEMENT_ID>
      <CLIENT>200</CLIENT>
      </key>
      </db_fi_out_wbs>
      </statement2>
    - <statement2>
    - <db_fi_out_wbs action="UPDATE_INSERT">
      <table>FI_OUT_WBS</table>
    - <access>
      <OBJECT_TYPE>P</OBJECT_TYPE>
      <PROJECT_TYPE />
      <ELEMENT_ID>10001</ELEMENT_ID>
      <ELEMENT_NAME>2H7 Immunology</ELEMENT_NAME>
      <PARENT_ID />
      <SEARCH1 />
      <SEARCH2 />
      <KRON />
      <LABR />
      <CLIENT>200</CLIENT>
      <DATE_CREATED>28-Feb-2005</DATE_CREATED>
      </access>
    - <key>
      <OBJECT_TYPE>P</OBJECT_TYPE>
      <ELEMENT_ID>10001</ELEMENT_ID>
      <CLIENT>200</CLIENT>
      </key>
      </db_fi_out_wbs>
      </statement2>
    - <statement2>
    - <db_fi_out_wbs action="UPDATE_INSERT">
      <table>FI_OUT_WBS</table>
    - <access>
      <OBJECT_TYPE>P</OBJECT_TYPE>
      <PROJECT_TYPE />
      <ELEMENT_ID>10002</ELEMENT_ID>
      <ELEMENT_NAME>SY Test</ELEMENT_NAME>
      <PARENT_ID />
      <SEARCH1 />
      <SEARCH2 />
      <KRON />
      <LABR />
      <CLIENT>200</CLIENT>
      <DATE_CREATED>28-Feb-2005</DATE_CREATED>
      </access>

  • JDBC Adapter-Implicit COMMIT--Need to have 1 Transaction

    Hi,
    I am on XI 3,SP9. We are trying to delete all the records from the table first and then Insert Records into the table.
    I have definted seperate Statements for the Database Table Delete and INSERT in my XML Schema for the Receiver JDBC Adapter.
    The Problem: After Deleting if there is an Error in the INSERT the Adapter does NOT do a Rollback but it Auto-commits.
    Can someone tell me how do I stop this? I want to bundle both the Delete and Insert into 1 transaction.
    Here is the output XML from the adpater:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns:root xmlns:ns="urn:genentech:xi:fin_int_056:costcenters:sap_to_adaytum">
    - <StatementName1>
      <FI_OUT_COST_CENTER action="DELETE" />
      </StatementName1>
    + <StatementName2>
    - <FI_OUT_COST_CENTER action="INSERT">
    - <access>
      <COST_CENTER_ID>0001</COST_CENTER_ID>
      <COST_CENTER_NAME>Standard Hierarchy CO Area 0001</COST_CENTER_NAME>
      <PARENT_ID />
      <ELEMENT_LEVEL>0</ELEMENT_LEVEL>
      <TYPE>G</TYPE>
      <START_DATE>19970101</START_DATE>
      <CLIENT>200</CLIENT>
      </access>
      </FI_OUT_COST_CENTER>
      </StatementName2>
    - <StatementName2>
    + <FI_OUT_COST_CENTER action="INSERT">
    - <access>
      <COST_CENTER_ID>0001-1</COST_CENTER_ID>
      <COST_CENTER_NAME>Administration</COST_CENTER_NAME>
      <PARENT_ID>0001</PARENT_ID>
      <ELEMENT_LEVEL>1</ELEMENT_LEVEL>
      <TYPE>G</TYPE>
      <START_DATE>19970101</START_DATE>
      <CLIENT>200</CLIENT>
      </access>
      </FI_OUT_COST_CENTER>
      </StatementName2>
    - <StatementName2>
    - <FI_OUT_COST_CENTER action="INSERT">
    + <access>
      <COST_CENTER_ID>0001-1-1</COST_CENTER_ID>
      <COST_CENTER_NAME>Executive</COST_CENTER_NAME>
      <PARENT_ID>0001-1</PARENT_ID>
      <ELEMENT_LEVEL>2</ELEMENT_LEVEL>
      <TYPE>G</TYPE>
      <START_DATE>19970101</START_DATE>
      <CLIENT>200</CLIENT>
      </access>
      </FI_OUT_COST_CENTER>
      </StatementName2>
    + <StatementName2>
    - <FI_OUT_COST_CENTER action="INSERT">
    - <access>
      <COST_CENTER_ID>SAP-DUMMY</COST_CENTER_ID>
      <COST_CENTER_NAME>SAP dummy</COST_CENTER_NAME>
      <PARENT_ID>0001-1-1</PARENT_ID>
      <ELEMENT_LEVEL>3</ELEMENT_LEVEL>
      <TYPE>C</TYPE>
      <START_DATE>19970101</START_DATE>
      <CLIENT>200</CLIENT>
      </access>
      </FI_OUT_COST_CENTER>
      </StatementName2>
    Thanks
    Ashish

    If an exception occurs in XI 3.0 the JDBC adapter doesn't actually issue a ROLLBACK. It just closes the connection. The problem is that Oracle will then  COMMIT this since the connection was explicitly closed (as opposed to dropped) even if Auto-commit is turned off at the DB level.
    SAP has let us know that they will fix this by including the ROLLBACK. It will be included in SP11.
    Thanks,
    J

  • JDBC Sender Adapter - Transaction & Parameterized Query?

    Dear Experts,
    I'm curious about the JDBC sender adapter in SAP PI.
    As I see from the document and have been searching in the Internet, The default procedure of the sender JDBC adapter is to first run a SELECT/Store Procedure query then update the records that have been read before.
    Configuring the Sender JDBC Adapter - Advanced Adapter Engine - SAP Library
    What I want to ask is:
    - What is the database transaction used for the SELECT and the UPDATE? I mean what if the SELECT is successful and the records have been sent to the IE, but the UPDATE failed. This way, the next polling run, the same records could be read again. Is it possible? Are the SELECT and UPDATE query atomic (if one fails the other fails too)?
    - Is it possible to have a parameterized query / stored procedure in sender JDBC adapter? Because seeing at the default procedure, there should be at least a field that will be used as a flag (for example the processed field needs to be updated to '1'). Something like:
              - SELECT * FROM table_a WHERE docno > $last_doc_no
                             $last_doc_no is a paramter or variable from PI
              - EXEC sp_do_something ( $param_a, $param_b )
                             $param_a, $param_b are parameters or variable in PI
    Thank you,
    Suwandi C.

    Hi Suwandi,
    all action to database are in one transaction and thats mean if one failed all failed.
    And it is possible to have parameterized storied procedure. You sould send something like
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:mt_proc xmlns:ns0="http://aaaa">
       <statementname>
          <stProc action="EXECUTE"/>
          <TABLE>PROCEDURE NAME</TABLE>
          <access>
             <param_in isInput="1" type="some_type">input param</param_in>
             <param_out isOutput="1" type="some_type"></param_out>
          </access>
       </statementname>
    </ns0:mt_proc>

  • Oracle Receiver JDBC Adapter - Handling Unicode Characters

    We have an IDOC to JDBC scenario.
    In this IDOC is sending data like -  10/14u2019/P7 After 4 there is special character coming from SAP ( It is not single quote).
    Mapping is going through OK and data is getting saved in Oracle Database as 10/14&#x19;/P7 with & # x 19;
    I came across following solution in forums and SAP Note.
    I am not sure how to modify Oracle JDBC URL to handle Unicode characters properly.
    Or is there any other approach we can follow to achieve this..
    Any input is really appreciated
    Q: I am inserting Unicode data into a database table or selecting Unicode data from a table. However, the data inserted into or retrieved from the table appears garbled. Why doesn't the JDBC Adapter handle Unicode correctly?
    A: While the JDBC Adapter is Unicode-aware, many JDBC drivers and/or database management systems aren't by default and need a codepage or Unicode-awareness to be configured explicitly. For the respective JDBC drivers, this codepage setting is often configured via the driver URL. For details, refer to the documentation of your JDBC driver or database management system.

    Hi Simona,
    1.To start the visual admin, execute "go" file:
    On Windows: Run \usr\sap\<SAPSID>\JC<xx>\j2ee\admin\go.bat
    On UNIX: Run /usr/sap/<SAPSID>/JC<xx>/j2ee/admin/go
    2.supply the credentials to login into visual admin
    3.under "cluster" tab select "server node"
    4.you will find "log viewer" under "services"
    Since you are new, I recommend you to take help from your BASIS team.
    Hope it helps !
    Hi Alwin,
    Just a quick clarification.
    I used the URL you have mentioned, when we were on SP5. After that we upgraded to SP9.
    From SP9, if you try to use the URL http://XISERVER:50000/AdapterFramework then it automatically redirects to a new webpage with the link to the URL i have mentioned.
    Regards,
    Sridhar

  • Exactly-Once Handling in Receiver JDBC Adapter

    Hi,
    I have doubt abt Exactly-Once Handling in Receiver JDBC Adapter.
    For Conflict Resolution as Database.
    Why there is need to define table as below ?
    In the database where the write-to tables are located you must create an additional table with two columns for this purpose. To define the table, specify the following:
    Database Table Name
    Enter the name of the table.
    Key Column Name
    Enter the name of the column in which the key is entered.
    Value Column Name
    Enter the name of the column in which the key value is entered.
    Please explain in simple language.

    Hi Abhishake,
    Thanks for your reply.
    I understant that the tables needs to be created in DB.
    But if you read the SAP Docs for conflict resolution. My undestanding is "During Database commit if AS Java is terminated then the message will be in unknown state, for this type of messgaes when the AS Java restarted the behaviour is defined by this parameters. If the message doesn't have primary key, then there is probablity when AS Java will try second time it may get the message in DB so a message can be duplicated. To avoid this condition it is mentioned that you must create additional table with three column".
    Please correct my understanding if I am wrong.
    My additional table needs to create & how it will resolve the problem.
    Thanks in advance.

  • Handling JDBC adapter errors in BPM

    Hi,
    I am using BPM to insert data in SQL server using a snychronous send.However i am not able to trap the adapter errors like server is down or could not insert because of key violation.
    Hence i decided to use transport level ack. But i understand that error description is returned in fault messages. Can i use fault messages in BPM???
    And also if that is not possible, I would like to know how can i configure alerts in JDBC adapter.
    Thanks in advance.

    Anand,
    I dont think this is possible. Fault Messages should be sent by the Application System back to XI , the Database in our case. AFAIK< the database cannot send back such fault messages and the error message is trapped in the JDBC adapters log. Try using Adapter Engine Alerts and this will cause the Message to be passed to your ALert framework from the adapter.
    Regards,
    Bhavesh

  • 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

  • Calling Stored Procedure from JDBC Adapter

    Hello,
    I am Updating a SQL Server Table using JDBC Adapter.
    Now I have multiple input rows and the procedure needs to be called for each set.
    Do I need to use multimapping for this or just generating multiple <b>Statement</b> node will solve?
    Also For this will there is any knows/ forseen problem (like Transaction handling) that I need to take care of?
    Thanks and Regards,
    Himadri
    Message was edited by:
            Himadri Chakraborty

    Himadri,
    You can just create multiple statement nodes in one message.
    I am not aware of any known or foreseen issues with this approach.
    Kind regads,
    Koen

Maybe you are looking for

  • Back Ground Job Issue

    Hi, My report program was executing successfully in the Foreground but not in the back ground.. Can any one help me on this? My report program has a selection screen..I entered the data for it at and through menu option Program->execute in background

  • Bold text in static text

    I want bold text in title of static_text. How to use it. Thanks

  • VPN issues

    I am trying to setup a VPN I have ports open on my router the mac os x sever firewall disabled... I can connect to the VPN via my iPhone, iPad, Laptop when connected via wifi to my local network but once I switch to 3G or am on someone elses wifi I a

  • Firefox doesn't handle chained deadkeys on Windows

    It seems that Firefox doesn't handle chained deadkeys as produced by for example this layout http://blogs.msdn.com/b/michkap/archive/2011/04/16/10154700.aspx . Correct characters are not produced as in contrast with them being produced in Windows exp

  • Cannot Find Whitespace

    I am trying to replace strings within a text file using the String methods replaceFirst and replaceAll. What I need to be able to do is pick up strings that have a leading whitespace. Because I want to replace words that begin with "wash" but not end