2008 Apr 23 5:14 PM
Hi @ll
I have the bellow statement and I need the LIKE but from syntax point of view this is not allowed. How can I find a field with a proximate content.
LOOP AT itab_report_test WHERE sdata LIKE 'It works good, change'.
Thanks for your help in advance
/Kamran
2008 Apr 23 5:17 PM
Try with %
LOOP AT itab_report_test WHERE sdata LIKE '%It works good, change%'.
Otherwise..
LOOP AT yourtable.
CHECK yourtable-sdata CS 'It works good, change'
* process
ENDLOOP.
Edited by: Paul Chapman on Apr 23, 2008 6:17 PM
Hi @ll
I have the bellow statement and I need the LIKE but from syntax point of view this is not allowed. How can I find a field with a proximate content.
LOOP AT itab_report_test WHERE sdata LIKE 'It works good, change'.
Thanks for your help in advance
/Kamran
2008 Apr 23 5:17 PM
Try with %
LOOP AT itab_report_test WHERE sdata LIKE '%It works good, change%'.
Otherwise..
LOOP AT yourtable.
CHECK yourtable-sdata CS 'It works good, change'
* process
ENDLOOP.
Edited by: Paul Chapman on Apr 23, 2008 6:17 PM
2008 Apr 23 5:20 PM
Hi,
when I write this
LOOP AT itab_report_test WHERE sdata LIKE '%It works good, change%'.
it then says
Relational operator "LIKE" is not supported.
Regards
2008 Apr 23 5:22 PM
Then you will need to try the 2nd option I provided.
loop..
check field CS 'xxxx'.
* process
endloop.
2008 Apr 23 5:31 PM
2008 Apr 23 5:22 PM
hi check this..
loop at itab where sdata like '*'.
endloop.
regards,
venkat.
2008 Apr 23 5:24 PM
Hi,
LIKE operator is not allowed in LOOP statement.
do like this..
Loop at itab.
find first occurrence of 'Its works good, change' in itab-sdat.
if sy-subrc = 0.
do ut thing.......
endif.
endloop.
Regards
Syed A
2008 Apr 23 5:43 PM
Hello,
Instead of
LOOP AT itab_report_test WHERE sdata LIKE 'It works good'
Try something like :
LOOP AT itab_report_test WHERE sdata CS 'It works good'.
Regards
Greg Kern
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |