DATA:alpha(10) type c VALUE '0123456789 ' . DATA:str(5) type c VALUE '11' . if CL_ABAP_MATCHER=>MATCHES( PATTERN = '^{0,20}[.,]{0,1}{0,10}$' TEXT = str ) = ABAP_TRUE . write : 'true' . else . write : 'false'. endif.