Convert the Input xml to String in PI 7.1 using Standard Graphical Mapping

I have written this blog to address the FAQ in SDN as discussed here and in many other threads.

Where there is a need to map complete input xml payload to a field of the target xml. Can this be done using the standard Graphical Mapping? The answer is YES in PI 7.1.

Earlier we used to do this using Java Mapping or Using XSLT Mapping . But now we can achieve this using CopyXML, a new feature of PI 7.1.So we don't need to create a Java Mapping with a lengthy code and thereby reduces the time spent in designing the mapping.

I am taking the same example which is explained in this Java Mapping wiki to make it simple to understand. 

Source Structure:

srcdata

Target Structure

tardata

Assign The Mapping:

Right-click on "Source Message Type" and select "Return as XML" in the dropdown menu. This will return XML.

To convert that to a string, here simply I am using trim function present in the Text function Category (you can use any text function , so that it treats input xml as string )

map

Source xml payload:

srcpayload

Target xml payload:

tarpayload

SAP Developer Network SAP Weblogs: SAP Process Integration (PI)