Skip to Content
avatar image
Former Member

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

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.

Add comment
10|10000 characters needed characters exceeded

  • 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

    Hello Mike,

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

    Thanks,

    Sailaja.

  • Get RSS Feed

2 Answers

  • Jul 25, 2017 at 01:32 PM

    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-ide/. Might also want to do a bit more searching, but I did not find all that much out there for your issue.

    Regards, Mike

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • Jul 25, 2017 at 01:55 PM
    Add comment
    10|10000 characters needed characters exceeded

    • 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