ABAP 字符串替换(保留后空格)
DATA: lc_str1 TYPE char120 VALUE '123&123&321'. DATA: lc_str2 TYPE char120 VALUE '123&123&321'. DATA itab TYPE TABLE OF string. SPLIT lc_str1 AT '&' INTO TABLE itab. CONCATENATE LINES OF itab INTO lc_str1 SEPARATED BY ' and '. WRITE lc_str1. REPLACE ALL OCCURRENCES OF '&' IN lc_str2 WITH ' and '. WRITE lc_str2.