‎2008 Apr 07 8:34 AM
Hi ,
i develop purchase register when i run this by giving only miro date then it will give me wrong o/p with message
EA could not be converted to TO but when i run this with miro date and perticular tax code the it will give me correct output.
in this report i use the function CALCULATE_TAX_ITEM.
Thanks
Dinesh
‎2008 Apr 07 9:08 AM
Use the function module -> MD_CONVERT_MATERIAL_UNIT.
This will convert the unit if the conversion factor is maintained in material master
‎2008 Apr 07 9:51 AM
hi Jeniphin
can u please explain how to use this function module in
a program with example.
Thanks
Dinesh
‎2008 Apr 07 10:21 AM
Suppose if i want to find the UoM for a material
Use the below Fn. module.
DATA: i_matnr TYPE mara-matnr,
i_in_me TYPE mara-meins,
i_out_me TYPE mara-meins,
i_menge TYPE ekpo-menge, "Input value
e_menge TYPE ekpo-menge. " Your output value
i_matnr = ->material numer.
i_in_me = -> Input unit.
i_out_me = ->to which unit it has to convert.
i_menge = -> Input value.
CALL FUNCTION 'MD_CONVERT_MATERIAL_UNIT'
EXPORTING
i_matnr = i_matnr "Material number
i_in_me = i_in_me "Input unit
i_out_me = i_out_me "Output unit i_menge = i_menge "i/p value
IMPORTING
E_MENGE = e_menge " o/p value
EXCEPTIONS
ERROR_IN_APPLICATION = 1
ERROR = 2
OTHERS = 3
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
ENDIF.