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: 

declare field

Former Member
0 Kudos
96

hallow

i wont to declare filed that i get the numbers after divide like 3.25 or 20.25 or 100.55 how?

regards

1 ACCEPTED SOLUTION

Former Member
0 Kudos
79

I always prefer like data dictionary :

data val type vbap-netpr. " Netpr contains 2 decimals..

Thanks

Seshu

4 REPLIES 4

former_member200338
Active Contributor
0 Kudos
79

Hi,

u can declare like this.

Data l_number type p decimals 2.

Regards,

Niyaz

former_member194669
Active Contributor
0 Kudos
79

Hi,

Declare this way

DATA : V_INT TYPE I.

Former Member
0 Kudos
80

I always prefer like data dictionary :

data val type vbap-netpr. " Netpr contains 2 decimals..

Thanks

Seshu

Former Member
0 Kudos
79

Hi Tal,

Declare as <b>TYPE P DECIMALS 2</b>.

DATA:

V_A TYPE P DECIMALS 2 VALUE '25.59',

V_B TYPE P DECIMALS 2 VALUE '11.31',

V_C TYPE P DECIMALS 2.

V_C = V_A / V_B.

WRITE:/ V_C.

Thanks,

Vinay