ABAP-处理去掉特殊字符

loop AT RESULT_PACKAGE assigning <RESULT_FIELDS> .
    WHILE <RESULT_FIELDS>-/bic/zcgpp ca CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
         clear <RESULT_FIELDS>-/bic/zcgpp+sy-fdpos(1).
    endwhile.
    WHILE <RESULT_FIELDS>-/bic/zcgpp ca CL_ABAP_CHAR_UTILITIES=>VERTICAL_TAB.
         clear <RESULT_FIELDS>-/bic/zcgpp+sy-fdpos(1).
    endwhile.
    WHILE <RESULT_FIELDS>-/bic/zcgpp ca CL_ABAP_CHAR_UTILITIES=>NEWLINE.
         clear <RESULT_FIELDS>-/bic/zcgpp+sy-fdpos(1).
    endwhile.
    WHILE <RESULT_FIELDS>-/bic/zcgpp ca CL_ABAP_CHAR_UTILITIES=>CR_LF.
         clear <RESULT_FIELDS>-/bic/zcgpp+sy-fdpos(1).
    endwhile.
    WHILE <RESULT_FIELDS>-/bic/zcgpp ca CL_ABAP_CHAR_UTILITIES=>FORM_FEED.
         clear <RESULT_FIELDS>-/bic/zcgpp+sy-fdpos(1).
    endwhile.
  endloop.  

cl_abap_char_utilities=>horizontal_tab — 09    TAB符

    cl_abap_char_utilities=>CR_LF ———-- 0D0A    回车换行

cl_abap_char_utilities=>VERTICAL_TAB —- 0B    垂直制表符

    cl_abap_char_utilities=>NEWLINE —---- 0A    换行

    cl_abap_char_utilities=>FORM_FEED —--- 0C    换页

    cl_abap_char_utilities=>BACKSPACE —---08    退格符

    CL_ABAP_CHAR_UTILITIES=>BYTE_ORDER_MARK_LITTLE-----(utf-16le')的文件头

CL_ABAP_CHAR_UTILITIES=>BYTE_ORDER_MARK_UTF8-------(utf-8)的文件头

如果是要单独取得回车或者换行(不是回车加换行),可以采用:

cl_abap_char_utilities=>CR_LF(1)
cl_abap_char_utilities=>CR_LF 1(1)

上一篇:配置文件中的数据库连接串加密了,你以为我就挖不出来吗?


下一篇:Photoshop为帅哥的右侧部分加上熊熊火焰效果