‎2006 Jun 12 1:28 PM
hi frnd's
Values in the internal_table must be compared with the screen field value entered.
Whether the where condition can be used in the read table syntax.
‎2006 Jun 12 1:32 PM
Where condition cannot be used to compare in read statement.
YOu have to use "with Key"
read table itab with key field1 = <value>
field2 = <value2.
Regards,
ravi
‎2006 Jun 12 1:32 PM
Where condition cannot be used to compare in read statement.
YOu have to use "with Key"
read table itab with key field1 = <value>
field2 = <value2.
Regards,
ravi
‎2006 Jun 12 1:41 PM
Hi,
if it is paramter then
read table it_matnr with key matnr = p_matnr.if it is select option then
loop at it_matnr where matnr in s_matnr.
do some thing...
exit.
endloop.Regards
vijay
‎2006 Jun 12 1:47 PM
Hi Suganya,
You can use where condition with READ statement.
READ TABLE ITAB WITH KEY ITAB-FIELD = SCREEN_FIELD-VALUE.
<b>You can perform only =(equals) condition with READ statement.</b>
<b>If you need to perform any other condtion apart from =(equals) then use LOOP...ENDLOOP WITH WHERE <condition>.</b>
LOOP AT ITAB WHERE ITAB-FIELD <> SCREEN_FIELD-VALUE.
"Do some operation
ENDLOOP.
Thanks,
Vinay
‎2006 Jun 12 1:56 PM
suganya,
As the others said you need to use Loop endloop for NE(not equal) conditions.
Remember to Sort your internal table before the READ statement and use the addition BINARY SEARCH to increase you search.
Please, mark ALL useful answers if it helps you.
Regards,Felipe Cunha [FpdC]
Message was edited by: Felipe Cunha