<?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 Values to be passed for Function ROUND..... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/values-to-be-passed-for-function-round/m-p/1778876#M335753</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi freinds,plz tell me what are the values to be pass to the function round. suppose i want to round off 56.4456 to only 2 decimals, what value should i pass in,DECIMALS,INPUT,SIGN.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 16 Dec 2006 07:44:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-16T07:44:52Z</dc:date>
    <item>
      <title>Values to be passed for Function ROUND.....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/values-to-be-passed-for-function-round/m-p/1778876#M335753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi freinds,plz tell me what are the values to be pass to the function round. suppose i want to round off 56.4456 to only 2 decimals, what value should i pass in,DECIMALS,INPUT,SIGN.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Dec 2006 07:44:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/values-to-be-passed-for-function-round/m-p/1778876#M335753</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-16T07:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Values to be passed for Function ROUND.....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/values-to-be-passed-for-function-round/m-p/1778877#M335754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;execute the code .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u need to work this out like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tricky part is if u want to see this in the fm input will be character of 200 length .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so u will get an error as the fm will take data types P or F or I and not char .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:
   L_MENGE_P5(16) TYPE P DECIMALS 5,
   L_MENGE_P3(16) TYPE P DECIMALS 3,
   L_ANDEC     like T006-ANDEC value 2.


  L_MENGE_P5 = '56.4456'.

  CALL FUNCTION 'ROUND'
    EXPORTING
     DECIMALS            = L_ANDEC
      input              = L_MENGE_P5     "over here u need to pass other than char
     SIGN                = '+'
   IMPORTING
     OUTPUT              = L_MENGE_P3
   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:/ L_MENGE_P3.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps ,&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Dec 2006 08:10:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/values-to-be-passed-for-function-round/m-p/1778877#M335754</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-16T08:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: Values to be passed for Function ROUND.....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/values-to-be-passed-for-function-round/m-p/1778878#M335755</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;no need fro any FM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this sample code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: a(16) type p decimals 4 .

data: b(16) type p decimals 2 .

data: c(30) .


a = '56.4456'.
write:/ a .

move: a to b .

write:/ b .

write a to c decimals 2 .

write:/ c .

the results will be

a = 56.4456
b = 56.44
c = 56.44&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can see automatic rounding of happenning as well &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anver&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Dec 2006 08:32:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/values-to-be-passed-for-function-round/m-p/1778878#M335755</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2006-12-16T08:32:23Z</dc:date>
    </item>
  </channel>
</rss>

