Skip to Content
0

Change value in the node in B1IF

Aug 03, 2017 at 10:58 AM

26

avatar image
Former Member

Dear All,

I stuck in our development and decided to ask help here. Please share your knowledge with me, I hope problem can be solved.

I am trying to migrate Business Partners from one company to another with B1if. Major things go smoothly except Series. Series should be changed to relevant value for the target company.

I have found a nice construction to change a node value via XSLT:

<xsl:template name="transform">
        <xsl:template match="/|@*|node()">
            <xsl:copy>
                <xsl:apply-templates select="@*|node()"></xsl:apply-templates>
            </xsl:copy>
        </xsl:template>
        <xsl:variable name="pReplacement" select="'Something Different'"></xsl:variable>
        <xsl:template match="/vpf:Msg/vpf:Body/vpf:Payload[./@id='atom1']/BOM/BO/BusinessPartners">
            <xsl:value-of select="$pReplacement"></xsl:value-of>
        </xsl:template>
    </xsl:template>

It works normal, except it puts all values in the line instead of XML structure. Like below:

022111Client test CCOcCustomer100111140.0000000.00000020.000000vLiabletNO0.00000010.0000000.0000000-1EURLU-1cPayments_sum0.000000-14011000tYEStNO-1tYEStYEStNOLUtNOtNOtNO-10.000000tNOtNOtNORAPP01cCompany22-1trr_CompanyDefaulttNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOtNOdgboNonedgrLowestDiscountatCompanytNOtNOocSalesOrServicesRevenuestNOtNOsgServicesAndAssettNOtNOtNOtYES12apNodgrLowestDiscounttNOrntSpanishFiscalIDtYEStNOtNO0.000000NNNCYNNNP0.000000111111746-1gt_UndefinedtYEStNObpat_OpenDebts40130001111119193tNOSomething Different

Could you please tell me, if it can work like this? Or completely different approach should be used?

Thanks in advance!

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers