Skip to Content
author's profile photo Former Member
Former Member

How to declare a variable with a 30 decimals?

Hi everibody!

I'll apreciate so much a code to declare a variable to use 30 decimals to find a especialized value.

Thanks a lot of!

DanielM

Add comment
10|10000 characters needed characters exceeded

2 Answers

  • Posted on Aug 01, 2006 at 02:18 PM

    Hello Daniel,

    I think it is not possible.

    ... DECIMALS n

    This addition only applies to field type P. The field has n

    decimal places for calculations and display, where n can be

    between 0 and 14.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 01, 2006 at 02:45 PM

    Hi Daniel,

    Type P doesnt support 30 decimals so declare a structure which can take integral part and decimal part.

    BUT this make calculations bit diffcult and you need to write code for all calculations.

    TYPES:

    BEGIN OF TY_DEC30,

    INT_VALUE TYPE I,

    SEPARATOR TYPE C VALUE '.',

    DEC_VALUE(30),

    END OF TY_DEC30.

    DATA V_DEC30 TYPE TY_DEC30.

    Thanks,

    Vinay

    Add comment
    10|10000 characters needed characters exceeded