Application Development 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: 

find value in itab

Former Member
0 Kudos

hi

i have internal table itab and i wont to now the best way to search value in this table

e.g.

<b>itab</b>


pernr       date

123456  10.1.2007
564788  12.2.2007

i wont to check in itab if i have pernr num 123456 what is the best way to do that

from performance isue

regards

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Do like this

Sort itab by pernr.

Read table itab into wa with key pernr = '123456' binary search.

Regards,

Satish

3 REPLIES 3

Former Member
0 Kudos

hi

read table itab with key pernr = '123456'.

this ll do the best

regards

karthik

Former Member
0 Kudos

Hi,

Do like this

Sort itab by pernr.

Read table itab into wa with key pernr = '123456' binary search.

Regards,

Satish

Former Member
0 Kudos

sort itab by pernr.

read table itab with table key pernr = '123456' into gwa binary search.

if sy-subrc eq 0.

.....................

endif.

Best regards,

Rebeka