11-30-2007 9:09 AM
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.
11-30-2007 9: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
11-30-2007 9: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
11-30-2007 9: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.
11-30-2007 9: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
11-30-2007 9: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
11-30-2007 9: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
11-30-2007 9: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
11-30-2007 9:48 AM
Hi,
Otherway is to use loop.
loop at xlips where vbeln = xlips-vbeln and matnr = xlips-matnr and charg ne space.
...
endloop.