2006 Aug 23 3:10 PM
For in_par-value = <b>999.999,66.</b>
REPLACE '.' WITH ' ' INTO in_par-value.
is making in_par-value = <b>999 999,66.</b>
Incase of in_par-value = <b>999.999.999,66</b>
REPLACE '.' WITH ' ' INTO in_par-value.
is making in_par-value as <b>999 999.999,66</b>
But I need it as <b>999 999 999,66</b>
How to achieve this ?
2006 Aug 23 3:13 PM
Another option is to use TRANSLATE.
TRANSLATE in_par-value with '. '.
Regards
Anurag
2006 Aug 23 3:11 PM
2006 Aug 23 3:13 PM
Another option is to use TRANSLATE.
TRANSLATE in_par-value with '. '.
Regards
Anurag
2006 Aug 23 3:15 PM
Hi,
Do this way...
replace all occurances of '.' with ''.
Regards,
Santosh
2006 Aug 23 3:21 PM
If you are on earlier versions and the ALL OCCURANCES is not avaiable it is better to use TRANSLATE. The REPLACE statement will only replace the first hit on the string. You can also do a loop using the replace.
while sy-subrc = 0.
REPLACE '.' WITH ' ' INTO in_par-value.
endwhile.
Regards,
RIch Heilman
2006 Oct 31 6:26 AM
Hi Guys,
How can I replace all occurrences of space with some other character in a given string. Many thanks for your quick responce.
Regards,
Hari
2006 Oct 31 6:34 AM
hi hari,
chk the same..
data : string(10) type c.
string = 'HIT & TRIAL'.
translate string using ' A'.
Write:/ string.
Regards,
nagaraj
2006 Oct 31 6:43 AM
hi ,
Do this way ...
Eg :
Replace all occurrences of '.' in var with ',' .
Thanks and regards
Santosh