cancel
Showing results for 
Search instead for 
Did you mean: 

Graphical Message Mapping with unused objects

Former Member
0 Kudos

Hi all,

I have a problem with the mapping of longtexts in DEBMAS Idocs.

I get an error "Cannot create target element /DEBMAS07/IDOC/E1KNA1M/E1KNA1H/E1KNA1L/SEGMENT". My incoming xml looks as follows (there is more in the original):

         <E1KNA1H SEGMENT="1">

            <MSGFN>003</MSGFN>

            <TDID>0013</TDID>

         </E1KNA1H>

         <E1KNA1H SEGMENT="1">

            <MSGFN>005</MSGFN>

            <TDID>0003</TDID>

            <E1KNA1L SEGMENT="1">

            </E1KNA1L>

         </E1KNA1H>

Now I have a Mapping for E1KNA1H which says that E1KNA1H will not be created in outgoing xml when TDID is 0013. That case is given in the first E1KNA1H of my example, but not in the second. Also when I look into the trace of ESB I see that the error occurs when the mapping tries to create E1KNA1L for the second E1KNA1H ( MSGFN is 005 ). Creation of the first E1KNA1H is completely skipped (which is the correct behaviour). Because of that behaviour I tested the same IDoc and skipped the E1KNA1Hs. This one worked fine and gave the expected result. Incomming XML:

         <E1KNA1H SEGMENT="1">

            <MSGFN>005</MSGFN>

            <TDID>0003</TDID>

            <E1KNA1L SEGMENT="1">

            </E1KNA1L>

         </E1KNA1H>

         <E1KNA1H SEGMENT="1">

            <MSGFN>003</MSGFN>

            <TDID>0013</TDID>

         </E1KNA1H>

My guess is that the mapping is still looking for E1KNA1L in the first E1KNA1H even though it should find it in the second E1KNA1H.

Does anyone experienced such a behaviour? I would be really happy if someone could help me with that issue and tell me how to solve it.

Regards and many thanks in advance,

Sven

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Sven,

the mapping engine will not "look into" a structure that is not mapped. If the root node is not created, all target fields below that node will be ignored. So your problem must be elsewhere.

I guess you have a problem with queues of your structure. I assume that your E1KNA1H has the correct context changes, but that your E1KNA1L are all in one context. This would probably cause an error like yours. Can you please check your queues in the mapping and have a close eye on context changes? If in doubt, please post them here.

Iñaki, Marco is responding to the same issue, he tried to solve it via an XSLT mapping. It doesn't make sense to open a new thread in this case.

Regards,

Jörg

iaki_vila
Active Contributor
0 Kudos

Hi Jörg,

You are right i misunderstood Marco, my apologize to him. That error seems a cardinality problem, form my point of view, as i sayd before i would try a little workaround for this problem.

Regards.

Former Member
0 Kudos

OK, I watched in the queues of the TDID element. For the condition on the E1KNA1H-node both values, 0003 and 0013 are in the same context but in the condition for E1KNA1L they are in different contextes. But what should we do here?

rcsegovia
Active Participant
0 Kudos

You can use useoneasmany function to replicate contextes and give to one element another context, please have a look first to that link: http://wiki.scn.sap.com/wiki/display/XI/What+is+Context+and+Context+Change

Former Member
0 Kudos

problem solved. The problem was, that the E1KNAl1-node had the same condition as the E1KNAH1, so this was doubled and this causes the error. The hint with queues and contextes was very helpful to find this as well as this link:

http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/06/22/queues-contexts-concept-of-graphi...

Thanks for your help!

Answers (2)

Answers (2)

Former Member
0 Kudos

I'm working with Mr Fischer and I wrote a little XSLT, but it doesn't work, too:

<?xml version='1.0' ?>

<xsl:stylesheet

           xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

           version="1.0">

<xsl:output method="xml" indent="yes"/>

<xsl:template match="@*|node()">

          <xsl:copy>

                    <xsl:apply-templates select="@*|node()"/>

          </xsl:copy>

</xsl:template>

<xsl:template match="DEBMAS07/IDOC/E1KNA1M/E1KNA1H[@TDID='0012' or @TDID='0013']"/>

</xsl:stylesheet>

Maybe someone can tell me the problem in this report? This doesnt have any effect on the given data.

Greetins,

Marco Richter

iaki_vila
Active Contributor
0 Kudos

Hi Marco,

Different question, different thread please. In the new thread, it will be helpful that you share the XML source and the desired target xml.

Regards.

iaki_vila
Active Contributor
0 Kudos

Hi Sven,

E1KNA1L tag has the minimum occurrences limited to one; if you finally call the IDOC in the endpoint you would have a problem.  I would do an RFC to wrap the IDOC in the endpoint to control the situation and in PI call the RFC. Another solution could be to duplicate the IDOC interface, with an external definition and to change E1KNA1L cardinality, but  I will try to send that IDOC to failed receiver in the integration directory asking in the condition editor.

Regards.

Former Member
0 Kudos

Hi Inaki,

Thanks a lot for your answer.

The E1KNA1L tag will be there. The E1KNA1H tag in which the E1KNA1L tag is missing will be deleted in the outgoing XML structure.

iaki_vila
Active Contributor
0 Kudos

Hi Sven,

May be im wrong but that tag has the same minimun ocurrence:

Therefore, if you leave out that tag you will get the same exception but in the parent node.

Regards

Former Member
0 Kudos

Hi again Inaki,

maybe I miss what you mean. But the output of my current mapping will be:

         <E1KNA1H SEGMENT="1">

            <MSGFN>005</MSGFN>

            <TDID>0003</TDID>

            <E1KNA1L SEGMENT="1">

            </E1KNA1L>

         </E1KNA1H>


So there should be no issue with a missing E1KNA1H or E1KNA1L tag.