cancel
Showing results for 
Search instead for 
Did you mean: 

sap xi

Former Member
0 Kudos

Which MAPPING TYPE is better and How we choose the particular mapping?

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi,

SAP recommends the graphical mapping, but all times graphical may not suitable to our requirements, so based on our requirement we select the mapping type.

Graphical mapping is the simplest of all mappings and easy and we have a mapping editor and standard functions available. when this becomes too complex, or this functions are not enough then we generally opt for java or xslt or ABAP mappings, In general ABAP mapping preference is very less.

If we need many functions then we will go for XSLT mapping. If there are some predefined functions in the java to suitable to our requirement then we will go for the Java mapping.

The choice depends on our requirement and scenario.

/people/udo.martens/blog/2006/08/23/comparing-performance-of-mapping-programs

/people/ravikumar.allampallam/blog/2005/02/10/different-types-of-mapping-in-xi

Performance wise

If data is less then

Graphical mapping -


> Java(sax parser)mapping -


> Java(dom parser)mapping -


>

XSLT mapping -


> ABAP mapping.

If data is high then

XSLT mapping -


> Java(sax parser)mapping -


> Graphical mapping(internally it uses SAX)

-


> Java(dom parser)mapping -


> ABAP mapping.

former_member193376
Active Contributor
0 Kudos

Hi

This is your question.

WHEN DO WE USE XSLT OR *JAVA *OR GRAPHICAL OR ABAP MAPPING?

Ans : If there is a complex structure we wont be able to map using graphical mapping . so that time* we will go for XSLT or Java Mapping*. If we need to pass a high size and more complex structure file then we choose ABAP mappings .

Basically there are 4 types of mappings

1. Graphical Mapping

2. XSLT Mapping

3. JAVA Mapping

4. ABAP Mapping

GRAPHICAL MAPPING

A message mapping refers to a mapping of messages; the procedure is supported by a graphical mapping editor. The editor enables you to design a structure mapping between any two XML structures and connect to a value mapping.

The mapping tool generates Java source code from the graphical mapping description, which is then compiled and packed in a JAR file that the Integration Engine executes at runtime.

Features

The mapping editor can load the following schemas to the structure overview:

● A schema from the Integration Repository: (Fault) message types, IDocs, the request, response, or fault part of RFCs, and message structures from external definitions. The latter are message structures from WSDL, XSD, or DTD documents.

● XML schema definitions (XSD) or XML files from a local file

In the case of XSD files (the repository schemas also use this format); the mapping editor generates an XML representation for both the source structure and the target structure in each case. If the XSD file contains more than one global element, use a dialog box to select one global element as the root element.

If you want to load several XSD files that reference each other using the import and include XSD statements, you must first pack the files into a Zip file. If the file contains more than one global element, you must select one global element as the root element in this case as well.

XSLT MAPPING

Steps required for developing XSLT Mapping

u2022 Create a source data type and a target data type

u2022 Create Message types for the source and target data types.

u2022 Create Message Interfaces includes Inbound Message interface and Outbound Message interface.

u2022 XSLT Mapping does not require creation of Message mapping, so donu2019t create any Message mapping.

u2022 Create an .XSL file which converts source data type into target data type.

u2022 Zip that .xsl file and import it into Integration Repository under Imported Archives.

u2022 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)

u2022 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 u201CAltova MapForceu201D 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.

You use XSLT to convert an XML document to another document. This is achieved by using XSLT commands to search for tags in the source document and replacing them with other tags or values in the target document. It is also possible to switch to a Java program from XSLT.

http://help.sap.com/saphelp_nw04/helpdata/en/83/2200cb50d345c793336d9a1683163e/frameset.htm

JAVA MAPPING

Java mapping can be used when you have complex mapping structures.

We can do most of the times for our requirements through Graphical mapping.

When the structures are very complex to build you can go for SAX (Simple API for XML) or DOM (Document Object Model) parsers.

Message mapping internally generates DOM parser.

Java Mapping in XI

https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=java+mapping&adv=false&sortby=cm_rn...

SAP Network Blog: Implementing a Java Mapping in SAP PI

/people/carlosivan.prietorubio/blog/2007/12/21/implementing-a-java-mapping-in-sap-pi

Java Mapping (SAP Library - Partner Connectivity Kit)

http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm

SAP Network Blog: XI Java Mapping Helper (DOM)

/people/alessandro.guarneri/blog/2007/03/25/xi-java-mapping-helper-dom

SAP Network Blog: Testing and Debugging Java Mapping

/people/stefan.grube/blog/2006/10/23/testing-and-debugging-java-mapping-in-developer-studio

Binary Conversion in XI - Java Mapping - Code Gallery - Wiki

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/binary%2bconversion%2bin%2bxi%2b-%2bjava...

SAP Network Blog: "JAVA MAPPING", an alternate way of reading a CSV file

/people/rahul.nawale2/blog/2006/07/18/java-mapping-an-alternate-way-of-reading-a-csv-file

