<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Computation with currency in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/computation-with-currency/m-p/8886612#M1688632</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My scenario is like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I have to do a computation based on 2 variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data: V1 type WERTV7,&amp;nbsp;&amp;nbsp;&amp;nbsp; (CURR 13)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; V2 type UKURSP.&amp;nbsp;&amp;nbsp;&amp;nbsp; (Decimals 9)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. The values across the above 2 variables are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v1 = 11846153200.00.&lt;/P&gt;&lt;P&gt;v2 = 65.00000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. The Computation which has to be done is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v1 = v1 * v2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Now, I get a runtime error saying "Overflow during the arithmetical operation (type P) in program"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. I tried many FMs mentioned in this FORUM like ROUND, CHAR_FLTP_CONVERSION, QSS0_FLTP_TO_CHAR_CONVERSION etc.&lt;/P&gt;&lt;P&gt;But, while moving the final value I face a runtime error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please help me in fixing this ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Deepu.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 22 Jul 2012 12:32:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-07-22T12:32:31Z</dc:date>
    <item>
      <title>Computation with currency</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/computation-with-currency/m-p/8886612#M1688632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My scenario is like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I have to do a computation based on 2 variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data: V1 type WERTV7,&amp;nbsp;&amp;nbsp;&amp;nbsp; (CURR 13)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; V2 type UKURSP.&amp;nbsp;&amp;nbsp;&amp;nbsp; (Decimals 9)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. The values across the above 2 variables are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v1 = 11846153200.00.&lt;/P&gt;&lt;P&gt;v2 = 65.00000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. The Computation which has to be done is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v1 = v1 * v2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Now, I get a runtime error saying "Overflow during the arithmetical operation (type P) in program"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. I tried many FMs mentioned in this FORUM like ROUND, CHAR_FLTP_CONVERSION, QSS0_FLTP_TO_CHAR_CONVERSION etc.&lt;/P&gt;&lt;P&gt;But, while moving the final value I face a runtime error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please help me in fixing this ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Deepu.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Jul 2012 12:32:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/computation-with-currency/m-p/8886612#M1688632</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-07-22T12:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: Computation with currency</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/computation-with-currency/m-p/8886613#M1688633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For type CURR fields you must know the number of decimals configured for the related currency key. So yu may have to muliply with /divide by multiples of 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can put everything to a type F variable, no danger of overflow. Check the result and write back to currency variable again muliply with /divide by multiples of 10&lt;/P&gt;&lt;P&gt; to get correct result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Jul 2012 17:52:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/computation-with-currency/m-p/8886613#M1688633</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2012-07-22T17:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: Computation with currency</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/computation-with-currency/m-p/8886614#M1688634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The maximum value a field of data type WERTV7 can contain is 99999999999.99 (13 chars with 2&amp;nbsp; decimals). The result of operation 65 * 11846153200.00 = 769999958000.00 ( 14 chars) does not fit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use a variable with a larger range (e.g. WERTV8) for field V1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JNN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Jul 2012 17:53:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/computation-with-currency/m-p/8886614#M1688634</guid>
      <dc:creator>nomssi</dc:creator>
      <dc:date>2012-07-22T17:53:23Z</dc:date>
    </item>
  </channel>
</rss>

