on 04-26-2007 12:03 PM
Hi,
How do I remove decimal from float (source) to unsigned integer (target) in graphical mapping?
For eg:
Source = 1500.23
Target = 150023
Reg,
Shobhit
why not use replacestring text function
http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi-
Here you need to use a User defined function.
I think the one that is given by Jai Shankar is incorrect.
By using replace string we need to replace the . with some other thing like (,) and i think this want work.
Let me check if i can find the solution for this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need an UDF.
int result;
float input = Float.parseFloat(a);
result = (int)input;
return (result+"");
This UDF takes one input the float value.
Regards,
Jai Shankar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<b>Source = 1500.23
Target = 150023</b>
reading from this case multiply soruce with 10 and then use fornum or formatnum f/n....hope this shud work
Message was edited by:
Prabhu S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.