Skip to Content

Table with too many number of keys

Hello every one.

I recently have a requirement that lead to a table with more than 16 key field. Its not allowed in SAP so i were trying to split this table to 2 smaller tables, each one have 8 keys and link each other by some kind of foreign key then use maintenance view to insert, update both of them. But it failed. When i made a new entry, it only update the first table and clear the check table...I need those keys to make an unique record in table, is there any one know how to do this.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Dec 07, 2017 at 10:29 AM

    Mike is right.

    Nevertheless, if you need it, you can try to create unique values from your key fields that fit into one field and use that as a logical key.

    Add comment
    10|10000 characters needed characters exceeded

    • Thanks Horst Keller.

      I do think about create unique values from other key fields, its the best and simple way to do but my consultant team said its not fit to their spec since that table have some other relationships table, that change could effect other people work...thats why my choice is break big table to smaller tables. I read about this on community and seem like not only me want this feature but no one success yet...can you tell me this is not supported by SAP or I did something wrong (I look at SAP Wiki and feel like it work that way but not...)

  • Dec 08, 2017 at 06:38 AM

    What Horst and Mike said.

    But do you really (like REALLY) need these fields to be keys in the database table. For relationships to other tables, you would need them in separate fields yes, but as for the database table key, you could follow Horst Kellers suggestion and merge it in some way into another field, that is set up to be the database table key. Or simply use a UUID as key, generated by cl_system_uuid class.

    This approach requires more program logic in order to ensure uniqueness than a simple maintenance view though. Either way, on insert you need to generate the key in some way and I don't think that can be done in SM30 automatically... Also you need to make sure that the uniqueness requirements are fulfilled at changes.

    Add comment
    10|10000 characters needed characters exceeded