ABAP MAPPING

There is already lot of information available on SDN about ABAP mapping...search with SDN Forum.

ABAP Mapping

ABAP mappings run on ABAP Stack and are developed in the ABAP workbench of the Integration Server.

You normally do not need to use the ABAP mappings and is preferable for someone with ABAP programming background. I should say JAVA functions would suffice any complex scenarios.

refer step by step guides for ABAP Mapping

ABAP Mapping

https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=abap+mapping&adv=false&sortby=cm_rn...

How to Use ABAP Mapping in Exchange Infrastructure 3.0 (NW2004)

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d030259...

SAP Network Blog: Testing ABAP Mapping

/people/sameer.shadab/blog/2005/09/29/testing-abap-mapping

SAP Network Blog: How to call XI ABAP Mapping via RFC

/people/ricardoandres.maienza/blog/2007/04/06/how-to-call-xi-abap-mapping-via-rfc

SAP Network Blog: XI: ABAP mapping logs - more standard = better visibility

/people/michal.krawczyk2/blog/2006/09/20/xi-abap-mapping-logs--more-standard-better-visibility

SAP Network Blog: Dynamically sending a mail to the PO creator using XSLT- ABAP Mapping

/people/rahul.nawale2/blog/2006/11/01/dynamically-sending-a-mail-to-the-po-creator-using-xslt-abap-mapping

You need to provide the name of your mapping program maually , you see it is an input box.

just provide the name of abap mapping program it will work.

and one more thing you cannot test abap mapping program in integration builer you need to test in abap only.

use tcode: SXI_MAPPING_TEST for testing abap mapping

Hope this clears your doubts

Thanks

Saiyog

Edited by: Saiyog Gonsalves on Jun 2, 2008 4:56 PM

Former Member
0 Kudos

Hi,

The mapping sequence is:

Graphical

Java

XSLT

ABAP

graphical mapping can prove to be the simplest of all mappings and easy to so also as u have a mapping editor and standard functions available.

when this becomes too complex v generally opt for java / xslt mappings.

when u are much comfortable with abap u may also opt for abap mapping.

still the choice depends on scenario. performance wise graphical and java mappings have

good results (also depends on ur code in java mapping).

refer this:

Comparing performance of mapping programs:

/people/udo.martens/blog/2006/08/23/comparing-performance-of-mapping-programs

Reward points if helpful.

Regards,

Soumya

Former Member
0 Kudos

Hi,

please have a look at this thread:

Regards

Patrick

Former Member
0 Kudos

Hi,

Check this forum he asked the same question look at the forum

Please reward points

here are 4 types of mapping in XI

1. Graphical Mapping

2. XSLT Mapping

3. JAVA Mapping

4. ABAP Mapping

Graphical Mapping is used for simple mapping cases. When, the logic for your mapping is simple and straight forward and it does not involve any complex logic.

Java and XSLT mapping are used when graphical mapping cannot help you.

When the choice is between Java And XSLT, XSLT is simpler than java mapping and easier. But, it has its drawbacks. One among them being that you cannot use Java APIs and Classes in it. There might be cases in your mapping when you will have to perfrom something like a properties file look up or a DB lookup, such scenarios are not possible in XSLT and so, when you want to use some specific Java API's you will have to go for 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.

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:-

When the required output is other than XML like Text, Html or XHTML (html displayed as XML)

When default namespace coming from graphical mapping is not required or is to be changed as per requirements.

When data is to be filtered based on certain fields (considering File as source)

When data is to be sorted based on certain field (considering File as source)

When data is to be grouped based on certain field (considering File as source)\

Advantages of using XSLT mapping

u2022

1. XSLT program itself defines its own target structure.

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.

XSLT provides use of number of standard XPath functions that can replaces graphical mapping involving user defined java functions easily.

File content conversion at receiver side can be avoided in case of text or html output.

Multiple occurrences of node within tree (source XML) can be handled easily.

XSLT can be used in combination with graphical mapping.

Multi-mapping is also possible using xslt.

XSLT can be used with ABAP and JAVA Extensions.

Disadvantages of using XSLT mapping

u2022

1. Resultant XML payload can not be viewed in SXMB_MONI if not in XML format (for service packs < SP14).

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.

XSLT mapping requires more memory than mapping classes generated in Java.

XSLT program become lengthier as source structure fields grows in numbers.

XSLT program sometimes become complex to meet desired functionality.

Some XSL functions are dependent on version of browser.

Thanks

Vikranth

Edited by: Khimavath Vikranth on Jun 2, 2008 4:34 PM

Edited by: Khimavath Vikranth on Jun 2, 2008 4:34 PM

Former Member
0 Kudos

hey,

/people/udo.martens/blog/2006/08/23/comparing-performance-of-mapping-programs

Thanks,

vijaya.

Edited by: Vijaya Lakshmi Palla on Jun 2, 2008 10:31 AM