Duplicate data updating in Oracle DB by JDBC adapter

Hi ,
I am developed Idoc to JDBC senario. One sigments was coming N number of times. for example 30 time. In that 3 diffrent disribution channel data. but I want to send only 3 records for each distribution channel.
I connected that segment to access in JDBC structure to repaet the data, because of this all 30 records are going. I want to avoid duplicate records. Please help how to do it?
Thanks,
Venkat

Hi,
You can control this in mapping.
You can suppress the duplicate records in mapping.
-Supriya.

Similar Messages

  • NCHAR issue with oracle database using JDBC adapter

    Hi,
    We have a requirement to develop an XI interface from FTP server(File adapter) to oracle database using JDBC adapter. In the oracle database table few fields are of type NCHAR/NVARCHAR. when we try to insert the character(A,B,c..) values into oracle table fields of type NCHAR/NVARCHAR, we are getting the following error message in the JDBC adapter audit log. IF we pass the numeric value to the same field, then we are able to insert the records successfully.
    Unable to execute statement for table or stored procedure. 'IPCSDD_DOWNLOAD_PROCESS' (Structure 'StatementName1') due to java.sql.SQLException: ORA-00904: "P": invalid identifier
    2010-10-19 22:29:59 Error JDBC message processing failed; reason Error processing request in sax parser: Error when executing statement for table/stored proc. 'IPCSDD_DOWNLOAD_PROCESS' (structure 'StatementName1'): java.sql.SQLException: ORA-00904: "P": invalid identifier
    2010-10-19 22:29:59 Error MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'IPCSDD_DOWNLOAD_PROCESS' (structure 'StatementName1'): java.sql.SQLException: ORA-00904: "P": invalid identifier
    Please find the system information below.
    Oracle version- 10.2.4
    XI version - 3.0/ service pack 19
    JDBC driver- oracle.jdbc.driver.OracleDriver
    Please suggest.
    Thanks,
    Venkata
    Edited by: Venkata Narayana  Eepuri on Oct 21, 2010 12:10 AM

    Dear Venkata Narayana,
    Concerning the error, kindly go through the following note :
    731 - Collective note: ORA-00904
    follow the recommendations mentioned in that and please check if that helps.
    Best Regards
    Nishwanth

  • Read data from 3 tables in sender JDBC Adapter

    Hi All,
    I doing a scenario JDBC to IDOC I need to read 3 tables of ORACLE.  how JDBC sender adapter will retrieve data from more than 3 ORACLE tables and also i need to update control status fields of these tables.
    Please provide me the syntax for the select and update.
    Thanks in Advance
    Regards,
    Nisha

    Hi,
    Select Syntax:-  select Table1.Field1, Table1.Field2, Table2.Field3, Tabl2.Field4
    From Table1 , Table2 where Table1.Field1 = Table2.Field3.
    Similary use this Syntax for three Tables.
    Update Syntax: -
    In SP Check if Data Seletion is suceesful then Use the seperate Update statement for each table.
    like Update Table1 set Field5 = 'Value'
    where Field1  = 'Value'.
    Also use the refernce link provided by Mr.Vinithra Iyangar.
    Thanks
    Regards
    Jagesh

  • Access an Oracle DB using JDBC adapter

    Hi, I'm trying to make an simple test for checking if the connection between XI and Oracle DB is working fine and following the weblog nr. 2018 ( Save Time with generalized JDBC datatypes ) i've made my structures in order to achived that. I've declared the field action as SELECT than the table name ... and in the IB set the needed configurations. So when i exec my interface i've got the black/white flag bur if i look at the adapter engine i see that the JDBC adapter is achieved but i got 2 errors " <b>No 'action' attribute found in XML document('action' attribute missing or wrong XML structure)</b> and <b>Exception caught by adapter framework: error processing request in sax parser: No 'action' attribute found in XML document('action' attribute missing or wrong XML structure)</b>. Can anybody provide me some help ??? Thanks in advance.
    JMMatos

    Hi,
    This is how my DT looks like:
    Structure           Category      Type
    Data_JDBCReceiver   Complex Type
      Statement
        Table_name
          action        Attribute
          table
        access                        Data_FileSender
          cod
        key                           Data_FileSender
          cod
    This is my DT and in MM i fill field <b>action</b> with constant value(SELECT/INSERT), field <b>table</b> with the name of the corresponding DB table, fields <b>access/key</b> with constant value(empty). At this moment, I got the following error <b>Exception caught by adapter framework: Error processing request in sax parser: Error when executing statement for table/stored proc. 'v01_sap_xi' (structure 'Statement'): java.sql.SQLException: FATAL ERROR: Column 'cod' does not exist in table 'v01_sap_xi'</b>; according with the people responsible for the DB this column named <b>cod</b> does really exist !! What can I do ?!?!? Some help will be ... Thanks !!!

  • How can read data from my local PC using JDBC adapter

    Hi experts.
    Actually we don't have permissions to work on RDBMS. So by locally I have Oracle8.0 installed in my pc. so can i update the table in my database via JDBS adapter. If so please describe how and where can I find the connectivity between XI server and my local DB system.
    Thanks.

    The first question is: Can the XI access your local PC?
    In most environments this is not possible.
    Connect to the server where the XI is installed and log on with the <sid>adm user (or let an administrator do this). Try to ping your PC.
    If this is successful, you have a good chance to connct your database. Follow the description in your database manual, which parameters you need to enter in the JDBC adapter channel.
    Regards
    Stefan

  • Oracle Function in JDBC Adapter

    Dear All
    Can we execute an oracle fucntion using receiver jdbc adapter? if yes then what should be the structure
    I have gone through following links but the soluiotn is not clear
    Using PI - Calling a Function in Oracle
    Regards
    Sourabh

    I think two possible ways. You might want to write stored procedure and inside your stored procedure call oracle function.  The second option is as below. In access tag write your query with standard functions. placeholder is to pass values for the variable.
    <StatementName>
    <anyName action=u201D SQL_QUERYu201D | u201CSQL_DMLu201D>
    <access>SQL-String with optional placeholder(s)</access>
    <key>
      <placeholder1>value1</placeholder1>
      <placeholder2>value2<placeholder2>
    </key>
    </anyName > 
      </StatementName>
    Ex:
    SELECT '03.12.2004:10:34:24' "Now",
           TO_CHAR(hiredate,'DD.MM.YYYY:HH24:MI:SS') "Hiredate",
           TO_DATE('03.12.2004:10:34:24','DD.MM.YYYY:HH24:MI:SS')
           - hiredate "Hired since [Days]"
      FROM emp;
    where to_char is the oracle function.

  • 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

  • Oracle CEP and JDBC Adapter

    I am using Oracle CEP 10g on WIndows.
    I wrote the following code on CEP:
    OracleDataSource ods = new OracleDataSource();
    ods.setURL("jdbc:oracle:thin:scott/[email protected]:1521/orcl");
    Connection conn = ods.getConnection();
    // Check for the existence of a previous customerID
    String selectStmt     = "SELECT * from STEPS " +
         "WHERE (streamID='" +
         this.customerId +
         "') and (assetid='" +
         this.eventName +
    Statement stmt  = conn.createStatement();
    //System.out.println("-- calling SELECT");
    //System.out.println(selectStmt);
    ResultSet rs    = stmt.executeQuery(selectStmt);This works great, except it is exceedingling slow. I am sending about 20,000 messages to this code.
    I think the problem is that I open the connection everytime I perform a select (and later an insert statement).
    The server instance goes away after the message has been processed, and I can not save the connection.
    Would using an adapter in config.xml prevent this openig a new connection every time a message invokes this code ?
    If so, I have never done JDBC with an adapter and I dont understand how to use an adapter to use a WHERE clause to select on variables, since in the example I have seen so far, it places "SELECT 1 from DUAL" into the config.xml and does not explain how to get mix have the SELECT statement interact with code variables or better yet how to get your code to get a connection handle.
    Could someone please post an exaqmple of how to use an adapter with JDBC, and possibly how to get your code to access a connection handle from the config.xml ?
    Thanks

    Hi,
    From note : 831162,
    <i>Oracle JDBC Driver (classes12.zip / classes12.jar) Deadlocks
    Q: I have deployed the Oracle classes12.zip / classes12.jar JDBC driver as per the instructions in the XI Configuration Guide.
    Unfortunately, I frequently notice hanging database connections. A thread dump taken according to the instructions in note 710154 shows one or more blocking JDBC Sender/Reciver threads and optionally that the JVM has detected a deadlock.
    A: <b>The Oracle classes12.zip / classes12.jar driver is compatible with JDK 1.2 and 1.3 only, but not with JDK 1.4. Upgrade to a current version of the driver (ojdbc14.jar). For details, refer to note 941317.</b>
    Make sure that you remove classes12.zip / classes12.jar from aii_af_jmsproviderlib.sda prior to adding the new driver as per the instructions in the answer to question #1 above as you will get a class name collision otherwise (all JARs from aii_af_jmsproviderlib.sda are loaded into the same class loader and the driver class name of both driver versions is the same).
    Before deploying the updated driver, ensure that the new version is still compatible with your Oracle database server release. For details, refer to the release notes provided by Oracle.</i>
    Regards,
    Bhavesh

  • Call Oracle Function via JDBC Adapter

    Hi to everybody,
    using JDBC connection with an Oracle DB, from XI I manage to send messages to execute SQL statements or Stored Procedures. Does anybody know if there is a way to call also an Oracle Function?
    Thanks a lot for any help...
    Ilaria

    Hi Illaria,
    I think i agree with Michal. The solution to your problem would be to go for a stored procedure. The link on SDN help only tells us that a stored procedure can be executed and does not discuss about oracle functions.
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    So, Stored Procedures, it has to be.
    Regards,
    Bhavesh

  • 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

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

  • JDBC adapter - update statement

    I have come to the conclusion that there is no direct connection between the select and update statement of a sender JDBC adapter, in terms of commit scope.
    According to SAP documentation:
    "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)."
    But my point is: if select statement retrieves e.g. 5 rows based on a where condition, then the update statement could find 6 rows to update, if a row was inserted a split second after the select, but before the update. Result : a row is lost...
    I don't think the select statement puts a lock on the table(s) it accesses, and releases this lock after update has been committed. This would ensure integrity between select and update statement.
    Can anybody confirm or deny this ?

    Hi,
    Have you seen the<b> Isolation level for Transaction handling</b> in the sender JDBC adapter?
    Make the Isolation level as Serializable and repeatable Read and the db gets locked  anbd until Update happens, no Insertion can occur in the Split Second!
    http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
    Regards,
    Bhavesh

  • Error while connecting to Oracle db using jdbc

    When I try to execute a java class which has to access data in
    the Oracle db using Jdbc connection, get an error --
    Appln- pathname/filename is attempting to call the OCI function
    (opinit) this function does not exist in ORA72.DLL.
    Exit this appln ? Yes or No
    Both oracle db & java are on the same PC.Would like to know what
    can be done to rectify this.
    Thanks.
    null

    The OCI driver 7.3 requires the 7.3 OCI to be installed (this is
    part of the client required support files or RSF). The particular
    call in question wasn't added to the OCI untill 7.3 so it
    wouldn't exist in the 7.2 OCI library.
    null

  • Error while retrieving data from sql using jdbc adapter

    hi all,
    i m working on one scenario where i m sending data using HTTP and receiver is jdbc adapter which is retrieving me data from sql server.
    i have checked the structure both for req and res.
    i m getting this error
    <SAP:Error>
    <SAP:Category>Application</SAP:Category>
    <SAP:Code>MAPPING.EXCEPTION_DURING_EXECUTE</SAP:Code>
    <SAP:P1>com/sap/xi/tf/_INF57285_DB_HR_RES_</SAP:P1>
    <SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>
    <SAP:P3>RuntimeException in Message-Mapping transformatio~</SAP:P3>
    <SAP:Stack>During the application mapping com/sap/xi/tf/_INF57285_DB_HR_RES_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: RuntimeException in Message-Mapping transformatio~</SAP:Stack>
    </SAP:Error>
    can somebody help me with this.
    Thanks & Regards
    Aruna

    thnks bhavesh i think i made it that way
    JDBC REQ  
      <ns:INF57285_DB_Request xmlns:ns="http://www.infosys.com/xi/training/hyd/57285">
      <Employee>
        <EmpDetails action="SELECT">
          <table>EmpDetails</table>
          <access>
            <Name />
            <EmpId />
            <Band />
            <Salary />
          </access>
          <Key>
            <EmpId>57285</EmpId>
          </Key>
        </EmpDetails>
      </Employee>
    </ns:INF57285_DB_Request>                        
      JDBC RES
    <ns:INF57285_DB_Request_response xmlns:ns="http://www.infosys.com/xi/training/hyd/57285">
      <Employee_response>
        <row>
          <Name>aruna</Name>
          <EmpId>57285</EmpId>
          <Band>A</Band>
          <Salary>4675776</Salary>
        </row>
      </Employee_response>
    </ns:INF57285_DB_Request_response>
    my hr req is which i mapped with DB req
    <ns:INF57285_HR_Req xmlns:ns="http://www.infosys.com/xi/training/hyd/57285">
      <REQUEST>
        <EmpNo>57285</EmpNo>
      </REQUEST>
    </ns:INF57285_HR_Req>
    my hr res is which i mapped with DB res
    <ns:INF57285_HR_Res xmlns:ns="http://www.infosys.com/xi/training/hyd/57285">
      <response>
        <row>
          <Name>aruna</Name>
          <Empld>57285</Empld>
          <Salary>4675776</Salary>
        </row>
      </response>
    </ns:INF57285_HR_Res>
    and interestingly i am not getting any error in sxmb_moni
    it's not showing any error
    plz suggest me something wht to do ....
    thnks & regards
    Aruna

  • 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

