<?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: Round off the numeric fields in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/round-off-the-numeric-fields/m-p/4339490#M1033680</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;USe CEIL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this snippet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA :
   w_p TYPE p DECIMALS 2 VALUE '13.89',
   w_p1 TYPE p DECIMALS 2 VALUE  '12.11',
   w_p2 TYPE p DECIMALS 2.



w_p2  = CEIL( w_p1 ).

WRITE :
  w_p2.
w_p2  = CEIL( w_p ).
WRITE /:
  w_p2.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Aug 2008 04:57:48 GMT</pubDate>
    <dc:creator>bpawanchand</dc:creator>
    <dc:date>2008-08-28T04:57:48Z</dc:date>
    <item>
      <title>Round off the numeric fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/round-off-the-numeric-fields/m-p/4339489#M1033679</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 need a FM to round of the numeric field values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex 13.89 should becomes 14.00&lt;/P&gt;&lt;P&gt;     12.11 should becomes 12.00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2008 04:56:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/round-off-the-numeric-fields/m-p/4339489#M1033679</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-28T04:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: Round off the numeric fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/round-off-the-numeric-fields/m-p/4339490#M1033680</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;USe CEIL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this snippet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA :
   w_p TYPE p DECIMALS 2 VALUE '13.89',
   w_p1 TYPE p DECIMALS 2 VALUE  '12.11',
   w_p2 TYPE p DECIMALS 2.



w_p2  = CEIL( w_p1 ).

WRITE :
  w_p2.
w_p2  = CEIL( w_p ).
WRITE /:
  w_p2.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2008 04:57:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/round-off-the-numeric-fields/m-p/4339490#M1033680</guid>
      <dc:creator>bpawanchand</dc:creator>
      <dc:date>2008-08-28T04:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Round off the numeric fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/round-off-the-numeric-fields/m-p/4339491#M1033681</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;Use " ROUND " function module to round any values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz look at below code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data input type F value '1.749'.
data output type p decimals 2.

CALL FUNCTION 'ROUND'
  EXPORTING
   DECIMALS            = 2
    input               = input
   SIGN                = 'X'
 IMPORTING
   OUTPUT              = output
* EXCEPTIONS
*   INPUT_INVALID       = 1
*   OVERFLOW            = 2
*   TYPE_INVALID        = 3
*   OTHERS              = 4
          .
IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.


write: output.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;thanx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Dhanashri Pawar on Aug 28, 2008 7:06 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2008 04:59:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/round-off-the-numeric-fields/m-p/4339491#M1033681</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-28T04:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: Round off the numeric fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/round-off-the-numeric-fields/m-p/4339492#M1033682</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 check the function module &lt;STRONG&gt;ROUND&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2008 05:00:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/round-off-the-numeric-fields/m-p/4339492#M1033682</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-28T05:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: Round off the numeric fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/round-off-the-numeric-fields/m-p/4339493#M1033683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Function Module is ROUND.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ROUND'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DECIMALS = 0 &lt;/P&gt;&lt;P&gt;input = v_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SIGN = ' ' &lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;OUTPUT = v_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also check the Funciton Modules:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ROUND_AMOUNT&lt;/P&gt;&lt;P&gt;FI_ROUND_AMOUNT&lt;/P&gt;&lt;P&gt;FM HR_IN_ROUND_AMT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~hitesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2008 05:00:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/round-off-the-numeric-fields/m-p/4339493#M1033683</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-28T05:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: Round off the numeric fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/round-off-the-numeric-fields/m-p/4339494#M1033684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;try this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : var(16) type p decimals 6 value '25478.36987',&lt;/P&gt;&lt;P&gt;       val(16) type p decimals 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       CALL FUNCTION 'ROUND'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;          DECIMALS            = 4&lt;/P&gt;&lt;P&gt;           input               = var&lt;/P&gt;&lt;P&gt;          SIGN                = '+'&lt;/P&gt;&lt;P&gt;        IMPORTING&lt;/P&gt;&lt;P&gt;          OUTPUT              = val&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         INPUT_INVALID       = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         OVERFLOW            = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         TYPE_INVALID        = 3&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                 write : val.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2008 05:01:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/round-off-the-numeric-fields/m-p/4339494#M1033684</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-28T05:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: Round off the numeric fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/round-off-the-numeric-fields/m-p/4339495#M1033685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aditya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the following funtion modules:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HR_NZ_ROUNDING_DECIMALS &lt;/P&gt;&lt;P&gt;ROUND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'ROUND'
    EXPORTING
      DECIMALS      = 0
      INPUT         = var1
      SIGN          = '-'
    IMPORTING
      OUTPUT        = var1
    EXCEPTIONS
      INPUT_INVALID = 1
      OVERFLOW      = 2
      TYPE_INVALID  = 3
      OTHERS        = 4.
  IF SY-SUBRC  0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chandra Sekhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2008 05:04:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/round-off-the-numeric-fields/m-p/4339495#M1033685</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-28T05:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: Round off the numeric fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/round-off-the-numeric-fields/m-p/4339496#M1033686</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;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="733588"&gt;&lt;/A&gt;&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;jana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2008 05:04:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/round-off-the-numeric-fields/m-p/4339496#M1033686</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-28T05:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: Round off the numeric fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/round-off-the-numeric-fields/m-p/4339497#M1033687</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;Check out this also. Instead of using FM, simple way to convert....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: a type p LENGTH 8 DECIMALS 2,
      b type i.

a = '17.25' .
b = a .

write b.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2008 05:12:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/round-off-the-numeric-fields/m-p/4339497#M1033687</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-28T05:12:10Z</dc:date>
    </item>
  </channel>
</rss>

