Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Function Module to convert Units with defferent Dimension ID's?

Former Member
0 Likes
2,842

Hi,

I got a requirement to Convert Units for one KPI. from source i am getting different kind of Units and i need to convert that units to M3. Source Units have different Dimension ID's compared to M3.

is there any function module available to do this?

i tried with "UNIT_CONVERSION_SAMPLE" .its not working in this case may be because of different dimension ID's

any help on this?

Hi,

I got a requirement to Convert Units for one KPI. from source i am getting different kind of Units and i need to convert that units to M3. Source Units have different Dimension ID's compared to M3.

is there any function module available to do this?

i tried with "UNIT_CONVERSION_SAMPLE" .its not working in this case may be because of different dimension ID's

any help on this?

5 REPLIES 5
Read only

Former Member
0 Likes
1,861

Hi Kool,

try

    CALL FUNCTION 'MD_CONVERT_MATERIAL_UNIT'
    EXPORTING
      i_matnr              = itp_matnr
      i_in_me              = itp_unit_in
      i_out_me             = itp_unit_out
      i_menge              = ltp_menge
    IMPORTING
      e_menge              = ltp_menge
    EXCEPTIONS
      error_in_application = 1
      error                = 2
      OTHERS               = 3.

Regards,

Roy

Read only

0 Likes
1,861

Hi Roy,

Thanks for reply

i tried with the above code but it is not accepting the conversion when the units belongs to different dimension.

in my case if it is in a different dimension also i need to do the conversion.

any help on this?

Read only

0 Likes
1,861

Hi Kool,

sorry for the late reply, but my daughter got born in the meantime!

How can you go from one dimension to the other? I have seen my share of Star Trak, but we are not there yet in this era . I mean how on earth can you convert from meters to cubic meters for instance?

Roy

Read only

Former Member
0 Likes
1,861

Hi,

Anybody has idea about business content object " 0TM_VOL - Conversion to Cubic meter" . did it convert if the units are in different dimension?

i cannot install in my firm to check so, pls help me

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,861

Which kind of unit are you converting ?

  • There is no absolute conversion factor between different dimensions (that's the dimension definition...) so you need a conversion factor, and AFAIK only material master allows this.
  • MD_CONVERT_MATERIAL_UNIT (allows conversion between units in different dimensions (weight, number of, length) if those unit are unit of measure of a single material reference (tabnle MARM). How did you test ?
  • If you know a conversion factor there are other FMs in the function group SCV0 like UNIT_CONVERSION_WITH_FACTOR. (Measurement units)