How to set dynamic Key Value parameter in Call B1 Object atom

2 months ago 38

Hi Expert,

I had a request to get the dynamic 'Key Value' of Call B1 Object atom each clip the predecessor atom has been initiated by HTTP call. 

I'm utilizing a HTTP Call Inbound Type from Inbound Channel. I request to get the CardCode worth generated from atom below. 

<xsl:output method="xml" encoding="UTF-8" indent="yes"></xsl:output>
<xsl:param name="atom"></xsl:param>
<xsl:param name="sessionid"></xsl:param>
<xsl:variable name="msg" select="/vpf:Msg/vpf:Body/vpf:Payload[./@Role=&apos;S&apos;]"></xsl:variable>
<xsl:variable name="vpSender" select="/vpf:Msg/vpf:Header/vpf:Sender/@Id"></xsl:variable>
<xsl:variable name="vpObject" select="/vpf:Msg/vpf:Header/vpf:Sender/@ObjId"></xsl:variable>
<xsl:variable name="vpReceiver" select="/vpf:Msg/vpf:Header/vpf:ReceiverList/vpf:Receiver[./@handover=&apos;P&apos;]/@Id"></xsl:variable>
<xsl:template match="/">
<xsl:variable name="vptsDoc" select="document(&apos;/com.sap.b1i.internal/xml/timestamp&apos;)"></xsl:variable>
<xsl:variable name="vpts" select="concat($vptsDoc/*/@year,&apos;/&apos;,$vptsDoc/*/@month,&apos;/&apos;,$vptsDoc/*/@date,&apos; &apos;,$vptsDoc/*/@hour,&apos;:&apos;,$vptsDoc/*/@minute,&apos;:&apos;,$vptsDoc/*/@second)"></xsl:variable>
<vpf:Msg>
<xsl:copy-of select="/vpf:Msg/@*"></xsl:copy-of>
<xsl:copy-of select="/vpf:Msg/vpf:Header"></xsl:copy-of>
<vpf:Body>
<xsl:copy-of select="/vpf:Msg/vpf:Body/*"></xsl:copy-of>
<vpf:Payload Role="X" id="{$atom}" ts="{$vpts}">
<xsl:call-template name="transform"></xsl:call-template>
</vpf:Payload>
</vpf:Body>
</vpf:Msg>
</xsl:template>
<xsl:template name="transform">
<BusinessPartners>
<row>
<CardCode>
<xsl:value-of select="$msg/bfa:io/bfa:object/bfa:string[./@name=&apos;AccountCode&apos;]"></xsl:value-of>
</CardCode>
<CardName>
<xsl:value-of select="$msg/bfa:io/bfa:object/bfa:string[./@name=&apos;AccountName&apos;]"></xsl:value-of>
</CardName>
<PayTermsGrpCode>
<xsl:value-of select="$msg/bfa:io/bfa:object/bfa:string[./@name=&apos;PaymentTerms&apos;]"></xsl:value-of>
</PayTermsGrpCode>
<FederalTaxID>
<xsl:value-of select="$msg/bfa:io/bfa:object/bfa:string[./@name=&apos;TIN&apos;]"></xsl:value-of>
</FederalTaxID>
</row>
</BusinessPartners>

Call B1 Object.png

Read Entire Article