2020 Apr 16 4:16 PM
Hi Experts,
Is there any way to adopt the key of database table into internal table without explictly specifying all the key fields in the internal table declaration like
data <itab> type standard table of <dbtable> with <key=> it should be all key fields of database table>.
Say i have 10 key fields in database table and i dont want to declare them explictly, is there any specific key word which will automatically bring the keys fields into the internal table.
Thank You,
Shadab
2020 Apr 16 5:10 PM
No, there is no such functionality.
To avoid coding the stuff again and again, you can of course create a DDIC table type with the key defintion. Of course, you have to replicate the key definitions one time again, but then you have at one central position in the ABAP layer at least.
2020 Apr 16 5:10 PM
No, there is no such functionality.
To avoid coding the stuff again and again, you can of course create a DDIC table type with the key defintion. Of course, you have to replicate the key definitions one time again, but then you have at one central position in the ABAP layer at least.
2020 Apr 16 7:53 PM
Maybe someone could write a program to make such a type. But it would be a wonderful addition to ABAP to have it part of the language. horst.keller
2020 Apr 16 7:51 PM
No.
But we wants it, my precious. We wants it. Specifically when I'm create a test double for db accesses (pre 7.52).