Composite key field is not a simple type or enum

According to the docs here - http://www.oracle.com/technology/documentation/berkeley-db/je/java/index.html?com/sleepycat/persist/model/PrimaryKey.html - you can use "A composite key class containing one or more simple type or enum fields" as a key field. When we try that we get "java.lang.IllegalArgumentException: Composite key field is not a simple type or enum: Result$Key.recordId". Am I misreading the docs?
Thanks,
Trevor
@Persistent
public final class RecordKey {
@KeyField(1)
private final String name;
@KeyField(2)
private final int duplicateNumber;
RecordKey(final String name, final int duplicateNumber) {
this.name = name;
this.duplicateNumber = duplicateNumber;
RecordKey() {
this.name = null;
this.duplicateNumber = -1;
@Persistent
static final class Key {
@KeyField(1)
private final RecordKey recordId;
@KeyField(2)
private final String key;
Key(final RecordKey recordId, final String key) {
this.recordId = recordId;
this.key = key;
Key() {
this.recordId = null;
this.key = null;
}

Hi Trevor,
You're nesting one key class inside another. All fields of a key class must be simple types or enums, which is what the exception message is trying to say. If you want all those fields in your key class, you'll have to include them in a single flattened class.
Neither nesting of key classes nor inheritance of key classes is supported. We have enhancements filed to support these in the future, but no concrete plans.
--mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Delete records in itab1 where key fields does not exit in itab2 w/o Loop

    Hi,
    I am trying to find the most efficient way to compare two internal tables and filter out (delete) the entries in Internal Table 1 (ITAB1) where the key fields does not exist in internal table 2 (ITAB2).
    Here is the codes using the Loop.
    Loop at itab1.
      read table itab2 where field1 = itab1-field1 and field2 = itab1-field2.
      if sy-subrc ne 0.
       delete itab1 where field1 = itab1-field1 and field2 = itab-field2.
      endif.
    endloop.
    Instead of looping thru each record of ITAB1, is there a way to use the "DELETE" or other efficient way? This is in ECC 6.0.
    Thanks for any advice in advance.

    Not sure if its possible without using even a single loop. Though you can avoid the read statement this way
    loop at itab2.
    delete itab1 where field1 NE itab2-field1 and field2 NE  itab2-field2.
    endloop.

  • Key fields are not visible in output condition table

    Hi,
         I have created few conndition tables using V/61. But i can not see Key field. It is not displaying. But when I check thru VK11 i can see that all fields are marked as key fields. example of table B018.
    My problem is that , i want to make few filed non key fields rest of fileds as key fields so that there should not be any duplicate ntry based on key fields. also I do not want to maintain these two fields for each record.
    Is there any exit to modify and view thesefields? or it is a security issue...bold
    Your earliest response is highly appreciated.\
    Thanks,
    AKS

    Hi Raga,
    Please check the documentation under the customizing path:
    IMG -> Sales and Distribution -> System Modifications ->
    Create New Fields (Using Condition Technique) ->
    New Fields For Pricing
    Then click on the paper icon
    Here is explained how to setup additional fields for pricing,
    not present in the standard.
    Notice the following rules:
    1. the new fields must have name beginning with 'ZZ' or 'YY' in order
       to avoid problem after upgrade
    2. add the new field in the table T681F for the application 'V' and the
       usage 'A'
    3. these new fields must be appened to the structures KOMKAZ or KOMPAZ
       (depending they are header or item fields)
    4. you should provide these fields by implementing the userexits
       USEREXIT_PRICING_PREPARE_TKOMK (header fields)
       USEREXIT_PRICING_PREPARE_TKOMP (item fields)
       in program MV45AFZZ for sales order, RV60AFZZ for invoice.
    In that documentation there are some examples too.
    Please check it.
    Regards,
    Alex

  • Sender File FCC - Key Field Value not available in file

    Hi All,
    I am new to SAP PI. I am working on Sender FCC. Below is the source file structure. I need to handle multiple sub structures Header,1Data,*. I think I have to use Key.field Name and Value. But in the below format we don't have any indicator to identify which is header and which is data record. Please suggest how to processed.
    Header Record (Pipe delimited) (Cardinality 1:1)
    Date
    Invoice Number
    Total Amount
    Company Name
    Data Records (Fixed Length) (Cardinality 1:n)
    Date
    Amount
    Country
    Card Number
    etc...
    Sample File Snippet:
    20100430|4123451810|218.50|CC
    20100430    $150.00     INDIA       1234567     
    20100430    $150.00     INDIA       1234567     
    20100430    $150.00     INDIA       1234567     
    20100430    $150.00     INDIA       1234567

    Hi
    Try using the below parameters in FCC
    Header.fieldSeparator    |
    Header.endSeparator    'nl'
    Data.fieldFixedLengths   ur values --3,5,5..
    Data.endSeparator         'nl'
    Regards
    Ramg
    Edited by: Ramkumar Ganesh on May 24, 2010 4:05 AM

  • Depreciation Key field is not in change mode in dep area

    Hello Sap Guru,
    I am facing a problem in my depreciation area. In my depreciation area, field of depreciaiton key is coming in grey mode automaticallly i.e I am not able to enter my dep. key there.
    Please suggest what to do.
    Thanks & Regards
    Deepak Garg

    Hi,
    Where do you want to change the dep key?
    in AS02?
    in OAYZ?
    Go to AO21 and select your screen layout rule 1000 and choose field group rules and for field group dep key, select all check boxes like mnno, Sbno, and copy as maintainance level.
    This will fix your issue.
    Thanks,
    Srinu

  • Key Field Name not there_Content conversion

    Hello SDN,
                   I am doing a sender content conversion in send file adapter but i donot have a keyfield and my structure is :-
    Header,*,body,1 but there is no common field between header and body so i cant use a keyfield . Any solutions ?
    Regards,
    Anirban.

    Hi,
    Refer this ...
    http://help.sap.com/saphelp_nw70/helpdata/en/ae/d03341771b4c0de10000000a1550b0/frameset.htm
    Hope it helps..
    kumar.S

  • Camcorder connection issues (not the simple type)

    Note: Also posted in OS and Hardware forums
    I have a Panasonic PV-GS400 camcorder that my Mac Pro refuses to recognize. First a list of what I have confirmed.
    1) There is nothing wrong with the camcorder (It will work with an iMac at my work running Leopard)
    2) There is nothing wrong with the cable I am using (Connected a friend's cam corder using it)
    3) There is nothing wrong with my firewire (I have a LaCie drive and have been able to interface to a different camcorder)
    4) I have reinstalled quicktime w/o fixing the problem.
    5) I installed my orig Tiger OS on my firewire drive and still see the same problem.
    6) Both iMovieHD and FinalCut fail to recognize the camcorder.
    7) All of my software and firmware is up to date.
    8) I have confirmed all settings on my camcorder (It worked with another mac)
    Now for the information regarding my mac:
    2x3GHz Dual Core Xeon
    OS X 10.4.11
    Model MacPro1,1
    Rom Version MP11.005C.B08
    SMC Version 1.7f10 (Don't know what this is)
    I appreciate any suggestions, there are only 2 things left to try (as far as I can see)
    1) New OS
    2) Try a Firewire 800 cable
    I have searched the net quite a bit over this issue and I feel I have done my homework with no success. I have also heard some disturbing comments / BS regarding certain camcorders "just not working" with certain Mac / PCs. Is this really true?
    Again thanks for any thoughts.

    I thought this initially myself, but when I had the other camcorder working with my mac I went through the following steps
    1) Use Canon Camorder (iMovie works, I can see the camera in the profiler)
    2) Plug in the GS400 and nothing happens (Can't see it in the profiler)
    3) Use Canon Camcorder again to make sure my cam is not killing the firewire and everything works as in step 1.
    Thank you very much for the suggestion, I also tried a 30 min reset a couple of days ago and no difference.
    Do you know if there are any firewire utilities for looking at plug in events and such?

  • Difference between semantic and key fields in DSO

    Hello All,
    Please help me in understanding about difference between "Key fields" and "Semantic key" in write optimize DSO.
    thanks

    Hi,
    you dont have key fields in write-optimized DSO, key fields terminology is forin standard DSO.
    And semantic key is used in write-optimized DSO.
    As we know standard DSO is a flat structure similar to transparent tables that we have in R3/ECC system with key fields (combination of values which needs to be unique).
    Now, The system generates a unique technical key for the write-optimized DataStore object. The standard key fields are not necessary with this type of DataStore object. If there are standard key fields anyway, they are called semantic keys so that they can be distinguished from the technical keys. The technical key consists of the Request GUID field (0REQUEST), the Data Package field (0DATAPAKID) and the Data Record Number field (0RECORD). Only new data records are loaded to this key.
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm

  • Regarding key field in a database table

    Hi friends, this is very urgent, plz help me.
    Here I have one field ex: MATNR , and I have to find out whether this field is key field or not in the MARA table. here the thing is I have to findout this programitically not going by SE11.
    Plz suggest me
    Regards
    Venkat.

    Hi prabhu,
    i think this is useful, but could you elaborate this little bit.
    regards
    Venkat

  • Add key fields for FM REUSE_ALV_HIERSEQ_LIST_DISPLAY

    Hi everyone,
    I would like to ask if it is possible or is there a way to increase the number of key fields used in FM REUSE_ALV_HIERSEQ_LIST_DISPLAY. The table parameter for the key fields is IS_KEYINFO. It can only contain 5 key fields. My program needs to have 7 key fields. I cannot modify type group SLIS to add more fields in its type declaration since it is a global object.
    Thanks,
    Eric

    Hi everyone,
    I would like to ask if it is possible or is there a way to increase the number of key fields used in FM REUSE_ALV_HIERSEQ_LIST_DISPLAY. The table parameter for the key fields is IS_KEYINFO. It can only contain 5 key fields. My program needs to have 7 key fields. I cannot modify type group SLIS to add more fields in its type declaration since it is a global object.
    Thanks,
    Eric

  • File Content Conversion - Key Field Value

    Hi Experts,
    I am using File to Idoc scenario for my mapping. In the receiver Communication channel, I am using File Content Conversion. My scenario is as follows :
    I have a recordset with Header and Line items with Key Field Indicator as 'H' and 'L'. In some cases, the value for this Key Field is coming in as something other than 'H' and 'L'. I need to throw an exception when this Key Field is not 'H' or 'L'.
    In the 'Content Conversion' tab, my attributes are as:
    Header_Structure.keyFieldValue = 'H' and Line_Structure.keyFieldValue = 'L'. Is there any more attributes that I need to add ?
    Please advise. Thanks a lot.
    Regards,
    Freddy.

    >>multiple key field values in FCC configuration i.e Line_Structure.keyFieldValue = H or L
    AFAIK it is not possible but lets wait for other experts to comment on this...
    >>Can keyFieldInStructure (add, ignore) parameter help me in this case ?
    No. this parameter is only used when you want to include key filed in ur XML structure(add) or not (ignore)...
    Chk this:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm

  • File content conversion Receiver with no key fields

    hi all,
              I have a header structure with four fields all varying and also  item structure with varying fields .. how do i go about to solve this .. as the regular Content Conversion uses key fields.. but there are no such key fields here... kindly help in this regard to proceed

    If you dont have a key field, then the only option to read the file and convert it to XML would be in a record row format.
    Here each line will go as one field in the XML. You will have to use some logic in your mapping to extract the right field.
    Ref: /people/sravya.talanki2/blog/2005/08/16/configuring-generic-sender-file-cc-adapter
    but in case your is a receiver File adapter then key fields are not required.
    ref: /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion

  • Non key field in Maintainance View

    Hi,
    I have generated a maintainance view for a Z table. I want to sort data from SM30 by means of a selection screen, for that, in the 'View Flds' tab in the maintainance view, i have entered a 'S' for which ever fields i want to filter the data on.
    When i execute the table maintainance, i am able to see only the key fields and not the non-key ones in the selection popup, though i have put a 'S' for both, the key and non-key fields.
    Can anyone please let me know how to get the non-key fields on the selection popup when i execute the maintainance view?
    Cheers,
    Raghav.

    Not possible via this functionality. A workaround was suggested by Raymond in this thread:
    Transaction code for Table Maitainence for table
    Thomas

  • 0CALDAY as a key field

    Hello All,
    I made some changes to tansformation for calculation of some keyfigures from one DSO to another. The changes were calculating the keyfigure correctly. But in the target DSO the 0CALDAY is selected as a key field, due to which the records from the past are getting deleted. How can make sure that the deletion doesnt happen.
    Thanks in advance.
    Regards,
    NK

    Hi,
    Addition of extra key field will not delete or overwrite any records from the DSO for eg. if you have A,B, C as key fields in source and in target you have A,B,C & date then in target you will have more records in target DSO than source.
    Give more details about your scenario, If you are loosing some data then you might be missing some field from key field.
    Regards,
    Durgesh.

  • Can I di Inner Join on 2 tables by using only 1 key field?

    Hello,
    I hv 2 Std. SAP tables, KNVV, KNKK.
    - KNVV - does hv 2 key fields (KUNNR and some other, say X)
    - KNKK - does hv 2 key fields (KUNNR and some other,say Y)
    I want to build a inner join on these 2 tables.
    So, Can I do a INNER JOIN on these 2 tables by using ONLY one key field (its KUNNR)? bcoz, there is ONLY common field!!
    thank you

    Hi,
    The correctness depends on your bussiness requirement. If the common key field is not a primary key, you may end up fetching duplicate entries which you may have to delete after the select query. You dont have to take of any extra precautions in a inner join select query compared to a ordinary select query. Just make sure you use most of the primary key fields of both the tables  in the where clause of the select query for better performance
    Vikranth

