ABAP ODATA 文字列からxstringへの変換およびその逆変換(UTF-8)
作者:互联网
DATA(lv_str) = |Teststring|. TRY. * string -> xstring * default UTF-8 DATA(lv_xstr) = cl_abap_codepage=>convert_to( source = lv_str ). * xstring -> string * default UTF-8 DATA(lv_dec_str) = cl_abap_codepage=>convert_from( source = lv_xstr ). WRITE: / lv_str. WRITE: / lv_xstr. WRITE: / lv_dec_str. CATCH cx_root INTO DATA(e_txt). WRITE: / e_txt->get_text( ). ENDTRY.
标签:WRITE,UTF,DATA,lv,ABAP,str,xstr,xstring 来源: https://www.cnblogs.com/yjyongil/p/10658068.html