Skip to Content
author's profile photo Former Member
Former Member

find value in itab

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 25, 2007 at 12:44 PM

    Hi,

    Do like this

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

    Regards,

    Satish

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 25, 2007 at 12:37 PM

    hi

    read table itab with key pernr = '123456'.

    this ll do the best

    regards

    karthik

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 25, 2007 at 02:15 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.