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: 
1 ACCEPTED SOLUTION
Read only

suresh_datti
Active Contributor
0 Likes
428

FOR ALL ENTRIES:

1.You must ensure that the itab is not empty, otherwise your SELECT will be a complete scna of the db table

2. If you expect duplicate entires to be selected from the db table, you must select all the key fields in your SELECT statement.

BBINARY SEARCH:

The itab must be sorted by the key fields you READ the table with. ie

SORT ITAB BY FIELD3.

read table itab with key field3 = 'XXXX'

binary search.

Regards,

Suresh Datti

2 REPLIES 2
Read only

suresh_datti
Active Contributor
0 Likes
429

FOR ALL ENTRIES:

1.You must ensure that the itab is not empty, otherwise your SELECT will be a complete scna of the db table

2. If you expect duplicate entires to be selected from the db table, you must select all the key fields in your SELECT statement.

BBINARY SEARCH:

The itab must be sorted by the key fields you READ the table with. ie

SORT ITAB BY FIELD3.

read table itab with key field3 = 'XXXX'

binary search.

Regards,

Suresh Datti

Read only

Former Member
0 Likes
428

ALL ENTRIES ..

If you want to fire a SELECT for each row of a internal table, then instead of calling the SELECT inside the loop of the internal table, you use the ALL ENTRIES so that the SELECT fires for each row. Pre-requisite is that internal table should have data, other wise it will fetch all the data and might cause performance issues

BINARY SEARCH ..

This is to improve the performance of a READ statement on a internal table. You will have to declare the table as a SORTED table and then use the BINARY SEARCH option on the SORTED field.

Regards,

Ravi