<?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: Problem with rounding the value in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-rounding-the-value/m-p/2357506#M521078</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;Please note SAP will always store the value as 10*actual value.Let that be as it is.In your pgm whenever you get kbetr divide it by 10 &amp;amp; use it.Do not do division by 10 in order to get the so called 'correct value' in database.Internally whenever SAP in using kbetr it will take care of it automatically i.e. it will divide it by 10 &amp;amp; use it as the actual kbetr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raju Chitale&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Jun 2007 10:05:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-14T10:05:21Z</dc:date>
    <item>
      <title>Problem with rounding the value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-rounding-the-value/m-p/2357503#M521075</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;I have a problem in rounding the value, it is something like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my program i am passing the value 26.560 but when it stores in the sap database "KOMV-KBETR" it is storing as 265.60. So, I divided the value in my program by 10 and passed the value 2.656 but now it is storing the value as 26.6 instead of 26.56.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope I am clear with the issue and expecting the solution from your desk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Suman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 09:29:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-rounding-the-value/m-p/2357503#M521075</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T09:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with rounding the value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-rounding-the-value/m-p/2357504#M521076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hey suman,&lt;/P&gt;&lt;P&gt;KOMV-KBETR is a currency field.. so it has only 2 decimal place.&lt;/P&gt;&lt;P&gt;please provide the code if possible...&lt;/P&gt;&lt;P&gt;check the declaration of the variable .&lt;/P&gt;&lt;P&gt;may be it is one decimal.. round off usaully happens when u declare the destination variable different from source... plz check that...&lt;/P&gt;&lt;P&gt;why dont u pass the value as 2 decimal place...&lt;/P&gt;&lt;P&gt;i hope thgs are clear now...&lt;/P&gt;&lt;P&gt;reward points if helpful&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 09:43:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-rounding-the-value/m-p/2357504#M521076</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T09:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with rounding the value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-rounding-the-value/m-p/2357505#M521077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;do like this :&lt;/P&gt;&lt;P&gt;declare a temporary variable of type KBETR,&lt;/P&gt;&lt;P&gt;move value to temporary field as follows and then to table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: V_temp type KOMV-KBETR.&lt;/P&gt;&lt;P&gt;write &amp;lt;b&amp;gt;FIELD&amp;lt;/b&amp;gt; to V_temp decimals 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move V_temp to table instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sooness&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 09:55:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-rounding-the-value/m-p/2357505#M521077</guid>
      <dc:creator>dev_parbutteea</dc:creator>
      <dc:date>2007-06-14T09:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with rounding the value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-rounding-the-value/m-p/2357506#M521078</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;Please note SAP will always store the value as 10*actual value.Let that be as it is.In your pgm whenever you get kbetr divide it by 10 &amp;amp; use it.Do not do division by 10 in order to get the so called 'correct value' in database.Internally whenever SAP in using kbetr it will take care of it automatically i.e. it will divide it by 10 &amp;amp; use it as the actual kbetr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raju Chitale&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 10:05:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-rounding-the-value/m-p/2357506#M521078</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T10:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with rounding the value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-rounding-the-value/m-p/2357507#M521079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;below  is the code for you   i did it ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  zround2.
PARAMETER: p_value type p decimals 3 default '26.560'.

DATA: d_value type p decimals 2,
      d_int1 TYPE i,
      d_int2 TYPE i,
      d_number(20)     TYPE c,
      d_num_result(20) TYPE c,
      d_decimal(2)     TYPE c.


************************************************************************
*START-OF-SELECTION.
START-OF-SELECTION.


d_number = p_value.
SHIFT d_number LEFT UP TO '.'.
SHIFT d_number LEFT.
d_decimal = d_number+0(2).
d_decimal = d_decimal + 1.

Clear: d_number.
d_number = p_value.
SHIFT d_number RIGHT DELETING TRAILING '123456789 '.
SHIFT d_number LEFT DELETING LEADING ' '.
CONCATENATE d_number d_decimal INTO d_num_result.

d_value = d_num_result.

write:/ 'Value rounded up to 2 decimal places is ', d_value.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points  if it is usefull ....&lt;/P&gt;&lt;P&gt;Girish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 10:56:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-rounding-the-value/m-p/2357507#M521079</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T10:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with rounding the value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-rounding-the-value/m-p/2357508#M521080</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;My problem is exactly like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MOVE gs_so_item_raw-kwmeng TO gs_so_item_conv-kwmeng.&lt;/P&gt;&lt;P&gt;  REPLACE ALL OCCURRENCES OF ',' IN gs_so_item_raw-netpr WITH '.' .&lt;/P&gt;&lt;P&gt;  MOVE gs_so_item_raw-netpr TO gs_so_item_conv-netpr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For ex, we have value '2.65'  in gs_so_item_conv-netpr and the same value is passed to the internal table and used in the Bapi "BAPI_SALESDOCU_CREATEFROMDATA". But the problem when the sales order is created the price is stored as '26.5" when i check the conditions tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, somewhere the value is multiplyed by 10 and storing in the database. Could you please let me know how to avoid this and store the exact passing value in the sales order creation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Urgent !!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Suman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 11:34:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-rounding-the-value/m-p/2357508#M521080</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T11:34:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with rounding the value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-rounding-the-value/m-p/2357509#M521081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;just multiply by 10 before moving to table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 11:39:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-rounding-the-value/m-p/2357509#M521081</guid>
      <dc:creator>dev_parbutteea</dc:creator>
      <dc:date>2007-06-14T11:39:58Z</dc:date>
    </item>
  </channel>
</rss>

