<?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 Re: multiply the packed values in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiply-the-packed-values/m-p/5922770#M1331802</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;i have checked the same expression in report it works fine. But, in pricing routine it returns wrong value. plz help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;R.Jayakumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Jul 2009 13:17:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-07-24T13:17:26Z</dc:date>
    <item>
      <title>multiply the packed values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiply-the-packed-values/m-p/5922761#M1331793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please look at the below eg:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : text1 type p decimals 2.&lt;/P&gt;&lt;P&gt;data : text2 type p decimals 2.&lt;/P&gt;&lt;P&gt;data : text3 type p decimals 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text1 = '328.70'.&lt;/P&gt;&lt;P&gt;text2 = '0.02'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text3 = text1 * text2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after multiplication the value is &lt;STRONG&gt;657.40&lt;/STRONG&gt;. but the actual value should be &lt;STRONG&gt;6.57&lt;/STRONG&gt; what the reason for this errored value &lt;STRONG&gt;657.40&lt;/STRONG&gt; have is missed some thing over here??? please help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jayakumar.R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 12:32:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiply-the-packed-values/m-p/5922761#M1331793</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-24T12:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: multiply the packed values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiply-the-packed-values/m-p/5922762#M1331794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ensure that in programs &lt;STRONG&gt;Atributes&lt;/STRONG&gt; you have checked &lt;STRONG&gt;Fixed point arithmetic&lt;/STRONG&gt; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 12:36:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiply-the-packed-values/m-p/5922762#M1331794</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-07-24T12:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: multiply the packed values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiply-the-packed-values/m-p/5922763#M1331795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;check program attributes:&lt;/P&gt;&lt;P&gt;&amp;lt;fixed point arithmetic&amp;gt; should be marked...&lt;/P&gt;&lt;P&gt;regards,darek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 12:38:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiply-the-packed-values/m-p/5922763#M1331795</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-24T12:38:07Z</dc:date>
    </item>
    <item>
      <title>Re: multiply the packed values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiply-the-packed-values/m-p/5922764#M1331796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its correct, I just copied ur code and pasted as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : text1 type p decimals 2.&lt;/P&gt;&lt;P&gt;data : text2 type p decimals 2.&lt;/P&gt;&lt;P&gt;data : text3 type p decimals 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text1 = '328.70'.&lt;/P&gt;&lt;P&gt;text2 = '0.02'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text3 = text1 * text2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write : text1,text2,text3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its giving me  328.70              0.02              6.57&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fixed point aithmetic should be selected in atribute.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 12:39:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiply-the-packed-values/m-p/5922764#M1331796</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-24T12:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: multiply the packed values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiply-the-packed-values/m-p/5922765#M1331797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that your decimal point is being recognized as a thousand separator. Replace &lt;STRONG&gt;'.'&lt;/STRONG&gt; with a comma &lt;STRONG&gt;','&lt;/STRONG&gt;, and your calculation should work fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : text1 type p decimals 2.&lt;/P&gt;&lt;P&gt;data : text2 type p decimals 2.&lt;/P&gt;&lt;P&gt;data : text3 type p decimals 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text1 = '328,70'.&lt;/P&gt;&lt;P&gt;text2 = '0,02'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text3 = text1 *  text2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should get it right now. If you want to change your settings, goto SAP Easy Access -&amp;gt; Settings -&amp;gt; Own Data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps! Do let me know if you need anything else!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Shailesh.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Always provide feedback for helpful answers!&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 12:42:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiply-the-packed-values/m-p/5922765#M1331797</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-24T12:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: multiply the packed values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiply-the-packed-values/m-p/5922766#M1331798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data : text1 type p decimals 2 VALUE '328.70'.
data : text2 type p decimals 2 VALUE '0.02'.
data : text3 type p decimals 2.

text3 = text1 * text2.

WRITE text3.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 12:45:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiply-the-packed-values/m-p/5922766#M1331798</guid>
      <dc:creator>sridhar_meesala</dc:creator>
      <dc:date>2009-07-24T12:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: multiply the packed values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiply-the-packed-values/m-p/5922767#M1331799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;jaya,&lt;/P&gt;&lt;P&gt;your code is correct and fetching correct value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check if you have written some thing else in the code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 12:45:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiply-the-packed-values/m-p/5922767#M1331799</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-24T12:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: multiply the packed values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiply-the-packed-values/m-p/5922768#M1331800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;actually the value are picked from database field kwert, &lt;/P&gt;&lt;P&gt;for example i just entered  the values in quotes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;R.Jayakumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 12:49:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiply-the-packed-values/m-p/5922768#M1331800</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-24T12:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: multiply the packed values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiply-the-packed-values/m-p/5922769#M1331801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; hi,&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; actually the value are picked from database field kwert, &lt;/P&gt;&lt;P&gt;&amp;gt; for example i just entered  the values in quotes.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; regards,&lt;/P&gt;&lt;P&gt;&amp;gt; R.Jayakumar&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is not important as KWERT is of type DEC so the one which you used in your example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you check the setting together with Darek we suggested you? &lt;/P&gt;&lt;P&gt;When it is set, SAP does calculation same way as you would do multiplication on sheet of paper, so decimal point is taken under considertation (4 places shifted to left after applied to result). &lt;/P&gt;&lt;P&gt;On the other hand, when you have that option off, it will leave that point at 2nd place shifted to left, hence you get 657.40 instead of 6.57.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 13:10:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiply-the-packed-values/m-p/5922769#M1331801</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-07-24T13:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: multiply the packed values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiply-the-packed-values/m-p/5922770#M1331802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;i have checked the same expression in report it works fine. But, in pricing routine it returns wrong value. plz help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;R.Jayakumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 13:17:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiply-the-packed-values/m-p/5922770#M1331802</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-24T13:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: multiply the packed values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiply-the-packed-values/m-p/5922771#M1331803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;try to do your calculation in external program with fixed point arithemtic checked...&lt;/P&gt;&lt;P&gt;darek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 13:23:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiply-the-packed-values/m-p/5922771#M1331803</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-24T13:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: multiply the packed values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiply-the-packed-values/m-p/5922772#M1331804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look at SAP documentation [Numeric Data Types |http://help.sap.com/abapdocu_70/en/ABENNUMBER_TYPES.htm]&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;If you are using packed numbers, you should always set the program attribute fixed point arithmetic as only this ensures that the decimal point is correctly calculated. Otherwise, all numbers are specified as integers and all intermediate results for the next integer are rounded.  If fixed point arithmetic is not set, the decimal places defined for the number only appear in  screen output or when formatting with WRITE [TO]. &lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 13:23:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiply-the-packed-values/m-p/5922772#M1331804</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2009-07-24T13:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: multiply the packed values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiply-the-packed-values/m-p/5922773#M1331805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please Check  that in your  programs atributes you have checked Fixed point arithmetic .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Shreemohan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 13:28:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiply-the-packed-values/m-p/5922773#M1331805</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-24T13:28:02Z</dc:date>
    </item>
  </channel>
</rss>

