‎2014 Oct 28 2:37 PM
Hi Gurus,
I am working on something and need to validate a above mentioned FM.
I don't know what values should I pass to test it in SE37.
Can someone please help?
Regards
Shirley
‎2014 Oct 28 2:49 PM
‎2014 Oct 28 2:49 PM
‎2014 Oct 28 3:04 PM
I did that but did not get any values...I am assuming that If I enter '1' in INPUT and KG in UNIT_IN and LB in UNIT_OUT, I should get 2.20462 when I hit Test..am I wrong somewhere?
‎2014 Oct 28 3:23 PM
Hi Shirley,
There is an interesting reason for this issue - as INPUT parameter is un-typed, SE37 creates and processes it as a character-like value.
Inside the function module there is a call of 'UNIT_CONVERSION_SIMPLE_OLD' FM. It contains the following code:
DESCRIBE FIELD input TYPE lv_type DECIMALS lv_decimals.
IF lv_type <> 'F'
AND lv_type <> 'P'
AND lv_type <> 'I'.
MESSAGE e310 WITH 'INPUT' RAISING input_invalid.
ENDIF.
Since a determined type is 'C' (because of SE37!), you are unlikely to get any result from this function module.
So I suggest to create a simple test program which passes a correctly typed input parameter to check the unit conversion.
Cheers,
Kirill
‎2014 Oct 28 3:25 PM
There are many function, maybe try this one : MD_CONVERT_MATERIAL_UNIT
regards
Fred