cancel
Showing results for 
Search instead for 
Did you mean: 

IDOC to IDOC message split with XSLT

Former Member
0 Kudos

Hi,

we get at the moment the following message into the message monitor:

Mapping "http://www.xxx.com/OperationMapping" failed to execute: RetryControlException: Split mapping created no messages, cannot proceed. Review your mapping setup: splitting to 0 messages is not allowed. We could tested the operation mapping without any error.


We would like to split the one source IDOC into 1...n IDOC's via XSL transfomration ( the count of the source segment E1XYZ generate the count of the destination IDOC's ). The destionation IDOC (message) is defined as external defintion with the unbounded signature


The first question: How should we build the XSL document:


1. Exampple:


<?xml version="1.0"?>

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

     <xsl:output method="xml" encoding="UTF-8" indent="no"/>

     <xsl:template match="/">

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

             <xsl:for-each select="SHPMNT06/IDOC/E1EDT20/E1EDL20">

                 <ns0:Message1>

                 </ns0:Message1>

             </xsl:for-each>

         </ns0:Messages>

     </xsl:template>

</xsl:stylesheet>


or


<?xml version="1.0"?>

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

     <xsl:output method="xml" encoding="UTF-8" indent="no"/>

     <xsl:template match="/">

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

            <ns0:Message1>

             <xsl:for-each select="SHPMNT06/IDOC/E1EDT20/E1EDL20">                

             </xsl:for-each>

             <ns0:Message1>

         </ns0:Messages>

     </xsl:template>

</xsl:stylesheet>


The second question:


Into the operation mapping we use 2 mapping programs:


1. XSL transformation source message to destinaion messages

2. Message Mapping destination messages with function mapping to the same destination messages ( 1:1 mapping til changes )


    Messages                           Messages

        Message1                           Message1

           TRACKINGIDOC   ------>      TRACKINGIDOC

                   IDOC           ------>          IDOC


Is this right ?


Last: Please dont answer me, if you link me to the simple examples ( files into idoc and so on.... ) or references without any

solutions 😉


Thanks in advance and have nice day

marc



Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

ok, I think the problem is:

<xsl:template match="/">

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

          <ns0:Message1>

               <xsl:for-each select="SHPMNT06/IDOC/E1EDT20/E1EDL20">



....and should be

<xsl:template match="/">

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

          <ns0:Message1>

              <xsl:for-each select="ns0:Messages/ns0:Message1/SHPMNT06/IDOC/E1EDT20/E1EDL20">


...into the right context.

Former Member
0 Kudos

I'm again, did you've any example IDOC -> IDOC with multi messages ?

Thanks

former_member190293
Active Contributor
0 Kudos

Hi Marc!

Your second XSL template is the right one.

And just for case: didn't you miss IDoc root node with respective namespace if it exists in your transformation?

I mean:

<xsl:template match="/">

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

          <ns0:Message1>

               <xsl:for-each select="SHPMNT06/IDOC/E1EDT20/E1EDL20">               

                    <TRACKINGIDOC>

                         ...

                    </TRACKINGIDOC>

               </xsl:for-each>

          <ns0:Message1>

     </ns0:Messages>

</xsl:template>

Did you test your XSL transformation in NWDS or any other external tool?

Regards, Evgeniy.

Former Member
0 Kudos

Hi Evgeniy,

the xsl transformation begins with:

<?xml version="1.0"?>

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

     <xsl:output method="xml" encoding="UTF-8" indent="no"/>

     <xsl:template match="/">

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

             <ns0:Message1>

                 <xsl:for-each select="SHPMNT06/IDOC/E1EDT20/E1EDL20">

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

                         <IDOC BEGIN="1">

                             <EDI_DC40 SEGMENT="1">

                                    .

                                    .

                                    .

and if I test this case into the NWDS, I can see the following result:


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

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

   <ns0:Message1>

      <SHP_OBDLV_CONFIRM_DECENTRAL04>

         <IDOC BEGIN="1">

            <EDI_DC40 SEGMENT="1">

               <TABNAM>EDI_DC40</TABNAM>

             </EDI_DC40>

             .

             .

           the idoc segments

         </IDOC>

      </SHP_OBDLV_CONFIRM_DECENTRAL04>

      <SHP_OBDLV_CONFIRM_DECENTRAL04>

         <IDOC BEGIN="1">

            <EDI_DC40 SEGMENT="1">

               <TABNAM>EDI_DC40</TABNAM>

            </EDI_DC40>

            .

            .

           the idoc segments

         </IDOC>

      </SHP_OBDLV_CONFIRM_DECENTRAL04>

All works perfect, till if I send a IDOC from the test SAP system.The the error message occured:


Mapping "http://www.xxx.com/namespace/OM_SHPMNT_TO_SHPOBDCONF" failed to execute: RetryControlException: Split mapping created no messages, cannot proceed. Review your mapping setup: splitting to 0 messages is not allowed.


The scenario runs as integrated configuration. If I tested this scenario with the graphical

mapping ( only till EDI_DC40 ), all works fine without any error.




Kind regards


Former Member
0 Kudos

Hi Raghuraman,

yes, the source message has 1 and the target message unbounded into the occurence field.

former_member186851
Active Contributor
0 Kudos

Hello Marc,

In the operation mapping did you change the occurence of interfaces to 0- unbounded.