‎2014 May 22 10:41 AM
Hi experts:
I have a problem using the FM - MD_CONVERT_MATERIAL_UNIT.
When I use the FM in dry run (from SE37) its giving me the correct result.
But whenever I'm calling the same FM from my code, its returning SY-SUBRC = 1 .
Please reply.
------------------------------------------------------
data:fp_menge type menge_d.
CALL FUNCTION 'MD_CONVERT_MATERIAL_UNIT'
EXPORTING
i_matnr = '000000000000005382'
i_in_me = 'E21'
i_out_me = 'E24'
i_menge = 4
IMPORTING
e_menge = fp_menge
EXCEPTIONS
error_in_application = 1
error = 2
OTHERS = 3.
write:/ sy-subrc, fp_menge.
‎2014 May 22 10:47 AM
Hi Partha,
clearly its an application error, please show the declaration of fp_menge in your program. Please write it as shown below and see is it working or not
DATA : fp_menge TYPE ekpo-menge.
‎2014 May 22 10:53 AM
‎2014 May 22 10:55 AM
Please pass correct 'Base Unit of Measure'(MARA-MEINS)
Both 4 parameters are pass by value
MARA-MATNR
MARA-MEINS
MARA-MEINS
EKPO-MENGE
All the values should be the above type.
Regards,
Vadamalai.