‎2008 Nov 20 6:32 PM
I am trying to use UNIT_CONVERSION_SIMPLE to convert units. The units I have tested all belong to the VOLUME Dimension. I have tried the following:
Input = 100.00
No_type_check = 'X'
round_Sign = ' '
unit_in = '4G'
unit_out = 'CCM'
When I execute that it gives me an error saying: "Specify at least 1 unit".
I then debugged and found that it is, for some reason, clearing the unit_in and unit_out parameters as soon as you execute. If I debug and reenter the units it says that my input (100.00) is of type C.
I have no idea why either of these things are happening. I am using the FM test tool.
Any ideas?
Regards,
Davis
‎2008 Nov 20 6:42 PM
Hi
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
input = ekpo-ntgew " input amount
unit_in = ekpo-meins " unit in which it is now
unit_out = 'KG' " unit u want to change
IMPORTING
output = ekpo-ntgew " result in new unit
EXCEPTIONS
conversion_not_found = 01
overflow = 02
OTHERS = 03.
menge_floating = ekpo-ntgew * h_menge.
‎2008 Nov 20 6:42 PM
Hi
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
input = ekpo-ntgew " input amount
unit_in = ekpo-meins " unit in which it is now
unit_out = 'KG' " unit u want to change
IMPORTING
output = ekpo-ntgew " result in new unit
EXCEPTIONS
conversion_not_found = 01
overflow = 02
OTHERS = 03.
menge_floating = ekpo-ntgew * h_menge.
‎2008 Nov 20 6:44 PM
J@y, I misspoke. Here is the updated issue. I realized that the first issue was because I wasn't using the technical names. it is, however, still thinking that any value is of type C.
I am trying to use UNIT_CONVERSION_SIMPLE to convert units. The units I have tested all belong to the VOLUME Dimension. I have tried the following:
Input = 100.00
No_type_check = 'X'
round_Sign = ' '
unit_in = 'M3'
unit_out = 'CM3'
If I debug and reenter the units it says that my input (100.00) is of type C.
I have no idea why this is happening. I am using the FM test tool.
Any ideas?
Regards,
Davis
‎2008 Nov 20 6:53 PM
Hi Davis
when I check in ECC6.0 unit CM3 is not created in EN is the error I am getting in table T006. Check may be thats the reason you are unable to convert the value
‎2008 Nov 20 7:01 PM
CM3 is the technical name (CCM is in T006). You can see CM3 by using table T006a or T006b.
Regards,
Davis
‎2008 Nov 20 7:44 PM
The easiest way to avoid this is to not use the test tool for import fields that are numeric.
You need to write a quick sample program and pass a numeric (type i, f, p) value to the parameter.
‎2008 Nov 20 7:48 PM
Bryan,
Thanks, I just did that and tested it. I have never seen an instance where the test tool couldn't be used so I wasn't sure if it was the tool or not.
Thanks,
Davis