Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • GeetG 11 posts 91 karma points
    Dec 17, 2020 @ 06:41
    GeetG
    0

    How to split xml into 3 outputs using XSLT ?

    Hi,

    I have to split the incoming soap request into 3 parts copying the input content as it is and store each part into 3 different variables. Below is my input request:

    <soap-env:Header>
        <msgID:messageId
        xmlns:msgID="http://www.sap.com/webas/640/soap/features/messageId/"
        >uuid:edb-8acd-6c267d3f97fc</msgID:messageId>
    </soap-env:Header>
    <soap-env:Body>
        <n0:BusinessPartnerSUITEBulkReplicateRequest
        xmlns:prx="urn:sap.com:proxy:L52:/1SAI/TAE11782B25F3BCA5A7B64F:804"
        xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"
        >
            <MessageHeader>
                <ID>00163EB1A37B1EEB8ACD6C1F89C80F28</ID>
                <UUID>00163eb1-a37b-1eeb-8acd-6c1f89c80f28</UUID>
                <CreationDateTime>2020-11-19T13:30:24.387912Z</CreationDateTime>
                <ReconciliationIndicator>true</ReconciliationIndicator>
                <SenderBusinessSystemID>0M2T5NQ</SenderBusinessSystemID>
                <RecipientBusinessSystemID>IBMDATPOW</RecipientBusinessSystemID>
                <SenderParty>
                    <InternalID schemeID="BusinessSystemID" schemeAgencyID="310">0M2T5NQ</InternalID>
                </SenderParty>
                <RecipientParty>
                    <InternalID schemeID="BusinessSystemID" schemeAgencyID="310">IBMDATPOW</InternalID>
                </RecipientParty>
            </MessageHeader>
            <BusinessPartnerSUITEReplicateRequestMessage>
                <MessageHeader>
                    <ID>00163EB1A8</ID>
                    <UUID>00163eb1c1f89d72f28</UUID>
                    <CreationDateTime>2020-11-19T13:30:24.387912Z</CreationDateTime>
                    <SenderBusinessSystemID>0M2T5NQ</SenderBusinessSystemID>
                </MessageHeader>
                <BusinessPartner actionCode="04" addressInformationListCompleteTransmissionIndicator="false" roleListCompleteTransmissionIndicator="false" identificationListCompleteTransmissionIndicator="false" industrySectorListCompleteTransmissionIndicator="false" commonListCompleteTransmissionIndicator="false" businessHoursListCompleteTransmissionIndicator="false" taxNumberListCompleteTransmissionIndicator="false" requestedSkillListCompleteTransmissionIndicator="false" providedSkillListCompleteTransmissionIndicator="false">
                    <UUID schemeID=" " schemeAgencyID=" ">00163ea3-dbbd-1edb-8686-6b80c2bd0df5</UUID>
                    <InternalID>1000592</InternalID>
                    <ReceiverInternalID>0001000592</ReceiverInternalID>
                    <SenderSequenceNumberValue>20201119133024435</SenderSequenceNumberValue>
                    <CategoryCode>2</CategoryCode>
                    <BusinessPurposeCompletedIndicator>false</BusinessPurposeCompletedIndicator>
                    <Customer salesArrangementListCompleteTransmissionIndicator="false">
                        <OwnerInternalID>8000000126</OwnerInternalID>
                        <MarketingAttributes>
                            <CustomerNielsenRegionCode listID=" " listVersionID=" " listAgencyID=" " listAgencySchemeID=" " listAgencySchemeAgencyID=" " />
                            <CustomerGroupCode>A</CustomerGroupCode>
                        </MarketingAttributes>
                        <SaleSalesAndDistributionBlocks>
                            <OrderBlockingReasonCode />
                            <BillingBlockingReasonCode />
                            <DeliveryBlockingReasonCode />
                            <SalesSupportBlockedIndicator>false</SalesSupportBlockedIndicator>
                        </SaleSalesAndDistributionBlocks>
                        <SalesArrangement actionCode="04" partnerFunctionsListCompleteTransmissionIndicator="true">
                            <SalesOrganisationID>10202200</SalesOrganisationID>
                            <DistributionChannelCode listID=" " listVersionID=" " listAgencyID=" " listAgencySchemeID=" " listAgencySchemeAgencyID=" ">01</DistributionChannelCode>
                            <DivisionCode listID=" " listVersionID=" " listAgencyID=" " listAgencySchemeID=" " listAgencySchemeAgencyID=" " />
                            <SalesOfficeID />
                            <SalesGroupID />
                            <GroupCode listID=" " listVersionID=" " listAgencyID=" " listAgencySchemeID=" " listAgencySchemeAgencyID=" " />
                            <CashDiscountTermsCode listVersionID=" " listAgencyID=" " listAgencySchemeID=" " listAgencySchemeAgencyID=" " />
                            <CurrencyCode />
                            <DeliveryTerms>
                                <Incoterms>
                                    <ClassificationCode />
                                    <TransferLocationName />
                                </Incoterms>
                                <DeliveryPriorityCode />
                            </DeliveryTerms>
                            <OrderBlockingReasonCode />
                            <BillingBlockingReasonCode />
                            <DeliveryBlockingReasonCode />
                            <SalesSupportBlockedIndicator>false</SalesSupportBlockedIndicator>
                            <PriceGroupCode listID=" " listVersionID=" " listAgencyID=" " listAgencySchemeID=" " listAgencySchemeAgencyID=" " />
                            <PriceListTypeCode />
                            <DeletedIndicator>false</DeletedIndicator>
                        </SalesArrangement>
                    </Customer>
                    <AddressInformation actionCode="04" addressUsageListCompleteTransmissionIndicator="false">
                        <AddressUsage actionCode="04">
                            <AddressUsageCode listVersionID=" " listAgencyID=" " listAgencySchemeID=" " listAgencySchemeAgencyID=" ">XXDEFAULT</AddressUsageCode>
                            <DefaultIndicator>false</DefaultIndicator>
                        </AddressUsage>
                        <Address emailListCompleteTransmissionIndicator="false" facsimileListCompleteTransmissionIndicator="false" postalAddressListCompleteTransmissionIndicator="false" telephoneListCompleteTransmissionIndicator="false" webListCompleteTransmissionIndicator="false" organisationNameListCompleteTransmissionIndicator="false">
                            <CommunicationPreference actionCode="04">
                                <CorrespondenceLanguageCode>EN</CorrespondenceLanguageCode>
                                <PreferredCommunicationMediumTypeCode listID=" " listVersionID=" " listAgencyID=" " />
                            </CommunicationPreference>
                            <Email actionCode="04" eMailUsageListCompleteTransmissionIndicator="false">
                                <URI schemeID=" ">[email protected]</URI>
                                <UsageDeniedIndicator>false</UsageDeniedIndicator>
                                <EmailUsage actionCode="04">
                                    <Usage>
                                        <Code>AD_DEFAULT</Code>
                                    </Usage>
                                </EmailUsage>
                            </Email>
                            <PostalAddress actionCode="04">
                                <AddressRepresentationCode listVersionID=" " listAgencyID=" " listAgencySchemeID=" " listAgencySchemeAgencyID=" " />
                                <CountryCode>SA</CountryCode>
                                <RegionCode listVersionID=" " listAgencyID=" " listAgencySchemeID=" " listAgencySchemeAgencyID=" ">01</RegionCode>
                                <CityName>Riyadh</CityName>
                                <AdditionalCityName />
                                <DistrictName />
                                <StreetPostalCode>12345</StreetPostalCode>
                                <POBoxPostalCode />
                                <CompanyPostalCode />
                                <StreetPrefixName>Adress Line 1</StreetPrefixName>
                                <AdditionalStreetPrefixName>Address Line 2</AdditionalStreetPrefixName>
                                <StreetName>Street</StreetName>
                                <StreetSuffixName />
                                <AdditionalStreetSuffixName />
                                <HouseID />
                                <AdditionalHouseID />
                                <BuildingID />
                                <RoomID />
                                <FloorID />
                                <CareOfName />
                                <POBoxDeviatingCountryCode />
                                <POBoxDeviatingRegionCode listID=" " listVersionID=" " listAgencyID=" " listAgencySchemeID=" " listAgencySchemeAgencyID=" " />
                                <POBoxDeviatingCityName />
                                <POBoxID>PO BOX</POBoxID>
                                <POBoxIDVisibleIndicator>false</POBoxIDVisibleIndicator>
                                <TimeZoneCode>UTC+3</TimeZoneCode>
                            </PostalAddress>
                            <Telephone actionCode="04" telephoneUsageListCompleteTransmissionIndicator="false">
                                <Number>
                                    <AreaID />
                                    <SubscriberID>06978546643</SubscriberID>
                                    <ExtensionID />
                                    <CountryCode>SA</CountryCode>
                                    <CountryDiallingCode>+966</CountryDiallingCode>
                                    <CountryName languageCode=" " />
                                </Number>
                                <FormattedNumberDescription>+966 6978546643</FormattedNumberDescription>
                                <UsageDeniedIndicator>false</UsageDeniedIndicator>
                                <MobilePhoneNumberIndicator>false</MobilePhoneNumberIndicator>
                                <TelephoneUsage actionCode="04">
                                    <Usage>
                                        <Code>AD_NMBDEFA</Code>
                                    </Usage>
                                </TelephoneUsage>
                            </Telephone>
                            <Web actionCode="04" webUsageListCompleteTransmissionIndicator="false">
                                <URI>www.randomcompany.com</URI>
                                <UsageDeniedIndicator>false</UsageDeniedIndicator>
                                <WebUsage actionCode="04">
                                    <Usage>
                                        <Code>AD_DEFAULT</Code>
                                    </Usage>
                                </WebUsage>
                            </Web>
                            <GeographicalLocation>
                                <GeographicalCoordinates>
                                    <LatitudeMeasure unitCode="DD">34.3456453</LatitudeMeasure>
                                    <LongitudeMeasure unitCode="DD">26.67867546</LongitudeMeasure>
                                </GeographicalCoordinates>
                            </GeographicalLocation>
                        </Address>
                        <UUID schemeID=" " schemeAgencyID=" ">00163ea3-dbbd-1edb-8686-6b80c2bd8df5</UUID>
                        <n1:ZKUTAdditionalStreetAddress
                        xmlns:n1="http://sap.com/xi/AP/CustomerExtension/BYD/A3YO6"
                        />
                        <n1:ZKUTAdditionalAddressName
                        xmlns:n1="http://sap.com/xi/AP/CustomerExtension/BYD/A3YO6"
                        />
                        <n2:ZCity schemeID=" " schemeVersionID=" " schemeAgencyID=" "
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                    </AddressInformation>
                    <Common actionCode="04">
                        <ReleasedIndicator>true</ReleasedIndicator>
                        <BlockedIndicator>false</BlockedIndicator>
                        <DeletedIndicator>false</DeletedIndicator>
                        <SalutationText languageCode=" " />
                        <NaturalPersonIndicator>false</NaturalPersonIndicator>
                        <ContactAllowedCode />
                        <Organisation>
                            <Name>
                                <FormOfAddressCode listID=" " listVersionID=" " listAgencyID=" " listAgencySchemeID=" " listAgencySchemeAgencyID=" " />
                                <FirstLineName>Random Partner Company</FirstLineName>
                                <SecondLineName />
                                <ThirdLineName />
                                <FourthLineName />
                            </Name>
                            <CompanyLegalFormCode listID=" " listVersionID=" " listAgencyID=" " listAgencySchemeID=" " listAgencySchemeAgencyID=" " />
                        </Organisation>
                        <n1:ZCITCSegment
                        xmlns:n1="http://sap.com/xi/AP/CustomerExtension/BYD/A3YO6"
                        />
                        <n1:ZTier
                        xmlns:n1="http://sap.com/xi/AP/CustomerExtension/BYD/A3YO6"
                        />
                        <n2:ZNo_Of_Offices
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        >0</n2:ZNo_Of_Offices>
                        <n2:ZNo_Of_Employees
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        >0</n2:ZNo_Of_Employees>
                        <n2:ZNumberOfEmployeesinGOSI
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        >0</n2:ZNumberOfEmployeesinGOSI>
                        <n2:ZPAMExternalID schemeID=" " schemeVersionID=" " schemeAgencyID=" "
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZRowID
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZPartnerShipType listID=" " listVersionID=" " listAgencyID=" "
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        >Z13</n2:ZPartnerShipType>
                        <n2:zPersonalID
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZOwnerID schemeID=" " schemeVersionID=" " schemeAgencyID=" "
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZContactType
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZAge
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZGOSIExpiryDate
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        >0000-00-00</n2:ZGOSIExpiryDate>
                        <n2:ZGOSIDateFormat
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZDate_Format
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZSA_ActiveSince
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        >0000-00-00</n2:ZSA_ActiveSince>
                        <n2:ZSA_PartnerDealerID
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZSA_SLAType
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZSA_StatusReason
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZSA_StatusDate
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        >0000-00-00</n2:ZSA_StatusDate>
                        <n2:ZSA_BillingAccountNumber
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZSA_PackageName
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZSA_PromotionName
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZSA_OfferName
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZSA_MNPStatus
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZSA_RegisterdAPDocNum
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n1:ZWorkPhone
                        xmlns:n1="http://sap.com/xi/AP/CustomerExtension/BYD/A3YO6"
                        />
                        <n1:ZAccountStatus
                        xmlns:n1="http://sap.com/xi/AP/CustomerExtension/BYD/A3YO6"
                        />
                        <n2:ZCnTBirthDateHijri
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZGOSIExpiryDateHijri
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZBA_BillingAccountType
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZBA_ProductType
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZDMSContactFlag
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        >true</n2:ZDMSContactFlag>
                        <n2:ZDMSAccountFlag
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        >false</n2:ZDMSAccountFlag>
                        <n2:ZAccountRegion
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZDoc_Type listID=" " listVersionID=" " listAgencyID=" " listAgencySchemeID=" " listAgencySchemeAgencyID=" "
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZId_Number
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZExpiryDate
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        >0000-00-00</n2:ZExpiryDate>
                        <n2:ZIssueDate
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        >0000-00-00</n2:ZIssueDate>
                        <n2:ZNo_Of_Staff
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        >2000.0</n2:ZNo_Of_Staff>
                        <n2:ZContactPreference
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZNationality
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZNationalID
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZCustomerType listID=" " listVersionID=" " listAgencyID=" "
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZDate_ofBirth_Format
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZCRID
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        >1234567890</n2:ZCRID>
                        <n2:zMSISDN
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        >3454567567</n2:zMSISDN>
                        <n2:zzMSISDN
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:zUplDocReqTaff
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        >false</n2:zUplDocReqTaff>
                        <n2:zUserId
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZParentAccountuu schemeID=" " schemeAgencyID=" "
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZAccountValidationFlag
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        >false</n2:ZAccountValidationFlag>
                        <n2:ZAccountDoc_Type listID=" " listVersionID=" " listAgencyID=" " listAgencySchemeID=" " listAgencySchemeAgencyID=" "
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZAccountId_Number
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZAccountExpiryDate
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        >0000-00-00</n2:ZAccountExpiryDate>
                        <n2:ZAccountIssueHijriDate
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZAccountIssueDate
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        >0000-00-00</n2:ZAccountIssueDate>
                        <n2:ZAccountExpiryHijriDate
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n1:Z_KUT_MSISDN
                        xmlns:n1="http://sap.com/xi/AP/CustomerExtension/BYD/A3YO6"
                        >555555555</n1:Z_KUT_MSISDN>
                        <n1:ZJobTitle
                        xmlns:n1="http://sap.com/xi/AP/CustomerExtension/BYD/A3YO6"
                        />
                        <n1:ZKUTOtherIndustry
                        xmlns:n1="http://sap.com/xi/AP/CustomerExtension/BYD/A3YO6"
                        />
                        <n2:ZContacttValidationFlag
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        >false</n2:ZContacttValidationFlag>
                        <n2:zRelMainPartner
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:zRelLocProfile
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:zHireDate
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        >0000-00-00</n2:zHireDate>
                        <n2:zTerminationDate
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        >0000-00-00</n2:zTerminationDate>
                        <n2:zBENEFICIARY_BIC
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:zBENEFICIARY_IBAN
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:zPartnerStatus
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        >121</n2:zPartnerStatus>
                        <n2:ZParentAccount
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZZPartnerShipType listID=" " listVersionID=" " listAgencyID=" "
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZNameArabic
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        >Arabic Name</n2:ZNameArabic>
                        <n2:zzPartnerStatus
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZContactExpiryHijriDate
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZContactIssueHijriDate
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZOwnerExternalID schemeID=" " schemeVersionID=" " schemeAgencyID=" "
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZOwnerEmail schemeID=" "
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        >[email protected]</n2:ZOwnerEmail>
                        <n2:ZPAM schemeID=" " schemeAgencyID=" "
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        >149</n2:ZPAM>
                        <n2:ZPAMName
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        >Itelligence UAT User</n2:ZPAMName>
                        <n1:Z_ResellerType
                        xmlns:n1="http://sap.com/xi/AP/CustomerExtension/BYD/A3YO6"
                        >101</n1:Z_ResellerType>
                        <n2:ZLegacyIndicator
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        >false</n2:ZLegacyIndicator>
                        <n2:ZAccountCmpanydocDateFormat
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZDoc_Issue_Place
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZAccountDoc_Issue_Place
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:ZComments
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:zzFunction
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:zzStatus
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        />
                        <n2:zAccountRole
                        xmlns:n2="http://0007408881-one-off.sap.com/YLD22ZF5Y_"
                        >Partner Account</n2:zAccountRole>
                        <n1:zPartnerShortCode
                        xmlns:n1="http://sap.com/xi/AP/CustomerExtension/BYD/A3YO6"
                        >RPC</n1:zPartnerShortCode>
                    </Common>
                    <Role actionCode="04">
                        <RoleCode>ZPRM01</RoleCode>
                    </Role>
                    <Role actionCode="04">
                        <RoleCode>CRM011</RoleCode>
                    </Role>
                    <IndustrySector actionCode="04">
                        <IndustryClassificationSystemCode listID=" " listVersionID=" " listAgencyID=" " listAgencySchemeID=" " listAgencySchemeAgencyID=" ">0005</IndustryClassificationSystemCode>
                        <IndustrialSectorCode listVersionID=" " listAgencyID=" " listAgencySchemeID=" " listAgencySchemeAgencyID=" ">Informatio</IndustrialSectorCode>
                        <DefaultIndicator>true</DefaultIndicator>
                    </IndustrySector>
                    <TextCollection textListCompleteTransmissionIndicator="false" actionCode="04">
                        <Text actionCode="04">
                            <TypeCode listID=" " listVersionID=" " listAgencyID=" " listAgencySchemeID=" " listAgencySchemeAgencyID=" ">10034</TypeCode>
                            <LanguageCode>EN</LanguageCode>
                            <ContentText languageCode="EN">Comment</ContentText>
                        </Text>
                    </TextCollection>
                    <ChannelPartner channelPartnerMembershipListCompleteTransmissionIndicator="false">
                        <PartnerTierLevelCode />
                        <ChannelPartnerMembershipProfile actionCode="4 " dimensionListCompleteTransmissionIndicator="false">
                            <MembershipID>1234411</MembershipID>
                            <PartnerTypeCode>Z001</PartnerTypeCode>
                            <ProgrammeCode>PG01</ProgrammeCode>
                            <AgreementStartDate>2020-11-01</AgreementStartDate>
                            <AgreementEndDate>2020-11-26</AgreementEndDate>
                            <PartnerTypeStatusCode>05</PartnerTypeStatusCode>
                        </ChannelPartnerMembershipProfile>
                        <ChannelPartnerMembershipProfile actionCode="4 " dimensionListCompleteTransmissionIndicator="false">
                            <MembershipID>12</MembershipID>
                            <PartnerTypeCode>Z010</PartnerTypeCode>
                            <ProgrammeCode>PG01</ProgrammeCode>
                            <AgreementStartDate>2020-11-03</AgreementStartDate>
                            <AgreementEndDate>2020-11-27</AgreementEndDate>
                            <PartnerTypeStatusCode>05</PartnerTypeStatusCode>
                        </ChannelPartnerMembershipProfile>
                        <ChannelPartnerMembershipProfile actionCode="4 " dimensionListCompleteTransmissionIndicator="false">
                            <MembershipID>13</MembershipID>
                            <PartnerTypeCode>Z010</PartnerTypeCode>
                            <ProgrammeCode>PG01</ProgrammeCode>
                            <AgreementStartDate>2020-11-03</AgreementStartDate>
                            <AgreementEndDate>2020-11-28</AgreementEndDate>
                            <PartnerTypeStatusCode>05</PartnerTypeStatusCode>
                        </ChannelPartnerMembershipProfile>
                        <ChannelPartnerMembershipProfile actionCode="4 " dimensionListCompleteTransmissionIndicator="false">
                            <MembershipID>14</MembershipID>
                            <PartnerTypeCode>Z003</PartnerTypeCode>
                            <ProgrammeCode>PG01</ProgrammeCode>
                            <AgreementStartDate>2020-11-02</AgreementStartDate>
                            <AgreementEndDate>2020-11-29</AgreementEndDate>
                            <PartnerTypeStatusCode>05</PartnerTypeStatusCode>
                        </ChannelPartnerMembershipProfile>
                        <ChannelPartnerMembershipProfile actionCode="4 " dimensionListCompleteTransmissionIndicator="false">
                            <MembershipID>15</MembershipID>
                            <PartnerTypeCode>Z007</PartnerTypeCode>
                            <ProgrammeCode>PG01</ProgrammeCode>
                            <AgreementStartDate>2020-11-02</AgreementStartDate>
                            <AgreementEndDate>2020-11-30</AgreementEndDate>
                            <PartnerTypeStatusCode>05</PartnerTypeStatusCode>
                        </ChannelPartnerMembershipProfile>
                        <ChannelPartnerMembershipProfile actionCode="4 " dimensionListCompleteTransmissionIndicator="false">
                            <MembershipID>16</MembershipID>
                            <PartnerTypeCode>Z007</PartnerTypeCode>
                            <ProgrammeCode>PG01</ProgrammeCode>
                            <AgreementStartDate>2020-11-02</AgreementStartDate>
                            <AgreementEndDate>2020-12-01</AgreementEndDate>
                            <PartnerTypeStatusCode>05</PartnerTypeStatusCode>
                        </ChannelPartnerMembershipProfile>
                        <ChannelPartnerMembershipProfile actionCode="4 " dimensionListCompleteTransmissionIndicator="false">
                            <MembershipID>17</MembershipID>
                            <PartnerTypeCode>Z003</PartnerTypeCode>
                            <ProgrammeCode>PG01</ProgrammeCode>
                            <AgreementStartDate>2020-11-03</AgreementStartDate>
                            <AgreementEndDate>2020-12-02</AgreementEndDate>
                            <PartnerTypeStatusCode>05</PartnerTypeStatusCode>
                        </ChannelPartnerMembershipProfile>
                        <ChannelPartnerMembershipProfile actionCode="4 " dimensionListCompleteTransmissionIndicator="false">
                            <MembershipID>18</MembershipID>
                            <PartnerTypeCode>Z014</PartnerTypeCode>
                            <ProgrammeCode>PG01</ProgrammeCode>
                            <AgreementStartDate>2020-11-03</AgreementStartDate>
                            <AgreementEndDate>2020-12-04</AgreementEndDate>
                            <PartnerTypeStatusCode>05</PartnerTypeStatusCode>
                        </ChannelPartnerMembershipProfile>
                        <ChannelPartnerMembershipProfile actionCode="4 " dimensionListCompleteTransmissionIndicator="false">
                            <MembershipID>19</MembershipID>
                            <PartnerTypeCode>Z012</PartnerTypeCode>
                            <ProgrammeCode>PG01</ProgrammeCode>
                            <AgreementStartDate>2020-11-03</AgreementStartDate>
                            <AgreementEndDate>2020-12-05</AgreementEndDate>
                            <PartnerTypeStatusCode>05</PartnerTypeStatusCode>
                        </ChannelPartnerMembershipProfile>
                        <ChannelPartnerMembershipProfile actionCode="4 " dimensionListCompleteTransmissionIndicator="false">
                            <MembershipID>21</MembershipID>
                            <PartnerTypeCode>Z001</PartnerTypeCode>
                            <ProgrammeCode>PG01</ProgrammeCode>
                            <AgreementStartDate>2020-11-03</AgreementStartDate>
                            <AgreementEndDate>2020-12-23</AgreementEndDate>
                            <PartnerTypeStatusCode>05</PartnerTypeStatusCode>
                        </ChannelPartnerMembershipProfile>
                        <ChannelPartnerMembershipProfile actionCode="4 " dimensionListCompleteTransmissionIndicator="false">
                            <MembershipID>55</MembershipID>
                            <PartnerTypeCode>Z006</PartnerTypeCode>
                            <ProgrammeCode>PG01</ProgrammeCode>
                            <AgreementStartDate>2020-11-03</AgreementStartDate>
                            <AgreementEndDate>2020-12-23</AgreementEndDate>
                            <PartnerTypeStatusCode>04</PartnerTypeStatusCode>
                        </ChannelPartnerMembershipProfile>
                        <ChannelPartnerMembershipProfile actionCode="4 " dimensionListCompleteTransmissionIndicator="false">
                            <MembershipID>RCMID0001</MembershipID>
                            <PartnerTypeCode>Z013</PartnerTypeCode>
                            <ProgrammeCode>PG01</ProgrammeCode>
                            <AgreementStartDate>2020-10-26</AgreementStartDate>
                            <AgreementEndDate>2023-11-12</AgreementEndDate>
                            <PartnerTypeStatusCode>05</PartnerTypeStatusCode>
                            <Dimension actionCode="4 ">
                                <ProductID>10000029</ProductID>
                                <DimensionStatusCode>01</DimensionStatusCode>
                                <StartDate>2020-11-05</StartDate>
                                <EndDate>2023-11-12</EndDate>
                            </Dimension>
                            <Dimension actionCode="4 ">
                                <ProductID>10000039</ProductID>
                                <DimensionStatusCode>02</DimensionStatusCode>
                                <StartDate>2020-11-12</StartDate>
                                <EndDate>2023-11-12</EndDate>
                            </Dimension>
                            <Dimension actionCode="4 ">
                                <ProductID>10000017</ProductID>
                                <DimensionStatusCode>02</DimensionStatusCode>
                                <StartDate>2020-11-12</StartDate>
                                <EndDate>2023-11-12</EndDate>
                            </Dimension>
                        </ChannelPartnerMembershipProfile>
                        <SalesAndServicePartnerABCClassificationCode listID=" " listVersionID=" " listAgencyID=" " listAgencySchemeID=" " listAgencySchemeAgencyID=" ">A</SalesAndServicePartnerABCClassificationCode>
                    </ChannelPartner>
                </BusinessPartner>
            </BusinessPartnerSUITEReplicateRequestMessage>
        </n0:BusinessPartnerSUITEBulkReplicateRequest>
    </soap-env:Body>
    

    Here is my xslt which I tried:

    <?xml version="1.0"?>
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:template match="/">      
        <xsl:for-each select="Envelope/Body/BusinessPartnerSUITEBulkReplicateRequest">
          <xsl:result-document method="xml" href="product_{@id}-output.xml">
            <xsl:copy-of select="."/>
          </xsl:result-document>
        </xsl:for-each>
      </xsl:template>
    </xsl:stylesheet> 
    
  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Dec 18, 2020 @ 09:15
    Huw Reddick
    0

    I can't comment on the file part as never used the result-document, but your problem is most likely namespace and paths.

    I can highly recommend this site for playing around with xslt https://xsltfiddle.liberty-development.net/

    This will parse your results (I think into what you want, but not certain)

    <?xml version="1.0"?>
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
                                  xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" 
                                  xmlns:a="http://tempuri.org/"
                                   xmlns:n0="http://sap.com/xi/SAPGlobal20/Global">
    
          <!-- extract just the first child of the body -->
      <xsl:template match="/">
        <xsl:apply-templates select="/soap-env:Envelope/soap-env:Body/n0:BusinessPartnerSUITEBulkReplicateRequest/*" />
      </xsl:template>
    
      <!-- identity template, but dropping namespace declarations not used
           directly by this element -->
      <xsl:template match="@*|node()">
        <xsl:copy copy-namespaces="no">
          <xsl:apply-templates select="@*|node()" />
        </xsl:copy>
      </xsl:template>
    
    </xsl:stylesheet> 
    
Please Sign in or register to post replies

Write your reply to:

Draft