Records with duplicate key in Infospoke

Hello
I have a question with regard to the output produced by a Delta Extraction Mode infospoke.
I have an Infospoke running across a single cube that pulls a number of characteristics and key figures from said cube.  The infospoke uses delta extraction and is run as part of a process chain after the successful update of the said infocube.
The output file contains two records for each record that exists in the cube .....
The first record contains all the characteristics and the correct values for the key figures - this record corresponds with the associated record in the cube.
The second record contains all the characteristics as the previous record but, all the key figures contain '0' values. 
The two records in the infospoke output file are always sequential.  Every valid record (ie record I would expect to see) has a duplicate with '0' value key figures.
Has anyone experienced this?  As the key figure values for the output always correspond when totalled I am not too concerned at this stage but just wondered if anyone has seen this before.
Thanks in advance for your help.
Sally

Hi Sally,
  Info spoke first extract data from F fact table and then from E fact table. If you are extracting data into an table you can choose request id and package id as key on top of characteristics. But when you are extracting data into flat file you cant. so you will get multiple records.
  Try to extract the data into a table and check the difference. If you have same characteristic combination records available in E & F fact table you will get 2 records in 2 different request nos(Check in the Open Hub Monitor).
For more information see the how to papers on open hub...
https://websmp201.sap-ag.de/bi
right side "Info Index".
  seach for the papers
· BW 3.0B Open Hub - Positioning (zip)
· BW Open Hub (ppt)
· BW Open Hub - Transcript (doc)
· BW Open Hub Service - Update (zip)
Hope this Helps
Srini

