on 12-20-2007 5:48 AM
Hello,
I am trying to compare (one less than or equal to other)
The source fields holds integer values but declared as String.
can I compare between these values without writing UDF?
when I use standard functions, its generating me error message
Are there any Standard functions in PI.7 to cast from string to Integer?
regards,
Nikhil.
Hi Nikhil,
Using UDF u can easily acheive what u want..
Syntax:
amount=Integer.parseInt(g[k]);
where g[k] is kth element of a string array and amount is integer.
Regards,
Pooja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
how can i convert string in to integer??
convert string in to integer + only one value is showing when click on a button supposed i want 22 number but it does not showing it shows only 2
sap.ui.define([ "root/controller/BaseController", "sap/m/MessageToast"], function (BaseController, MessageToast) { "use strict"; return BaseController.extend("root.controller.View1", { onInit: function () { }, onNext: function () { var oRouter = sap.ui.core.UIComponent.getRouterFor(this); oRouter.navTo("View2"); }, btnPress: function (oEvent) { //MessageToast.show(oEvent.getSource().getId() + " Pressed"); var element = oEvent.getSource().getText(); MessageToast.show(element ); this.getView().byId("txtInput").setValue(element); }, function() { alert("2!") } });});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nikhil,
To the best of my knowledge there are no standard functions that cast string to integer . If it would have been equal you could have used EQUALS but less and greater need arithmetic value hece udf is your only option.
Thanks,
Sidhvin
Edited by: sidhvin ,mada on Dec 20, 2007 7:12 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nikhil,
Integer.pareseInt(X): to convert a sting to integer
(X is the string value u need to convert)
new Integer(x).toString(): to convert an integer to string
u can also try these for float values as well, by replacing integer with float.
reward points if useful
Thanks
Hari.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
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.