Skip to Content
avatar image
Former Member

Error on XML Deserialization with DATS Datatype

Hello,

I'm using an XSLT Program to deserialize a XML-File. Inside the XSL I'm assigning the needed values to the fields of my structure. I have one field with the datatype DATS (length 8). Inside the XML File there is a tag which contains a date in the according format

YYYMMDD ( e.g. <DATE>20160522</DATE>).

Whenever I try to assign the value of Date to the structure field with the DATS type I am getting the CX_XSLT_DESERIALIZATION_ERROR.

For troubleshooting I changed the type of the field to a char32 which is working just fine.

How can I cast the value correctly to the dats field?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Nov 02, 2016 at 04:20 PM

    Here are the accepted formats for "asXML" : http://help.sap.com/abapdocu_702/en/?url=abenabap_xslt_asxml_schema.htm

    .

    Excerpt:

    XML Scheme Type XML Representation Domain ABAP Representation

    xsd:date 2007-10-01 XSDDATE_D "20071001"

    Add comment
    10|10000 characters needed characters exceeded