Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to declare a variable with a 30 decimals?

Former Member
0 Kudos

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

3 REPLIES 3

naimesh_patel
Active Contributor
0 Kudos

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.

0 Kudos

Maybe a type float would help.

Regards,

Rich Heilman

Former Member
0 Kudos

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