Skip to Content
author's profile photo Former Member
Former Member

Conversion of unit of measure function module.

Hi All,

Can you let me know the function module that convert the unit of measure from EACH(EA)to cases(CS). I have the material that unit of measure is in EACH(EA). And i have to dispaly in cases(CS).

Regards,

Rakesh Singh

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on May 02, 2005 at 04:22 PM

    Use either

    MATERIAL_CONVERT_QUANTITY or MATERIAL_UNIT_CONVERSION.

    Srinivas

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 03, 2005 at 04:52 AM

    Hi Rakesh,

    Try this Function Module:

    MD_CONVERT_MATERIAL_UNIT

    Im sending you a sample code also.

    *& Form f2121_convert_price

    *&----


    • Convert price to Base UoM

    *----


    • -->P_LV_MEINS Conversion UoM

    • -->P_LV_KBETR Converted Rate

    • -->P_LV_KMEIN Condition unit

    • -->P_LV_MATNR Material Number

    • -->P_LV_KSCHL Condition Type

    ----


    FORM f2121_convert_price USING p_lv_meins

    p_lv_kbetr

    p_lv_kmein

    p_lv_matnr

    p_lv_kschl.

    DATA: lv_imenge LIKE ekpo-menge,

    lv_emenge LIKE ekpo-menge.

    lv_imenge = p_lv_kbetr.

    CALL FUNCTION 'MD_CONVERT_MATERIAL_UNIT'

    EXPORTING

    i_matnr = p_lv_matnr

    i_in_me = p_lv_kmein

    i_out_me = p_lv_meins

    i_menge = lv_imenge

    IMPORTING

    e_menge = lv_emenge

    EXCEPTIONS

    error_in_application = 1

    error = 2

    OTHERS = 3.

    IF sy-subrc = 0.

    p_lv_kbetr = lv_emenge.

    ELSE.

    CONCATENATE text-009 p_lv_kschl INTO v_err_msg.

    ENDIF.

    ENDFORM. " f2121_convert_price

    Hope this helps you.

    Regards,

    Anjali.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 02, 2005 at 06:53 PM

    Rakesh,

    Remember that the Material must be maintained in both the Units of measure before you can convert them unless they belong to the same dimension (eg. KG to G, i.e. kilograms to Grams or MM to CM Millimeters to Centimeters). Judging from your case EA to CS which are dimentionless UoM's you will need all materials involved to be maintained for both EA's and CS's.

    Just thought I should add my 2 cents.

    Rishi

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.