Maybe you are looking for

  • Error when publishing a PL/SQL Web Service with JDeveloper 10.1.3!!!!!!!!!

    Hi, When I publish a PL/SQL package as a web service in J2EE 1.4 (Jax-RPC) Web Service version get this error: oracle.j2ee.ws.common.tools.api.ValidationException: Error in database webservices assembly      at oracle.j2ee.ws.tools.wsa.db.WSADBPlugin

  • Need an alternative to rp-read-infotype to display infotype txts frm a BSP?

    Hi All, I need to display infotypes maintained texts(F9) from a bsp.  I created a test program to read these texts using rp-read-infotype and got it working but didn't realise i couldn't use this method in a BSP until i copied it in.  total bummer! D

  • Determine material master mandatory fields

    Hello, I've developed an workflow based program to create material master. I want to set all fields in my proram as required which are defined mandatory in Customizing of material master. Can anybody give me a hint how to determine the mandatory fiel

  • New T61 won't launch Windows

    Just unpacked my new T61, inserted battery, plugged it in, and turned it on.  The hard disk light flickered for awhile, the screen lightened a bit, and after 30 sec or so there was a bit of music.  But no sign of Windows logon screen, or any indicati

  • Local administrator name(language) on remote computer

    I have a big number of computers around, which I would like to have inventoried. Issue is that some of those have native US-US locale and some of them RU-RU, so the local administrator account could be named 'Administrator' or 'Администратор'. These