‎2013 Feb 19 4:34 PM
Hello experts,
I have an issue with a table, the system is raisiins the following error:
Table XXXXX has more than 16 key fields (violates SAA standard)
Since i am feeding this table with an Abap program, i would like to know if using a statement like Delete adjacent duplicates comparing (the fields that i couldn't add as primary key) can help me to avoid my issue.
Thanks.
Amine
‎2013 Feb 19 5:10 PM
Amine,
Yes, if you are using delete adjacent duplicates, it will serve your purpose.
But you have to compare the values which are already present in the table as well.
But if you are using these fields (which are not primary keys) to select data to report, the performance wont be that great. You may have to create secondary index for these.
Let me know if this helps.
Thanks,
Sreekanth
‎2013 Feb 19 5:10 PM
Amine,
Yes, if you are using delete adjacent duplicates, it will serve your purpose.
But you have to compare the values which are already present in the table as well.
But if you are using these fields (which are not primary keys) to select data to report, the performance wont be that great. You may have to create secondary index for these.
Let me know if this helps.
Thanks,
Sreekanth
‎2013 Feb 19 7:12 PM
hello,
Delete adjacent duplicates would not solve the issue in my opinion.
A maximum of 16 key fields are allowed in a table. In your case you need to reduce the key fields to 16 or less.
Check this link
http://help.sap.com/saphelp_47x200/helpdata/en/cf/21eb6e446011d189700000e8322d00/content.htm
best regards,
swanand
‎2013 Feb 19 7:23 PM
Your requirement is not clear. The restriction is on database table, deleting the duplicates in an internal table will only reduce the risk of duplicate keys during insertion, but won't help to bypass the technical limit, you won't be able to have more than 16 primary keys / 255 bytes length for the total.
So reduce to 15 primary keys + a counter (range number associate ?) but manage the unicity of records in each of your programs. (build a FG or simila tool for that, with FM to insert, update or read records...)
Concatenation of key may reach the max length of 255 so may or not be a solution.
Are you truly certain to need all those keys ?
Regards,
Raymond
‎2013 Feb 20 12:35 PM
Thanks to all for your answers.
I finally choosed to use the 16 keys and removed some keys which contain fixed values.
Thanks.
Amine