sap 提取字符串中汉字
生活随笔
收集整理的這篇文章主要介紹了
sap 提取字符串中汉字
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
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位技術(shù)專家面對(duì)面20年技術(shù)見(jiàn)證,附贈(zèng)技術(shù)全景圖
? 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位技術(shù)專家面對(duì)面20年技術(shù)見(jiàn)證,附贈(zèng)技術(shù)全景圖
總結(jié)
以上是生活随笔為你收集整理的sap 提取字符串中汉字的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: SAP TableControl 控制单
- 下一篇: sap内表 table_LINE