CLEAR :k_len,k_val,k_str0,k_str,k_str0.
k_len = cl_abap_list_utilities=>dynamic_output_length( tab2-kdmat ). " 字节长度
IF k_len > 12.
CALL FUNCTION 'TEXT_SPLIT' " 取前12位进行拆分
EXPORTING
length = 12
TEXT = tab2-kdmat
* AS_CHARACTER =
IMPORTING
LINE = k_str0
REST = k_str.
tab2-kdmat = k_str0.
ENDIF.
ABAP按字符串长度拆分
最新推荐文章于 2024-05-09 09:44:00 发布