Similar Messages

  • The record has duplicate key values - "Include in Unique Index" checkbox missing

    I have a Silverlight client app that I'm developing in Lightswitch in VS2013 Ultimate Update 1, and have run into a problem when adding records.
    I am working against an external SQL Server 2008 database, and the table in question only has the primary key constraint, meaning that the ID field is an identity field, set as the primary key.
    When I try and add records to the table from the app, I get an error "The Shiur record has duplicate key values." This seems to happen when I add a row that has the same Speaker as an existing one. If I add one with a new Speaker then
    it inserts OK.
    Whilst searching for information on this error, I saw many comments around about there being a problem in earlier releases with the "Include in Unique Index" not working properly. This looked like my problem, except for two points...
    1) This table doesn't have anything in a unique index (as far as I know), as I never set it up to have any. You can see the details here...
    This looks to me like there is only the one index, which is the primary key one.
    2) The "Include in Unique Index" checkbox doesn't appear on my Properties panel at all. If I open the table in the designer, then click in the Speaker row, I don't see "Include in Unique Index" at all...
    Actually, I don't see "Include in Unique Index" at all, irrespective of what I click. It's just not there.
    So, I don't seem to have a unqiue constraint to violate, and VS doesn't show me the "Include in Unique Index" to allow me to check this, but I still get the error on insert. Anyone any ideas what's going on here?
    Thanks
    FREE custom controls for Lightswitch! A collection of useful controls for Lightswitch developers.
    Download from the Visual Studio Gallery.
    If you're really bored, you could read about my experiments with .NET and some of Microsoft's newer technologies at
    http://dotnetwhatnot.pixata.co.uk/

    Hi Alan,
    'Include in Unique Index' is for intrinsic database entity properties.
    Ah, that explains why I can't see it then :)
    Is LightSwitch or SQL throwing the error?
    Ah, you're a genius! Well, not quite, but your question led me to the answer.
    For some odd reason, the primary key fields on my tables seem to have lost their identity setting, so when it tried to insert a new record, the ID wasn't automatically increased, so was going in as zero. This worked fine for the first insert, as there wasn't
    a record with zero ID, but failed for the second.
    Changed the ID fields to be identity, and all works fine now :)
    Thanks very much.
    FREE custom controls for Lightswitch! A collection of useful controls for Lightswitch developers.
    Download from the Visual Studio Gallery.
    If you're really bored, you could read about my experiments with .NET and some of Microsoft's newer technologies at
    http://dotnetwhatnot.pixata.co.uk/

  • Error Record with Same Key

    Can anyone help me out with a master data load failure.
    My request goes off red and the message looks somehow like "Record filtered in advance as error records with the same key exist", "Filter out new records with same key". I have already checked the duplicate handle record setting in DTP. Still why am i getting this error.
    Would appreciate if some one could suggest me in this.

    Hello Shridevi M ,
    When I execute my DTP, I get a master data load failure : "Record filtered in advance as error records with the same key exist" . It's the same as you get. Please tell me how did you solved this probelm?
    Thanks in advance,
    Abdellatif

  • Optimal read write performance for data with duplicate keys

    Hi,
    I am constructing a database that will store data with duplicate keys.
    For each key (a String) there will be multiple data objects, there is no upper limit to the number of data objects, but let's say there could be a million.
    Data objects have a time-stamp (Long) field and a message (String) field.
    At the moment I write these data objects into the database in chronological order, as i receive them, for any given key.
    When I retrieve data for a key, and iterate across the duplicates for any given primary key using a cursor they are fetched in ascending chronological order.
    What I would like to do is start fetching these records in reverse order, say just the last 10 records that were written to the database for a given key, and was wondering if anyone had some suggestions on the optimal way to do this.
    I have considered writing data out in the order that i want to retrieve it, by supplying the database with a custom duplicate comparator. If I were to do this then the query above would return the latest data first, and I would be able to iterate over the most recent inserts quickly. but Is there a performance penalty paid on writing to the database if I do this?
    I have also considered using the time-stamp field as the unique primary key for the primary database instead of the String, and creating a secondary database for the String, this would allow me to index into the data using a cursor join, but I'm not certain it would be any more performant, at least not on writing to the database, since it would result in a very flat b-tree.
    Is there a fundamental choice that I will have to make between write versus read performance? Any suggestions on tackling this much appreciated.
    Many Thanks,
    Joel

    Hi Joel,
    Using a duplicate comparator will slow down Btree access (writes and reads) to
    some degree because the comparator is called a lot during searching. But
    whether this is a problem depends on whether your app is CPU bound and how much
    CPU time your comparator uses. If you can avoid de-serializing the object in
    the comparator, that will help. For example, if you keep the timestamp at the
    beginning of the data and only read the one long timestamp field in your
    comparator, that should be pretty fast.
    Another approach is to store the negation of the timestamp so that records
    are sorted naturally in reverse timestamp order.
    Another approach is to read backwards using a cursor. This takes a couple
    steps:
    1) Find the last duplicate for the primary key you're interested in:
      cursor.getSearchKey(keyOfInterest, ...)
      status = cursor.getNextNoDup(...)
      if (status == SUCCESS) {
          // Found the next primary key, now back up one record.
          status = cursor.getPrev(...)
      } else {
          // This is the last primary key, find the last record.
          status = cursor.getLast(...)
      }2) Scan backwards over the duplicates:
      while (status == SUCCESS) {
          // Process one record
          // Move backwards
          status = cursor.getPrev(...)
      }Finally another approach is to use a two-part primary key: {string,timestamp}.
    Duplicates are not configured because every key is unique. I mention this
    because using duplicates in JE has more overhead than using a unique primary
    key. You can combine this with either of the above approaches -- using a
    comparator, negating the timestamp, or scanning backwards.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • There is already a record with duplicate customer/vendor reference number

    Dear  Expert,
    Person "A" reject the Sale Order now Person "B" edit same  SO and again send to "A",now second time "A" approval
    "B" in aleart msg go to that approval,press "add" button got information  (error)
    "there is already a record with duplicate customer/vendor reference number"
    what shud i do ?
    and why in aleart message box two entry for same SO
    1st is reject but show SO draft [approved]
    2nd is approval ...
    Thanks

    hi,
    U can change radio button option in per document tab of document settings for sales order,
    Either change it to without warning / warning only When duplicated customer reference no. occurs.
    Modify customer reference number by including dot at end.

  • Master data records with one key

    Hello All,
    I have scenario that I need to load the master data records with one key.
    For ex--
    Cluster            Dcode               version
    5000                 DC1                  2008
    5000                 DC1                  2008
    5001                  DC1                  2009
    Could you please let me know possible ways.
    Thanks

    In your case if Cluster is the key then the underlying attributes data will be overwritten when the same cluster key comes.
    as per you example data finally it loads only two records in to the target, since first two records key is same.
    Hope this helps.
    Veerendra.

  • Package parametеr "overwrite records with match key" (BPC 10)

    Hi all.
    We load data from DSO in SAP BW to BPC. We use the /CPMB/LOAD_INFOPROVIDER process chain for that.
    In the package we use the "overwrite records with match key" parameter for the "Handling of records in target" setting.
    But if there's no data in the DSO, the package hangs in the "Running" status and won't finish loading.
    If we start the package with the "append" parameter for the "Handling of records in target" setting, then package finishes with the warning status.
    What could be the problem if use "overwrite records with match key" ?
    Best regards,
    Sergey

    Hi,
    As per the below note its known issue in SP08. In which version of BPC are you running now.
    1787650 - Data Manager package no end at dumpload step for empty data
    Thanks,
    Raju

  • How to locate a record with multipute keys in dataprovider??

    As above subject, I want to locate a record with multipute keys / searching criterias; my dataprovider is connected to a view of database table.

    use:
    findFirst(FieldKey[] fieldKeys, java.lang.Object[] values)
    for example:
    String[] keyf = {"FIELD1", "FIELD2"};
    String[] keyval = { keyval1, keyval2};
    RowKey rk = xxxDataProvider.findFirst(keyf, keyval);

  • Updating database table with DUPLICATE keys

    i have an internal table having data as follows.
    emp_id     name     date           proj_id  activity_id    Hours  Remarks
    101     Pavan    09.10.2007      123     1         2.00       Coding
    101     Pavan     09.10.2007   124     2         1.00        Documentation
    102     Raj     09.10.2007   123        3         6.00     Testing
    Now i need to update a Ztable with above mentioned data.
    The structure of the Ztable is as follows.
    Mandt     emp_id  name    date    proj_id   activity_id   Hours   Remarks
    NOte: i have ticked both check boxes for the field MANDT in table.
    Rest didnt select the check boxes.
    I believe now the field MANDT alone is a primary key for the z-table.
    NOw i have tried with UPDATE/INSERT statments to update the database table.
    But instead of inserting all the rows, the system is over writing on the same emp_id row.
    Even tried with the statments like INSERT INTO <Ztable> values <Internal table> ACCEPTING DUPLICATE KEYS.
    But its not getting inserted as a separate row in the table.
    Requirement is to insert the multiple rows in the database table without any over writing activity.
    Can anyone give me the code to do this?
    Regards
    Pavan

    Hi Pavan,
        Please let me know what are the key fields in your Ztable. Try with below code it may help you. change the "Ztablename" as your database table name and I_INTERNAL TABLE  as your internal table name. still you are facing the problem please let me know.
    lock the custom table before updating the table.
      CALL FUNCTION 'ENQUEUE_E_TABLE'
       EXPORTING
      MODE_RSTABLE         = 'E'
         TABNAME              = 'ZTABLENAME'
      VARKEY               =
      X_TABNAME            = ' '
      X_VARKEY             = ' '
      _SCOPE               = '2'
      _WAIT                = ' '
      _COLLECT             = ' '
       EXCEPTIONS
         FOREIGN_LOCK         = 1
         SYSTEM_FAILURE       = 2
         OTHERS               = 3
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ELSE.
        INSERT  ZTABLENAME FROM TABLE I_INTERNALTABLE ACCEPTING DUPLICATE KEYS.
        COMMIT WORK.
      ENDIF.
    unlock after updating the custom table After updation is done.
      CALL FUNCTION 'DEQUEUE_E_TABLE'
       EXPORTING
        MODE_RSTABLE       = 'E'
         TABNAME            = 'ZTABLENAME'
        VARKEY             =
        X_TABNAME          = ' '
        X_VARKEY           = ' '
        _SCOPE             = '3'
        _SYNCHRON          = ' '
        _COLLECT           = ' '

  • Two records with same  key (Infocube)

    Hi,
    I was trying to do, in a update rule, an "IF" condition with two key figures.
    IF Kf1 > Kf2. result = Kf1 else result = Kf2.
    But the data in the source (datamart Infocube to infocube) have tow records with the same characteristics combination (the same keys)and different amount in the keyfigures, then the result of my "if" condition is not the expected because I understood in the infocube only exists one characteristics combination. :S
    I was seeing those records in the manage transaction of the infocube.
    Some reason for this?
    Thanks and regards
    Victoria Leó

    This can happen with parallel loads.  Two rows with same set of Char values but in different packets of the same Request, being loaded at the same time.
    It really shouldn't be an issue - your update rule will make the KF change as desired.  Your queries aggregate KFs based characteristic values, not Dim IDs, so you'll get the totals you expect.
    Here's some more info:
    There is an RSRV Test that lets you check a dimension for a cube to see if multiple DIM IDs exist for the same combination of Chars - <b>Multiple Entries in Dimensions of a (Basis) InfoCube</b>
    Output looks like:
    12:02:24 o'clock on 08/25/2006: Start test run for user PIZZAMAN:)
    Dimension ZFM_C521: DIMID 61,215 and 61,214 have same characteristic values
    Dimension ZFM_C521: DIMID 61,880 and 61,879 have same characteristic values
    Dimension ZFM_C521: DIMID 61,366 and 61,365 have same characteristic values
    Dimension ZFM_C521: DIMID 61,368 and 61,367 have same characteristic values
    12:02:24 on 08/25/2006: Test run for user PIZZAMAN:) completed
    You can run the Correct Error option to have it update fact rows to use one of the DimIDs if you want, but unless you have lots of them, I even wouldn't bother.
    Here's the description of the test:
    <u>Description</u>
    This elementary test recognizes whether there are several lines that have different DIMIDs(dimension table key), but have the same SIDs for the selected dimension table for the InfoCube specified. (This can occur by using parallel loading jobs). This has nothing to do with an inconsistency. However, unnecessary storage space is occupied in the database.
    <u>Repairs</u>
    Since the different DIMIDs with the same SIDs are normally used in the fact tables, they cannot simply be deleted. Therefore, all of the different DIMIDS in the fact tables are replaced by one DIMID that is randomly selected from the equivalent ones. Before a change can be made to the database, the consent of the user is requested.
    DIMIDs that have become unnecessary are deleted in the connection. In doing so, not only are the DIMDs deleted that were released in the first part of the repair, but so are all of those that are no longer used in the fact tables (including aggregates). The consent of the user is again requested before this change is made.

  • Create with duplicate key throws BaseEJBException instead of DuplicateKeyEx

    WAS640 SP9: implemented an entity EJB, with a primary key field that is a String. The database table has the mapped column as a key. create(keyfield) works fine (I can get the data out with either sqlcli or through the EJB). If I try to add a 2nd bean with the same primary key, I don't get the javax.ejb.DuplicateKeyException that I would expect, I get get a com.sap.engine.services.ejb.exceptions.BaseEJBException (trace at end of message)
    Any idea what I am doing incorrectly?
    com.sap.engine.services.ejb.exceptions.BaseEJBException: Transaction system failure in method com.whirlpool.stock.ejb.StockLocalHomeImpl0.create(java.lang.String,java.lang.String,java.lang.String,java.lang.String,boolean).
         at com.whirlpool.stock.ejb.StockLocalHomeImpl0.create(StockLocalHomeImpl0.java:479)
         at com.whirlpool.stock.ejb.StockProcessorBean.createStock(StockProcessorBean.java:86)
         at com.whirlpool.stock.ejb.StockProcessorObjectImpl0.createStock(StockProcessorObjectImpl0.java:119)
         at com.whirlpool.stock.ejb.StockProcessor_Stub.createStock(StockProcessor_Stub.java:64)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187)
         at $Proxy67.createStock(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126)
         at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:146)
         at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:68)
         at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:92)
         at SoapServlet.doPost(SoapServlet.java:51)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:385)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:263)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:340)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:318)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:821)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:239)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
    Caused by: com.sap.engine.services.ts.exceptions.BaseRollbackException: Exception in beforeCompletition of ( SAP J2EE Engine JTA Transaction : [075ffffffd56e000e] ).
         at com.sap.engine.services.ts.jta.impl.TransactionImpl.commit(TransactionImpl.java:217)
         at com.whirlpool.stock.ejb.StockLocalHomeImpl0.create(StockLocalHomeImpl0.java:452)
         ... 34 more
    Caused by: com.sap.engine.services.ejb.exceptions.BaseEJBException: SQLException while the data is being flushed. The persistent object is com.whirlpool.stock.ejb.StockBean0Persistent.
         at com.sap.engine.services.ejb.entity.pm.UpdatablePersistent.ejbFlush(UpdatablePersistent.java:101)
         at com.sap.engine.services.ejb.entity.pm.TransactionContext.flushAll(TransactionContext.java:429)
         at com.sap.engine.services.ejb.entity.pm.TransactionContext.flush(TransactionContext.java:378)
         at com.sap.engine.services.ejb.entity.pm.TransactionContext.beforeCompletion(TransactionContext.java:506)
         at com.sap.engine.services.ejb.entity.SynchronizationList.beforeCompletion(SynchronizationList.java:136)
         at com.sap.engine.services.ts.jta.impl.TransactionImpl.commit(TransactionImpl.java:205)
         ... 35 more
    Caused by: com.sap.sql.DuplicateKeyException: [200]: Duplicate key
         at com.sap.sql.jdbc.common.CommonPreparedStatement.executeUpdate(CommonPreparedStatement.java:326)
         at com.sap.engine.services.dbpool.wrappers.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:240)
         at com.whirlpool.stock.ejb.StockBean0Persistent.ejb_iInsert(StockBean0Persistent.java:443)
         at com.sap.engine.services.ejb.entity.pm.UpdatablePersistent.ejbFlush(UpdatablePersistent.java:92)
         ... 40 more
    com.sap.engine.services.ts.exceptions.BaseRollbackException: Exception in beforeCompletition of ( SAP J2EE Engine JTA Transaction : [075ffffffd56e000e] ).
         at com.sap.engine.services.ts.jta.impl.TransactionImpl.commit(TransactionImpl.java:217)
         at com.whirlpool.stock.ejb.StockLocalHomeImpl0.create(StockLocalHomeImpl0.java:452)
         at com.whirlpool.stock.ejb.StockProcessorBean.createStock(StockProcessorBean.java:86)
         at com.whirlpool.stock.ejb.StockProcessorObjectImpl0.createStock(StockProcessorObjectImpl0.java:119)
         at com.whirlpool.stock.ejb.StockProcessor_Stub.createStock(StockProcessor_Stub.java:64)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187)
         at $Proxy67.createStock(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126)
         at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:146)
         at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:68)
         at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:92)
         at SoapServlet.doPost(SoapServlet.java:51)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:385)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:263)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:340)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:318)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:821)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:239)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
    Caused by: com.sap.engine.services.ejb.exceptions.BaseEJBException: SQLException while the data is being flushed. The persistent object is com.whirlpool.stock.ejb.StockBean0Persistent.
         at com.sap.engine.services.ejb.entity.pm.UpdatablePersistent.ejbFlush(UpdatablePersistent.java:101)
         at com.sap.engine.services.ejb.entity.pm.TransactionContext.flushAll(TransactionContext.java:429)
         at com.sap.engine.services.ejb.entity.pm.TransactionContext.flush(TransactionContext.java:378)
         at com.sap.engine.services.ejb.entity.pm.TransactionContext.beforeCompletion(TransactionContext.java:506)
         at com.sap.engine.services.ejb.entity.SynchronizationList.beforeCompletion(SynchronizationList.java:136)
         at com.sap.engine.services.ts.jta.impl.TransactionImpl.commit(TransactionImpl.java:205)
         ... 35 more
    Caused by: com.sap.sql.DuplicateKeyException: [200]: Duplicate key
         at com.sap.sql.jdbc.common.CommonPreparedStatement.executeUpdate(CommonPreparedStatement.java:326)
         at com.sap.engine.services.dbpool.wrappers.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:240)
         at com.whirlpool.stock.ejb.StockBean0Persistent.ejb_iInsert(StockBean0Persistent.java:443)
         at com.sap.engine.services.ejb.entity.pm.UpdatablePersistent.ejbFlush(UpdatablePersistent.java:92)
         ... 40 more

    Hi Douglas,
    The answer is that the EJB container does not have to throw DuplicateKeyException in case of an attempt for creating an already existing entity object. The EJB 2.0 specification, chapter 10.5.3 says "The container may, but is not required to, throw the DuplicateKeyException on the Bean Provider’s attempt to create an entity object with a duplicate primary key[15]." And the explanation follows in the footnote "[15] Containers using optimistic caching strategies, for example, may rollback the transaction at a later point."
    In fact this is what happens in your case – the EJB container postpones the insert database operation for the end of the transaction, thus optimizing the number of database access calls. Then, the primary key constraint violation is detected by the database, which leads to transaction rollback, but nevertheless an exception different from DuplicateKeyException is thrown.
    The EJB container can detect primary key constraint violation in case two entities with the same primary keys are created in one transaction and then to throw the DuplicateKeyException (you can check this).
    The conclusion is that EJB applications cannot rely on the DuplicateKeyException to distinguish the case when  primary key constraint is violated. The EJB container can improve the primary key constraint violation handling  by introducing an additional option for immediately storing a newly created entity object, thus checking whether an entity with the same primary key already exists and throwing DuplicateKeyException. This option will be introduced with the next versions of the EJB container, but nevertheless it again does not cover all possible scenarios. So my advice is simply to not rely on the DuplicateKeyException to distinguish primary key constraint violation from other transaction failures.
    Best regards,
    Viliana

  • Read statement with duplicate key fields

    Hello,
    I have an internal table(EKBE) with 8 fields
    ebeln ebelp vgabe gjahr belnr budat wrbtr refkey
    populating the first 7 fields from EKBE table with VGABE = 2 and PO#, concatenating the WRBTR and GJAHR to get the Refkey and passing this to the 8th field.
    Using this refkey, getting the document numbers from BKPF.
    I am looping another internal table into a work area and reading the above internal table by passing the ebeln field and I am doing some calculations ,etc.
    A custom table is getting updated from the above work area.
    The issue is-
    The internal table EKBE can have the same PO numbers with the same line item numbers but with different ref key's.
    So, when I am reading the int. tab, it is reading only one record, since I have no other key's to read except EBELN. So for one PO# it is reading only 1 ref key, I cannot use the line item# as a key, as the line item#'s never match, even if they match they could be same PO# with same line item# and different ref key.
    Any inputs highly appreciated.
    Regards,
    Kiran

    Loop on EKBE Internal table as well to fetch all entries of PO. Use Parallel cursor to optmize performance.
    http://wiki.sdn.sap.com/wiki/display/Snippets/ABAPCodeforParallelCursor-Loop+Processing

  • Help selecting from records with duplicate fields

    Test_table2 is shown below with the sql to create it.
    I need to:
         Identify duplicate address_keys
            Within that set of duplicate address_keys, select only if HH_Income is the same between the two records and the HH_Age difference is less than 10
               Now the duplicate set matches the necessary criteria, and I want to select from these duplicate address_keys, only the one with the most recent verification date
    The purpose of this is to infer cohabiting couples.  In the large set of data we receive, for each HH_key if the people have the same last name they are all listed under the same HH_Key, but if they do not have same last name but live together, they will be listed as separate households (HH_key) but with the same address_key.  A further validator is if each HH_key reports the same HH_Income and if they are close in age.  We then only want to mail to one of the people, so we choose the one that has the most recent verification date.
    The result I would expect here, using the table I provided, would be
    HH_Key
    Address_Key
    HH_Type
    HH_Income
    Age
    Verification_Date
    1234
    1111
    10
    6
    50
    10-Jun-13
    Can you help?
    HH_Key
    Address_Key
    HH_Type
    HH_Income
    Age
    Verification_Date
    1234
    1111
    10
    6
    50
    10-Jun-13
    5678
    1111
    11
    6
    49
    15-Jun-12
    5544
    2222
    10
    6
    65
    10-Apr-13
    7788
    1111
    3
    3
    25
    10-Jun-13
    9898
    3333
    10
    6
    45
    18-Jun-13
    CREATE TABLE test_table2
        (HH_key varchar(20),
         address_key   varchar(20),
         HH_type varchar(2),
         HH_Income varchar(2),
         HH_age varchar(2),
         Verification_date     Date
    INSERT INTO test_table2
    (HH_Key, Address_key, HH_Type, HH_Income, HH_Age, Verification_date)
    VALUES
    (1234, 1111, 10, 6, 50, '10-Jun-13');
    INSERT INTO test_table2
    (HH_Key, Address_key,HH_Type, HH_Income, HH_Age, Verification_date)
    VALUES
    (5678, 1111, 11, 6, 49, '15-Jun-12');
    INSERT INTO test_table2
    (HH_Key, Address_key,HH_Type, HH_Income, HH_Age, Verification_date)
    VALUES
    (5544, 2222, 10, 6, 65, '10-Apr-13');
    INSERT INTO test_table2
    (HH_Key, Address_key,HH_Type, HH_Income, HH_Age, Verification_date)
    VALUES
    (7788, 1111, 3, 3, 25, '10-Jun-13');
    INSERT INTO test_table2
    (HH_Key, Address_key,HH_Type, HH_Income, HH_Age, Verification_date)
    VALUES
    (9898, 3333, 10, 6, 45, '18-Jun-13');

    I really like the results this gave, because it allows me to create a view now that contains the pair in one record.  Thanks for this response.  I think I did post the result that I was looking for which would be the one record that we would mail to:  Once I create the view with one record for each pair, then I would just need to select the verification date that was greatest with the related data.  Would that be the best approach to take?  The fact that I now have a single record for each pair is excellent!
    The result I would expect here, using the table I provided, would be
    HH_Key
    Address_Key
    HH_Type
    HH_Income
    Age
    Verification_Date
    1234
    1111
    10
    6
    50
    10-Jun-13

  • SM30 - Deleting a record with Foriegn Key Constraints

    I have a two custom tables ZCCED_STATUS and ZCCED_COSTITEM. 
    ZCCED_COSTITEM has a status column with a foriegn key to a (PK) status record in ZCCED_STATUS.
    I have generated table maintenance objects for the table ZCCED_STATUS.
    When I go to SM30 and maintain the table ZCCED_STATUS I can select a status record and delete it. (still ZCCED_COSTITEM records using that status)
    Is there any way that SM30 can warn or stop a user from deleting a ZCCED_STATUS record when there are child records in the ZCCED_COSTITEM table?
    Regards,

    Create a maintenance view , link both tables and generate a table maintenance for the maintenance view . it will work.

  • Getting Multiple Records with Same Key throws Access Violation

    Are there any known issues with PInvoke Signatures for GET .. Im gettign consistently AVL's when attempting to read Multiple Values under single key ..
    Error doesn't happens while debugging in VS 2007 , Tried turning off optimizations with no luck ..
    Im using VS 2010 and .NET 4.0 ( WIN XP) . I do have a repro. ( Im using latest bits from Oracle site as of 9/10/2010 )
    Unhandled Exception: System.AccessViolationException: Attempted to read or write
    protected memory. This is often an indication that other memory is corrupt.
    at BerkeleyDB.Internal.libdb_csharpPINVOKE.db_strerror(Int32 jarg1)
    at BerkeleyDB.DatabaseException..ctor(Int32 err) in C:\Users\gmf\db\db-5.0.26
    \csharp\DatabaseException.cs:line 78
    at BerkeleyDB.DatabaseException.ThrowException(Int32 err) in C:\Users\gmf\db\
    db-5.0.26\csharp\DatabaseException.cs:line 34
    at BerkeleyDB.Internal.DB.get(DB_TXN txn, DatabaseEntry key, DatabaseEntry da
    ta, UInt32 flags) in C:\Users\gmf\db\db-5.0.26\csharp\Internal\DB.cs:line 187
    at BerkeleyDB.BaseDatabase.Get(DatabaseEntry key, DatabaseEntry data, Transac
    tion txn, LockingInfo info, UInt32 flags) in C:\Users\gmf\db\db-5.0.26\csharp\Ba
    seDatabase.cs:line 900
    at BerkeleyDB.Database.GetMultiple(DatabaseEntry key, Int32 BufferSize, Trans
    action txn, LockingInfo info) in C:\Users\gmf\db\db-5.0.26\csharp\Database.cs:li
    ne 494
    at helloworld.Program.Main(String[] args) in C:\bdm\helloworld\helloworld\Pro
    gram.cs:line 53
    Appreciate any help.
    Thanks
    Nirmal
    Edited by: user8050299 on Sep 10, 2010 3:29 PM
    Updated with OS

    seems like oracle .NET bindings doesnt work for new CLR . It works fine with .NET 2.0
    May be Oracle folks will release new version for 4.0

Maybe you are looking for

  • Badi for modifying the Contact person details....

    Hi, I have a problem here, can anyone help me.? I am creating a contact person for an account/bp in the IC Webclient. I  need to modify certain fields on Contact person address while saving. Can anyone tell what badi's or user-exits that I can use fo

  • First ever Web Form - URL error

    Hi. I'm attempting to call my first Web form, but I'm getting this error: URL: http://springfield01:7777/forms/frmservlet?config=ttmsmenu ERROR: 500 Internal Server Error Forms Servlet Error. Missing or invalid value for baseHTML parameter. Please ch

  • Retinizer for MacBook Pro to fix Office

    Hey guys, I did some digging and I found this. Not sure if it's already known and I don't know if there's any negative side effects, but it worked for my Microsoft Office Apps and things look great. http://retinizer.mikelpr.com/ All you do is drag an

  • H.264 and Q7 Plugin Woes

    I have posted in the Quicktime forum but have not gotten any response so I thought I would try here. I have several videos that I have compressed with H.264. They play perfectly via Q7 player, but when trying to play them via Firefox or IE, they cras

  • Bank Account field in Vendor Master Data

    Hi Guys, Anyone of you might have faced this kind of problem. The field for bank account in vendor bank details provides only 18 digits. We have a couple of Polish and Russian vendors which have 20 digits in the bank account and because SAP cuts off