cancel
Showing results for 
Search instead for 
Did you mean: 

XSLT

Former Member
0 Kudos

Hi,

Could anyone provide blogs covering detail XSLT mapping.

Regards,

S.RamNarender

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Ram

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.

refer this PDF

<b>Generic XSLT Mapping for SAP XI,Part I</b>

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

http://www.w3schools.com/xsl/default.asp - <b>that would be a good start. </b>

Go through these

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

Some scenarios

/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

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

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

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

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

Lookups with XSLT - https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8e7daa90-0201-0010-9499-cd347ffb...

Using XSLT Mapping within the J2EE Adapter Framework -https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3823 [original link is broken] [original link is broken] [original link is broken]

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

http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/frameset.htm

So go with XMLSpy or Stylus Studio editors for the XSLT Mapping.

You can get XSLT Tutorial from the Stylus Stutdio site. Refer

http://www.stylusstudio.com/xml_product_index.html

Thanks!

Regards

Abhishek Agrahari

Former Member
0 Kudos

Hi Abhishek,

You have given good piece of information. Can you provide blogs that contain the generation of xslt code.

Regards,

S.RamNarender

Former Member
0 Kudos

Hi

Shall send you a simple document on how to go about XSLT Mapping.Let me know your mail id.

Thanks

Former Member
0 Kudos

Hi,

my mailid narender.sriramula@gmail.com

Regards,

S.RamNarender

Former Member
0 Kudos

Hi

I have sent the document.Hope you find it useful.It will explain you the basics.

Thanks

Former Member
0 Kudos

Hello

Go thru my wiki page ...

https://www.sdn.sap.com/irj/sdn/wiki?path=/pages/viewpage.action&pageid=43096

with Regards,

sagar Bhogaraju

**Reward with points if useful

Former Member
0 Kudos
Former Member
0 Kudos
Former Member
0 Kudos