04-01-2019 12:47 PM
Hi all,
i want to show error message if my input contains any non-english or special characters.
i have tried some function module but it is completely removing it.
instead of removing i want to show error message.
can you please explain how it can be done ?
thanks in advance.
04-01-2019 1:14 PM
IF (Input field name) NA 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.
MESSAGE 'Enter ur message' TYPE 'E'.
ENDIF.
04-01-2019 1:27 PM
I guess you mean CN, not NA.
or preferably, use CO as it should contain only English characters, so NOT to trigger the error:
IF NOT (input field name) CO 'ABCDEF...'.
04-02-2019 4:00 PM
04-02-2019 4:09 PM
04-01-2019 1:23 PM
HI Rishab Mishra,
If you think function module used in your program working correctly in removing special characters other than english letters then write sy-subrc condition below the function module .
function module.
if sy-subrc eq 0.
'Error message'.
endif.
04-01-2019 1:42 PM
04-01-2019 1:44 PM
If the FM removed the non-english character (Brexit?) then use a temporary field in the call compare the previous value with the new one, if different, non-english characters removed, then you have your answer?