Posted on May 13, 2010 at 07.25 PM - Kuala Lumpur, Malaysia
Aside from using ABAP mapping, we can also create ABAP XSLT to be used in PI mapping. Following is the procedure:
Go to ABAP XSLT editor using transaction XSLT_TOOL or from context menu of SE80 More->Transformation.
In the source tab, we can code the transformation using ABAP XSLT.
Following is the example of ABAP XSLT:
* definition of XSLT
<xsl:transform version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:sap="http://www.sap.com/sapxsl"
xmlns:ns="http://bit460.com/xi/mappingXX"
xmlns:ns0="urn:education.com:BIT460:mapping" >
* call the template
<xsl:template match="ns:MtCustomerName">
<xsl:call-template name="temp_CustomerNameOut"/>
</xsl:template>
* transformation in the called template
<xsl:template name="temp_CustomerNameOut">
<ns0:MtName>
<xsl:value-of select="Name"/>
<xsl:text> </xsl:text>
<xsl:value-of select="Surname"/>
</ns0:MtName>
</xsl:template>
</xsl:transform>
Don't forget to make use of the ABAP XSLT mapping in the operation mapping and refer to this operation mapping in the interface determination
Life is beautiful! Let's make it meaningful and colorful!