cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping issue in IDOC to file Scenario(multimapping)

former_member217945
Participant
0 Kudos

Dear Experts,

I have an existing IDOC to file scenario where all the target structure occurrence is 0 to 1 occurrence.

As per my customer's requirement to populate the date and quantity fields multiple times i have changed the occurrence to 0 to unbounded.

when i test my mapping i am getting date and quantity fields multiple times as expected.

Now in interface mapping there is one more XSLT mapping added (multimapping) to populate envelope to the target webservice.

When i test my interface mapping (with graphical and XSLT) i am not getting the output multiple times for date and quantity fields.

If i remove XSLT mapping added in interface mapping i am getting proper output as expected

Please suggest...

Thanks and Regards,

Naveen

Accepted Solutions (0)

Answers (2)

Answers (2)

praveen_sutra
Active Contributor
0 Kudos

hi Suma,

could you please share the mapping screenshot and xslt mapping being used.

thanks and regards,

Praveen T

former_member217945
Participant
0 Kudos

Hi,

when ever E1EDP20 occurs we need to populate EDATU(source filed) in target side(scheduldDate_OLD) for multiple times.

So i have changed the occurance from 0 -1 to 0 - unbounded when i test my mapping i am getting date and quantity fields multiple times as expected.

But when i test in operation mapping the results are not getting as expected with XSLT mapping

If i remove XSLT mapping  in interface mapping i am getting proper output as expected but xml is not coming with soap header.

Below is the XSLT code

