09-03-2009 6:26 PM
Hi,
How can I catch if the wildcard '*' only has been entered in a search-option on the selection screen?
So '123' is ok, '123' is ok, 'ABC' is also ok, however '' is not.
if s_lifnr-low co '*' .
write:/'error: you have entered only a *'.
else.
write:/ 'all ok'.
endif.
Thanks.
Edited by: William Lawlor on Sep 3, 2009 7:37 PM
09-03-2009 6:41 PM
Hi
U need to check if there's a vlue after wildcard:
TABLES: LFA1.
SELECT-OPTIONS SO_LIFNR FOR LFA1-LIFNR.
LOOP AT SO_LIFNR.
IF SO_LIFNR-LOW(1) = '*'.
IF SO_LIFNR-LOW+1 IS INITIAL.
WRITE 'Error'.
ENDIF.
ENDIF.
ENDLOOP.
Max
09-03-2009 6:41 PM
09-03-2009 11:17 PM
Hi Rich,
AFAIK wildcards are automatically marked as patterns, isnt't it?
loop at s_lifnr where option = 'CP'
and low = '*'.
message ...
endloop.
Kind regards,
Clemens