2008 Apr 18 3:54 PM
Hello,
I want to make an internal table, that should behandled by a compound primary key. I'm German and I am not sure what's the english word for zusammengesetzter primärschlüssel. I mean I have e.g. 4 Primary Keys. An valid Dataset must have a unique COMBINATION of these 4 Primary keys.SO that's what I am looking for. I tried doing it with a SORTED TABLE:
tabLine TYPE SORTED TABLE OF Line WITH UNIQUE KEY Key1 , Key 2.But this is not what I want. Now ABAP wants to be each Primary Key to be unique. But I want to have a unique COMBINATION of all Primary Keys to be unique. My next idea is to make "a table in a line" and this will be my primary key. But I am not sure if that would even work and if there isn't a much easier way in ABAP. So I am asking you again
thank you.
2008 Apr 18 3:58 PM
tabLine TYPE SORTED TABLE OF Line WITH UNIQUE KEY Key1 , Key 2.
This uses the combination of the four key fields as unique. So every row in this internal table is unique for the keyfields key1, key2, key3 etc.
2008 Apr 18 3:58 PM
tabLine TYPE SORTED TABLE OF Line WITH UNIQUE KEY Key1 , Key 2.
This uses the combination of the four key fields as unique. So every row in this internal table is unique for the keyfields key1, key2, key3 etc.
2008 Apr 18 11:59 PM
Seems to work now. I tried the same thing a few hours ago and it didn't work. Looks like there was some kind of typing error