<?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: Data element decimals points query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-element-decimals-points-query/m-p/12533544#M2005603</link>
    <description>&lt;P&gt;+1 not for first sentence, but for switching on the  "floating decimal point" program attribute!&lt;/P&gt;</description>
    <pubDate>Thu, 03 Feb 2022 19:08:58 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2022-02-03T19:08:58Z</dc:date>
    <item>
      <title>Data element decimals points query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-element-decimals-points-query/m-p/12533537#M2005596</link>
      <description>&lt;P&gt;KONP-KBETR is type KBETR_KOND. This is a currency field of length 11 and &lt;STRONG&gt;&lt;EM&gt;2&lt;/EM&gt;&lt;/STRONG&gt; decimal points.&lt;/P&gt;
  &lt;P&gt;In this piece of code then, how is it L_KBETR can hold 3 decimals points?&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;  CONSTANTS: c_decimals_3(5) VALUE '3    '.&lt;BR /&gt;  DATA: out_value(15) TYPE c,&lt;BR /&gt;        l_kbetr       TYPE konp-kbetr.&lt;BR /&gt;&lt;BR /&gt;  l_kbetr = '1.234'. "&amp;lt;-- should only be able to hold 1.23?&lt;BR /&gt;&lt;BR /&gt;  WRITE l_kbetr TO out_value CURRENCY c_decimals_3.&lt;BR /&gt;&lt;BR /&gt;  WRITE:/ out_value. "--&amp;gt; 1.234&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 03 Feb 2022 12:10:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-element-decimals-points-query/m-p/12533537#M2005596</guid>
      <dc:creator>former_member788228</dc:creator>
      <dc:date>2022-02-03T12:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: Data element decimals points query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-element-decimals-points-query/m-p/12533538#M2005597</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am assuming your question is how to round off, as it is not clear what is it exactly that you need help with. &lt;/P&gt;&lt;P&gt;Have you tried using ROUND function module .&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2022 13:40:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-element-decimals-points-query/m-p/12533538#M2005597</guid>
      <dc:creator>former_member598787</dc:creator>
      <dc:date>2022-02-03T13:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: Data element decimals points query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-element-decimals-points-query/m-p/12533539#M2005598</link>
      <description>&lt;P&gt;why didn't you put a real currency after CURRENCY keyword ?   EUR --&amp;gt; 1.23   JPY --&amp;gt; 123 &lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2022 14:10:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-element-decimals-points-query/m-p/12533539#M2005598</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2022-02-03T14:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: Data element decimals points query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-element-decimals-points-query/m-p/12533540#M2005599</link>
      <description>&lt;P&gt;First of all, I cannot reproduce the behavior.&lt;/P&gt;&lt;P&gt;Check in the debugger the ABAP type of l_kbetr. It must be P(6) DECIMALS 2.&lt;/P&gt;&lt;P&gt;Then, after assigning '1.234', it contains 1.23.&lt;/P&gt;&lt;P&gt;Then, your are applying the character 3 to CURRENCY of WRITE TO.&lt;/P&gt;&lt;P&gt;Look into tables TCURC/TCURX which number of decimal places is assigned to currency '3'.&lt;/P&gt;&lt;P&gt;See &lt;A rel="noopener noreferrer" href="https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapwrite_to_options.htm#!ABAP_ADDITION_6@6@" target="_blank"&gt;WRITE, format_options, Addition 6&lt;/A&gt; on how the CURRENCY addition works.&lt;/P&gt;&lt;P&gt;"For data objects of type p, the decimal places specified by the definition of the data type are ignored completely. Independently of the actual value and without rounding, decimal separators and thousands separators are inserted between the digits in the places determined by cur. "&lt;/P&gt;&lt;P&gt;If there are three decimal places behind the currency specified, it produces 0.123 from 1.23.&lt;/P&gt;&lt;P&gt; See also &lt;A rel="noopener noreferrer" href="https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenddic_currency_field.htm" target="_blank"&gt;DDIC - Currency Fields&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2022 15:16:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-element-decimals-points-query/m-p/12533540#M2005599</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2022-02-03T15:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: Data element decimals points query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-element-decimals-points-query/m-p/12533541#M2005600</link>
      <description>&lt;P&gt;Hi Horst,&lt;BR /&gt;Not sure if system version affects why you cannot reproduce the behaviour. The code is as pasted above. I confirmed KONP-KBETR is a currency field, length 11 decimals 2.&lt;/P&gt;&lt;P&gt;Kernel 777 SP 429&lt;BR /&gt;SAP_BASIS 754 SP 3&lt;/P&gt;&lt;P&gt;Attached is a screenshot of debug. But what you wrote about type P certainly would suggest why the P variable can 'hold' 3 decimals places even though is defined with only 2.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2020558-decimals.png" /&gt;&lt;/P&gt;&lt;P&gt;Frederic,&lt;BR /&gt;To rule out any currency-related configuration issues in this test. Defining the explicit number of 'currency' decimals points eliminates this extra factor.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2022 15:40:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-element-decimals-points-query/m-p/12533541#M2005600</guid>
      <dc:creator>former_member788228</dc:creator>
      <dc:date>2022-02-03T15:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: Data element decimals points query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-element-decimals-points-query/m-p/12533542#M2005601</link>
      <description>&lt;P&gt;it looks like this old good "floating decimal point" flag in program attributes...&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2022 16:51:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-element-decimals-points-query/m-p/12533542#M2005601</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-02-03T16:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: Data element decimals points query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-element-decimals-points-query/m-p/12533543#M2005602</link>
      <description>&lt;P&gt;omg I'm a moron! lol&lt;/P&gt;&lt;P&gt;That was it, the flag was off.&lt;/P&gt;&lt;P&gt;Thank-you Sandra!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2022 18:26:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-element-decimals-points-query/m-p/12533543#M2005602</guid>
      <dc:creator>former_member788228</dc:creator>
      <dc:date>2022-02-03T18:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: Data element decimals points query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-element-decimals-points-query/m-p/12533544#M2005603</link>
      <description>&lt;P&gt;+1 not for first sentence, but for switching on the  "floating decimal point" program attribute!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2022 19:08:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-element-decimals-points-query/m-p/12533544#M2005603</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-02-03T19:08:58Z</dc:date>
    </item>
  </channel>
</rss>

