Skip to Content
avatar image
Former Member

Formatting a FLTP number??

Hi All,

I am showing a number of type FLTP in my WD Table. It is fromatted as 5,200000000000001E-02.

I need to format this on UI as 0,052.

How can I do this?

Thanks

Johannes

P.S.: The system is on SAP EHP 1 for SAP NetWeaver 7.0

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Aug 09, 2011 at 08:27 AM

    Is the type of FPLT which you are showing is same as the TYPE of the attribute which you have binded in WD?

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hello Johannes,

      For this you need to write the logic and there is no built-in support for this in webdynpro. you can try the following logic

      data lv_target type char22.
      data lv_source type f value '5,200000000000001E-02'.
      
      write lv_source EXPONENT 0 to lv_target. "to remove the exponent
      
      shift lv_target right deleting trailing ' '. "to remove trailing space if any
      
      shift lv_target right deleting trailing '0'. "to remove trailing zeros if any
      
      shift lv_target right deleting trailing ','. "to remove trailing comma if there is no decimal part.
      
      condense lv_target. "to remove the leading space.
      
      

      BR, Saravanan