on 05-22-2009 10:33 AM
Hi,
I want to change the comma in the number format to decimal (for decimals' place) and also the thousands' separator should be a comma.
For eg: 3.267,3 should be converted to 3,267.3
Can i use a standard function(which one?, how?) or a user-defined java function(if so, plz give the code)?
Please help.
Thanks,
John
>
> Hi,
>
> I want to change the comma in the number format to decimal (for decimals' place) and also the thousands' separator should be a comma.
>
> For eg: 3.267,3 should be converted to 3,267.3
>
> Can i use a standard function(which one?, how?) or a user-defined java function(if so, plz give the code)?
>
> Please help.
>
> Thanks,
> John
a.replaceAll(".","~");
a.replaceAll(",","@");
a.replaceAll("~",",");
a.replaceAll("@",".");
return a;
a simple approach ...
you can also play around with indexOf and do the exact conversion
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can use replaceString function from Text category.
Mapping:
InputValue(3.267,3) -->
Constant(.) --> replaceString -->
Constant(-) --> replaceString -->
Constant(,) --> replaceString --> OutPut
Constant(.) --> Constant(-) -->
Constant(,) -->
-Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
It can be simply done with a standard function replaceString
replaceString(Source, Constant(","), Constant("$"))
replaceString(Source, Constant("."), Constant(","))
replaceString(Source, Constant("$"), Constant("."))
for help refer to
http://help.sap.com/saphelp_nw04/helpdata/en/4c/b2ad3de2d76b3be10000000a114084/frameset.htm
Regards,
chandra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.