<?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: Remove decimals in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631897#M281969</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;declare the variable as type p decimals 0,&lt;/P&gt;&lt;P&gt;i think this will helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Sep 2006 06:43:29 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-25T06:43:29Z</dc:date>
    <item>
      <title>Remove decimals</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631894#M281966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do i remove the decimals from a variable?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I have 40.587, I want it to become 40. And no rounding off.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2006 06:39:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631894#M281966</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-25T06:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: Remove decimals</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631895#M281967</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;Move the value to the variable of type P and display it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Senthil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2006 06:40:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631895#M281967</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-25T06:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: Remove decimals</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631896#M281968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data: f1 type p decimals 3 value '40.002'.&lt;/P&gt;&lt;P&gt;data:f2 type p.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;f2 = f1.&lt;/P&gt;&lt;P&gt;write:f2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2006 06:42:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631896#M281968</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-25T06:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: Remove decimals</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631897#M281969</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;declare the variable as type p decimals 0,&lt;/P&gt;&lt;P&gt;i think this will helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2006 06:43:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631897#M281969</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-25T06:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Remove decimals</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631898#M281970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;where ever you are outputting your value, add NO-DECIMALS NO-GAP,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;Aditya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2006 06:47:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631898#M281970</guid>
      <dc:creator>former_member184495</dc:creator>
      <dc:date>2006-09-25T06:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: Remove decimals</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631899#M281971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the FM : HR_IN_ROUND_AMT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eXPORTING&lt;/P&gt;&lt;P&gt;AMOUNT : 40.587&lt;/P&gt;&lt;P&gt;RNDOFF : 100&lt;/P&gt;&lt;P&gt;RMDLMT : L&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2006 06:47:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631899#M281971</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-25T06:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: Remove decimals</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631900#M281972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I already did not using type p with or without decimals. But if I have 40.587 it will assign 40857 to the variable.  Im getting the 40.587 from a table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2006 06:47:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631900#M281972</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-25T06:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: Remove decimals</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631901#M281973</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;data var1 type p decimals 3 value '20.455'.&lt;/P&gt;&lt;P&gt;data var2 type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move var1 to var2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write :  / var2.  " 20&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if useful...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2006 06:47:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631901#M281973</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-25T06:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: Remove decimals</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631902#M281974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adrian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just goto the table name, then goto the field, double click the data element, then double click the domain. Check if there is any conversion routine for the field, if it exist double click that and use the FM in ur program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like this.&lt;/P&gt;&lt;P&gt;**CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;   input         = v1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;  OUTPUT        = v3&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         .&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; v3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The 'ALPHA_INPUT' should be the convers exit in the domain of your field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helps.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Senthil&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: senthil kumar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2006 06:53:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631902#M281974</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-25T06:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: Remove decimals</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631903#M281975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adrian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the FLOOR function.&lt;/P&gt;&lt;P&gt;eg. &lt;/P&gt;&lt;P&gt;DATA : w_num type p decimals 3 value '40.587',&lt;/P&gt;&lt;P&gt;       w_num_i type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_num_i = FLOOR( w_num ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now w_num_i will contain 40.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Saurabh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2006 06:53:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631903#M281975</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-25T06:53:39Z</dc:date>
    </item>
    <item>
      <title>Re: Remove decimals</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631904#M281976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I already did that. Using type I, but it just eliminates the period and put them all in the variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From 40.587 to 40587.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is kinda weird...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2006 06:54:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631904#M281976</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-25T06:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: Remove decimals</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631905#M281977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adrian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you try using the FLOOR function?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Saurabh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2006 06:58:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631905#M281977</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-25T06:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: Remove decimals</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631906#M281978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes. I also use the floor function. the decimals keeps sticking to the value. Let's say 40.587, it becomes 40587.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2006 07:02:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631906#M281978</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-25T07:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: Remove decimals</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631907#M281979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;one another concern:&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;in that program attributes, check the field &amp;lt;u&amp;gt;FIXED POINT ARITHMETIC&amp;lt;/u&amp;gt; is selected or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this check box should be selected,to get the exact values.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZSRIM_TEMP25.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : v_p(12) type p decimals 3,&lt;/P&gt;&lt;P&gt;       v_i type i.&lt;/P&gt;&lt;P&gt;       &lt;/P&gt;&lt;P&gt;       &lt;/P&gt;&lt;P&gt;       v_p = '123.456'.&lt;/P&gt;&lt;P&gt;       &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      v_i = floor( v_p ).&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;       v_i = trunc( v_p ).       &lt;/P&gt;&lt;P&gt;       write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; v_i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use either FLOOR or TRUNC in this case,both will return numeric part of your variable to V_I.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here for both options,i am getting 123 to V_I variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;srikanth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Srikanth Kidambi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2006 07:04:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631907#M281979</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-25T07:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: Remove decimals</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631908#M281980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;as Srikanth pointed out in ur program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; goto&lt;DEL&gt;&amp;gt;attributes&lt;/DEL&gt;&amp;gt; check Fixed point arithmetic,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Fixed point arithmetic&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you mark this checkbox, all caluculations in the program will use fixed point arithmetic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do not, packed numbers (ABAP/4 type P, Dictionary types CURR, DEC or QUAN) will be treated as integers when they are used in assignments, comparisons and calculations, irrespective of the number of decimal places defined. Intermediate results in arithmetic calculations will also be rounded to the next whole number. The number of decimal places defined is only taken into account when you output the answer using the WRITE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; this will work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT ZSPELL.

data : v_amt type p decimals 2 value '40.58',
       v_int type i.

v_int = floor( v_amt ).

write : v_int.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Chandrasekhar Jagarlamudi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2006 07:12:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631908#M281980</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-25T07:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: Remove decimals</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631909#M281981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adrian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Program attributes please check the checkbox 'Fixed Point Arithmetic'.&lt;/P&gt;&lt;P&gt;This should solve your problem (along with using the FLOOR function).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Saurabh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2006 07:13:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631909#M281981</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-25T07:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: Remove decimals</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631910#M281982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data: c1 type p decimals 2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2006 07:13:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-decimals/m-p/1631910#M281982</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-25T07:13:57Z</dc:date>
    </item>
  </channel>
</rss>

