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: 

conversion of decimals

Former Member
0 Kudos
127

hi everybody

i have 2 values, x of type 9,5 decimals

and y 17, 3 decimals

i want to convert x to y, is there a special fm to do that?

anjali

1 ACCEPTED SOLUTION

shishupalreddy
Active Contributor
0 Kudos
85

hi,

Use move or assignment operator to convert x to y .

regards,

6 REPLIES 6

Former Member
0 Kudos
85

Just use MOVE and it should work. Surely, the decimals would be truncated as y has 3 places as compared to 5 for x.

Former Member
0 Kudos
85

hi Anjali,

Try with Move or assignement operator .. it works

Regards,

Santosh

shishupalreddy
Active Contributor
0 Kudos
86

hi,

Use move or assignment operator to convert x to y .

regards,

0 Kudos
85

thanks for the reply

0 Kudos
85

Sai Anjali,

If your problem is resolved please close the thread and it would be nice if you reward points to all helpful answers.

Myself and Santosh did say the same thing but unfortunately you did not like the answers to award points !!

Regards

Anurag

Former Member
0 Kudos
85
REPORT  YCHATEST                                .

DATA : X(15) TYPE P DECIMALS 5 VALUE '12345.12345',
       Y(16) TYPE P DECIMALS 3.

Y = X.

WRITE : Y.

But for type p maximum length is only 16