Arithmetic operator

Can't you use all Arithmetic operators with characters?

What would the value be of doing this, evenassuming
you can?it's easy:
2 * '.' == ':'
't' - '-' == l
'~' + 'o' == � (that's õ in
html)
'p' ^ -1 == 'd'
sqrt('A') == 'a'
and so on...And if code were written like that, it would be time to get a rope to have a hangin' for the coder...

Similar Messages

  • Error while doing MIRO-Overflow for arithmetical operation (type P) in prog

    Hi ,
    I am getting the error while doing the MIRO  as below-
    Runtime Errors         COMPUTE_BCD_OVERFLOW
    Exception              CX_SY_ARITHMETIC_OVERFLOW
    Date and Time          20.05.2009 10:07:03
    Short text
         Overflow during the arithmetical operation (type P) in program "SAPLMRMC".
    What happened?
         Error in the ABAP Application Program
         The current ABAP program "SAPLMRMC" had to be terminated because it has
         come across a statement that unfortunately cannot be executed.
    What can you do?
         Note down which actions and inputs caused the error.
         To process the problem further, contact you SAP system
         administrator.
         Using Transaction ST22 for ABAP Dump Analysis, you can look
         at and manage termination messages, and you can also
         keep them for a long time.
    Error analysis
         An exception occurred that is explained in detail below.
         The exception, which is assigned to class 'CX_SY_ARITHMETIC_OVERFLOW', was not
          caught in
         procedure "MRM_AMOUNT_QUANTITY_PROPOSE" "(FUNCTION)", nor was it propagated by
          a RAISING clause.
         Since the caller of the procedure could not have anticipated that the
    Please let me know how can this be removed.

    Hi,
    There can be some problem with tolerances set in the customizing.
    In my case, I was getting this error because of delivery date variance. The difference between delivery date maintained in PO and invoice date was huge and hence the multiplication of price of PO and difference  of delivery date was huge and that was the reason for error.
    Similarly in your case also, there will be some tolerance limit problem.
    Please check your tolerance limits set in customizing.
    Regards,
    Mihir Popat

  • ODBC BI Server Bug - arithmetic operation resulted in an overflow

    I am trying to write some really simple .NET code access the Oracle BI Server ODBC driver and it's not working at all.  I've connected fine, however it seems like anything I try to do related to getting database information spits up an error "arithmetic operation resulted in an overflow".
    Here is the code:
    Dim ConnectString As String
    Dim FactoryType As String
    Dim Factory As System.Data.Common.DbProviderFactory
    Dim Connection As System.Data.Common.DbConnection = Nothing
    Dim TablesData As System.Data.DataTable = Nothing
    Dim err As String = ""
    Dim nl As String = Chr(13) + Chr(10)
    Try
        ' Connect to the database via ODBC
        ConnectString = "DSN=BSODBC_7;uid=TheUser10;pwd=************"
        FactoryType = "System.Data.Odbc"
        Factory = System.Data.Common.DbProviderFactories.GetFactory(FactoryType)
        Connection = Factory.CreateConnection
        Connection.ConnectionString = ConnectString
        Connection.Open()
        ' Request a list of tables from the database
        ' ** Tried both with restrictions and without
        ' ERROR on this line:
        ' “Arithmetic operation resulted in an overflow.”
        TablesData = Connection.GetSchema("Tables")
        ' Show the list of tables on the screen in a grid
        ' If it was successful.
        OnScreenGrid.AutoGenerateColumns = True
        OnScreenGrid.DataSource = TablesData
    Catch ex As Exception
        ' Report the error
        err = ex.Message
        If Not (ex.InnerException Is Nothing) Then
            If Not (ex.InnerException.Message Is Nothing) Then
                err = err + nl + nl + ex.InnerException.Message
            End If
        End If
        MsgBox(err, MsgBoxStyle.OkOnly + MsgBoxStyle.Exclamation, "Error")
    Finally
        ' Clean up and Close the DB Connection
        If Not (Connection Is Nothing) Then
            Connection.Close()
            Connection.Dispose()
            Connection = Nothing
        End If
    End Try
    Any Thoughts?  Is this a known bug?  Is there a fix?

    I doubt on line
    OnScreenGrid.DataSource = TablesData
    instead of array as TablesData try to take List object and assign it to OnScreenGrid.DataSource
    just in case check this
    DataGridView.AutoGenerateColumns Property (System.Windows.Forms)
    I might be wrong but just check it

  • Overflow for arithmetical operation (type P) in program.

    Hi experts..
    I had developed a report for showing total receipt and issues and confirmed issue.
    of PQ.
    For all the plant is running fine but only for one plant 2050 its going into dump and error is "Overflow for arithmetical operation (type P) in program." and the code line is
    T_EKET-MNG02 = T_EKET-MNG02 * ( t_mdbs-umrez / t_mdbs-umren ).
    MNG02 IS OF TYPE  Data : "Quan", length =13 , decimal = 3.
    initially : value in Mng02 is =  10       and ratio is 11/8 = 1.375
                  and in the debugging the value is   10*1.375 = 13.75
    but... when i am executing it .. its going into dump and after again checking the MNG02 is showing valude --9765133613.881  and the above error.
    what should i do....
    please help..
    i will award the points for every help...
    thanks

    Hi,
    Are you doing any other calculation for field MNG02 in your program?
    I created a small program with the field and values you have mentioned and it gave me the result 13.75 and no short dump.
    Please check following things:
    When short dump occurs, it shows at which line it has occured. Is it showing that the shortdump has occurs on the line you are talking about here or it is somewhere else.
    Also, when shortdump occurs, it shows a "debugging" button at the top. Hit that button and it will show you exactly where the short dump has occured. What ever this statement is, check what are the values of different variables here.
    Check all these and you might get the answer. Let me know if you still have problem.
    Regards,
    RS

  • Power query from ODBC :"DataSource.Error: Arithmetic operation resulted in an overflow"

    Good day
    Everytime I want to pull data into a query from our servers it gives the error "DataSource.Error: Arithmetic operation resulted in an overflow". What is the reason for this error, and how do I get past this bump.
    Thanks in advance
    Arnoux

    Hey Tristan. Thanks I did that yes.
    For some reason my direct MySQL connection does not want to work.
    I get the following error
    DataSource.Error: MySQL: Unable to find a database provider with invariant name 'MySql.Data.MySqlClient'.
    This error may have been the result of provider-specific client software being required but missing on this computer.  To download client software for this provider, visit the following site and choose at minimum 'MySQL Connector/Net':

  • Overflow during the arithmetical operation (type P) in program "SAPLHRPT

    Hi,
    I am currently facing an issue in payroll posting to accounting in international payroll.A run time error "Overflow during the arithmetical operation (type P) in program "SAPLHRPT" occurs. By reducing the amounts on the balance sheet side payroll posting document is created.

    Hi Asad,
    Does you guys enhancemented this program? I think if it`s standard code, it should give you a error message inform you "amount is too large" or something.
    So double click this dump log, to check whether it is a custom code, if yes, to add "TRY CATCH" and give out a message.
    regards,
    Archer

  • Overflow during the arithmetical operation (type P) in program "SAPLV61A

    hi,
        I am getting this error in VA01(sales order)
    Runtime error              Compute_bcd_overflow
    Except                       Cx_sy_arithmetic_overflow.
    Overflow during the arithmetical operation (type P) in program "SAPLV61A
    Error in particular line is.
    1388           ADD  xkomv-kwert  TO komp-mwsbp.
    Please give me the solution with detail decsription.How to solve with step by step.

    Hi,
    Instead of directly assigning the value to xkomv-kbetr. Store the value in a temporary variable of type p length 13 decimals 2 . Multiply by 10^n to get the correct result.
    Then assign the temp value to xkomv-kbetr.
    Sample Code
    DATA : lv_temp TYPE P length 13 decimals 2.
    lv_temp = ( xkwert * 10^n ) / komp-mgame. 
    Then assign lv_temp to xkomv-kbetr.
    To get proper value, you have to multiply or divide by 10^n .
    Regards,
    DPM

  • Overflow during the arithmetical operation (type P) in program SAPLBBP_FRA

    Hi All
    I am receieving the following error the moment I log onto the SRM system via the browser.
    Overflow during the arithmetical operation (type P) in program SAPLBBP_FRAMEWORK
    Please can you advise what could possibly the problem.
    Thanks in Advance
    Regards
    KC

    Hi
    <b>Please go through this SAP OSS Note which will definitely help -></b>
    Note 857137 - MENUDATA: A "short dump" occurs with several role assignment
    <u>Do let me know.</u>
    Regards
    - Atul

  • VEctor: Problem in arithmetical operation

    The problem with the following code is that when an element is accessed with v.elementAt() the compilation is OK. But if I try to do some arithmetic operation on the element, it won't compile, giving the message -
    VectorDemo.java:36: operator * cannot be applied to java.lang.Object, int
    System.out.println("Result: "+v.elementAt(3)*2);
    Is it because of <Object> type declaration of Vector? If so how to do arithmetic operation with an element of a vector which may have Double, Float or Integer type of elements in the same vector?
    import java.util.*;
    class VectorDemo
         public static void main(String args[])
              Vector<Object> v=new Vector<Object>(3,2);
              System.out.println("Initial size: "+v.size());
              System.out.println("Initial capacity: "+v.capacity());
              v.addElement(new Integer(1));
              v.addElement(new Integer(2));
              v.addElement(new Integer(3));
              v.addElement(new Integer(4));
              System.out.println("Capacity after four additions: "+v.capacity());
              v.addElement(new Double(5.45));
              System.out.println("Current capacity : "+v.capacity());
              v.addElement(new Double(6.08));
              v.addElement(new Integer(7));
              System.out.println("Current capacity : "+v.capacity());
              v.addElement(new Float(9.4));
              v.addElement(new Integer(10));
              System.out.println("Current capacity : "+v.capacity());
              v.addElement(new Integer(11));
              v.addElement(new Integer(12));
              System.out.println("First element : "+v.firstElement());
              System.out.println("Last element : "+v.lastElement());
              System.out.println("Find Result: "+v.elementAt(3));     //<------ if replaced with:
                                    //System.out.println("Find Result: "+v.elementAt(3)*2);
              if(v.contains(new Integer(3)))
                   System.out.println("Vector contains 3.");
              Enumeration vEnum=v.elements();
              System.out.println("\nElements in vector: ");
              while(vEnum.hasMoreElements())
                   System.out.println(vEnum.nextElement()+" ");
              System.out.println();
    }

    Here's the correct code.
    import java.util.*;
    import java.lang.Number;
    class VectorDemo
         public static void main(String args[])
              //initial size is 3, increment is 2
              String s;
              int i=0;
              Vector<Number> v=new Vector<Number>(3,2);
              System.out.println("Initial size: "+v.size());
              System.out.println("Initial capacity: "+v.capacity());
              v.addElement(new Integer(1));
              v.addElement(new Integer(2));
              v.addElement(new Integer(3));
              v.addElement(new Integer(4));
              System.out.println("Capacity after four additions: "+v.capacity());
              v.addElement(new Double(5.45));
              System.out.println("Current capacity : "+v.capacity());
              v.addElement(new Double(6.08));
              v.addElement(new Integer(7));
              System.out.println("Current capacity : "+v.capacity());
              v.addElement(new Float(9.4));
              v.addElement(new Integer(10));
              System.out.println("Current capacity : "+v.capacity());
              v.addElement(new Integer(11));
              v.addElement(new Integer(12));
              System.out.println("First element : "+v.firstElement());
              System.out.println("Last element : "+v.lastElement());
              System.out.println("Result: "+Integer.parseInt(v.elementAt(3).toString())*2);
              if(v.contains(new Integer(3)))
                   System.out.println("Vector contains 3.");
              //enumerate the elements in the vector.
              Enumeration vEnum=v.elements();
              System.out.println("\nElements in vector: ");
              while(vEnum.hasMoreElements())
                   System.out.println(vEnum.nextElement()+" ");
              System.out.println();
    }

  • Arithmetic operations using Picklist field values

    Hi,
    I tried to multiply a picklist field value as below and wanted to store the result in a field (datatype = Integer or Number) using a workflow which triggers based on the Trigger Event "Before modified record saved".
    Criticality = [<plFrequency_of_Occurrence_ITAG>] * 10
    It throws an error:
    "Update Criticality : Value too long for field 'ZNum_0' (maximum size 16). (SBL-DAT-00235)(SBL-ODS-00500)"
    Can't we do arithmetic operations on the Picklist fields? I believe this is because the values are being stored as text??
    Do we have a function to convert the character field to numeric before we perform any arithmetic operations?
    Thanks,
    Sriram

    Hi,
    You're right, you can't perform arithmetic operations with a number and a text. That's why you get the error.
    Today, there's no function you can use to convert a text to a number.
    You'll need to create a SR asking for a Change Request.
    Regards,
    Max

  • [nQSError: 22023] An arithmetic operation is being carried out on a non-num

    Hi All,
    I have created a logical column for rolling period based on a measure. I have used newly created rolling period column to create another column. I have checked the global consistency there were no errors in rpd. I have uploaded the rpd, when I was trying to expand that table in Answers it is giving an error *"State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 22023] An arithmetic operation is being carried out on a non-numeric type. (HY000)"*
    The base measure has aggregation rule. Please help to find resolve this issue.
    Thanks in advance.

    Rolling Amount- "PeriodRolling("Core"."Fact - Sales - Orders"."Order Amount" , -10, 0)"
    Amount- "case when VALUEOF("No_of_Days"."No_of_days") <= 10 then ( "Core"."Fact - Sales - Orders"."Rolling Amount" / 10) * VALUEOF("No_of_Days"."No_of_days") else "Core"."Fact - Sales - Orders"."Order Amount" / VALUEOF("No_of_Days"."No_of_days") end"
    I have created above two measures.
    Expand table means we need click on + symbol besides the table name to select columns, it is not allowing me to click on that + sysmbol.

  • Process chain error:Error in an arithmetic operation in record

    Hi friends ,
    Plz help me ehow to solve the  error: Error in an arithmetic operation in record  in process chains  when loading IP.
    Error in  error messages s:
    Record 1927 :Contents 1100.00 J from field PSWBT cannot be converted in type CURR -
    Record 1927 :Contents 0.00 0 from field BDIF2 cannot be converted in type CURR
    Record 1927 :Contents 0.00 0 from field FDWBT cannot be converted in type CURR -
       what can i do ?
    regards ,
    Pavan

    Hi pawan,
    If you are loading data thru PSA, correct these values in the PSA and reload it again. Best solution would be to correct it in the source system also. If you see the record 1927 in your case has following values for the fields.
    PSWBT - 1100.00 J
    BDIF - 0.00 0
    FDWBT - 0.00 0
    You can see the spaces in between as well as the character 'J'.
    Hence it is giving you this error.
    Correct it in PSA and reload it.
    it will go fine...
    Regards.

  • Using Modulus (%) arithmetic operator with decimals

    When trying to use the arithmetic operator modulus with decimals there seem to be some errors in the results. Is there a restriction on the number/value of decimals that can be used with this operator? Am I perhaps just using it incorrectly?
    example ...
    Double valA= new Double("12.4");
    Double valB = new Double("1236");
    double result = valB.floatValue() % valA.floatValue();
    System.out.println("valB : " + valB );
    System.out.println("valA: " + valA);
    System.out.println("result : " + result);
    produces :
    valB : 1236.0
    valA : 12.4
    result : 8.40003776550293
    But :
    Double valA= new Double("12.5");
    Double valB = new Double("1236");
    double result = valB.floatValue() % valA.floatValue();
    System.out.println("valB : " + valB );
    System.out.println("valA: " + valA);
    System.out.println("result : " + result);
    produces :
    valB : 1236.0
    valA : 12.5
    result : 11.0

    Floating point arithmetic in general is not exact. The problem is that you are expecting exact results.
    In the second example where you use 12.5 and 1236.0 is just so happens that both of those numbers can be represented exactly, so you do get an exact result.

  • Error in arithmetic operation

    All,
    I have the error when loading my data, "error in arithmetic operation".
    I am trying to load e.g.:
    20030412101100 in a DATS field.
    My question:
    <b>How can I remove the 6 digits from the right in my transferstructure?</b>
    Please guide in steps if possible,
    Many thanks!
    Andrew

    Hi dear,
    You can also try SUBSTRING:
    Cut out part of a character string.
    Parameters
    SUBSTRING( <character string>, <offset>, <length> )
    Result
    Part of a character string
    Example
    SUBSTRING( 'ABCD', 0, 3 ) = 'ABC'
    SUBSTRING( 'ABCD', 2, 2 ) = 'CD'
    Hope it help...

  • Evaluating a Character as a arithmetic operator

    I have two double values as variables call them val1 and val2. I also have a character value call it char1 that is an arithmetic operator '+' for example.
    How would I go about making this expression get evaluated from those variables? obviously using val1 char1 val2 doesn't work.

    I guess I needed to explain better why I wanted to be able to take two doubles and then go val1 char val2 where the char holds the operator.
    It's more than just 4 lines because what happens is i'm already under the case of +,-,/,* from a comparison and then i'm looking at another operator off of a stack, so that I can peform the argument operation in the right order. So thats another 4 comparisons plus the code I want to execture for each of the operators. So if I do it that way its 4 original comparison for finding which of the operators it is and then X 4 comparisons for the 4 different cases under each one found... plus the actual code beyond the comparisons.
    I assume there is no way to evaluate a char as an operator.. or convert into something where it can be?

  • Error in arithmetic operation in record

    Hi all
    when I'm loading from flat file i'm getting the following error
    "Error in arithmetic operation in record"
    Also one more error is
    "Error 8" error
    Pl reply with solution asap
    Thanks and Regards
    Shyam

    Hi Shyam,
    Delete Infosource - Source system assignment (with PSA tables etc.).
    Then save (activate) the Infosource (communication structure).
    Then assign source system, create infopackage and load data again.
    Should work fine then.
    Sham'm

Maybe you are looking for