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

Problem with decimal places

Former Member
0 Likes
774

Moderator message: please do not offer points.

I am not unable to get like the below value:-

455.501.363,952, to get this value I am calculating

a = 111.752.052

B = 4.076

c = a * b( a is type char20 and b is also char20)

c = 455.501.364(c is type char20)

but i need to display the c value should be 455.501.363,952

Please help me out in the above issue, <<Text removed>>

Regards

Raju

Edited by: Matt on Nov 18, 2008 1:58 PM

Moderator message: please do not offer points.

I am not unable to get like the below value:-

455.501.363,952, to get this value I am calculating

a = 111.752.052

B = 4.076

c = a * b( a is type char20 and b is also char20)

c = 455.501.364(c is type char20)

but i need to display the c value should be 455.501.363,952

Please help me out in the above issue, <<Text removed>>

Regards

Raju

Edited by: Matt on Nov 18, 2008 1:58 PM

5 REPLIES 5
Read only

Former Member
0 Likes
748

hI,

Goto su01 .....give the user name....then click change...then goto default tab...and select decimal notation as per your requirement.

Regards

Debarshi

Read only

Former Member
0 Likes
748

hi ,

refer this link [url] ;url]

Vikki.

Read only

Former Member
0 Likes
748

Hi Raju,

Declare c as type p with decimals 6.

The following code could help.


DATA:a TYPE p DECIMALS 3, " type char20 would be enough
         b TYPE p DECIMALS 3, " type char20
         c TYPE p DECIMALS 6.

a = '111752.052'.
b = '4.076'.

c = a * b.

Cheers,

Vishnu

Read only

matt
Active Contributor
0 Likes
748

Please do not offer points.

Read only

Former Member
0 Likes
748

Hi,

There are two ways you can achieve this.

1) Goto su01(User Creation) .....give the user name....then click change...then goto default tab...and select decimal notation as per your requirement.

2) Create a variable type C and write the write the resulting set of value from variable c to variable type C.

For Example:-

Data: R type c.

Your Value C = 11444008.00.

Write C to R.

You will get the value in a SAP Format.

Vikas.