<?xml version="1.0"?><!DOCTYPE xsl:stylesheet []>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://Elotouch.com/SFDC/Orders" xmlns:ns1="http://Elotouch.com/SFDC/Orders">

    <xsl:template match="/">

        <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com" xmlns:urn1="urn:sobject.enterprise.soap.sforce.com" xmlns:ns1="http://soap.sforce.com/schemas/class/InboundOrderProcess" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

            <soapenv:Header>

                <urn:SessionHeader>

                    <urn:sessionId>

                        <xsl:value-of select="ns0:OrderHeader/Header/SessionId"/>

                    </urn:sessionId>

                </urn:SessionHeader>

            </soapenv:Header>

            <soapenv:Body>

                <ns1:OrderEntry xmlns:ns1="http://soap.sforce.com/schemas/class/InboundOrderProcess">

          <xsl:for-each select="ns0:OrderHeader/Details">

                    <ns1:ord>

                        <ns1:AccountName>

                            <xsl:value-of select="AccountName"/>

                        </ns1:AccountName>

                        <ns1:amount_OLID>

                            <xsl:value-of select="amount_OLID"/>

                        </ns1:amount_OLID>

                        <ns1:BillToCompanyAccountAddress_OLID>

                            <xsl:value-of select="BillToCompanyAccountAddress_OLID"/>

                        </ns1:BillToCompanyAccountAddress_OLID>

                        <ns1:BillToCompanyName>

                            <xsl:value-of select="BillToCompanyName"/>

                        </ns1:BillToCompanyName>

                        <ns1:CMS_id>

                            <xsl:value-of select="CMS_id"/>

                        </ns1:CMS_id>

                        <ns1:Comments>

                            <xsl:value-of select="Comments"/>

                        </ns1:Comments>

                        <ns1:CurrencyIsoCode>

                            <xsl:value-of select="CurrencyIsoCode"/>

                        </ns1:CurrencyIsoCode>

                        <ns1:CurrencyIsoCode_OLID>

                            <xsl:value-of select="CurrencyIsoCode_OLID"/>

                        </ns1:CurrencyIsoCode_OLID>

                        <ns1:Exchange_Rate>

                            <xsl:value-of select="Exchange_Rate"/>

                        </ns1:Exchange_Rate>

                        <ns1:ExchangeRate_OLID>

                            <xsl:value-of select="ExchangeRate_OLID"/>

                        </ns1:ExchangeRate_OLID>

                        <ns1:Geography>

                            <xsl:value-of select="Geography"/>

                        </ns1:Geography>

                        <ns1:Integration_Job_Id>

                            <xsl:value-of select="Integration_Job_Id"/>

                        </ns1:Integration_Job_Id>

                        <ns1:Integration_JobIdc_OLID>

                            <xsl:value-of select="Integration_JobIdc_OLID"/>

                        </ns1:Integration_JobIdc_OLID>

                        <ns1:ord_Number>

                            <xsl:value-of select="ord_Number"/>

                        </ns1:ord_Number>

                        <ns1:Order_Amount_Integration>

                            <xsl:value-of select="Order_Amount_Integration"/>

                        </ns1:Order_Amount_Integration>

                        <ns1:Order_Date>

                            <xsl:value-of select="Order_Date"/>

                        </ns1:Order_Date>

                        <ns1:Order_Status>

                            <xsl:value-of select="Order_Status"/>

                        </ns1:Order_Status>

                        <ns1:Order_Type>

                            <xsl:value-of select="Order_Type"/>

                        </ns1:Order_Type>

                        <ns1:Owner>

                            <xsl:value-of select="Owner"/>

                        </ns1:Owner>

                        <ns1:Partnumber_OLID>

                            <xsl:value-of select="Partnumber_OLID"/>

                        </ns1:Partnumber_OLID>

                        <ns1:PO_Number>

                            <xsl:value-of select="PO_Number"/>

                        </ns1:PO_Number>

                        <ns1:PricingAgreementc_OLID>

                            <xsl:value-of select="PricingAgreementc_OLID"/>

                        </ns1:PricingAgreementc_OLID>

                        <ns1:Project_Description>

                            <xsl:value-of select="Project_Description"/>

                        </ns1:Project_Description>

                        <ns1:Quantityc_OLID>

                            <xsl:value-of select="Quantityc_OLID"/>

                        </ns1:Quantityc_OLID>

                        <ns1:QuoteNumber_OLID>

                            <xsl:value-of select="QuoteNumber_OLID"/>

                        </ns1:QuoteNumber_OLID>

                        <ns1:Request_Date>

                            <xsl:value-of select="Request_Date"/>

                        </ns1:Request_Date>

                        <ns1:Request_Datec_OLID>

                            <xsl:value-of select="Request_Datec_OLID"/>

                        </ns1:Request_Datec_OLID>

                        <ns1:Rowc_OLID>

                            <xsl:value-of select="Rowc_OLID"/>

                        </ns1:Rowc_OLID>

                        <ns1:SAP_Bill_To_Customer_ID>

                            <xsl:value-of select="SAP_Bill_To_Customer_ID"/>

                        </ns1:SAP_Bill_To_Customer_ID>

                        <ns1:SAPSalesOrganization>

                            <xsl:value-of select="SAPSalesOrganization"/>

                        </ns1:SAPSalesOrganization>

                        <ns1:SAPSalesOrganization_OLID>

                            <xsl:value-of select="SAPSalesOrganization_OLID"/>

                        </ns1:SAPSalesOrganization_OLID>

                        <ns1:ScheduleDatec_OLID>

                            <xsl:value-of select="ScheduleDatec_OLID"/>

                        </ns1:ScheduleDatec_OLID>

                        <ns1:ScheduledQuantity>

                            <xsl:value-of select="ScheduledQuantity"/>

                        </ns1:ScheduledQuantity>

                        <ns1:Shipto_SAP_Number>

                            <xsl:value-of select="Shipto_SAP_Number"/>

                        </ns1:Shipto_SAP_Number>

                        <ns1:ShipToAccount_OLID>

                            <xsl:value-of select="ShipToAccount_OLID"/>

                        </ns1:ShipToAccount_OLID>

                        <ns1:ShipToAccountAddress_OLID>

                            <xsl:value-of select="ShipToAccountAddress_OLID"/>

                        </ns1:ShipToAccountAddress_OLID>

                        <ns1:ShipToAccountCity>

                            <xsl:value-of select="ShipToAccountCity"/>

                        </ns1:ShipToAccountCity>

                        <ns1:ShipToAccountCountry>

                            <xsl:value-of select="ShipToAccountCountry"/>

                        </ns1:ShipToAccountCountry>

                        <ns1:ShipToAccountName>

                            <xsl:value-of select="ShipToAccountName"/>

                        </ns1:ShipToAccountName>

                        <ns1:ShipToAccountPostalCode>

                            <xsl:value-of select="ShipToAccountPostalCode"/>

                        </ns1:ShipToAccountPostalCode>

                        <ns1:ShipToAccountState>

                            <xsl:value-of select="ShipToAccountState"/>

                        </ns1:ShipToAccountState>

                        <ns1:ShipToAccountStreet>

                            <xsl:value-of select="ShipToAccountStreet"/>

                        </ns1:ShipToAccountStreet>

                        <ns1:SoldToAccountName_OLID>

                            <xsl:value-of select="SoldToAccountName_OLID"/>

                        </ns1:SoldToAccountName_OLID>

                        <ns1:SupportContactname>

                            <xsl:value-of select="SupportContactname"/>

                        </ns1:SupportContactname>

                        <ns1:TE_Order_Id>

                            <xsl:value-of select="TE_Order_Id"/>

                        </ns1:TE_Order_Id>

                        <ns1:Tempfield1>

                            <xsl:value-of select="Tempfield1"/>

                        </ns1:Tempfield1>

                        <ns1:Tempfield2>

                            <xsl:value-of select="Tempfield2"/>

                        </ns1:Tempfield2>

                        <ns1:Tempfield3>

                            <xsl:value-of select="Tempfield3"/>

                        </ns1:Tempfield3>

                        <ns1:Tempfield4>

                            <xsl:value-of select="Tempfield4"/>

                        </ns1:Tempfield4>

                        <ns1:Tempfield5>

                            <xsl:value-of select="Tempfield5"/>

                        </ns1:Tempfield5>

                        <ns1:Tempfield6>

                            <xsl:value-of select="Tempfield6"/>

                        </ns1:Tempfield6>

                        <ns1:TEOrderLineDetailId_OLID>

                            <xsl:value-of select="TEOrderLineDetailId_OLID"/>

                        </ns1:TEOrderLineDetailId_OLID>

                        <ns1:Test_Training_Record>

                            <xsl:value-of select="Test_Training_Record"/>

                        </ns1:Test_Training_Record>

                        <ns1:TEWeekId_OLID>

                            <xsl:value-of select="TEWeekId_OLID"/>

                        </ns1:TEWeekId_OLID>

                        <ns1:UnitPrice_OLID>

                            <xsl:value-of select="UnitPrice_OLID"/>

                        </ns1:UnitPrice_OLID>

                    </ns1:ord>

                            </xsl:for-each>

                </ns1:OrderEntry>

            </soapenv:Body>

        </soapenv:Envelope>

    </xsl:template>

