‎2021 Nov 15 9:46 AM
Dear Experts,
Could you please suggest on below doubt..
If we don't sort internal table before using Binary search what will be the impact on read statement..
Thanks in advance.‎2021 Nov 15 9:56 AM
if the table is type STANDARD TABLE, and the SORT is not correct, the BINARY SEARCH will give you wrong answer.
It is a dichotomic search: Check in the middle of the list if it is higher or lower than the exepected result. Do it on the result ......
‎2021 Nov 15 10:18 AM
Use a type sorted tables or with sorted secondary table keys (not hashed) definition or a SORT statement, otherwise the behavior will be unpredictable: ‘If this requirement is not met, the correct line is not usually found.’