Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Internal Tables

Former Member
0 Likes
310

This is Lalitha>

I want to know about " Binary Search"

Please sent explaination in a simple language & clearly .

2 REPLIES 2
Read only

Former Member
0 Likes
295

Internal Tables : Binary search.

Read only

0 Likes
295

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