Search code examples
special-charactersabapsap-selection-screens

Accept only special characters in Selection Screen parameter


I have one input field of type C.

PARAMETERS lv_sep TYPE c.

Field lv_sep should accept only special characters.

Can you help me how i can give this constraint?


Solution

  • you can do checks during AT-SELECTION-SCREEN. You could for instance check the parameter lv_sep for the characters you want to accept.

    AT-SELECTION-SCREEN.
    if not lv_sep CO '!"§$%&/()=?'.
        message text-e01 type E.
    endif.