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

Read an itab with read table but

Hi all,

I want to read an internal table with a criterion like;

read table xlips with key vbeln = xlips-vbeln matnr = xlips-matnr <b>charg ne space</b>.

Charg ne space is not allowed however I need it.

Is there any other way to do that?

Thanks.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

7 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 09:39 AM

    Hello Deniz

    Please check if the addition COMPARING to READ TABLE is of any use...

    Otherwise probably LOOP AT <> WHERE <> . ENDLOOP will have to be used

    Regards

    Arun

    Message was edited by:

    Arun Nair

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 30, 2007 at 09:13 AM

    Hi,

    try like this

    read table xlips with key vbeln = xlips-vbeln matnr = xlips-matnr .

    if sy-subrc eq 0.

    if xlips-charg ne space.

    statement

    endif

    endif.

    Regards,

    Prashant

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 09:15 AM

    read table xlips into wa.

    if ( wa-vbeln = xlips-vbeln ) and ( matnr = xlips-matnr ) and ( wa-charg ne space ).

    buil logic succ

    endif.

    read table xlips into wa with keyvbeln wa-vbeln matnr xlip-matnr.

    if sy-subrc = 0.

    if wa-charg ne space .

    buil logic succ

    endif.

    endif.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 09:16 AM

    You can check the condition inside the read stmt..

    If the read stmt succeeds it will go inside,there u can check with if cheng = space..

    Reward if useful

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 09:18 AM

    Hi,

    First check charg NE space.

    if sy-subrc = 0.

    read table xlips with key vbeln = xlips-vbeln matnr = xlips-matnr

    endif.

    Regards,

    Vani

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 09:20 AM

    Hi deniz,

    u cannot use NE symbol with read statement...

    try like this

    read table xlips with key vbeln = xlips-vbeln

    matnr = xlips-matnr .

    if sy-subrc eq 0.

    if xlips-charg ne space.

    here do wat u want.

    endif

    endif.

    Regards,

    Nagaraj

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 30, 2007 at 09:48 AM

    Hi,

    Otherway is to use loop.

    loop at xlips where vbeln = xlips-vbeln and matnr = xlips-matnr and charg ne space.

    ...

    endloop.

    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.