XSLT Mapping

By Vijay Kumar Thirumareddi, YASH PI Competency Core Team, Yash Technologies

This document gives you clear understanding of XSLT Mapping, which shall convert source structure to specific target structure.  

Below are different ways of achieving this conversion in XI, 

  1. Message Mapping (Graphical Mapping using Mapping Editor in XI )
  2. Java Mapping
  3. ABAP Mapping
  4. XSLT Mapping

The rest of the document gives you pre-requisites and steps that are necessary for making use of XSLT Mapping.


  • XSL – Extensible Stylesheet Language

  • XSLT – XSL Transformations, the purpose of this is for transformation of XML documents into other formats like XML, XHTML and etc. Here is the link to get corresponding tutorial http://www.w3schools.com/xsl/default.asp.

  •  XPATH – XSLT uses XPATH to find information in an XML document. XPATH is used to navigate through elements and attributes in XML documents. Here is the link for same http://www.w3schools.com/xpath/default.asp.

Steps required for developing XSLT Mapping

  • Create a source data type and a target data type
  • Create Message types for the source and target data types.
  • Create Message Interfaces includes Inbound Message interface and Outbound Message interface.
  • XSLT Mapping does not require creation of Message mapping, so don’t create any Message mapping.
  • Create an .XSL file which converts source data type into target data type.
  • Zip that .xsl file and import it into Integration Repository under Imported Archives.
  • In Interface Mapping choose mapping program as XSL and specify this zip program. (Through search help you will get XSL Mapping programs that you imported under Imported Archives, select your corresponding XSL Program)
  • Test this mapping program by navigating to Test tab.

By having look at above steps you can easily find out that this mapping is no where different from other mapping programs, here the challenging lies in creating an XSLT file. If you spend couple of minutes in studying XPATH tutorial you would be in ideal position to create an XSL Transformation (.xsl extension). 

If you still find difficulties in generating XSL Transformation, then you can make use of a tool “Altova MapForce” which will create XSL file for you.  

Steps for creating XSL file using this tool: 

  1. Open the Alto MapForce, import the source .xml and .xsd file in it
  2. Similarly import the target .xml and .xsd in MapForce.
  3. These two data files should match with source and target data types in Integration Repository.
  4. Complete the graphical mapping using extensive list of XSLT functions available there.
  5. Save the mapping file.
  6. Click the XSLT tab. You will have the entire xslt logic there.
  7. Copy that content and save it as .xsl file.
  8. Zip above .xsl file and import the same into IR under Imported Archives.

Scenario demonstrating usage of XSLT Mapping

Take a business scenario where in business (Source System) sends an outbound delivery to their Logistics partner for transporting the same. But here the source business is running on SAP R/3 and corresponding Logistics partner is not on SAP, hence the interpretation of data/communication is different. Because source system sends delivery information in an IDoc (which will be handled by message control for delivery (VL01N/02N) and the target Logistics partner is not aware of these IDoc structures, so in order to provide a communication between these two we need some interface mechanism which takes IDoc structure and converts it into the format understandable by the target Logistics provider and vice versa.  


Here the target system expects the xml files in CIDX format, so XI system takes IDoc as an input and converts it to an XML file adhering to CIDX naming standards. 

Important steps to make this scenario: 

·         Import needed IDoc structure into IR, in our scenario import IDoc DESADV.DELVRY03

·         Import corresponding XSD structure under External Definitions in IR.  Here the corresponding CIDX message is Load Tender Motor.

·         Import ZIP file corresponding to XSLT under Imported Archives in IR, which can transform source message to target structure.

Objects needed to be developed in IR 

Inbound Message Interface: Create Inbound Message Interface resembling target CIDX message. 


Import XSL ZIP file 



Provide path to corresponding zip file, 


Save it 


Interface Mapping: Provide source interface as DESADV.DELVRY03 and Target interface as MI_IB_LoadTenderMotor 


Now specify Mapping Program specific to XSL Type, 


Choose corresponding Archive program from the search help provided under “Name”. 

Save it.

Now activate all the objects that are developed in IR.

Click here to continue...


Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image