Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Read using binary search

Hi,

I have an internal table itab on which I am using READ inside a loop. The READ on itab is being used multiple times inside the loop with different keys.

I have sorted itab with 3 keys before the loop. In one of the READs I am using all the 3 keys but in another READ I am using first 2 keys only.

So is the code fine with BINARY SEARCH on these READs cos I have sorted with 3 keys but Reading with 2 keys in some places.

Please let me know your suggestions.

Thanks,

Abhishek

Tags:
Former Member
Former Member replied

Yes it will work if you have exactly don what you have said. it will not work if you READ with 2nd and 3rd key.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question