<?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 UNIT_CONVERSION_SIMPLE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/unit-conversion-simple/m-p/1810257#M347444</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. I am converting UOM from 'g' to 'lbs' and i'm using UNIT_CONVERSION_SIMPLE function module. My question is how will i make the output in 2 decimals places. I only got rounded off to the nearest whole number. Please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Dec 2006 02:13:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-12T02:13:48Z</dc:date>
    <item>
      <title>UNIT_CONVERSION_SIMPLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unit-conversion-simple/m-p/1810257#M347444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. I am converting UOM from 'g' to 'lbs' and i'm using UNIT_CONVERSION_SIMPLE function module. My question is how will i make the output in 2 decimals places. I only got rounded off to the nearest whole number. Please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2006 02:13:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unit-conversion-simple/m-p/1810257#M347444</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-12T02:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: UNIT_CONVERSION_SIMPLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unit-conversion-simple/m-p/1810258#M347445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe this will help,  all you need to do is pass fields that are TYPE p with Decimals places 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001.

data: out type p decimals 2.

parameters: p_in type p decimals 2 default '1234.67',
            p_uomi type t006-msehi default 'G' ,
            p_uomo type t006-msehi default 'LB'.

call function 'UNIT_CONVERSION_SIMPLE'
  exporting
    input                      = p_in
*   NO_TYPE_CHECK              = 'X'
*   ROUND_SIGN                 = ' '
   unit_in                    = p_uomi
   unit_out                   = p_uomo
 importing
*   ADD_CONST                  =
*   DECIMALS                   =
*   DENOMINATOR                =
*   NUMERATOR                  =
   output                     = out
* EXCEPTIONS
*   CONVERSION_NOT_FOUND       = 1
*   DIVISION_BY_ZERO           = 2
*   INPUT_INVALID              = 3
*   OUTPUT_INVALID             = 4
*   OVERFLOW                   = 5
*   TYPE_INVALID               = 6
*   UNITS_MISSING              = 7
*   UNIT_IN_NOT_FOUND          = 8
*   UNIT_OUT_NOT_FOUND         = 9
*   OTHERS                     = 10
          .
write:/ out.

&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;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2006 02:23:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unit-conversion-simple/m-p/1810258#M347445</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-12-12T02:23:42Z</dc:date>
    </item>
  </channel>
</rss>

