Skip to Content
1
Former Member
Apr 25, 2016 at 05:36 AM

Call B1 function Parameter error

273 Views

Hi all,

I am working on exchange rate import from SAP Business One Integration blog by Pierre Canali exchange rate is collected from a

url : http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml . I face a problem starts at for -each loop. I get a error " parameters doesn't match existing methods "

The processing flow

Now i added the atom 7 which consists of following xsl for-each loop that calls SBObob function to insert/update exchange rates

  1. <xsl:template xmlns:gesmes="http://www.gesmes.org/xml/2002-08-01" xmlns="http://www.ecb.int/vocabulary/2002-08-01/eurofxref" name="transform">
  2. <xsl:for-each select="/vpf:Msg/vpf:Body/vpf:Payload[./@id=&apos;atom2&apos;]//*[./@rate]">
  3. <xsl:variable name="currency"><xsl:value-of select="./@currency" /></xsl:variable>
  4. <xsl:if test="/vpf:Msg/vpf:Body/vpf:Payload[./@id=&apos;atom8_2&apos;]/jdbc:ResultSet/jdbc:Row[jdbc:CurrCode = $currency]">
  5. <ExchangeRate xmlns="">
  6. <xsl:attribute name="date">
  7. <xsl:call-template name="b1ilib.strgReplace">
  8. <xsl:with-param name="subs" select="&apos;.&apos;"></xsl:with-param>
  9. <xsl:with-param name="var" select="&apos;-&apos;"></xsl:with-param>
  10. <xsl:with-param name="wstrg" select="../@time"></xsl:with-param>
  11. </xsl:call-template>
  12. </xsl:attribute>
  13. <xsl:attribute name="currency">
  14. <xsl:value-of select="./@currency"></xsl:value-of>
  15. </xsl:attribute>
  16. <xsl:attribute name="rate">
  17. <xsl:choose>
  18. <xsl:when test="/vpf:Msg/vpf:Body/vpf:Payload[./@id=&apos;atom8_1&apos;]/jdbc:ResultSet/jdbc:DirectRate = &apos;Y&apos;">
  19. <xsl:value-of select="./@rate"></xsl:value-of>
  20. </xsl:when>
  21. <xsl:otherwise>
  22. <xsl:value-of select="1 div ./@rate"></xsl:value-of>
  23. </xsl:otherwise>
  24. </xsl:choose>
  25. </xsl:attribute>
  26. </ExchangeRate>
  27. </xsl:if>
  28. </xsl:for-each>
  29. </xsl:template>

Regards:

Navin

Attachments

function-call.png (14.7 kB)