<?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: Unit conversion in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/unit-conversion/m-p/2020950#M413581</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am testing thins last function but output are always same that input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'MATERIAL_UNIT_CONVERSION'&lt;/P&gt;&lt;P&gt;          EXPORTING&lt;/P&gt;&lt;P&gt;            INPUT                        = l_aux_p_verme&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          KZMEINH                      = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            matnr                        = p_i_almacenwm_matnr&lt;/P&gt;&lt;P&gt;            meinh                        = 'ZCJ'&lt;/P&gt;&lt;P&gt;            MEINS                        = p_i_almacenwm_meins&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          EXTENDED_CONV                = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          TYPE_UMR                     = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          NO_OUTPUT                    = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          CHARGE                       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          CHARG_CUOBJ                  =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          WERKS                        =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;         IMPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          ADDKO                        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          MEINS                        =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            OUTPUT                       = l_verme&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          UMREN                        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          UMREZ                        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          BATCH_CONVERSION_ERROR       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          KZWSO                        =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you see something? Otherwise is better this function because input and output are frees and i have not to do the conversion of verme to long 15 to 9.&lt;/P&gt;&lt;P&gt;But why output is the same that input?  p_i_almacenwm_meins is 'ZTQ'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Mar 2007 16:45:04 GMT</pubDate>
    <dc:creator>former_member582701</dc:creator>
    <dc:date>2007-03-07T16:45:04Z</dc:date>
    <item>
      <title>Unit conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unit-conversion/m-p/2020946#M413577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi people,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using a standard function to convert units in a Stock control report.&lt;/P&gt;&lt;P&gt;I have had two problems.&lt;/P&gt;&lt;P&gt;First, value old import is a quantum of (9,3) and export was a quantum of (15,3) (VEPO-VEMNG). I have had to convert vemng into a quantum (9,3).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: l_vemng LIKE PLFH-MGVGW,&lt;/P&gt;&lt;P&gt;           v_vemng LIKE PLFH-MGVGW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF p_i_almacenmm_vemeh &amp;lt;&amp;gt; 'ZCJ'.&lt;/P&gt;&lt;P&gt;        l_vemng = p_i_almacenmm_vemng.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        CALL FUNCTION 'CF_UT_UNIT_CONVERSION'&lt;/P&gt;&lt;P&gt;          EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          MATNR_IMP           = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          MEINS_IMP           = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            unit_new_imp        = 'ZCJ'&lt;/P&gt;&lt;P&gt;            unit_old_imp        = p_i_almacenmm_vemeh&lt;/P&gt;&lt;P&gt;            value_old_imp       = l_vemng&lt;/P&gt;&lt;P&gt;         IMPORTING&lt;/P&gt;&lt;P&gt;           VALUE_NEW_EXP       = v_vemng&lt;/P&gt;&lt;P&gt;         EXCEPTIONS&lt;/P&gt;&lt;P&gt;           OVERFLOW            = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      p_v_unid_cuar = TRUNC( v_vemng ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second and the unresolved problem is that the return parameter v_vemng is always 0. I have tried with unit type ZTQ to ZCJ. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any idea?&lt;/P&gt;&lt;P&gt;Thx in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Manel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2007 15:45:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unit-conversion/m-p/2020946#M413577</guid>
      <dc:creator>former_member582701</dc:creator>
      <dc:date>2007-03-07T15:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: Unit conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unit-conversion/m-p/2020947#M413578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are Several Function Module...&lt;/P&gt;&lt;P&gt;Check out there functionality as per your requirement...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· CONVERSION_FACTOR_GET&lt;/P&gt;&lt;P&gt;With this function module, you determine the conversion factors for the conversion of a measurement unit into another using the measurement units table. This does not apply to measurement units within a dimension.&lt;/P&gt;&lt;P&gt;The module also returns the number of decimal places to which the values in the unit UNIT_OUT are to be rounded. This also applies to units with no dimension.&lt;/P&gt;&lt;P&gt;The following formula applies for the conversion:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(value in the unit UNIT_OUT) = (value in the unit UNIT_IN) * numerator/denominator + additive constant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· ROUND&lt;/P&gt;&lt;P&gt;With this function module, you round a value to the specified number of decimal places. You can choose between three rounding types:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Rounding up&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Rounding down&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Commercial rounding&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The rounding is performed internally with the same field type as that of the field passed.&lt;/P&gt;&lt;P&gt;Rounding errors can thus occur when rounding a FLOAT value. If you want a high degree of accuracy, the passed field should have the type P.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· SI_UNIT_GET&lt;/P&gt;&lt;P&gt;You pass either a unit or a dimension to this function module to get the SI unit. If you pass both a unit and a dimension, the SI unit for the dimension is returned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· UNIT_CONVERSION_WITH_FACTOR&lt;/P&gt;&lt;P&gt;With this function module, you convert a value according to the factor passed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· UNIT_CORRESPONDENCE_CHECK&lt;/P&gt;&lt;P&gt;With this function module, you can check whether the two units passed belong to the same dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· UNIT_GET&lt;/P&gt;&lt;P&gt;With this function module, you get the appropriate measurement unit for the specified dimension and conversion factor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· UNIT_CONVERSION_SIMPLE&lt;/P&gt;&lt;P&gt;With this function module, you convert a value using the measurement unit table, and round it, if appropriate.&lt;/P&gt;&lt;P&gt;You can also perform the rounding without conversion.&lt;/P&gt;&lt;P&gt;Conversion with this function module requires that the measurement unit table is maintained for both units, and that both units belong to the same dimension, i.e. also that they have dimensions.&lt;/P&gt;&lt;P&gt;The rounding can, however, also be performed for units which have no dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONVERT_TO_LOCAL_CURRENCY - Conversion of currency&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HRCM_AMOUNT_TO_STRING_CONVERT - Convert amount to string&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HRCM_STRING_TO_AMOUNT_CONVERT - Convert amount from string&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLOI_PUT_SIGN_IN_FRONT Move the negative sign from the left hand side of a number, to the right hand side of the number. Note that The result will be left justified (like all &lt;/P&gt;&lt;P&gt;character fields), not right justifed as numbers normally are. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONVERT_TO_FOREIGN_CURRENCY Convert local currency to foreign currency. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONVERT_TO_LOCAL_CURRENCY Convert from foreign currency to local currency &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do Reward Points to replies if found useful...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2007 15:48:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unit-conversion/m-p/2020947#M413578</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-07T15:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: Unit conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unit-conversion/m-p/2020948#M413579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see that the material MATNR and material base UOM MEINS fields are not input in the function interface. If the units that you want to convert are UOMs for the material then you need to pass them too for conversion between the alternate UOMs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2007 15:52:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unit-conversion/m-p/2020948#M413579</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-07T15:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Unit conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unit-conversion/m-p/2020949#M413580</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;Try to use fm&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'MATERIAL_UNIT_CONVERSION'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you need to pass material number and alternative UOM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aRs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2007 15:57:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unit-conversion/m-p/2020949#M413580</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-03-07T15:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: Unit conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unit-conversion/m-p/2020950#M413581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am testing thins last function but output are always same that input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'MATERIAL_UNIT_CONVERSION'&lt;/P&gt;&lt;P&gt;          EXPORTING&lt;/P&gt;&lt;P&gt;            INPUT                        = l_aux_p_verme&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          KZMEINH                      = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            matnr                        = p_i_almacenwm_matnr&lt;/P&gt;&lt;P&gt;            meinh                        = 'ZCJ'&lt;/P&gt;&lt;P&gt;            MEINS                        = p_i_almacenwm_meins&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          EXTENDED_CONV                = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          TYPE_UMR                     = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          NO_OUTPUT                    = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          CHARGE                       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          CHARG_CUOBJ                  =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          WERKS                        =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;         IMPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          ADDKO                        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          MEINS                        =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            OUTPUT                       = l_verme&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          UMREN                        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          UMREZ                        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          BATCH_CONVERSION_ERROR       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          KZWSO                        =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you see something? Otherwise is better this function because input and output are frees and i have not to do the conversion of verme to long 15 to 9.&lt;/P&gt;&lt;P&gt;But why output is the same that input?  p_i_almacenwm_meins is 'ZTQ'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2007 16:45:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unit-conversion/m-p/2020950#M413581</guid>
      <dc:creator>former_member582701</dc:creator>
      <dc:date>2007-03-07T16:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Unit conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unit-conversion/m-p/2020951#M413582</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;This function module converts a quantity from one unit of measurement to another. A requirement for this is that the units of measurement relate to a material. One of them must be the base unit of measure of the material, while the other must be defined as an alternative unit of measure for the material or be capable of being converted to an alternative unit of measure as per table T006.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are recommended declaring the transfer parameters for the quantities and the conversion factors as type F fields since the runtime required for conversion is substantially less than with type P or type I fields and also because the exception OVERFLOW cannot then occur.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the transfer parameters for the conversion factors are of type P (packed number), the system assumes that you require conversion with 5-digit accuracy. If they are of type I (integer), the system assumes that you require conversion with 10-digit accuracy. (See also the documentation on transfer parameter TYPE_UMR.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aRs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2007 16:52:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unit-conversion/m-p/2020951#M413582</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-03-07T16:52:35Z</dc:date>
    </item>
  </channel>
</rss>

