cancel
Showing results for 
Search instead for 
Did you mean: 

XSLT mapping

Former Member
0 Kudos

Hi SAP-Guru,

can u please explain me that when and how we can use XML mapping in SAP-XI.

what are the advantages of using XSLT mapping rather than other mappings.

Thanks & Regards

Krishna

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

this is the answer for "How"?

1. Develope ur XSLT files

2.create .jar or .zip

3.Create a new imported archive and import the .jar to the IR

You can invoke external java method from within a XSLT transformation

to learn about the basics of XSLT see in w3schools.com

Edited by: Kubra fatima on Apr 14, 2009 12:58 PM

madanmohan_agrawal
Contributor
0 Kudos

Krishna Says..

can u please explain me that when and how we can use XML mapping in SAP-XI.

It depends on your requirement whether to use Message mapping or XSLT mapping or Java Mapping

Krishna Says..

what are the advantages of using XSLT mapping rather than other mappings.

Well....some of advantages are to maintain namspace, namespace prfix, encoding format, encoding type, etc, etc

Regards,

Madan Agrawal

former_member181962
Active Contributor
0 Kudos

XSLT is a transformation language which can convert XML Data in one structure into another structure.

Some advantages of XSLT mapping over the other mappings is that,

1) XSLT Mapping is upgrade proof. IN the sense that, If XI/PI is upgraded, we can still make use of the same XSLT Mapping.

2) The same XSLT mapping can be deployed into into non SAP middlewares also. In other words, if there is a case where your client want to migrate away from SAP XI to some other middleware, you can still make use of the XSLT Mapping sincle XSLT is open(Follows Open standards).

Regards,

Ravi Kanth Talagana

Former Member
0 Kudos

Hi,

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

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

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.

Also go throgh the below links.

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2ea3bb9...

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9692eb84-0601-0010-5ca0-923b4fb8...

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/006aa890-0201-0010-1eb1-afc5cbae...

/people/sap.user72/blog/2005/03/15/using-xslt-mapping-in-a-ccbpm-scenario

/people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping

Thanks,

Vijaya.

JoelTrinidade
Active Contributor
0 Kudos

hi,

All that you wanted to know about XSLT mapping.

XSLT Mapping with java enhancement

/people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners

XSLT - /people/dirk.roeckmann/blog/2006/07/26/grouping-xml-with-xslt--from-muenchian-method-to-xslt-20

XSLT Mapping

/people/prasadbabu.nemalikanti3/blog/2006/03/30/xpath-functions-in-xslt-mapping

/people/sreekanth.babu2/blog/2005/01/05/design-time-value-mappings-in-xslt

/people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping

Regards

joel

PS: there is no such thing as xml mapping , in xi almost all things are converted into the native language which is xml. The above is quite a bunch of links go through them for a clear understanding.

Edited by: joel trinidade on Apr 14, 2009 3:08 PM