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 packed data type variable?

Former Member
0 Likes
485

Hi all,

I have a problem while doing calculations with packed data type variables . As they are saving in the format '0,00'. so unable to do calulations because of ',' .

To convert these fields into str and replacing ',' with '.' is very time consuming because i have many packed data type variables.

Can you please provide any other alternative for over coming this problem? Is there any option while defining these variables?

Thanks,

Vamshi.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
468

Hi VAMSHI KRISHNA,

First check out SU01 Tcode (if u don't have permission then u can ask BASIS to do it)

Enter User Name

Execute

Goto Defaults Tab

Check Out Decimal Notation here... set it 1,234,567.89

SAVE it

Log Off once and again login with the same user id and check the result...

Hope it will solve your problem..

Thanks & Regards

ilesh 24x7

3 REPLIES 3
Read only

Former Member
0 Likes
469

Hi VAMSHI KRISHNA,

First check out SU01 Tcode (if u don't have permission then u can ask BASIS to do it)

Enter User Name

Execute

Goto Defaults Tab

Check Out Decimal Notation here... set it 1,234,567.89

SAVE it

Log Off once and again login with the same user id and check the result...

Hope it will solve your problem..

Thanks & Regards

ilesh 24x7

Read only

0 Likes
468

Hi ilesh,

Thanks for your reply and the problem solved.

Thanks,

vamshi.

Read only

Former Member
0 Likes
468

Hi vamshi,

check this code. It may help you.

data: s type p decimals 2 value '123445.78'.

data: d type p decimals 2 value '123445.78'.

data: sum type p decimals 2.

data f type float.

sum = s + d.

f = sum.

write sum.

write f.

P.S. Execute it and observe the output and spot the differences.

Thanks