ABAP校验系统不能支持的非法字符

背景

接口开发过程中,上游传输的特殊字符,虽然可以存储,但是在Proxy接口返回时,却无法转换为xml,情况如下
在这里插入图片描述

思路

校验系统不支持的字符,返回错误;换个思路来想,不能用write正常打印的字符大概就是不支持的。

解决方案

没错,就是正则表达式,如果有非法字符,匹配结果表会有内容

find all occurrences of regex '[^[:print:]]' in lv_string results  data(result_tab)
ignoring case.

猜你喜欢

转载自blog.csdn.net/u012232542/article/details/107690822