2007 Dec 27 9:09 AM
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 !
2007 Dec 27 9:26 AM
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
2007 Dec 27 9:17 AM
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
2007 Dec 27 9:17 AM
Hi,
Replace ',' in wa-PSWBT with space.
condense wa-PSWBT.
Regards,
Rama.Pammi
2007 Dec 27 9:21 AM
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 !?
2007 Dec 27 9:18 AM
Hi
Copy the currency value to a char variable v_char
replace all OCCURRENCES of ',' in v_char with ' '.
2007 Dec 27 9:26 AM
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
2007 Dec 28 4:20 AM
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 ....