cancel
Showing results for 
Search instead for 
Did you mean: 

Any website for XSLT AND ABAP mapping

Former Member
0 Kudos

Hi XI experts,

I am looking for any good website/Material for XSLT and ABAP Mapping with examples.

So experts if you any one of you have any clue , i would appreciate it , if you post the info here .

Regds,

Ram.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Pooja/Satish/Amaresh,

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

I am going thru above link which explains about mapping of Flat file to IDOC and According to Anish XSLT Mapping should generates IDOC for each occurance of REJFL and TROUT .

When i check Flat File I see two REFJL and One TROUT .So it should generate two REFJL and One TROUT IDOC.

But according to the diagram given by Anish it generates One REFJL and tow TROUT IDOCS.

I am bit confused in this part .

If any one of you help me to understand it better , i would appreciate it.

Thank you and Regds,

Ram.

Former Member
0 Kudos

Hi,

For XSLT mapping, please try to create msg types for sender and recv, import these two into XML Mapforces (This is a software which enables us to do mapping this you can download from altova mapforce site) , do mapping in that mapforce , late click on XSLT icon , one XSLT file will be c reated that file , prepare zip and late come to xi , import under imported archieves,do Interface mapping by selecting the XSLT mapping option, select imported archieve..

See below examples..

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

http://www.troobloo.com/tech/xslt.toc.shtml

http://www.w3schools.com/xsl/

http://www.w3.org/TR/xslt

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

https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-code-samples/gen...

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

Regards

Chilla..

Former Member
0 Kudos

Hi Chandra,

Thank you very much for you reply and i could able to start on something .

I am new to XSLT mapping and struggling to understand some of the code in the below website you have sent me.

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

I have difficulty in understanding below code in the above site...If you have time ,i would appreciate it ,if you can explain me to understand better.

<!-- iterate on each group -->

<xsl:for-each select="salesOrder/item[generate-id(.) = generateid(

key('itemDescription', itemDescription)[1]) ]">

<xsl:variable name="group" select="key('itemDescription', itemDescription)"/>

<xsl:variable name="itemDescription">

<xsl:value-of select="itemDescription"/>

</xsl:variable>

<xsl:variable name="itemRetailPrice">

<xsl:value-of select="sum($group/itemRetailPrice)"/>

</xsl:variable>

<xsl:variable name="itemSalePrice">

<xsl:value-of select="sum($group/itemSalePrice)"/>

</xsl:variable>

Thank you in advance again,

Ram.

Former Member
0 Kudos

Rama,

Initially he had build a key itemDescription so that he can iterate for each item:

<!-- Build a key to group item by itemDescription --> <xsl:key name="itemDescription" match="salesOrder/item" use="itemDescription"/>

Then he is iterating for all the items in this code and taken the sum of itemRetailPrice and itemSalePrice.

<!-- iterate on each group --> <xsl:for-each select="salesOrder/item[generate-id(.) = generate-id(key('itemDescription', itemDescription)[1]) ]"> <xsl:variable name="group" select="key('itemDescription', itemDescription)"/> <xsl:variable name="itemDescription"> <xsl:value-of select="itemDescription"/> </xsl:variable> <xsl:variable name="itemRetailPrice"> <xsl:value-of select="sum($group/itemRetailPrice)"/> </xsl:variable> <xsl:variable name="itemSalePrice"> <xsl:value-of select="sum($group/itemSalePrice)"/> </xsl:variable>

If you have any doubts in the doubt just go the w3schools and check the syntax like <xsl:value-of select> and generate-id(.) etc.

---Satish

Former Member
0 Kudos

Thank you all guys.

Former Member
0 Kudos

Hi Rama Manthena,

Check the following links:

/people/r.eijpe/blog/2005/11/04/using-abap-xslt-extensions-for-xi-mapping

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

/people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii

Java mapping:

/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i

/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii

ABAP Mapping:

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

XSLT mapping:

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

Amaresh

Former Member
0 Kudos

Rama,

The best thing I would suggest to learn XSLT is from here:

http://w3schools.com/xsl/default.asp

For ABAP Mapping you can follow the link given by pooja.

Also check this weblogs which will give you some help:

/people/shabarish.vijayakumar/blog/2006/04/12/if--else-if-and-xslt--a-better-work-around

/people/r.eijpe/blog/2005/11/04/using-abap-xslt-extensions-for-xi-mapping

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

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

https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3823 [original link is broken] [original link is broken] [original link is broken] [original link is broken]

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

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

/people/r.eijpe/blog/2005/11/04/using-abap-xslt-extensions-for-xi-mapping

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

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

...Satish

Former Member
0 Kudos

Hi Rama,

Here are few links which might help you

ABAP Mapping:

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

XSLT mapping

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

ABAP XSLT mapping

/people/r.eijpe/blog/2005/11/04/using-abap-xslt-extensions-for-xi-mapping

thanks,

Pooja