‎2008 Jul 28 8:50 AM
hi huys,
how to split the value and concotenate the value...
for eg.
i hvave the value like 4.549,50 but i want 4,549.50 like this.
Thanks & Regards,
praveen
‎2008 Jul 28 10:19 AM
First try to change the user settings in SU01.
Here in Default tab define decimal notation as 1,234,567.89.
and check whether changes are reflected or not?
After that also if you are getting the same problem then try the code
data : text(50) value '1.234,56'.
replace all occurrences of ',' in text with '*' .
replace all occurrences of '.' in text with ',' .
replace all occurrences of '*' in text with '.' .
write : / text.
‎2008 Jul 28 9:50 AM
‎2008 Jul 28 10:07 AM
HI,
try this way
PARAMETERS p_val(10) type c .
REPLACE ALL OCCURRENCES OF ',' in p_val with '.'.
replace '.' IN P_VAL WITH ','.
write p_val.
regards
prasanth
‎2008 Jul 28 10:19 AM
First try to change the user settings in SU01.
Here in Default tab define decimal notation as 1,234,567.89.
and check whether changes are reflected or not?
After that also if you are getting the same problem then try the code
data : text(50) value '1.234,56'.
replace all occurrences of ',' in text with '*' .
replace all occurrences of '.' in text with ',' .
replace all occurrences of '*' in text with '.' .
write : / text.
‎2008 Jul 29 8:00 AM
Hi prasad,
my problem is solved while going to the su01 transcaction.
thanq for ur help.
Regards,
praveen.
‎2008 Jul 28 11:43 AM
Hi,
You can use the following code for this,
DATA: str1 TYPE string,
str2 TYPE string,
str3 TYPE string,
itab TYPE TABLE OF string,
text TYPE string,
l_no type String value '4.549,50' .
SPLIT l_no AT '.' INTO: str1 str2 .
SPLIT str2 AT ',' INTO: str2 str3 .
concatenate str1 str2 into str2 separated by ',' .
concatenate str2 str3 into str3 separated by '.' .
write /: str3.
You can do this by using REPLCE also
replace all occurences of ',' in l_no with '.'.
replace first occurence of '.' in l_no with ','.
write : l_no.