Showing results for 
Search instead for 
Did you mean: 

Doctype to be included after Mapping

Former Member
0 Kudos

Hello Friends,

I am sending an IDOC to a 3rd party using HTTP adapter. I need to bring in the Doctype into the payload of the message to the 3rd party.

I required second line as




so can i do using the XI Message Mapping.


Gaurav Jain

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

You can't do this with Message Mapping. You could use either XSL mapping or Java mapping.

XSL mapping is the easiest approach:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="">

<!-- Add the Doctype declaration -->

<xsl:output method="xml" indent="no"


<!-- Identity Transform - copy the source XML to the output without any changes -->

<xsl:template match="node() | @*">


<xsl:apply-templates select="node() | @*"/>




Unfortunately there's a bug in how the SAP XSLT processor generates the doctype tag. It doesn't do it correctly.

Therefore you would need to write a Java map to add in the doctype and call it after your first map.

Former Member
0 Kudos

Gaurav / Wolff -

I applied the XSLT mapping and got the second line added but with an extra "[]" characters at the end.

I am not sure how to remove these and also not sure if Ariba would handle these characters.

Also if have a solution using the Java map can you tell me how to solve this using java map?