Skip to Content
-3

Identify non-english character in input and show error message.

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Apr 01 at 12: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?

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 01 at 12:14 PM
    IF (Input field name) NA 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.
    MESSAGE 'Enter ur message' TYPE 'E'.
    ENDIF.
    Add comment
    10|10000 characters needed characters exceeded

  • Apr 01 at 12:23 PM
    -2

    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.
    Add comment
    10|10000 characters needed characters exceeded