cancel
Showing results for 
Search instead for 
Did you mean: 

In CBTA can We do summation of two variables which are holding values?

Former Member
0 Kudos

I have two values stored in two variables,now I need to add them and store it in another variable ,when I'm using '+' operator to add them it is considering as concatenation instead of plus sign,Now what I need to do?Please help me out in this

Thanks,

Sailaja.

agentry_src
Active Contributor
0 Kudos

Are you actually using SAPUI5? Either or both of the two Answers provided should have given you sufficient insight for a solution.

If you are using SAPGUI, then should you not be asking this question under an ABAP related tag?

Former Member
0 Kudos

Hello Mike,

So sorry about my question here,I'm new to this site
I'l post the same in SAPGUI

Thanks,

Sailaja.

Accepted Solutions (0)

Answers (2)

Answers (2)

jamie_cawley
Advisor
Advisor
0 Kudos
Former Member
0 Kudos

Hello Jamie,

I didnt found this blog is not going to help me in this case.

Thanks,

Sailaja.

jamie_cawley
Advisor
Advisor
0 Kudos

The link provides multiple answers to the problem you describe, such as

var x = +y + +z;

or

var i=2;  
var j=3;  
var k = Number(i) + Number(j); // 5  <br>

if these do not help please provide an example of your issue.

Regards,

Jamie

agentry_src
Active Contributor
0 Kudos

Hi Sailaja,

If you are using (or even if not using) Web IDE, you should take a look at this blog: https://blogs.sap.com/2015/06/16/simple-sapui5-application-for-addition-of-two-numbers-using-sap-web.... Might also want to do a bit more searching, but I did not find all that much out there for your issue.

Regards, Mike

Former Member
0 Kudos

Hello Mike,

No, I'm not using Web IDE. the blog which you provided is not going to help me why because i'm working SAP GUI not web,could you please suggest me anything else?

Thanks ,

Sailaja