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='S']"></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='P']/@Id"></xsl:variable>
<xsl:template match="/">
<xsl:variable name="vptsDoc" select="document('/com.sap.b1i.internal/xml/timestamp')"></xsl:variable>
<xsl:variable name="vpts" select="concat($vptsDoc/*/@year,'/',$vptsDoc/*/@month,'/',$vptsDoc/*/@date,' ',$vptsDoc/*/@hour,':',$vptsDoc/*/@minute,':',$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='AccountCode']"></xsl:value-of>
</CardCode>
<CardName>
<xsl:value-of select="$msg/bfa:io/bfa:object/bfa:string[./@name='AccountName']"></xsl:value-of>
</CardName>
<PayTermsGrpCode>
<xsl:value-of select="$msg/bfa:io/bfa:object/bfa:string[./@name='PaymentTerms']"></xsl:value-of>
</PayTermsGrpCode>
<FederalTaxID>
<xsl:value-of select="$msg/bfa:io/bfa:object/bfa:string[./@name='TIN']"></xsl:value-of>
</FederalTaxID>
</row>
</BusinessPartners>