Maybe you are looking for

  • Only prints part of photo

    I am trying to print a 12x16 in photo from iPhoto using an Epson 1280 printer. Unfortunately, the printer only prints part (about 1/4 of the photo). It then ejects the photo paper as if it were finished with the print job. I downloaded the latest dri

  • Printing SAPScripts in Thai on Hp Printers

    Dear Experts, I am trying to set up Thai printing in my system. I created a output device with device type, THSAPWIN. In the print preview of SAPScripts, my thai characters are cramped together in a mess and when I tried to print, I just see "#" ever

  • OSX Yosemite Wifi FIX!!

    I found a way to fix the wifi issue on my iMac which i upgraded from maverick to Yosemite OSX. I got fed up with all the fixes that didn't fix the problem so I opened app store and re-downloaded Mavericks.. I noticed that for two hours my wifi didn't

  • Problem with field symbols in ecc 6.0

    i have the following  code  written in 4.6 version   now i am executing the old report   in 6.0  but  i am facing with some unicode error.   FIELD-SYMBOLS:     <line_of_bs_table> LIKE tbl1024,    READ TABLE bs_table INDEX row_bst ASSIGNING  <line_of_

  • Static Crypto configuration

    Hi All, I ahve a requirement to configure static crypto for 1800 site and I need to configure on two sepaarte interfacs at spoke site which means I need to configure 1800*2 = 3600 peers at central site. The challenge I have is due to load balancing ,