on 10-28-2013 12:10 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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:
Thanks for your help!
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sven,
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.