on 07-03-2008 9:36 AM
Hi
I have a problem with an XI message that is converted OK by File Adapter (flat file to XML). The configuration picks up the message and routes is accordingly but SXMB_MONI errors with "Split mapping created no messages".
If I cut and paste the Source XML into my Interface Mapping and unit test it will convert correctly. So does not appear to be anything wrong with the source message.
The message mapping transforms a StoreLog file (200MB containing thousands of Stock and Sales transactions) and must produce multiple IDOCs for each branch and date (for each it produces Accounting IDOCS and a Stock Movement IDOCS). Following recommended SAP Note about unbounded IDOCS I have used that for my target messages.
As mentioned above the message mapping works fine if unit tested in the Designer message mapping and interface mapping with the source XML message that causes the error message "Split mapping created no messages" in SXMB_MONI.
Can you please assist.
Hi,
In the source XML message you may find some extra tags being included.
Just remove those extra tags, then it will work fine.
For example:
If your source XML message is:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<ns0:Message1>
<ns1:MT_FileToFile_MultiMap_Src xmlns:ns1="http://FileToFile/MultiMap">
<Input>
<Name>abc</Name>
<EmpId>123487</EmpId>
<Age>22</Age>
</Input>
</ns1:MT_FileToFile_MultiMap_Src>
</ns0:Message1>
</ns0:Messages>
remove the extra tags and then it will look like:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_FileToFile_MultiMap_Src xmlns:ns0="http://FileToFile/MultiMap">
<Input>
<Name>abc</Name>
<EmpId>123487</EmpId>
<Age>22</Age>
</Input>
</ns0:MT_FileToFile_MultiMap_Src>
Regards,
Geetha J.
Reward points if found helpful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Paulie,
In Interface mapping and Message Mapping this error will not come. It will come only during end to end testing as XI does not recognizes the tags with namespace specified as "\SplitAndMerge". So remove those tags from the xml message that you are sending and then retest the scenario as suggested by Geetha.
Regards,
Sanjeev.
So the File Adapter puts in the split and merge ? Is that what you are saying.
So how can I remove them so it will work when I make this thing Productive ? Should I do a XSLT mapping to remove them prior to running into the main message mapping (which is a graphical mapping btw)? Please explain
thanks
Sorry I misunderstood...problem is with the Target that my mapping produces !
The File Adapter converts my source file correctly. (a flat file to XML) That is fine.
So this Source XML is correct
and it passed into the message mapping this produces a Target message and the XI graphical mapping sticks in the offending "SplitandMerge".
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/*SplitAndMerge*"><ns0:Message1>... ...
Now it would seem that the IDOC Adapter has a problem with this .... So solution is to remove that offending tag in the Target Message.
How can this be done programmatically ? My main mapping is a Graphical Mapping...should I have a 2nd mapping (XSLT) to remove the offending tag ?
If so how ?
The problem is the Target XML that is produced contains the namespace
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<ns0:Message1>
</ns0:Message1
u2026
This needs to be removed.
Use this XSLT as post processing after the main message mapping. Save this code as XSLT, zip and then import as external archive and then add this as last step in interface mapping.
Let me know how it goes - it will fix your namespace issue not sure if you'll have problems with the result it produces.
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="no"/>
<xsl:template match="/|comment()|processing-instruction()">
<xsl:copy>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<xsl:template match="*">
<xsl:element name="{local-name()}">
<xsl:apply-templates select="@*|node()"/>
</xsl:element>
</xsl:template>
<xsl:template match="@*">
<xsl:attribute name="{local-name()}">
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:template>
</xsl:stylesheet>
Hey thanks you are a legend !.
that fully works
However I discovered that my File Adapter content conversion I had a typo in the DocumentName and Document Namespace parameters.. the namespace was to match my interface mapping and it did not.
I adjusted that and it worked.
I first used your XSLT as Step2 of the Interface Mapping and it worked
I then removed the XSLT - so that back to were I was before with only Step1 being a Graphical Mapping - and it still works. That means the error "Split mapping created no messages" and the fact it has "http://sap.com/xi/XI/SplitAndMerge"
has got NOTHING to do with the problem
It was only because I made a simple typo in my File Adapter giving it the wrong DocumentName and hence the message mapping could not find the tags and hence it produced no messages duh !.
But thanks anyway it got me on the way.
I too have the same problem, The comments which you mentioned
"Save this code as XSLT, zip and then import as external archive and then add this as last step in interface mapping. "
I copied your code into notepad and saved it with extn .xslt and then zipped it. Imported the zipped file to PI - using imported archives method. I did not get the meaning of " add this as last step in interface mapping" ?
Please let me know in detail. Do I have to create another Interface Mapping(Operation Mapping)with source structure as the zipped code and target as IDOC structure?
Thanks in advance,
Krishna
Thanks you Geetha Jeyaprakash.
I have faced the same problem. As of your solution I could solve the issue. But how will we do the same thing while end to end testing? My scenario is JDBC to RFC Asynchronous. In this i got many records at a time from source database. I cant do manual deletion of those extra things in payload for all times.
Please let me know the solution..
Best Regards,
Ashok.
Hi Peter Munt,
I am also having the same issue and followed your instructions to delete this tag,
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">,
But no luck and getting the same attachemnt without actual namespace now.
Please see this discussion to understand clearly what is going on in this discussion.
http://scn.sap.com/thread/3273356
If you did this in the past then your help is more appriciable.
Thank you.
Regards,
Sreeni.
"Following recommended SAP Note about unbounded IDOCS I have used that for my target messages"
Did you ensure that the IDOCs used in the Interface maps are standard and not the unbounded ones. We should use the unbounded IDOCs only in the message map.
Sameer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.