05-05-2007 4:28 PM
Hi,
I am using transaction mm03 to read a material
In the DisplayBasicData1 view i can see the BAse unit of measurement
and also the alternae UOM in the dimensions box.
I need bapi/function module to convert between these material Units
I tried using
MD_CONVERT_MATERIAL_UNIT but it is not giving result
eg for material 1424 chocolate -
basic unit of meaurement - PC
alternate
weight kg 28
net weight 27.9 kg
volume 0.750 M3
it is showing error in result
How can i achieve this conversion - using some bapi
or func module ?
please help me with the input fields also as i do not have much knowledge about the input fields in ABAP.
Thanks
Points assured for help
Message was edited by:
shobhendra srivastava
05-05-2007 6:33 PM
Hi
Use the fun module
UNIT_CONVERSION_SIMPLE
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
input = p_act_in
unit_in = p_uom_in
unit_out = w_unit_out
IMPORTING
output = w_act_out
EXCEPTIONS
conversion_not_found = 1
division_by_zero = 2
input_invalid = 3
output_invalid = 4
overflow = 5
type_invalid = 6
units_missing = 7
unit_in_not_found = 8
unit_out_not_found = 9
OTHERS = 10.
reward points if useful
Regards
Anji
05-07-2007 4:43 AM
Hi Anji,
EXPORTING
p_act_in 5
p_uom_in KG
w_unit_out G
It shows
Exception INPUT_INVALID
Message ID BM
Mesaage No 310
Please use an number field for the input value
05-07-2007 5:11 AM
Hi Anji ,
MD_CONVERT_MATERIAL_UNIT is givin the output
if the data is maintained in the basicdata1 view - additional daat - uom
I/P Params,
MATNR - Material,
I_IN_ME - Alternate UoM - MEINH
I_OUT_ME - Base UoM - MEINS
I_MENGE - Quantity
O/P Params,
E_MENGE - Quantity
===============
UOM is MEINS
AUOM is MEINS
Can you tell me a bapi by which i can get these fields for any material?
Thanks