‎2009 Jan 07 1:52 PM
Hi every,
I got a question. I have the following code:
READ TABLE itab WITH KEY value = lv TRANSPORTING NO FIELDS.
IF sy-subrc IS INITIAL.
flag = 'X'.
ENDIF.
If I want to change the condition to " value <= lv ". Then how to rewrite the code? Thanks!
Regards
Pheily
‎2009 Jan 07 2:09 PM
Hi,
This is not possible in the read statment because read statment only returns one single record. This can only be acheived using LOOP WHERE...ENDLOOP .
regards,
Advait
‎2009 Jan 07 2:08 PM
Hi,
maybe u can try to sth like this.
loop at itab where value <= lv.
flag = 'X'.
exit. " it will trigger after to have change the value of flag
endloop.
Regards
‎2009 Jan 07 2:09 PM
Hi,
This is not possible in the read statment because read statment only returns one single record. This can only be acheived using LOOP WHERE...ENDLOOP .
regards,
Advait
‎2009 Jan 07 3:20 PM
You would have to sort the table and use multiple READs, but it can be done.
Rob