Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

Mapping Techniques
XI provides 3 standard ways of interface mapping between source and target.

  • Graphical mapping
  • Java Mapping
  • XSLT Mapping

Two more additional mapping types can be activated in XI by making changes to the exchange profile. Those two mappings are

  • ABAP mapping
  • XSLT mapping with ABAP Extensions

Graphical Mapping
Graphical mapping is a common approach followed by everyone for generating desired target structure. It involves simple drag-n-drop to correlate respective nodes (fields) from source and target structure. It hardly involves coding. (Exception - User defined functions). But sometimes with graphical mapping it is difficult to produce required output. For example ... text/html output, namespace change, sorting or grouping of records etc.

ABAP Mapping
 A person comfortable with Object Oriented ABAP can go for ABAP mapping instead.

Java Mapping
 Java Mapping uses 2 types of parsers. DOM and SAX. DOM is easier to use with lots of classes to help you create nodes and elements, but , DOM is very processor intensive.

SAX parser is something that parses your XML one after the other, and so is not processor intensive. But, it is not exaclty easy to develop either.

XSLT Mapping
One can also think of Java mapping as another option but it is a bit complex and required knowledge of Java. In such cases, XSLT mapping can be the best approach to meet the requirements.

A few example cases in which an XSLT mapping can be used:-

  1. When the required output is other than XML like Text, Html or XHTML (html displayed as XML)
  2. When default namespace coming from graphical mapping is not required or is to be changed as per requirements.
  3. When data is to be filtered based on certain fields (considering File as source)
  4. When data is to be sorted based on certain field (considering File as source)
  5. When data is to be grouped based on certain field (considering File as source)\

Advantages of using XSLT mapping

  • *# XSLT program itself defines its own target structure.
    1. XSLT programs can be imported into SAP XI. Message mapping step can be avoided. One can directly go for interface mapping once message interfaces are created and mapping is imported.
    2. XSLT provides use of number of standard XPath functions that can replaces graphical mapping involving user defined java functions easily.
    3. File content conversion at receiver side can be avoided in case of text or html output.
    4. Multiple occurrences of node within tree (source XML) can be handled easily.
    5. XSLT can be used in combination with graphical mapping.
    6. Multi-mapping is also possible using xslt.
    7. XSLT can be used with ABAP and JAVA Extensions. 

Disadvantages of using XSLT mapping

  • *# Resultant XML payload can not be viewed in SXMB_MONI if not in XML format (for service packs < SP14).
    1. Interface mapping testing does not show proper error description. So errors in XSLT programs are difficult to trace in XI but can be easily identified outside XI using browser.
    2. XSLT mapping requires more memory than mapping classes generated in Java.
    3. XSLT program become lengthier as source structure fields grows in numbers.
    4. XSLT program sometimes become complex to meet desired functionality.
    5. Some XSL functions are dependent on version of browser.

5 Comments

  1. Former Member

    It's a relly nice guide. Keep it up. We really appriciate your efforts.

  2. Former Member

    It's a relly nice guide. Keep it up. We really appriciate your efforts.

  3. Former Member

    nice blog.. keep it up..

  4. Anonymous

    Hi Vonkolu 

    this is good and useful.

    Cheers..

    Vinod

  5. Guest

    HI Vonkolu

    Good Notes... Keep it up..

    - Rajesh