‎2007 Oct 02 5:53 PM
This is Lalitha>
I want to know about " Binary Search"
Please sent explaination in a simple language & clearly .
‎2007 Oct 02 5:54 PM
‎2007 Oct 02 7:17 PM
Hi ,
Binary search in sap works similar to any other lang.
I will tell u with an example
you have an internal tables with the foloowing records
1
2
3
4
5
6
7
8
and now you want to search a record using a binary search
say you want to search no 2
first it splits your internal table
1
2
3
4
5 greter than 2 ignores this temp internla table
6
7
8
then it divides
1
2
3
4
internla table in to two again
1
2
3 greater than 2 and ignores it doesn't even check the next record
4
now it considers
1
2
and splits agains into
1
2 this is required number
Most imp thing
you have to sort your internal table before using binary search key word
Hope iam clear
Thanks
Venki