<?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: Need Help on CEIL command in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297819#M1725849</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello A N,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, CEIL returns the lower integer not less than the argument passed to it. Now, 133725 is passed to CEIL, it should return 133725 since that satisfies the condition lowest integer not less than 133725.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Moreover, if you simply do a CEIL on an integer value, it does not return the next higher integer value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Mar 2013 04:54:55 GMT</pubDate>
    <dc:creator>kakshat</dc:creator>
    <dc:date>2013-03-01T04:54:55Z</dc:date>
    <item>
      <title>Need Help on CEIL command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297815#M1725845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May I get you help on CEIL command?&lt;/P&gt;&lt;P&gt;I wrote the following test program:&lt;/P&gt;&lt;P&gt;----------&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;REPORT&amp;nbsp; ZTEST_TOM_CALCT&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="L0S52"&gt;data&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;:&lt;/SPAN&gt;&lt;BR /&gt;result &lt;SPAN class="L0S52"&gt;type &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;I&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;,&lt;/SPAN&gt;&lt;BR /&gt;p1 &lt;SPAN class="L0S52"&gt;type &lt;/SPAN&gt;P &lt;SPAN class="L0S52"&gt;DECIMALS &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;2&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;,&lt;/SPAN&gt;&lt;BR /&gt;p2 &lt;SPAN class="L0S52"&gt;type &lt;/SPAN&gt;P &lt;SPAN class="L0S52"&gt;DECIMALS &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;2&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;,&lt;/SPAN&gt;&lt;BR /&gt;p3 &lt;SPAN class="L0S52"&gt;type &lt;/SPAN&gt;P &lt;SPAN class="L0S52"&gt;DECIMALS &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;4&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;,&lt;/SPAN&gt;&lt;BR /&gt;p4 &lt;SPAN class="L0S52"&gt;type &lt;/SPAN&gt;P &lt;SPAN class="L0S52"&gt;DECIMALS &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;4&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;p1 &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'5349.00'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;p2&amp;nbsp; &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'0.25'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;p3&amp;nbsp; &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'123.0000'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;p4&amp;nbsp; &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'123.0000'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;result &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;CEIL&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;P1 * p2 / p3 * p4 * &lt;SPAN class="L0S32"&gt;100 &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="L0S52"&gt;write &lt;/SPAN&gt;result&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="L0S52"&gt;data&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;p_temp &lt;SPAN class="L0S52"&gt;type &lt;/SPAN&gt;string&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;p_temp &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;P1 * p2 / p3 * p4 * &lt;SPAN class="L0S32"&gt;100 &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="L0S52"&gt;write&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;:&lt;/SPAN&gt;/ p_temp&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="L0S52"&gt;data&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;:&lt;/SPAN&gt;c_temp &lt;SPAN class="L0S52"&gt;type &lt;/SPAN&gt;p&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;c_temp &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;ceil&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;p_temp &lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="L0S52"&gt;write&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;:&lt;/SPAN&gt;/ c_temp&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&amp;lt;-------------&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;The result is:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; 133,726&lt;/P&gt;&lt;P&gt;133725.00000000000000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 133,725&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can understand ceil ( 133725.00..) = 133725.&lt;/P&gt;&lt;P&gt;But why &lt;/P&gt;&lt;P&gt;result &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;CEIL&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;P1 * p2 / p3 * p4 * &lt;SPAN class="L0S32"&gt;100 &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;) = 133726 ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;Tom&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2013 01:50:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297815#M1725845</guid>
      <dc:creator>tom_wan</dc:creator>
      <dc:date>2013-03-01T01:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help on CEIL command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297816#M1725846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's interesting and I guess it has to do with the internal conversions that happen during such arithmetic calculations. Although, I haven't been able to pin-point the exact reason, I did notice that that if you place parentheses around p2/p3, you would get the correct value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2013 04:37:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297816#M1725846</guid>
      <dc:creator>kakshat</dc:creator>
      <dc:date>2013-03-01T04:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help on CEIL command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297817#M1725847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check below code you got all are give same out put .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output : &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; 133 725&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;133725.0000000000&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 133 725&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; DATA:&lt;/P&gt;&lt;P&gt; RESULT &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;I,&lt;/P&gt;&lt;P&gt; P1 &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;P &lt;SPAN class="L0S52"&gt;DECIMALS &lt;/SPAN&gt;2,&lt;/P&gt;&lt;P&gt; P2 &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;P &lt;SPAN class="L0S52"&gt;DECIMALS &lt;/SPAN&gt;2,&lt;/P&gt;&lt;P&gt; P3 &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;P &lt;SPAN class="L0S52"&gt;DECIMALS &lt;/SPAN&gt;4,&lt;/P&gt;&lt;P&gt; P4 &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;P &lt;SPAN class="L0S52"&gt;DECIMALS &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;4.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; P1 = &lt;SPAN class="L0S33"&gt;'5349.00'&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt; P2&amp;nbsp; = &lt;SPAN class="L0S33"&gt;'0.25'&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt; P3&amp;nbsp; = &lt;SPAN class="L0S33"&gt;'123.0000'&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt; P4&amp;nbsp; = &lt;SPAN class="L0S33"&gt;'123.0000'&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; RESULT =&amp;nbsp; P1 * P2 / P3 * P4 * &lt;SPAN class="L0S32"&gt;100 &lt;/SPAN&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; RESULT = CEIL( RESULT ).&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;WRITE &lt;/SPAN&gt;RESULT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; DATA: P_TEMP &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;STRING.&lt;/P&gt;&lt;P&gt; P_TEMP =&amp;nbsp; P1 * P2 / P3 * P4 * &lt;SPAN class="L0S32"&gt;100&amp;nbsp; &lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt; WRITE:/ P_TEMP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; DATA:C_TEMP &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;P.&lt;/P&gt;&lt;P&gt; C_TEMP = CEIL( P_TEMP ).&lt;/P&gt;&lt;P&gt; WRITE:/ C_TEMP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regard's&lt;/P&gt;&lt;P&gt;Smruti&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2013 04:38:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297817#M1725847</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-03-01T04:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help on CEIL command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297818#M1725848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are getting 133726 because result is of type I and you are using CEIL here. If the result field is an integer then the ceil of a value will be the lowest integer not less than x. Hope this helps! This is a great learning for me too! Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in this case, Integer = Ceil(133725) = 133726&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can refer link - &lt;A href="http://help.sap.com/saphelp_46c/helpdata/en/92/58c505417011d189ec0000e81ddfac/content.htm"&gt;http://help.sap.com/saphelp_46c/helpdata/en/92/58c505417011d189ec0000e81ddfac/content.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2013 04:47:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297818#M1725848</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-03-01T04:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help on CEIL command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297819#M1725849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello A N,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, CEIL returns the lower integer not less than the argument passed to it. Now, 133725 is passed to CEIL, it should return 133725 since that satisfies the condition lowest integer not less than 133725.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Moreover, if you simply do a CEIL on an integer value, it does not return the next higher integer value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2013 04:54:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297819#M1725849</guid>
      <dc:creator>kakshat</dc:creator>
      <dc:date>2013-03-01T04:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help on CEIL command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297820#M1725850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Akshat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its NOT LESS THAN so the Result should be not less than 133725 Hence it is passing 133726! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can check this link for more information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_46c/helpdata/en/92/58c505417011d189ec0000e81ddfac/content.htm"&gt;http://help.sap.com/saphelp_46c/helpdata/en/92/58c505417011d189ec0000e81ddfac/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this link, X = 3.1 Ceil (3.1) is passed as 4&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2013 04:58:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297820#M1725850</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-03-01T04:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help on CEIL command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297821#M1725851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;133725 is NOT LESS THAN 133725. So, why shouldn't CEIL return 133725 for 133725?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2013 05:08:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297821#M1725851</guid>
      <dc:creator>kakshat</dc:creator>
      <dc:date>2013-03-01T05:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help on CEIL command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297822#M1725852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Akshat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would be better if you read the link for more information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per me, 133725 is equal to 133725 and is NOT MORE or LESS than 133725 and is definitely not 'the lowest interger less than 133725'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And as per my understanding the result should be 'lowest integer not less than 133725(in this case)' which means 133726 which is lowest integer and not less than 133725!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its better if you read the link. I have understood it this way as per the link so I think the result 133726 is correct!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2013 05:28:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297822#M1725852</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-03-01T05:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help on CEIL command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297823#M1725853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Akshat &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also in the link they have said CEIL(3.1) into an integer is 4. They could have said '3'. but 4 is the next lowest integer which is greater than 3.1 (lowest integer NOT LESS THAN 3.1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you understand from the link! Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1214/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2013 05:30:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297823#M1725853</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-03-01T05:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help on CEIL command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297824#M1725854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have read the link. You need to understand that, logically speaking, the following IF condition would evaluate to true&lt;/P&gt;&lt;P&gt;IF NOT ( A &amp;lt; B)&lt;/P&gt;&lt;P&gt;if A and B have the same values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And, they could not have said CEIL(3.1) = 3 because 3 is not less than the argument (3.1). However, CEIL(3) = 3 is correct because 3 (result) is the lowest integer which is NOT LESS THAN 3 (argument).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you still don't agree, you can simply test for yourself the results of doing a CEIL(3). I would be curious to know if that returns you 4!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2013 05:47:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297824#M1725854</guid>
      <dc:creator>kakshat</dc:creator>
      <dc:date>2013-03-01T05:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help on CEIL command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297825#M1725855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Akshat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Firstly, it is not about any IF condition here. There are 2 things here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. The result should be LOWEST INTEGER&lt;/P&gt;&lt;P&gt;2. It should be NOT LESS than the argument which means it should be GREATER than the argument.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which means the Result should be 'LOWEST INTEGER and GREATER THAN the Argument'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Definitely CEIL(3) cannot be 4!&amp;nbsp; &lt;STRONG&gt;I did not even say it should be 4! It considers the decimal portion. In this case it is 133725.00&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This works when the argument is a decimal but the result is an integer &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway I don't think this is the right forum to try and explain to each other this way! I understood an explanation and gave it here. Its upto us to analyze on it. Cheers &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1214/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2013 06:06:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297825#M1725855</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-03-01T06:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help on CEIL command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297826#M1725856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello A N,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think as long as the discussion is meaningful and done in a respectful manner, this is the right forum. Like you, there could be others who could interpret NOT LESS THAN to be same as GREATER THAN because there is but a small difference between the two.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way, I just tried doing a CEIL( 133725.00 ) and even that returned 133725 and not 133726.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My intention is not to prove that you are incorrect but only to try to make you see what you aren't seeing. I rest my case here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2013 06:27:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297826#M1725856</guid>
      <dc:creator>kakshat</dc:creator>
      <dc:date>2013-03-01T06:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help on CEIL command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297827#M1725857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Akshat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Definitely even I am not here to prove anyone incorrect. I thought you were misunderstanding me on the explanation front!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ok lets continue then:)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes you may get CEIL(133725.00) as 133725 but what field was inside the bracket? Was it a packed one with decimal 2? and was the result field an Integer? Can you try it with this? Currently I don't have SAP access hence can't try:(&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually Tom has also got CEIL(133725.00) as 133725 but the field types have differed. This difference happens only when CEIL(Packed decimal) into an Integer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please don't rest your case, let's solve this! What say?:)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2013 06:32:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297827#M1725857</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-03-01T06:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help on CEIL command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297828#M1725858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nice to see that you are up for it! (I just hope &lt;A __default_attr="444261" __jive_macro_name="user" class="jive_macro jive_macro_user" href="https://community.sap.com/"&gt;&lt;/A&gt; is not cursing us for prolonging this discussion &lt;SPAN __jive_emoticon_name="wink" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1214/images/emoticons/wink.gif"&gt;&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Initially, I had tried with a literal - CEIL( '133725.00' ) but after your last reply, just to be absolutely sure, I used a packed variable with 2 decimals. In both cases, I got the same result - 133725.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way, I don't know if you read my very first response to Tom but if parentheses are used around p2/p3 without changing anything else, the correct value (133725) is obtained. So, I think this has something to do with how the system evaluates the expression and the internal conversions that go into it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2013 06:44:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297828#M1725858</guid>
      <dc:creator>kakshat</dc:creator>
      <dc:date>2013-03-01T06:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help on CEIL command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297829#M1725859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Akshat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes I saw about the paranthesis, even I thought about that first. But when I searched online, I got the above link so I am little confused &lt;SPAN __jive_emoticon_name="silly" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1214/images/emoticons/silly.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I already told Tom Wan this is a good post for us to learn something new so I guess he will be happy&amp;nbsp; &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1214/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Btw did you paste his code and see how it works!? And what is that link trying to say or do I just forget it? As I have got confused because of that link.:(&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2013 06:51:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297829#M1725859</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-03-01T06:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help on CEIL command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297830#M1725860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I've got it. If you see this link (&lt;A href="http://help.sap.com/abapdocu_70/en/ABENNUMBER_TYPES.htm" title="http://help.sap.com/abapdocu_70/en/ABENNUMBER_TYPES.htm"&gt;http://help.sap.com/abapdocu_70/en/ABENNUMBER_TYPES.htm&lt;/A&gt;), it mentions that if you use packed numbers then decimals up to 31 places are considered during evaluation of arithmetic expressions. Now, what could be happening is that with 31 decimal places, maybe the computed value has a digit towards the end (something like 133725.0000000000000000000000005). Then, CEIL would return the next integer which is 133726.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As to why it does not give 133726 when we use parentheses around p2/p3, probably in that case, the order of evaluation is different (division first and then the multiplication operations as opposed to the other case in which the expression is evaluated from left to right) which leads to a value that does not have any non-zero digits up to 31 places.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Former Member: This sounds believable to me. &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1214/images/emoticons/happy.gif"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2013 07:51:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297830#M1725860</guid>
      <dc:creator>kakshat</dc:creator>
      <dc:date>2013-03-01T07:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help on CEIL command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297831#M1725861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brilliant Akshat!:)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2013 09:06:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297831#M1725861</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-03-01T09:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help on CEIL command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297832#M1725862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wrote a program like below:&lt;/P&gt;&lt;P&gt;---&amp;gt;&lt;/P&gt;&lt;P&gt;REPORT&amp;nbsp; ztest_tom_calct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;result_i TYPE i,&lt;/P&gt;&lt;P&gt;p1 TYPE p DECIMALS 2,&lt;/P&gt;&lt;P&gt;p2 TYPE p DECIMALS 2,&lt;/P&gt;&lt;P&gt;p3 TYPE p DECIMALS 4,&lt;/P&gt;&lt;P&gt;p4 TYPE p DECIMALS 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p1 = '5349.00'.&lt;/P&gt;&lt;P&gt;p2&amp;nbsp; = '0.25'.&lt;/P&gt;&lt;P&gt;p3&amp;nbsp; = '123.0000'.&lt;/P&gt;&lt;P&gt;p4&amp;nbsp; = '123.0000'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE:/ 'Case0: Original'.&lt;/P&gt;&lt;P&gt;result_i = CEIL( p1 * p2 / p3&amp;nbsp; * p4 * 100 ).&lt;/P&gt;&lt;P&gt;WRITE:/ result_i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*If we split the steps&lt;/P&gt;&lt;OL style="list-style-type: upper-alpha;"&gt;&lt;LI&gt;SKIP.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;WRITE:/ 'Case1: If we split the steps like below,we can get 133726'.&lt;/P&gt;&lt;P&gt;DATA result_temp_2 TYPE p DECIMALS 2.&lt;/P&gt;&lt;P&gt;DATA result_temp_4 TYPE p DECIMALS 4.&lt;/P&gt;&lt;P&gt;result_temp_2 = p1 * p2.&lt;/P&gt;&lt;P&gt;WRITE:/ result_temp_2.&lt;/P&gt;&lt;P&gt;result_temp_4 = result_temp_2 / p3.&lt;/P&gt;&lt;P&gt;WRITE:/ result_temp_4.&lt;/P&gt;&lt;P&gt;result_temp_4 = result_temp_4 * p4.&lt;/P&gt;&lt;P&gt;WRITE:/ result_temp_4.&lt;/P&gt;&lt;P&gt;result_temp_4 = result_temp_4 * 100.&lt;/P&gt;&lt;P&gt;WRITE:/ result_temp_4.&lt;/P&gt;&lt;P&gt;result_i = CEIL( result_temp_4 ).&lt;/P&gt;&lt;P&gt;WRITE:/ result_i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*If 133725.0000000000000000000000005 is the reason&lt;/P&gt;&lt;OL style="list-style-type: upper-alpha;"&gt;&lt;LI&gt;SKIP.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;WRITE:/ 'Case2: If 133725.0000000000000000000000005 is the reason'.&lt;/P&gt;&lt;P&gt;DATA: f_temp TYPE f.&lt;/P&gt;&lt;P&gt;f_temp = p1 * p2 / p3 * p4 * 100 .&lt;/P&gt;&lt;P&gt;WRITE:/ f_temp.&lt;/P&gt;&lt;P&gt;result_i = CEIL( f_temp ).&lt;/P&gt;&lt;P&gt;WRITE:/ result_i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Why split like this has a different result?&lt;/P&gt;&lt;OL style="list-style-type: upper-alpha;"&gt;&lt;LI&gt;SKIP.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;WRITE:/ 'Case3: Why split like this has a different result with Case1?'.&lt;/P&gt;&lt;P&gt;data: p_temp type p DECIMALS 4.&lt;/P&gt;&lt;P&gt;p_temp = p1 * p2 / p3 * p4 * 100.&lt;/P&gt;&lt;P&gt;write:/ p_temp.&lt;/P&gt;&lt;P&gt;&amp;lt;----&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result is&lt;/P&gt;&lt;P&gt;----&amp;gt;&lt;/P&gt;&lt;P&gt;Case0: Original&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; 133,726&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Case1: If we split the steps like below,we can get 133726&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1,337.25&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10.8720&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1,337.2560&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 133,725.6000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; 133,726&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Case2: If 133725.0000000000000000000000005 is the reason&lt;/P&gt;&lt;P&gt;&amp;nbsp; 1.3372500000000000E+05&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; 133,725&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Case3: Why split like this has a different result with Case1?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 133,725.0000&lt;/P&gt;&lt;P&gt;&amp;lt;-----&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we check abaphelp,we can found:&lt;/P&gt;&lt;P&gt;Determination of a calculation type before the calculation is executed,&lt;/P&gt;&lt;P&gt;taking all operands including the result field into account, is a&lt;/P&gt;&lt;P&gt;feature of ABAP that differs considerably from the way in which other&lt;/P&gt;&lt;P&gt;programming languages perform calculations. To avoid unnecessary&lt;/P&gt;&lt;P&gt;conversions, if possible, all operands and the result field should have&lt;/P&gt;&lt;P&gt;the same numeric data type. Another difference is the decimal rounding&lt;/P&gt;&lt;P&gt;of intermediate results in the calculation type i. In other programming&lt;/P&gt;&lt;P&gt;languages, the decimal places are simply cut off.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So my assumption is:&lt;/P&gt;&lt;P&gt;In case 1,it is calculated with higher internal accuracy which leads to 133726.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Yong Luo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Mar 2013 08:56:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-ceil-command/m-p/9297832#M1725862</guid>
      <dc:creator>former_member215981</dc:creator>
      <dc:date>2013-03-27T08:56:27Z</dc:date>
    </item>
  </channel>
</rss>