</xsl:stylesheet>

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

hi, it is not working because you are mapping the field once for those that come many time

you need to with this code and let me know if it works

<?xml version="1.0"?><!DOCTYPE xsl:stylesheet []>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://Elotouch.com/SFDC/Orders" xmlns:ns1="http://Elotouch.com/SFDC/Orders">

    <xsl:template match="/">

        <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com" xmlns:urn1="urn:sobject.enterprise.soap.sforce.com" xmlns:ns1="http://soap.sforce.com/schemas/class/InboundOrderProcess" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

            <soapenv:Header>

                <urn:SessionHeader>

                    <urn:sessionId>

                        <xsl:value-of select="ns0:OrderHeader/Header/SessionId"/>

                    </urn:sessionId>

                </urn:SessionHeader>

            </soapenv:Header>

            <soapenv:Body>

                <ns1:OrderEntry xmlns:ns1="http://soap.sforce.com/schemas/class/InboundOrderProcess">

          <xsl:for-each select="ns0:OrderHeader/Details">

          <xsl:copy-of select="*" />

              </xsl:for-each>

                </ns1:OrderEntry>

            </soapenv:Body>

        </soapenv:Envelope>

    </xsl:template>

</xsl:stylesheet>

Rodrigo

former_member217945
Participant
0 Kudos

Hi Rodrigo,

Now its working fine.

Thank you so much..

suma

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

Perfect, please mark the thread as ANSWERED.

Regards

Rodrigo

ambrish_mishra
Active Contributor
0 Kudos

Hi Naveen,

I suggest you provide screenshots and explain the design. It will help us help you better.

You mention this is a IDoc to file scenario. Then you mention target web service. ..I'm a bit confused.

Ambrish