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

Help On Read

Hi,

I have the below data in my internal table and i am reading the resords based on some condition as below.

CLEAR w_jest.

SORT i_JEST.

READ TABLE i_jest

INTO w_jest

WITH KEY objnr = w_iflot-objnr

stat+0(1) = 'E'

inact = ' '

BINARY SEARCH.

The internal table data is as below.

OBJNR STAT INACT

===================================

IF00000000000000004113|E0001|

IF00000000000000004113|E0002|X

IF00000000000000004113|I0098|

IF00000000000000004330|E0001|

IF00000000000000004330|E0002|X

IF00000000000000004330|I0098|

IF00000000000000004331|E0001|

IF00000000000000004331|E0002|X

IF00000000000000004331|I0098|

IF00000000000000624145|E0002|X

IF00000000000000624145|E0003|

IF00000000000000624145|I0098|

IF00000000000000624164|E0002|X

IF00000000000000624164|E0003|

IF00000000000000624164|I0098|

IF00000000000001260720|E0001|

IF00000000000001260720|E0002|X

IF00000000000001260720|I0098|

IF00000000000001437518|E0002|X

IF00000000000001437518|E0003|

IF00000000000001437518|I0098|

IF00000000000001454313|E0002|X

IF00000000000001454313|E0003|

IF00000000000001454313|I0098|

IF00000000000001454314|E0002|X

IF00000000000001454314|E0003|

IF00000000000001454314|I0098|

IF00000000000001454315|E0002|X

IF00000000000001454315|E0003|

IF00000000000001454315|I0098|

IF00000000000001454316|E0002|X

IF00000000000001454316|E0003|

IF00000000000001454316|I0098|

Now while reading the records based on the above condition I am getting the result for some records and not getting for some records even the condition matches. Can anyone help me out.

For OBJNR value 'IF00000000000000624145' i am not getting the record even the condition is matched. For this OBJNR it should pick the record where STAT = E0003. But its not picking the record.

Also one strange thing is for OBJNR value 'IF00000000000000624164' its picking the matched condition where STAT = E0003.

Pls help me out as why its not picking the record for the condition mentioned.

Regards,

Ram

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 20, 2006 at 04:54 AM

    Hi,

    If you are using binary search..Don't try to use stat+0(1)..Probably that is the reason why it is failing..

    Remove the binary search and check...

    Thanks,

    Naren

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 20, 2006 at 08:28 AM

    Hi,

    Try to use CALL FUNCTION 'STATUS_READ' which will return acurate result.

    Cheers

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 20, 2006 at 09:24 AM

    Ram,

    you are reading the i_jest table with the condition which is going to give only one record.

    if at all in your i_jest internal table, you have multiple records with the satisfing condition it will give u a single record.

    i thing you need to use loop.

    -Anu.

    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.