拼接字符串
CONCATENATE t1 t2 INTO result. "直接拼接
CONCATENATE t1 t2 INTO result SEPARATED BY space. "用空格将字符串连接
拆分字符串
SPLIT text AT space INTO str1 str2. "根据空格将字符串拆分到str1 和str2中
字符转换
TRANSLATE text TO UPPER CASE. "转大写
TRANSLATE text TO LOWER CASE. "转小写
取字符串长度
len = strlen( text ). "字符串长度
截取字符串
subtext = text+0(5). "取左边5個字符('ABCDE')
subtext = text+3(5). "从第四個字串起取5个字符('DEFGH)
text+0(1) = 'Z'. "將第一个字符转为Z'
查找字符位置
SEARCH text FOR '='. "查找=在text中的位置
IF sy-subrc = 0.
l_index = sy-fdpos. "sy-fdpos的位置
去空格
CONDENSE {c} NO-GAPS