on 12-01-2009 10:32 AM
Hi,
I have this currPrice 28771.16 but I need to remove the decimal i.e 2877116. I have done it but my solution also removes all the digits after the decimal which I don't want to remove.
Anyone know how?
Thanks
Hi Sonny,
Multiply that number with 100.
Use the standard arithmetic function multiply
28771.16
Multiply Target
100
Regards
Ramesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abhi,
This amount is related to the currency.
Currency value not occure more than 2 digits after the decimal, thats why i mentioned multiply by 100.
We can use replace function also, here we use the first input as actual input field, 2nd field as . and replaced string(3rd input) is empty then 123.15 becomes 12315, because . is replaceb by empty.
Regards
Ramesh
>
> Hi,
> I have this currPrice 28771.16 but I need to remove the decimal i.e 2877116. I have done it but my solution also removes all the digits after the decimal which I don't want to remove.
>
> Anyone know how?
>
> Thanks
go for the simplest solution as already mentioned by Abhishek. Use the standard string function, replaceAll and replace . with and empty string and you should be good
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
in your case,
first would be the actual field, second will be . and third will be an empty constant
http://help.sap.com/saphelp_nw04/helpdata/EN/43/c4cdfc334824478090739c04c4a249/content.htm -> Function Category: Text
Hi
use Replacestring text function
map first field --- actual field
second----- . (decimal)
third -
(blank)
http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
If need UDF to remove decimal, check the below link
Replacestring will solve your issue
Regards
Abhijit
Edited by: Abhijit Bolakhe on Dec 1, 2009 4:40 PM
Edited by: Abhijit Bolakhe on Dec 1, 2009 4:47 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you use the standard function Replace string...available in Message Mapping itself?
Regards,
Abhishek.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.