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: 

Convert amount ...

Former Member
0 Kudos
116

Hi all,

Pls help me !!! I want to convert amount,.

Ex: I have amount filed wa-PSWBT, currrency wa-PSWSL.

When debug, I saw wa-PSWBT = 1,423,680

wa-PSWSL = 'VND'

How can I change wa-PSWBT = 1423680 ???? Which 1,423,680 is format number of system.

Thanks !

1 ACCEPTED SOLUTION

Former Member
0 Kudos
85

Try this

data: a(20) type c.

a = '14,23,680'.

*Replace ',' in a with space.

replace all OCCURRENCES of ',' in a with space.

condense a.

write:/ a.

If usefull rewards points helpfull

6 REPLIES 6

Former Member
0 Kudos
85

Hi,

Well probably u can declare the field wa-PSWBT as character of required size and then u can use write statement

For ex :

DATA :L_PSWBT(10).

*U can capture the amount in L_PSWBT.

WRITE L_PSWBT to wa-PSWBT .

Well try it like this if it solves ur problem or incase of any use

reward good points.

Thanks ,

Rahul

Former Member
0 Kudos
85

Hi,

Replace ',' in wa-PSWBT with space.

condense wa-PSWBT.

Regards,

Rama.Pammi

0 Kudos
85

Thanks Rama,

I also thought about this, but if we use REPLACE ',' when we set FM number in system is '.' it will be wrong, right !? How !?

former_member624107
Contributor
0 Kudos
85

Hi

Copy the currency value to a char variable v_char

replace all OCCURRENCES of ',' in v_char with ' '.

Former Member
0 Kudos
86

Try this

data: a(20) type c.

a = '14,23,680'.

*Replace ',' in a with space.

replace all OCCURRENCES of ',' in a with space.

condense a.

write:/ a.

If usefull rewards points helpfull

0 Kudos
85

Raj, thanks so much, but pls tell me how to do if I change FM number in my own data. Change FM eq : 1,245.23 = 1.245,23 ....