Application Development and Automation 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: 
Read only

DIVIDING A VALUE BY DECIMAL VALUE

Former Member
0 Likes
819

I am facing problem while dividing a value by decimal value. If i remove decimal point, there wont be problem. how can i solve this.

x = y / 7.5.

1 ACCEPTED SOLUTION
Read only

former_member787646
Contributor
0 Likes
792

Hi

Try this...

Data: z(5) TYPE P DECIMALS 2 VALUE '7.5' .

x = y / z .

Hope it helps.

Murthy

Hi

Try this...

Data: z(5) TYPE P DECIMALS 2 VALUE '7.5' .

x = y / z .

Hope it helps.

Murthy

4 REPLIES 4
Read only

Former Member
0 Likes
792

Sappin,

what problem you are facing?

and what is the type of X?

make type od X

data:X type P decimal 2.

Amit.

Read only

0 Likes
792

let me try tomorrow and get back to you

Read only

0 Likes
792

hi try this code

parameter: y type p decimal 2,

z type p decimal 2.

data: x type p decimal 2.

x = y / z.

write 😕 x.

bye

sachidananda

Read only

former_member787646
Contributor
0 Likes
793

Hi

Try this...

Data: z(5) TYPE P DECIMALS 2 VALUE '7.5' .

x = y / z .

Hope it helps.

Murthy