<?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: Rounding off in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/rounding-off/m-p/2526793#M572501</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the numerical Function ROUND to round off the decimal places.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &amp;lt;b&amp;gt;round_or_trunc_spec&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax Rules for Column Descriptions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;round_or_trunc_spec&amp;gt; ::= ROUND &amp;lt;valFRACTION&amp;gt; | TRUNC &amp;lt;valFRACTION&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;valFRACTION&lt;/P&gt;&lt;P&gt; Number of decimal places&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The value must be between 0 and 18. This function doe not have any effect if the number does not have any decimal places.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this syntax rule to specify the number of decimal places in a number. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ROUND &amp;lt;valFRACTION&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The value is rounded off at the (&amp;lt;valFRACTION&amp;gt;&lt;EM&gt;1) th decimal place. If this number is &amp;gt;= 5, the value is rounded up. If it is &amp;lt; 5, the value is rounded down. The result is a number in which the (&amp;lt;valFRACTION&amp;gt;&lt;/EM&gt;1)th and all subsequent decimal places are equal to 0. The other digits in the number may have been changed if the value was rounded up. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATALOAD TABLE distance&lt;/P&gt;&lt;P&gt;  ...&lt;/P&gt;&lt;P&gt;  cm 7 SCALE 2&lt;/P&gt;&lt;P&gt;  cm 7 SCALE -3 ROUND 1&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;INFILE 'meter.data'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRUNC &amp;lt;valFRACTION&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The (&amp;lt;valFRACTION&amp;gt;+1)th and all subsequent decimal places of the value are set to 0. The first &amp;lt;valFRACTION&amp;gt; decimal places remain unchanged. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATAEXTRACT * FROM distance&lt;/P&gt;&lt;P&gt;  cm    10-14 INTEGER SCALE 2&lt;/P&gt;&lt;P&gt;  m     14-17 INTEGER&lt;/P&gt;&lt;P&gt;  km    18-21 INTEGER SCALE -3 TRUNC 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OUTFILE 'dimensions.bin' FORMATTED&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;Ajith V&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Jul 2007 07:23:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-23T07:23:52Z</dc:date>
    <item>
      <title>Rounding off</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rounding-off/m-p/2526792#M572500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way (code or FM) to round off a decimals value?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jul 2007 07:19:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rounding-off/m-p/2526792#M572500</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-23T07:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding off</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rounding-off/m-p/2526793#M572501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the numerical Function ROUND to round off the decimal places.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &amp;lt;b&amp;gt;round_or_trunc_spec&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax Rules for Column Descriptions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;round_or_trunc_spec&amp;gt; ::= ROUND &amp;lt;valFRACTION&amp;gt; | TRUNC &amp;lt;valFRACTION&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;valFRACTION&lt;/P&gt;&lt;P&gt; Number of decimal places&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The value must be between 0 and 18. This function doe not have any effect if the number does not have any decimal places.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this syntax rule to specify the number of decimal places in a number. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ROUND &amp;lt;valFRACTION&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The value is rounded off at the (&amp;lt;valFRACTION&amp;gt;&lt;EM&gt;1) th decimal place. If this number is &amp;gt;= 5, the value is rounded up. If it is &amp;lt; 5, the value is rounded down. The result is a number in which the (&amp;lt;valFRACTION&amp;gt;&lt;/EM&gt;1)th and all subsequent decimal places are equal to 0. The other digits in the number may have been changed if the value was rounded up. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATALOAD TABLE distance&lt;/P&gt;&lt;P&gt;  ...&lt;/P&gt;&lt;P&gt;  cm 7 SCALE 2&lt;/P&gt;&lt;P&gt;  cm 7 SCALE -3 ROUND 1&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;INFILE 'meter.data'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRUNC &amp;lt;valFRACTION&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The (&amp;lt;valFRACTION&amp;gt;+1)th and all subsequent decimal places of the value are set to 0. The first &amp;lt;valFRACTION&amp;gt; decimal places remain unchanged. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATAEXTRACT * FROM distance&lt;/P&gt;&lt;P&gt;  cm    10-14 INTEGER SCALE 2&lt;/P&gt;&lt;P&gt;  m     14-17 INTEGER&lt;/P&gt;&lt;P&gt;  km    18-21 INTEGER SCALE -3 TRUNC 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OUTFILE 'dimensions.bin' FORMATTED&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;Ajith V&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jul 2007 07:23:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rounding-off/m-p/2526793#M572501</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-23T07:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding off</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rounding-off/m-p/2526794#M572502</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;  You can use Round option for rounding the decimal values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for eg:&lt;/P&gt;&lt;P&gt; DATA pack TYPE p VALUE '123.456'&lt;/P&gt;&lt;P&gt;                        DECIMALS 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE pack DECIMALS 2. "123,46&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: / pack ROUND -2, " 12.345,600&lt;/P&gt;&lt;P&gt;       / pack ROUND -1,   "  1.234,560&lt;/P&gt;&lt;P&gt;       / pack ROUND 1,    "   12,346&lt;/P&gt;&lt;P&gt;       / pack ROUND 2.    "  1,235&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;veeresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jul 2007 07:27:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rounding-off/m-p/2526794#M572502</guid>
      <dc:creator>former_member673464</dc:creator>
      <dc:date>2007-07-23T07:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding off</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rounding-off/m-p/2526795#M572503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;U declare that field as packed decimal.&lt;/P&gt;&lt;P&gt;eg.    data: qty type p.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;anju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jul 2007 07:29:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rounding-off/m-p/2526795#M572503</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-23T07:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding off</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rounding-off/m-p/2526796#M572504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to move the value to data type "P" , automatic rounding take place.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EX:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA :num TYPE P decimals 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE '123.456' TO NUM.    &amp;lt;b&amp;gt;"output 123.46&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE num.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE '123.454' TO NUM. &amp;lt;b&amp;gt; "output 123.45&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE num.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sairam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jul 2007 07:32:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rounding-off/m-p/2526796#M572504</guid>
      <dc:creator>former_member196280</dc:creator>
      <dc:date>2007-07-23T07:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding off</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rounding-off/m-p/2526797#M572505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check FM 'J_1I6_ROUND_TO_NEAREST_AMT'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jul 2007 07:34:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rounding-off/m-p/2526797#M572505</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-23T07:34:52Z</dc:date>
    </item>
  </channel>
</rss>

