‎2007 Feb 28 3:48 PM
Can anybody tell me,
what is binary search and where can i use it. can i use it on database table or internal tables?
please suggest me
thanks
kp
‎2007 Feb 28 3:52 PM
hi,
u can use binary search only on Internal table. sorting the table before the binary search opn. is important
‎2007 Feb 28 3:51 PM
‎2007 Feb 28 3:51 PM
‎2007 Feb 28 3:52 PM
hi,
u can use binary search only on Internal table. sorting the table before the binary search opn. is important
‎2007 Feb 28 3:56 PM
BINARY SEARCH is used to improve the performance,
It is used on internal tables
SORT ITAB BY NUMBER
READ TABLE ITAB with key number eq '25' BINARY SEARCH.
suppose say ur itab has values from 1,2,3,4 ...................... 50
Now you are searching for 25, What binary search will do is first it will search if 25 is there at top half of 50 values or bottom half,
25 will be at the top half of 50
‎2007 Feb 28 4:03 PM
Hmmm...
If you don't know what a binary search (sometimes called a Binary chop) is then you really should not be writing ABAP code. Enter this into Google, or see some of Robert Knuth's books on indexing/access methods etc...
Dr Sidewalk
‎2007 Feb 28 4:08 PM
Hi Gary,
do you think that's the right answer???
Regards, Dieter
‎2007 Mar 01 10:39 AM
Dieter,
1). The question had already been answered within the thread.
2). I gave the response to use Google to find the answer, therefore pointing to an alternative answer and also educating the person at the same time for such future queries.
3). This is supposed to be a technical forum area !!!
4). My statement about knowing what a Binary search is was a bit flippent I agree, but still true.