SAP ABAP Forum
What is the difference between withkey and tablekey in ABAP?
Please suggest me with a proper solutions?
WITH TABLE KEY, is used for faster binary search. Binary search is one of the fastest way to find the record exists in the internal table. For the binary search, the table must be sorted by the specified search key in ascending/descending order.
Otherwise the search will not find the correct row.
When normal linear search is used and no field contained in the keys then WITH KEY is used.
We can pass key field of non key field and it is determined through the content of data object key for which a flat character-type data type is expected. It consider only standard table key field.
Sign up for STechies