Skip to Content
avatar image
-1
Former Member

Dealing with FLTP type

I have a table which has 3 columns of type FLTP (length 16, decimal places 16)

Now i need a simple report which should take the input from user for these 3 fields and update the table.

To take the input, SAP wont allow to create selection screen with FLTP type.

so what are my options here, i tried creating the parameters with type P but when i moved the value into table field, the values gets modified.

Example : 0.25435 is being converted to 2,5435000000000002E-01

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jun 09, 2017 at 04:12 PM

    "but when i moved the value into table field, the values gets modified"

    This has nothing to do with selection screens but reflects the well known and documented fact, that you cannot express any decimal number as a binary floating point number.

    See CL_ABAP_MATH how to round.

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 09, 2017 at 08:19 PM

    If you need to store exact decimal values, don't use a FLTP field in your database table, use a DEC (or QUAN/CURR if it's a quantity/currency) or a decimal floating point number (DF16* or DF34*) field. PS: FLTP is a binary floating point number.

    Add comment
    10|10000 characters needed characters exceeded