sap 提取字符串中汉字
生活随笔
收集整理的這篇文章主要介紹了
sap 提取字符串中汉字
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
DATA: alpha_num(120) TYPE c.
alpha_num = ' abcdefghijklopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789,./;''[]\-=`<>?:"{}|_+~!@#$%^&*()'.
IF input CA alpha_num.
? output = '不僅僅全是漢字'.
ELSE.
? output = '全是漢字'.
ENDIF. IF NOT input CO alpha_num.
? output = '含有漢字'.
ELSE.
? output = '不含有任何漢字'.
ENDIF.
提取漢字
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. 與50位技術專家面對面20年技術見證,附贈技術全景圖
? output = '不僅僅全是漢字'.
ELSE.
? output = '全是漢字'.
ENDIF. IF NOT input CO alpha_num.
? output = '含有漢字'.
ELSE.
? output = '不含有任何漢字'.
ENDIF.
提取漢字
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. 與50位技術專家面對面20年技術見證,附贈技術全景圖
總結
以上是生活随笔為你收集整理的sap 提取字符串中汉字的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: SAP TableControl 控制单
- 下一篇: sap内表 table_LINE