Skip to Content
author's profile photo Former Member
Former Member

IDOC to IDOC message split with XSLT

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



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Jul 25, 2016 at 11:06 AM

    Hello Marc,

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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 25, 2016 at 12:02 PM

    Hi Raghuraman,

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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 25, 2016 at 12:52 PM

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

    Thanks

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Evgeniy Kolmakov

      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


  • author's profile photo Former Member
    Former Member
    Posted on Jul 26, 2016 at 12:44 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.