stransform 日期的 处理

今天在做银行返回报文调用CALL TRANSFORMATION的XML转到SAP结构时,银行返回的日期为YYYYMMDD格式,我定义的SAP结构为SY-DATUM,在STRANS中定义的格式如下

stransform 日期的 处理 - 第1张  | 优通SAP


An exception has occurred which is explained in more detail below. The
exception is assigned to class ‘CX_SY_CONVERSION_NO_DATE_TIME’ and was not
caught in procedure
“CONVERT_XML_TO_SAP” “(METHOD)”, nor was it propagated by a RAISING clause.
Since the caller of the procedure could not have anticipated this
exception, the current program was terminated.
The reason for the exception is:
Date 20220325 has an invalid format. The system could not interpret it in
the representation “yyyy-mm-dd”.
If the termination occurred when using MOVE EXACT, the rules apply for
MOVE EXACT. Otherwise, the rules for the deserialization of type
XSDDATE_D apply.
stransform 日期的 处理 - 第2张  | 优通SAP



stransform 日期的 处理 - 第3张  | 优通SAP