cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronous update is nor working for invoice

SatyaDeo
Participant
0 Kudos

Hello Everyone,

I have created a scenario for updating the userdefined fields of an invoice.but I couldn't able to update it .Please do check my code below and kindly help me out.

U_Delivery_Boy is the userdefined field.
 <xsl:template name="transform">
        <QueryParams>
            <DocNum>
                <xsl:value-of select="/vpf:Msg/vpf:Body/vpf:Payload[./@Role='S']/bfa:io/bfa:object/bfa:string[./@name='invoiceNum']"></xsl:value-of>
            </DocNum>
        </QueryParams>
        <U_Delivery_Boy>
            <xsl:value-of select="/vpf:Msg/vpf:Body/vpf:Payload[./@Role='S']/bfa:io/bfa:object/bfa:string[./@name='deliveryBoy']"></xsl:value-of>
        </U_Delivery_Boy>
    </xsl:template>

In the place of keyName I have used DocNum in the b1Object configuration

Please do let me know my mistakes and kindly guide me .

kvbalakumar
Active Contributor
0 Kudos

Are you getting any error message?

SatyaDeo
Participant
0 Kudos

For input string: "/vpf:Msg/vpf:Body/vpf:Payload[./@id=&apos;atom1&apos;]/DocNum"-The di call #1 did fail.

Accepted Solutions (1)

Accepted Solutions (1)

kvbalakumar
Active Contributor
0 Kudos

Hi,

Please try to pass DocEntry instead of DocNum !

Also, you can check the processing of "sap.sl.purchquote.resp" step of "sap.B1RFQ" scenario package to get an idea of how to use the Synchronous Update !

Regards,

Bala

SatyaDeo
Participant
0 Kudos
 <xsl:template name="transform">
        <QueryParams>
            <DocEntry>
                <xsl:value-of select="/vpf:Msg/vpf:Body/vpf:Payload[./@Role='S']/bfa:io/bfa:object/bfa:string[./@name='invoiceNum']"></xsl:value-of>
            </DocEntry>
        </QueryParams>
        <U_Delivery_Boy>
            <xsl:value-of select="/vpf:Msg/vpf:Body/vpf:Payload[./@Role='S']/bfa:io/bfa:object/bfa:string[./@name='deliveryBoy']"></xsl:value-of>
        </U_Delivery_Boy>
    </xsl:template>

<Result>
    <Payload xmlns="urn:com.sap.b1i.vplatform:entity" Role="C" id="atom4" system="001sap0005" status="success" b1login="Technical User" method="Synchronous Update" objectid="17" payload="atom1" keyname="DocEntry" keyvalue="atom1" DIresult="success" DImsg=""/>
</Result>

but in the db its not getting updated..

SatyaDeo
Participant
0 Kudos

Please suggest me something on my mistake

kvbalakumar
Active Contributor

For the KeyValue define the xPath expression instead of atom1

Answers (0)