Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8950

Re: 'UNIT_CONVERSION_SIMPLE' not giving output

$
0
0

Hi JD,

 

Please find below test program and flow screen.

 

DATA: lv_input  TYPE f,

         lv_output TYPE f.

lv_input = '10.2536'.

 

   CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'

     EXPORTING

       input                = lv_input

       no_type_check        = 'X'

       unit_in              = 'KG'

       unit_out             = 'G'

     IMPORTING

       output               = lv_output

     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.

   IF sy-subrc <> 0.

* Implement suitable error handling here

   ENDIF.


info.PNG

After execute FM.


info.PNG

You have to declare INPUT and OUTPUT as FLTP (F) type. then you will get output information.


Regards,

Praveer.


Viewing all articles
Browse latest Browse all 8950

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>