cancel
Showing results for 
Search instead for 
Did you mean: 

N:1 mapping using XSLT

Former Member
0 Kudos

Hi,

I have a scenario in which i have to do a N:1 mapping using XSLT.

I am doing this using the BpmPatternCollectMultiIf giving the XSLT mapping in the transformation step...

But, the transformation step is returning the following error:

Error: Exception CX_MERGE_SPLIT occurred (program: CL_MERGE_SPLIT_SERVICE========CP, include: CL_

My XSLT mapping is as follows:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>

<xsl:template match="/">

<item xmlns:xs="http://www.w3.org/2001/XMLSchema-instance">

<KEYCODE>

<xsl:value-of select="ns0:Messages/ns0:Message1/fsxml/item/keycode"/>

</KEYCODE>

<DESCRIPTION>

<xsl:value-of select="ns0:Messages/ns0:Message1/fsxml/item/description"/>

</DESCRIPTION>

<CLASS>

<xsl:value-of select="ns0:Messages/ns0:Message1/fsxml/item/class"/>

</CLASS>

<ONE>

<xsl:value-of select="ns0:Messages/ns0:Message2/test/row/one"/>

</ONE>

<TWO>

<xsl:value-of select="ns0:Messages/ns0:Message2/test/row/two"/> </TWO>

</item>

</xsl:template>

</xsl:stylesheet>

Here,<b> fsxml</b> is the first message and<b> test</b> is the second message.

Kindly let me know if there is any problem in the XSLT mapping.

Thanks in advance,

Thanks,

Karen Pereira

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

There was problem in the XSLT mapping. i figured it out and fixed it and the scenario worked.

The new mapping was as follows:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >

<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>

<xsl:template match="/">

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

<ns0:Message1>

<item xmlns:xs="http://www.w3.org/2001/XMLSchema-instance">

<!-- Mapping for tags which are to be directly replicated in the target message-->

<KEYCODE>

<xsl:value-of select="ns0:Messages/ns0:Message1/fsxml/item/keycode"/>

</KEYCODE>

<DESCRIPTION>

<xsl:value-of select="ns0:Messages/ns0:Message1/fsxml/item/description"/>

</DESCRIPTION>

<CLASS>

<xsl:value-of select="ns0:Messages/ns0:Message1/fsxml/item/class"/>

</CLASS>

<ONE>

<xsl:value-of select="ns0:Messages/ns0:Message2/test/row/one"/>

</ONE>

<TWO>

<xsl:value-of select="ns0:Messages/ns0:Message2/test/row/two"/>

</TWO>

</item>

</ns0:Message1>

</ns0:Messages>

</xsl:template>

</xsl:stylesheet>

Thanks,

Karen