====================================================================
Method 1:
====================================================================
*Get Unicode of Charactor
call method cl_abap_conv_out_ce=>uccpi
exporting
char = v_temp
receiving
uccp = v_uccp.
if v_uccp between 0 and 128.
v_strlen = v_strlen + 1.
else.
v_strlen = v_strlen + 2.
endif.
====================================================================
Method 2:
====================================================================
DATA: alpha_num(120) TYPE c.
alpha_num = ' abcdefghijklopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789,./;''[]\-=`<>?:"{}|_+~!@#$%^&*()'.
data len type i.
data n type i.
len = strlen( input ).
do len times.
n = sy-index - 1.
if not alpha_num cs input+n(1).
concatenate output input+n(1) into output.
endif.
enddo.
![](https://img2024.cnblogs.com/blog/35695/202407/35695-20240713070336838-1837943664.jpg)