Skip to Content
Former Member
Oct 10, 2016 at 12:54 PM

Binary search on an internal table which has both ascending and descending order sorted fields



I have a logic in my program where the internal table is sorted both ascending and descending as shown below:

Sort itab by A B ascending C D descending.

Can I use binary search on this if I read the table only with the first two fields like REAT itab by A B Binary Search? I thought this should work, but it's failing. Can you please help me with this? I know there are too many posts already posted reg. Binary search, but still couldn't find anything very similar to this.

Thanks in advance.