首页 > 代码库 > 去非数字字符串的前导零

去非数字字符串的前导零

DATA:       LV_LEN TYPE I,      LV_NUM TYPE I,      LV_NU  TYPE I.DATA:L_ORT02 TYPE KNA1-ORT02.L_ORT02 = 000你好你好.*lv_len = cl_abap_list_utilities=>dynamic_output_length( l_ort02 ).“字符长度LV_LEN = STRLEN( L_ORT02 ).  "字符个数DO LV_LEN TIMES.  LV_NU = SY-INDEX.  IF L_ORT02+LV_NUM(1) = 0.    LV_NUM = LV_NUM + 1.  ELSE.    EXIT.  ENDIF.ENDDO.SHIFT l_ort02 by  LV_NUM  PLACES left.WRITE L_ORT02.

 输出你好你好

 

去非数字字符串的前导零