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

Former Member
0 Kudos
94

I am getting output as 1,000.53.But, I want to remove the comma and the result to be displayed as 1000.53.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
76

hi veeru,

try this replace keyword.


data : var type string value '1,000'.
write var.
replace  all occurrences of ',' in var with ''.
write : / var.

Regards,

Roshani

7 REPLIES 7

Former Member
0 Kudos
76

Hi,

Let, v1 = 1,000.53.

U want 1000.53 in v2.

concatenate v10(1) v12(6) into v2.

Reward points if helpful.

Regards.

Srikanta Gope

Former Member
0 Kudos
76

Hi Veera,

Change the data type I into Data Type C.

Thanks.

Former Member
0 Kudos
76

Goto ->

System -> User Profile -> Own data -> Defaults -> Decimal Notation..

make ur choice parameters without comma...

In ur all reports, you will see decimal numbers without comma...

Reward if useful

Regards

Prax

Former Member
0 Kudos
76

Hi Veera,

You can change this in transaction SU01 in tab defaults. But this is going to change this only for your user...

Regards,

Marcelo Moreira

Former Member
0 Kudos
77

hi veeru,

try this replace keyword.


data : var type string value '1,000'.
write var.
replace  all occurrences of ',' in var with ''.
write : / var.

Regards,

Roshani

former_member183890
Participant
0 Kudos
76

Hi,

There are two ways to do this.

1. Execute transaction SU3 -> Defaults -> Decimal Notation. Altering this will give your results. But this will be for all your transactions.

2. Changing the variable to character format. This is easier and specific to your program only.

Hope it helps. Award points if useful.

- Irudayaraj Peter

Former Member
0 Kudos
76

hi veera,

if ur variable is numeric type then first convert it into a string type variable

data var TYPE p LENGTH 8 DECIMALS 2 value '10000000.86'.

data var1 type string.

write var.

var1 = var.

write : / var1.

Regards,

Roshani