<?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 the values afetr two decimal points... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342203#M1230429</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SAI,&lt;/P&gt;&lt;P&gt;Do one thing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your subroutine&lt;/P&gt;&lt;P&gt;Declare one variable as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: lv_var TYPE P DECIMALS 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now assign your field to this variable.&lt;/P&gt;&lt;P&gt;i.e lv_var = itab-total.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now in script display this variaable &amp;amp;lv_var&amp;amp;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Lokesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Mar 2009 07:16:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-20T07:16:10Z</dc:date>
    <item>
      <title>Remove the values afetr two decimal points...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342185#M1230411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;am doing SD form..in tat i used my own logic to get totals sub-totals, tax and discount....output data s showing correctly...but it displaying more than two decimal points....for some values it showing correctly...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want like this.....100.89&lt;/P&gt;&lt;P&gt;but it s showing like this 100.897...i declare it as string.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can u  guide me in this...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2009 01:07:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342185#M1230411</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-20T01:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the values afetr two decimal points...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342186#M1230412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry for before question small mistake...not to remove have to round off....i declare all this as type STRING..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;am getting output like this....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dis count = 32.75.&lt;/P&gt;&lt;P&gt;sub-total = 622.27&lt;/P&gt;&lt;P&gt;add gst = 43.5575.&lt;/P&gt;&lt;P&gt;total = 665.8075.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but my orginal output is like this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dis count = 32.75.&lt;/P&gt;&lt;P&gt;sub-total = 622.27&lt;/P&gt;&lt;P&gt;add gst = 43.56.&lt;/P&gt;&lt;P&gt;total = 665.81.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2009 01:45:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342186#M1230412</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-20T01:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the values afetr two decimal points...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342187#M1230413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the script write the number of decimals in ( ) and it automatically rounds in display &amp;amp;sub_total10(2)&amp;amp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2009 01:51:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342187#M1230413</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2009-03-20T01:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the values afetr two decimal points...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342188#M1230414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI JOY....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could u please give me in detail if u don mind....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2009 02:09:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342188#M1230414</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-20T02:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the values afetr two decimal points...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342189#M1230415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the script program layout set.. check where the values are getting printed... SE71 &amp;gt; form name &amp;gt; windows....&lt;/P&gt;&lt;P&gt;some where in the code you will find variables in &amp;amp; .....&amp;amp; there change the variables as I mentioned before....&lt;/P&gt;&lt;P&gt;the value in brackets will decide the number of decimals to show.. and rounding will automatically taken care..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2009 02:20:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342189#M1230415</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2009-03-20T02:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the values afetr two decimal points...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342190#M1230416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dis_count = 32.75.&lt;/P&gt;&lt;P&gt;sub_total = 622.27&lt;/P&gt;&lt;P&gt;add_gst = 43.5575.&lt;/P&gt;&lt;P&gt;total = 665.8075.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u want write this in script, then write them in &amp;amp;....(n)&amp;amp; format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&amp;amp;dis_count(2)&amp;amp;   &amp;amp;sub_total(2)&amp;amp;   &amp;amp;add_gst(2)&amp;amp;   &amp;amp;total(2)&amp;amp;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its output will be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;32.75          622.27       43.56         665.81&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will be rounded off two decimals automatically in this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sachin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2009 03:11:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342190#M1230416</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-20T03:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the values afetr two decimal points...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342191#M1230417</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;actually am doing calculatipon in sub routine....from sub routine am passing the values to script.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;guided me in this...can u plls tell me how to declare in script or in sub routine...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2009 03:30:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342191#M1230417</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-20T03:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the values afetr two decimal points...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342192#M1230418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if i write this in script .....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;sub_total(2)&amp;amp; ....like this it is printing the same  &amp;amp;sub_total(2)&amp;amp; not value...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2009 03:35:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342192#M1230418</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-20T03:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the values afetr two decimal points...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342193#M1230419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want the nearest value, just declare a variable with type 'P' 0 decimals, and move the value to this variable then automically it will get rounded off to its nearest value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg: data : gv1 type string value '5.585',&lt;/P&gt;&lt;P&gt;               gv2 type p decimals 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gv2 = gv1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write : gv2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;output: 6&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps!!&lt;/P&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>Fri, 20 Mar 2009 04:15:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342193#M1230419</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-20T04:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the values afetr two decimal points...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342194#M1230420</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 variables as type p decimals 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Soumya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2009 04:20:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342194#M1230420</guid>
      <dc:creator>soumya_jose3</dc:creator>
      <dc:date>2009-03-20T04:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the values afetr two decimal points...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342195#M1230421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if i write this in script .....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;sub_total(2)&amp;amp; ....like this it is printing the same &amp;amp;sub_total(2)&amp;amp; not value...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This would happen if sub_total is either not declared or does nt receieve values properly from callg report &lt;/P&gt;&lt;P&gt;Jus check it&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2009 04:31:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342195#M1230421</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-20T04:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the values afetr two decimal points...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342196#M1230422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi sai,&lt;/P&gt;&lt;P&gt;A program symbol  can contain decimal place data. The option below  overrides the Dictionary definition for the number of decimal places to format this symbol value.&lt;/P&gt;&lt;P&gt;Syntax:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&amp;amp;symbol(.n)&amp;amp;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this will help you out if number of decimal places have to be set &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&amp;amp;sub_total&amp;amp; ---------------&amp;gt; 1,234.560 
