what is a binary search ? and how it is useful in a sorted
internal table?
Answers were Sorted based on User's Feedback
Answer / saplead.sai
The solution provided by Siddhart is though correct, I
would like to project the solution in a much detailed with
example.
Binary Search Basic rule - Sort the data in Ascending order.
Suppose we have random numbers ranging from 1 to 10000 and
we are searching for 4219. If the data is unorganized and
random....a sequential search would be time consuming.
Hence once the data is sorted in Ascending order. Binary
search would reduce the LOOKUP time.
In the FIRST PASS BINARY search would split the range of 1 -
10000 in to two halfs (i.e 1 - 4999 & 5000 - 10000) and
compares the 4219 which happens to fall in the first half.
In the next pass again two halfs are made and compared.
This way BINARY SEARCH works by dividing either data into
two halfs.
For internal table......or for anything else....this is it
Is This Answer Correct ? | 15 Yes | 0 No |
Answer / siddharth samal
IT DIVIDES THE SEARCH CRITERIA INTO TWO PARTS SO 1ST IT
SEARCH FOR THE 1ST HALF AND IF YOU GET THE DESIRED VALUE IT
WIL NOT SCAN THE SECOND PART WHICH HENANCES PERFORMANCE
TUNING....
Is This Answer Correct ? | 8 Yes | 0 No |
what is Catch Command?
What is the difference between select statement and provide statement ? : abap hr
what is the use of select for all entries in an internal table?
Wat is the difference between Select single * and Select .. Up to one row . And which method is better for performance ?
What is the difference between ECC versions and older versions?
Explain the difference between domain and data element?
How do you restrict the data to be entered in the payroll area? : sap abap hr
difference between user exit and customer exit dont tell both are same but there is another difference is there if anybody knows reply immediately
What is the difference between the function module and a normal abap/4 subroutine? : abap modularization
What functions does a data dictionary perform ?
How to change the development class of any object?
Hi, I have a requirement for locking the fax field in user master records. As you know user can edit the details using the System>profile>own data (SU3), it is causing some security threat to our model. What i want is users should not be able to change the fax field under communications when they get into su3.I have heard of user Exist functionality but don't know how to implement it. Can you suggest something, it will be greatly appreciated.