on 03-27-2014 1:37 PM
Dear Experts,
I am struggling to identify an error on the Technical Routing. Firstly according to my scenario, I receive an XML file with multiple PO's and I have to split the file to 2 different target messages. and also according to the source payload I have to send the file to 2 different receivers. first receiver is ABAP Proxy to the back end system and the 2nd one is to a file location. I have used XSLT to split the message into 2 target message type and I have used a XSLT mapping for receiver determination. Does any one have any idea of what I am doing wrong.
Note: some time I will only be able to fill in on target message.
I have attached my XSLT message split mapping with this post, please let me know if you have further question.
Your help is more appreciated.
Advance Thanks,
Pradeep
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
<xsl:variable name="vFlag"/>
<xsl:variable name="vPONUM" select="POTRACKING/Lines[1]/PONumber"/>
<xsl:template match="/">
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<ns0:Message1>
<ns1:MT_Tracking xmlns:ns1="http://www.findel-education.co.uk/axapta">
<xsl:for-each select="POTRACKING/Lines">
<sap:call-external class="ZCL_VNAP_OBJECTS" method="CHECK_PO_EXIST">
<sap:callvalue param="IP_EBELN" select="string(PONumber)"/>
<sap:callvariable name="vFlag" param="EP_BOLEAN" type="string"/>
</sap:call-external>
<xsl:if test="$vFlag = 0">
<Lines>
<DDate>
<xsl:value-of select="DespatchDate"/>
</DDate>
<PONumber>
<xsl:value-of select="PONumber"/>
</PONumber>
<POLine>
<xsl:value-of select="POLine"/>
</POLine>
<QTY>
<xsl:value-of select="Quantity"/>
</QTY>
<VendorMaterial>
<xsl:value-of select="VendorMaterialNumber"/>
</VendorMaterial>
<AccountRef>
<xsl:value-of select="AccountReference"/>
</AccountRef>
<ConsignNumber>
<xsl:value-of select="ConsignmentNumber"/>
</ConsignNumber>
<CarrierURL>
<xsl:value-of select="CarrierURL"/>
</CarrierURL>
<ConsignURL>
<xsl:value-of select="ConsignmentURL"/>
</ConsignURL>
</Lines>
</xsl:if>
</xsl:for-each>
</ns1:MT_Tracking>
</ns0:Message1>
<ns0:Message2>
<ns2:MT_Tracking xmlns:ns2="http://www.findel-education.co.uk/ecc/ax/po/ftp">
<xsl:for-each select="POTRACKING/Lines">
<sap:call-external class="ZCL_VNAP_OBJECTS" method="CHECK_PO_EXIST">
<sap:callvalue param="IP_EBELN" select="string(PONumber)"/>
<sap:callvariable name="vFlag" param="EP_BOLEAN" type="string"/>
</sap:call-external>
<xsl:if test="$vFlag = 1">
<Lines>
<DDate>
<xsl:value-of select="DespatchDate"/>
</DDate>
<PONumber>
<xsl:value-of select="PONumber"/>
</PONumber>
<POLine>
<xsl:value-of select="POLine"/>
</POLine>
<QTY>
<xsl:value-of select="Quantity"/>
</QTY>
<VendorMaterial>
<xsl:value-of select="VendorMaterialNumber"/>
</VendorMaterial>
<AccountRef>
<xsl:value-of select="AccountReference"/>
</AccountRef>
<ConsignNumber>
<xsl:value-of select="ConsignmentNumber"/>
</ConsignNumber>
<CarrierURL>
<xsl:value-of select="CarrierURL"/>
</CarrierURL>
<ConsignURL>
<xsl:value-of select="ConsignmentURL"/>
</ConsignURL>
</Lines>
</xsl:if>
</xsl:for-each>
</ns2:MT_Tracking>
</ns0:Message2>
</ns0:Messages>
</xsl:template>
</xsl:stylesheet>
Hi Hareesh,
I have split the mappings to 1:1 and created multiple Interface determinations following the below help.
<<Defining Message Splits - SAP NetWeaver Process Integration - SAP Library>>
Thanks,
Pradeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for all your help guys. I have resolved the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Experts,
Can anyone help me with giving me some sample 1:N message scenario please without using BPM.
Thanks,
Pradeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pradeep - I'm not sure how you are finding the "Receiver system" during the interface determination step..
But looking at your design ->
you can add both of your receivers in the "receiver determination"
-> If you have any conditions, try validating xpath and route.
-> If it's not possible to handle with xpath, you can go for enhanced receiver determination
Once the receivers are identified,
for receiver A : handle the message split part in your graphical mapping(multi mapping) and select the same in your interface determination..
For receiver B : it's a straight forward as you would be creating another interface determination and selects the graphical mapping..
Hi Hareesh,
Please find my determination in the XSLT below, I am using enhanced receiver determination.
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" xmlns:p1="http://sap.com/xi/XI/System" xmlns:ns="urn:sap-com:document:sap:idoc:messages" version="1.0">
<xsl:variable name="vFlag"/>
<xsl:variable name="vAX" select="0"/>
<xsl:variable name="vSAP" select="0"/>
<xsl:variable name="vBoth" select="0"/>
<!-- <xsl:variable name="vPONUM" select="POTRACKING/Lines[1]/PONumber"/>-->
<xsl:template match="/">
<xsl:for-each select="POTRACKING/Lines">
<sap:call-external class="ZCL_VNAP_OBJECTS" method="CHECK_PO_EXIST">
<sap:callvalue param="IP_EBELN" select="string(PONumber)"/>
<sap:callvariable name="vFlag" param="EP_BOLEAN" type="string"/>
</sap:call-external>
<xsl:choose>
<xsl:when test="$vFlag = 0">
<!-- <p1:Receivers>
<Receiver>
<Service>
<xsl:text>BS_AXAPTA_TST</xsl:text>
</Service>
</Receiver>
</p1:Receivers>-->
<xsl:variable name="vAX" select="$vAX + 1"/>
</xsl:when>
<xsl:when test="$vFlag = 1">
<!-- <p1:Receivers>
<Receiver>
<Service>
<xsl:text>BS_ECQCLNT300</xsl:text>
</Service>
</Receiver>
</p1:Receivers>-->
<xsl:variable name="vSAP" select="$vSAP + 1"/>
</xsl:when>
</xsl:choose>
</xsl:for-each>
<xsl:if test="$vSAP > 0">
<xsl:if test="$vAX > 0">
<xsl:variable name="vBoth" select="$vBoth + 1"/>
<xsl:variable name="vSAP" select="0"/>
<xsl:variable name="vAX" select="0"/>
</xsl:if>
</xsl:if>
<xsl:if test="$vBoth > 0">
<p1:Receivers>
<Receiver>
<Service>
<xsl:text>BS_AXAPTA_TST</xsl:text>
</Service>
</Receiver>
<Receiver>
<Service>
<xsl:text>BS_ECQCLNT300</xsl:text>
</Service>
</Receiver>
</p1:Receivers>
</xsl:if>
<xsl:if test="$vAX > 0">
<p1:Receivers>
<Receiver>
<Service>
<xsl:text>BS_AXAPTA_TST</xsl:text>
</Service>
</Receiver>
</p1:Receivers>
</xsl:if>
<xsl:if test="$vSAP > 0">
<p1:Receivers>
<Receiver>
<Service>
<xsl:text>BS_ECQCLNT300</xsl:text>
</Service>
</Receiver>
</p1:Receivers>
</xsl:if>
</xsl:template>
</xsl:transform>
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.