<?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 ABAP Ceiling function in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-ceiling-function/m-p/12143840#M1976282</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;Is there a function in abap for ceiling like in excel?&lt;/P&gt;
  &lt;P&gt;There are two parameter, &lt;/P&gt;
  &lt;P&gt;first the number we want to round up&lt;/P&gt;
  &lt;P&gt;second is the multiple number&lt;/P&gt;
  &lt;P&gt;for example&lt;/P&gt;
  &lt;P&gt;&lt;A href="https://exceljet.net/excel-functions/excel-ceiling-function"&gt;https://exceljet.net/excel-functions/excel-ceiling-function&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;So we supply the number and then the significance.&lt;/P&gt;
  &lt;P&gt;10 significance 3 = 12&lt;/P&gt;
  &lt;P&gt;Thanks &lt;/P&gt;
  &lt;P&gt;Sam&lt;/P&gt;</description>
    <pubDate>Sat, 15 Feb 2020 10:39:58 GMT</pubDate>
    <dc:creator>former_member641612</dc:creator>
    <dc:date>2020-02-15T10:39:58Z</dc:date>
    <item>
      <title>ABAP Ceiling function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-ceiling-function/m-p/12143840#M1976282</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;Is there a function in abap for ceiling like in excel?&lt;/P&gt;
  &lt;P&gt;There are two parameter, &lt;/P&gt;
  &lt;P&gt;first the number we want to round up&lt;/P&gt;
  &lt;P&gt;second is the multiple number&lt;/P&gt;
  &lt;P&gt;for example&lt;/P&gt;
  &lt;P&gt;&lt;A href="https://exceljet.net/excel-functions/excel-ceiling-function"&gt;https://exceljet.net/excel-functions/excel-ceiling-function&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;So we supply the number and then the significance.&lt;/P&gt;
  &lt;P&gt;10 significance 3 = 12&lt;/P&gt;
  &lt;P&gt;Thanks &lt;/P&gt;
  &lt;P&gt;Sam&lt;/P&gt;</description>
      <pubDate>Sat, 15 Feb 2020 10:39:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-ceiling-function/m-p/12143840#M1976282</guid>
      <dc:creator>former_member641612</dc:creator>
      <dc:date>2020-02-15T10:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Ceiling function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-ceiling-function/m-p/12143841#M1976283</link>
      <description>&lt;P&gt;The link says: "The Excel CEILING function rounds a given number &lt;EM&gt;up&lt;/EM&gt; to the nearest specified multiple. CEILING works like the MROUND function, but CEILING &lt;EM&gt;always rounds up&lt;/EM&gt;."&lt;/P&gt;&lt;P&gt;So,&lt;/P&gt;&lt;P&gt;10 significance 3 = 12&lt;/P&gt;&lt;P&gt;If I understand well:&lt;/P&gt;&lt;P&gt;10 / 3 = 3.333 rounded up to the closest integer = 4 and multiply it by 3 = 12&lt;/P&gt;&lt;P&gt;Code with &lt;A href="https://help.sap.com/doc/abapdocu_753_index_htm/7.53/en-US/index.htm?file=abendec_floating_point_functions.htm"&gt;round&lt;/A&gt;:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;METHODS ceiling&lt;BR /&gt;  IMPORTING number TYPE numeric multiple TYPE numeric&lt;BR /&gt;  RETURNING VALUE(result) TYPE decfloat34.

METHOD ceiling.
  result = round( val = EXACT( number / multiple ) dec = 0 mode = cl_abap_math=&amp;gt;ROUND_UP ) * multiple.
ENDMETHOD.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;NB: I didn't test...&lt;/P&gt;</description>
      <pubDate>Sat, 15 Feb 2020 13:06:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-ceiling-function/m-p/12143841#M1976283</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-02-15T13:06:40Z</dc:date>
    </item>
  </channel>
</rss>

