on 10-15-2012 12:53 PM
Hi Experts,
I would like to spilit the target SOAP message depends on the number of line items from the source side.
For example, total source message/lineitem is 5000. I have to send 500 lineitem in one SOAP message, so I have to create 10 Soap messages.
Could you please suggest me, how to do it thro' Graphical mapping?
Thanks
Sara
Why dont you impkement same logic at sender side it self? i would prefer doing at sender system.
you need count number of records then splitinjg records , you required UDF for this with multi mapping concept.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sara,
You may use 1:n mapping and split the messages in graphical mapping. You will have to use enhanced interface determination for same.
You will have to use UDF with context type.
Loop on all the items and add context change after every 500 line items.
It will look something like this (there might be syntax errors):
for (i =0 ; i< a.size, i++)
{
result.add(a[i]);
if (i mod 500 = 0 )
result.add(ResultList.CC);
}
Regards,
Beena.
Thanks for your response Beena.
Source(JDBC) and Target(SOAP) side, I have only one message structure. Is it fine?
I have to use the mentioned UDF for the root node of the target structure right? Will it automatically creates the n number of Target SOAP messages? Can we check this in Message mapping testing(test tab) itself?
Regards
Sara
Hi Sara,
Hope the below link can help you.
http://wiki.sdn.sap.com/wiki/display/XI/Split+Mapping+using+UDF
Regards,
Pradeep A.
Hi, the other and i think the best option is to create an additional XSLT mapping. below you will find and example of a mmaping i needed to create to split an WPUUMS01 IDoc
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns1="http://spsa.com/POS/DailySales">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="ns1:mt_SalesValidation_response">
<WPUUMS01>
<xsl:for-each select="row[position() mod 500 = 1]">
<IDOC>
<xsl:attribute name="BEGIN">
<xsl:value-of select="1" />
</xsl:attribute>
<EDI_DC40>1
<SNDPRN>
<xsl:value-of select="../OUT_WERKS"/>
</SNDPRN>
</EDI_DC40>
<xsl:for-each select=".| following-sibling::row[position() < 500]">
<E1WPU01>
<xsl:attribute name="SEGMENT">
<xsl:value-of select="1"/>
</xsl:attribute>
<BELEGDATUM>
<xsl:value-of select="../OUT_ERSDA"/>
</BELEGDATUM>
<BELEGWAERS>PEN</BELEGWAERS>
<E1WPU02>
<xsl:attribute name="SEGMENT">
<xsl:value-of select="1"/>
</xsl:attribute>
<QUALARTNR>EANN</QUALARTNR>
<ARTNR>
<xsl:value-of select="EAN11"/>
</ARTNR>
<VORZMENGE>-</VORZMENGE>
<UMSMENGE>
<xsl:value-of select="TOT_CANTIDAD"/>
</UMSMENGE>
<UMSWERT>
<xsl:value-of select="TOT_VTA"/>
</UMSWERT>
</E1WPU02>
</E1WPU01>
</xsl:for-each>
</IDOC>
</xsl:for-each>
</WPUUMS01>
</xsl:template>
</xsl:stylesheet>
also take allok to this link
http://scn.sap.com/docs/DOC-3535
Hope it helps
Rodrigo P-.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Experts,
I have created the UDF logic as per your suggestion.
Source side - I have one message
Target side - I have one message but change the occurance to 0 to unbounded.
In the Target output, I get the message like below.
<Messages>
<Message1>
<Target rootnode>
<LineItemNode>
<Lineitems>
<LineItems>
<LineItemNode>
</Target rootnode>
<Target rootnode>
<LineItemNode>
<LineItems>
<LineItems>
</LineItemNode>
</Target rootnode>
</Message1>
</Messages>
In above message Target rootnode level spilit occurs but it displayed in the same/one message. Is it possible to create separte messages for each Target SOAP rootnode spilit message.
Do I need to change anything in ID objects ( Receiver determination or Interface Determination)?
Thanks & Regards
Sara
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.