&amp;amp;sub_total(.1)&amp;amp;------------&amp;gt;1,234.6 
&amp;amp;sub_total(.4)&amp;amp;-------------&amp;gt;1,234.5600 
&amp;amp;sub_total(0)&amp;amp;---------------&amp;gt; 1,235
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if the problem still persists post back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;K.SIbi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: sibi k  kanagaraj on Mar 20, 2009 5:46 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: sibi k  kanagaraj on Mar 20, 2009 5:47 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: sibi k  kanagaraj on Mar 20, 2009 5:48 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2009 04:46:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342196#M1230422</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-20T04:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the values afetr two decimal points...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342197#M1230423</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;if i give like this in layout...&lt;/P&gt;&lt;P&gt;&amp;amp;sub_total(.1)&amp;amp;...the output contains the same one....its not printing the value......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have assign like this in layout...&amp;amp;subtot(.2)&amp;amp;.....the output also same....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ACTUALLY AM GETTING THE OUTPUT LIE THIS...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;discount = 10.00&lt;/P&gt;&lt;P&gt;subtotal = 450.00&lt;/P&gt;&lt;P&gt;GST = 62.5661 ACTUAL IS: 62.57&lt;/P&gt;&lt;P&gt;tOTAL = 665.8075  aCTUAL ONE IS: 665.81&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BUT I WANT LIKE THIS..I CANT DECLARE DECIMALS BECAUSE CURRENCY KEYS CANNOT BE CONVERTED TO DECIMALS....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2009 05:10:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342197#M1230423</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-20T05:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the values afetr two decimal points...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342198#M1230424</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;How have you declared sub_total and how do u pass it to the form ?&lt;/P&gt;&lt;P&gt;Can you send the code ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2009 05:14:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342198#M1230424</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-20T05:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the values afetr two decimal points...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342199#M1230425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi sai,&lt;/P&gt;&lt;P&gt;          &lt;/P&gt;&lt;P&gt;I get your problem.It needs a detailed explanaiton &lt;/P&gt;&lt;P&gt;you can refer to this wiki&lt;/P&gt;&lt;P&gt;link : [ &lt;A href="https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/currency" target="test_blank"&gt;https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/currency&lt;/A&gt;&lt;EM&gt;Formatting&lt;/EM&gt;in&lt;EM&gt;SAP&lt;/EM&gt;Scripts]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It solves your pronlem exactly i guess.If the problem persists , post back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;K.SIbi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2009 05:20:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342199#M1230425</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-20T05:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the values afetr two decimal points...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342200#M1230426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi this s the coding...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/:	 	PERFORM SUB_TOTAL IN PROGRAM ZSD_CASH_ADDRESS&lt;/P&gt;&lt;P&gt;/:	 	USING &amp;amp;KOMK-SUPOS(I13)&amp;amp;&lt;/P&gt;&lt;P&gt;/:	 	USING &amp;amp;KOMVD-KBETR&amp;amp;&lt;/P&gt;&lt;P&gt;/:	 	USING &amp;amp;KOMVD-KWERT&amp;amp;&lt;/P&gt;&lt;P&gt;/:	 	USING &amp;amp;KOMK-FKWRT&amp;amp;&lt;/P&gt;&lt;P&gt;/:	 	CHANGING &amp;amp;SUBTOT&amp;amp;&lt;/P&gt;&lt;P&gt;/:	 	CHANGING &amp;amp;DISAMO&amp;amp;&lt;/P&gt;&lt;P&gt;/:	 	CHANGING &amp;amp;LV_GST&amp;amp;&lt;/P&gt;&lt;P&gt;/:	 	CHANGING &amp;amp;LV_TOTAL&amp;amp;&lt;/P&gt;&lt;P&gt;/:	 	ENDPERFORM&lt;/P&gt;&lt;P&gt;SU	 	                                                                        &lt;/P&gt;&lt;P&gt;/	 	,,,,,,,,,,,,,,                            &amp;lt;B&amp;gt;DISCOUNT&amp;lt;/&amp;gt;,, &amp;amp;DISAMO(I13)&amp;amp;&lt;/P&gt;&lt;P&gt;/*	 	                                                                        &lt;/P&gt;&lt;P&gt;SU	 	,,,,,,,,,,,,,,                           &amp;lt;B&amp;gt;SUB-TOTAL&amp;lt;/&amp;gt;,, &amp;amp;SUBTOT(I13)&amp;amp;&lt;/P&gt;&lt;P&gt;/	 	,,,,,,,,,,,,,,                  &amp;lt;B&amp;gt;ADD GST(@7%)&amp;lt;/&amp;gt;,, &amp;amp;LV_GST(I13)&amp;amp;&lt;/P&gt;&lt;P&gt;/	 	,,,,,,,,,,,,,,                             &amp;lt;B&amp;gt;TOTAL&amp;lt;/&amp;gt;,, &amp;amp;LV_TOTAL(I13)&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM SUB_TOTAL TABLES IN_TAB  STRUCTURE ITCSY&lt;/P&gt;&lt;P&gt;                        OUT_TAB STRUCTURE ITCSY.&lt;/P&gt;&lt;P&gt;  "tables:vbpa.&lt;/P&gt;&lt;P&gt;  DATA : LV_TOT LIKE KOMK-SUPOS,&lt;/P&gt;&lt;P&gt;         LV_DIS LIKE KOMK-SUPOS.&lt;/P&gt;&lt;P&gt;  "LV_STO LIKE KOMK-SUPOS,&lt;/P&gt;&lt;P&gt;  "LV_DAM LIKE KOMK-SUPOS.&lt;/P&gt;&lt;P&gt;  DATA:    LV_STO TYPE STRING,&lt;/P&gt;&lt;P&gt;           LV_DAM TYPE STRING,&lt;/P&gt;&lt;P&gt;           LV_GST TYPE STRING,&lt;/P&gt;&lt;P&gt;           LV_TOTAL TYPE STRING,&lt;/P&gt;&lt;P&gt;           LV_KBETR  TYPE KBETR,&lt;/P&gt;&lt;P&gt;           LV_LEN TYPE I,&lt;/P&gt;&lt;P&gt;           LVS_KBETR TYPE KBETR.&lt;/P&gt;&lt;P&gt;  DATA: LKWERT_TOTAL  LIKE KOMV-KWERT.&lt;/P&gt;&lt;P&gt;  DATA: L_NAME TYPE TDOBNAME,&lt;/P&gt;&lt;P&gt;        LTW_LINES TYPE TLINE,&lt;/P&gt;&lt;P&gt;        L_VALUE TYPE CHAR255,&lt;/P&gt;&lt;P&gt;        LV_KNUMV TYPE KNUMV,&lt;/P&gt;&lt;P&gt;        L_VBELN TYPE VBELN.&lt;/P&gt;&lt;P&gt;  DATA:P_VBELN TYPE VBAK-VBELN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT SINGLE  KNUMV FROM VBAK INTO LV_KNUMV  WHERE VBELN = T_VBELN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT SINGLE  KBETR FROM KONV INTO LV_KBETR WHERE KNUMV = LV_KNUMV AND KSCHL EQ 'MWST'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT SINGLE  KBETR FROM KONV INTO LVS_KBETR WHERE KNUMV = LV_KNUMV AND KSCHL EQ 'RA00' AND KOAID EQ 'A'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  "Get the value of sub-total&lt;/P&gt;&lt;P&gt;  READ TABLE IN_TAB WITH KEY 'KOMK-SUPOS'.&lt;/P&gt;&lt;P&gt;  IF  IN_TAB-VALUE IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;    CONDENSE IN_TAB-VALUE NO-GAPS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BKK_AMOUNT_STRING_CONVERT'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        AMOUNT_STRING = IN_TAB-VALUE&lt;/P&gt;&lt;P&gt;        DCPFM         = 'X'&lt;/P&gt;&lt;P&gt;        WAERS         = 'SGD'&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        AMOUNT        = LKWERT_TOTAL.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  MOVE LKWERT_TOTAL TO  LV_TOT.&lt;/P&gt;&lt;P&gt;  CLEAR : LKWERT_TOTAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Get the value of Discount&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  "get the gst value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE IN_TAB WITH KEY 'KOMK-FKWRT'.&lt;/P&gt;&lt;P&gt;  IF  IN_TAB-VALUE IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;    CONDENSE IN_TAB-VALUE NO-GAPS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BKK_AMOUNT_STRING_CONVERT'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        AMOUNT_STRING = IN_TAB-VALUE&lt;/P&gt;&lt;P&gt;        DCPFM         = 'X'&lt;/P&gt;&lt;P&gt;        WAERS         = 'SGD'&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        AMOUNT        = LKWERT_TOTAL.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  MOVE LKWERT_TOTAL TO  LV_TOTAL.&lt;/P&gt;&lt;P&gt;  "write lv_total to lv_total decimals 2.&lt;/P&gt;&lt;P&gt;  CLEAR : LKWERT_TOTAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: LV_TOT1 TYPE STRING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  "LV_DIS = 10.&lt;/P&gt;&lt;P&gt;  "if lv_dis ne ''.&lt;/P&gt;&lt;P&gt;  IF LVS_KBETR NE '0.00'.&lt;/P&gt;&lt;P&gt;    LVS_KBETR = LVS_KBETR / 10.&lt;/P&gt;&lt;P&gt;    LV_TOT1 = ( LV_TOT * 100 ) / ( 100 +  LVS_KBETR ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LV_DAM = LV_TOT1 - LV_TOT.&lt;/P&gt;&lt;P&gt;    "endif.&lt;/P&gt;&lt;P&gt;    LV_STO = LV_TOT1 - LV_DAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    LV_STO = LV_TOT.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LV_GST = LV_STO * LV_KBETR / ( 100 * 10 ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LV_TOTAL = LV_STO + LV_GST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE OUT_TAB WITH KEY 'SUBTOT'.&lt;/P&gt;&lt;P&gt;  CLEAR OUT_TAB-VALUE.&lt;/P&gt;&lt;P&gt;  CONDENSE LV_STO NO-GAPS.&lt;/P&gt;&lt;P&gt;  "LV_LEN = STRLEN( LV_STO ) .&lt;/P&gt;&lt;P&gt;  "LV_LEN = LV_LEN - 2.&lt;/P&gt;&lt;P&gt;  MOVE LV_STO TO OUT_TAB-VALUE.&lt;/P&gt;&lt;P&gt;  MODIFY OUT_TAB INDEX SY-TABIX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR LV_LEN.&lt;/P&gt;&lt;P&gt;  READ TABLE OUT_TAB WITH KEY 'DISAMO'.&lt;/P&gt;&lt;P&gt;  CLEAR OUT_TAB-VALUE.&lt;/P&gt;&lt;P&gt;  CONDENSE LV_DAM NO-GAPS.&lt;/P&gt;&lt;P&gt;  "LV_LEN = STRLEN( LV_DAM ) .&lt;/P&gt;&lt;P&gt;  "LV_LEN = LV_LEN - 2.&lt;/P&gt;&lt;P&gt;  MOVE LV_DAM TO OUT_TAB-VALUE.&lt;/P&gt;&lt;P&gt;  MODIFY OUT_TAB INDEX SY-TABIX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE OUT_TAB WITH KEY 'LV_GST'.&lt;/P&gt;&lt;P&gt;  CLEAR OUT_TAB-VALUE.&lt;/P&gt;&lt;P&gt;  CONDENSE LV_GST NO-GAPS.&lt;/P&gt;&lt;P&gt;  "LV_LEN = STRLEN( LV_GST ) .&lt;/P&gt;&lt;P&gt;  "LV_LEN = LV_LEN - 1.&lt;/P&gt;&lt;P&gt;  "MOVE LV_GST(LV_LEN) TO OUT_TAB-VALUE.&lt;/P&gt;&lt;P&gt;  MOVE LV_GST TO OUT_TAB-VALUE.&lt;/P&gt;&lt;P&gt;  MODIFY OUT_TAB INDEX SY-TABIX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE OUT_TAB WITH KEY 'LV_TOTAL'.&lt;/P&gt;&lt;P&gt;  CLEAR OUT_TAB-VALUE.&lt;/P&gt;&lt;P&gt;  CONDENSE LV_TOTAL NO-GAPS.&lt;/P&gt;&lt;P&gt;  "WRITE : LV_TOTAL no-grouping currency 'SGD'. "ROUND 2 DECIMALS 4.&lt;/P&gt;&lt;P&gt;  " LV_LEN = STRLEN( LV_TOTAL ) .&lt;/P&gt;&lt;P&gt;  "LV_LEN = LV_LEN - 2.&lt;/P&gt;&lt;P&gt;  MOVE LV_TOTAL TO OUT_TAB-VALUE.&lt;/P&gt;&lt;P&gt;  "write  OUT_TAB-VALUE to  OUT_TAB-VALUE decimals 2.&lt;/P&gt;&lt;P&gt;  MODIFY OUT_TAB INDEX SY-TABIX.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2009 05:22:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342200#M1230426</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-20T05:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the values afetr two decimal points...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342201#M1230427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI SIBI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this one s for based on currency wise.....i hav the correct output...but the thing is have to round up decimals&lt;/P&gt;&lt;P&gt;to two places....what ever the ouput came mine s ;like this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for eg.&lt;/P&gt;&lt;P&gt;total = 665.5461 mine s 665.55.......am getting the first total...next hav to round off...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2009 05:32:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342201#M1230427</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-20T05:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the values afetr two decimal points...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342202#M1230428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai sai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the table ,&lt;/P&gt;&lt;P&gt;TCURX it contains Decimal Places in Currencies&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can get number of decimals for currency from TCURX table.&lt;/P&gt;&lt;P&gt;then use the FM  SPELL_AMOUNT .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or else you can &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;goto transaction OY01(oh y zero one) and make the country specific setting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;K.Sibi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: sibi k  kanagaraj on Mar 20, 2009 6:59 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2009 05:52:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342202#M1230428</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-20T05:52:34Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the values afetr two decimal points...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342203#M1230429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SAI,&lt;/P&gt;&lt;P&gt;Do one thing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your subroutine&lt;/P&gt;&lt;P&gt;Declare one variable as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: lv_var TYPE P DECIMALS 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now assign your field to this variable.&lt;/P&gt;&lt;P&gt;i.e lv_var = itab-total.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now in script display this variaable &amp;amp;lv_var&amp;amp;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Lokesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2009 07:16:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342203#M1230429</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-20T07:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the values afetr two decimal points...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342204#M1230430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai ,&lt;/P&gt;&lt;P&gt;       Was the problem solved ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;K.Sibi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2009 04:10:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-the-values-afetr-two-decimal-points/m-p/5342204#M1230430</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-23T04:10:08Z</dc:date>
    </item>
  </channel>
</rss>

