Skip to Content

0UNit (time) conversion

fm2.pngHI Folks,

we need to convert one key-figure values into H (hours). Currently we have H , STD, TAG as units for this key figure. Tried to use the function module 'RSW_UNIT_CONVERSION'.

But throwing error " INput type" not matched when i ever i execute DTP. . and this FM may not fit for our case bcause we dont have different source and target fields. we have one key figure and 0unit and need to use them as source and target fields in this FM. Need your inputs. screenshots attached.

Thanks.

Raki

fm.png

fm.png (5.5 kB)
fm2.png (11.6 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jan 17 at 07:36 AM

    HI Erdem,

    thanks a lot for reply. I just changed the data type of key figure from Dec to FLTP. then it started to work correctly.

    RegardsDRavi.B

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 16 at 08:34 PM

    Hi Raki,

    Try UNIT_CONVERSION_SIMPLE function. Following sample works fine.

    DATA: lv_output TYPE /BCV/FND_QUANTITY..
    
    CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
      EXPORTING
        INPUT                      = 1
       NO_TYPE_CHECK              = 'X'
       UNIT_IN                    = 'TAG'
       UNIT_OUT                   = 'H'
     IMPORTING
       OUTPUT                     = lv_output .
    
    WRITE :/ lv_output.
    
    Add comment
    10|10000 characters needed characters exceeded