Numeric Values Converted to Scientific Notation

My BPEL process converts numeric values to scientific notation (eg. 12345678 is converted to 1.2345678E7). This then causes problems when I try to perform any mathematical operations on these values during an XSL transformation (output - NaN)
Is there any way I can stop this data conversion?
This occurs with BPEL 10.1.2.0.2. I'm loading the data from an Oracle 9.2 database using the DbAdapter.
I've written an XSL routine to convert these values back to the correct decimal notation, but would prefer to stop this happening rather than workaround the problem.

On further investigation, this occurs for values loaded from Oracle FLOAT database type.
The XSD generated for the DbAdapter uses type xs:double for this field, but I've also tried changing this to xs:decimal & xs:float and still get the same problem.

Similar Messages

  • Numeric value changed to scientific notation when export to excel

    Hi All,
    I have a value like 200077776666 in af:table , it's a bank account number.
    when I use exportCollectionActionListener export the table to excel,the number shows as 2.00078E+11.
    I have tried the following methods:
    1.change the outputText's converter to javax.faces.Character , it does not work.
    2.change the value #{row.AccountNumber} to '#{row.AccountNumber},which has a ' in front , and the excel file will show the value with a obviously ' at front.
    How can I make it just show as 200077776666 in excel file ?
    version: Jdev11.1.2
    Thanks!
    Mod: font fixed
    Message was edited by: PhHein

    User, please don't use this very big, fat font to write your posts. This make it really hard to read (on tablets or phones).
    What is the data type of the cell in the af:table? Is it a number? In this case an easy solution would be to change the data type of the underlying eo/vo to string. If you can't do this you can add a transient attribute in the eo (or vo if you don't have a eo) which returns the account number as string.
    Exporting this attribute should give you the desired result.
    If this does not help you can use POI which lets you write navtive excel files.
    Timo

  • Convert from scientific notation

    Can someone help me with this? I cannot get this working even using some of the tips I found on this site and elsewhere:
    Round this and format this with 2 decimals: '-2.58069E-11'.
    Now I realize this would end up -2.58, but it is giving me an error instead.
    Error converting data type varchar to numeric.
    SELECT CAST('2.58069E-11' AS NUMERIC(24,2))
    SELECT CAST('2.58069E-11' AS NUMERIC(24,12))
    I tried 12 just to make sure that there was enough room for the decimals
    If I use ISNUMERIC, it returns 1, so SQL Server considers it a number (at least with that function)
    The next example works, but it is not what I want.
    SELECT CAST('2.58069E-11' AS REAL) just returns the same thing with the 'E', (as REAL, of course)
    In these example I haven't done the rounding yet.
    I get all kinds of negative and positive numbers with different decimal lengths, but the scientific notation is particularly tricky.

    Before I put this to bed, I have found out both the above solutions are wrong when using a regular decimal:
    Try this:
    SELECT CAST(CAST('-1131658.27' AS REAL) AS NUMERIC(24,2))
    And this:
    SELECT CAST(CONVERT(REAL, -1131658.27) as DECIMAL(24,12))
    They both yield -1131658.25, and -1131658.250000000000, respectively.
    This is probably some floating point error, but how do I take care of it?

  • How to convert from scientific notations to double value ?

    Hi all,
    i need to convert a string 2E-23 to corresponding double values so that i can compare it one more existing double value. Is there any API present for this ?
    Thanks and regards,
    rosamama.

    Note: This thread was originally posted in the Swing forum, but moved to this forum for closer topic alignment.

  • Float Data Value and Scientific Notation

    Hello All,
    SQL Server converts some of the float value into scientific notation for example 0.00001 will be stored as
    1E-05.
    Is there any simple method\formula\threshold to precisely tell when some particular value will be converted to scientific notation?
    Also I think oracle store same value above i.e. 0.00001 as it is with float data type but not the case with SQL Server. Any reason for the same?
    Thanks in Advance.
    -Malkesh

    Thanks Erland.
    I got your point that internal storage as you mentioned will be 53 bit and 11 bit exponent of 2. However my question remains the same that is there any method\threshold from which we can say that after this numeric value stored data will be represented in
    scientific notation or any rule of thumb? For example
    drop
    table #t
    CREATE
    TABLE #T (T1
    FLOAT)
    INSERT
    INTO #T (T1)
    SELECT 0.000001
    INSERT
    INTO #T (T1)
    SELECT 0.00001
    INSERT
    INTO #T (T1)
    SELECT 0.0001
    INSERT
    INTO #T (T1)
    SELECT 0.001
    INSERT
    INTO #T (T1)
    SELECT 0.01
    INSERT
    INTO #T (T1)
    SELECT 0.1
    INSERT
    INTO #T (T1)
    SELECT 1.
    INSERT
    INTO #T (T1)
    SELECT 1.0
    INSERT
    INTO #T (T1)
    SELECT 1.01
    INSERT
    INTO #T (T1)
    SELECT 1.001
    INSERT
    INTO #T (T1)
    SELECT 1.0001
    INSERT
    INTO #T (T1)
    SELECT 1.00001
    INSERT
    INTO #T (T1)
    SELECT 1.000001
    INSERT
    INTO #T (T1)
    SELECT 1.0000001
    INSERT
    INTO #T (T1)
    SELECT 1.00000001
    INSERT
    INTO #T (T1)
    SELECT 1.000000001
    INSERT
    INTO #T (T1)
    SELECT 1.0000000001
    INSERT
    INTO #T (T1)
    SELECT 1.00000000001
    INSERT
    INTO #T (T1)
    SELECT 1.000000000001
    INSERT
    INTO #T (T1)
    SELECT 1.1
    INSERT
    INTO #T (T1)
    SELECT 10.1
    INSERT
    INTO #T (T1)
    SELECT 100.1
    INSERT
    INTO #T (T1)
    SELECT 1000.1
    INSERT
    INTO #T (T1)
    SELECT 10000.1
    INSERT
    INTO #T (T1)
    SELECT 100000.1
    INSERT
    INTO #T (T1)
    SELECT 1000000.1
    INSERT
    INTO #T (T1)
    SELECT 10000000.1
    INSERT
    INTO #T (T1)
    SELECT 100000000.1
    INSERT
    INTO #T (T1)
    SELECT 1000000000.1
    INSERT
    INTO #T (T1)
    SELECT 10000000000.1
    INSERT
    INTO #T (T1)
    SELECT 100000000000.1
    INSERT
    INTO #T (T1)
    SELECT 1000000000000.1
    SELECT T1
    FROM #T
    Here you can see value < 0.0001 i.e. 0.00001 and 0.000001 both are in scientific notation. So which rule or formula drives this behavior that is what my question is. Sorry I am somewhat poor in mathematics fundamentals So if you can make it simple.
    Thanks Again.

  • Internal table data 1E2 automatically convert to scientific format

    Dear all,
    I have been searched for solution moths from the forums and tried all possible methods, but still no way to solve my above problem.  I found a way to solve it partially for us, but may be very helpful for others who meet similly case like mine, so I posted here.
    my problem is when I export my internal table data to Excel, the Cell data with 1E2 auto becomes 1.00E02, and 1E8 becomes 1.00E08, we need it to be 1E2 and 1E8 in excel.
    you can recreate my problem by
    1,  input 1E2 into your Microsoft Excel, then Enter, it will auto change into scientific format. which is we do not want.
    2, use any of your SAP system open any table as long as there is a Char (>3) field in that table. add some
    data entry in that field in the form "any amount (<15) of numeric 1 to 9"E"any one or two numeric 1 to 9". such as, 123E2, 1234E12 etc. then save this table's data to local file spread sheet, or use any FM to download it to a Excel file, when you open this
    file by Excel, the cell with above form will display as scientific. but
    if you put three or more numeric after the "E", such as 123E123 it will
    display correctly.
    what I have done:
    I searched in SCN for similar thread:
        Export to Excel 2007 - item number problem
        Exceding the limit of numbers in Excel at target side
        Excel download cell format problem
        Formating as Text in excel through SAP
        Converting of amount field into excel file through GUI DOWNLOAD
        Data downloaded to excel gets converted to exponential format.
        Problem with Excel download   and scientific number
        Re: Issue in displaying numbers in Excel?
        CSV Flat File Data Problem (Number converting to Scientific Notation)
    Tested accordingly, But none of these works in our case. because our
    ultimate receiver of email attachment will be external third party, we cannot ask
    them to change anything in their Excel.
    Search Microsoft help about Excel, http://support.microsoft.com/kb/214233,
    and it says this "Automatic Number Formatting" is a normal behaviour of excel.
    no way to turn it off, the "work-around" way that Microsoft provides is not suitable for our
    case.
    We test CL_iXML recently arrording to weblog http://wiki.sdn.sap.com/wiki/display/Snippets/FormattedExcelasEmailAttachment
    it successful controled the format. so this could be a solution for others whose internal table size is small. but our 2MB internal table bocome 6MB when converted to xml file attachment, which cannot be received by our end user's mail box. too big.
    So please advise your ideas.
    Many thanks in advance!
    Peter Ding
    Thank you very much for your time!

    Hi,
    You can achieve this by describing the spreadsheet in XML with the help of the DOM classes.
    The later releases of Excel can read and save spreadsheets as XML, providing your release supports this you can achieve it.
    Check out the following Wiki
    [Excel - XML|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/exporting%2bdata%2bto%2bexcel%2b-%2bxml%2bto%2bthe%2brescue]
    Regards,
    Darren

  • Double in Scientific Notation after Marshal

    Hi,
    I have an element defined as an xsd:double. If I try and place a value say 100 into the element and then I marshal it I get an output of <Quantity>100.0</Quantity>... That is fine....
    However, if I put a value in of say 1000000000, I get an output of <Quantity>1.0E9</Quantity> when I marshal.
    Can I turn a setting on (or off) so the output does not get converted into scientific notation?
    -j

    I also verified the XML standard and you are right that the values are legal xsd:double values. What made this a problem for me is that the XSLT functions that use XPATH number() to process these values failed because XPATH specifies that a number is:
    Number ::= Digits ( '.' Digits?)? | '.' Digits
    which does not handle the exponents at all. So the XML documents produced could not be handled by XSLT processors.
    For fun, I redefined my schema definition to replace xsd:double with:
    <xs:simpleType name="simpleDouble">
         <xs:restriction base="xs:double">
              <xs:pattern value="(-)?[0-9]*(.[0-9]+)?" />
         </xs:restriction>
    </xs:simpleType>
    which is essentially a non-exponent based double. JAXB rendered the document, but then the validator complained that the output did not match the pattern. So JAXB does not use this pattern as a method of determining output, only as a method of validation.
    This is why I replaced the DoubleType class for my solution. The alternative of using the jaxb:globalBindings is probably a cleaner approach. I think I'll switch my implementation. Thanks for the pointer!
    -Allan

  • Scientific Notation when Downloading Reports

    When downloading reports from a web template, in either Excel or CSV, some values are getting converted to scientific notation in the downloaded file. I am wondering if there is a setting which prevents any data to be converted to scientific notation when downloading. The data appears to be fine when viewing the report in Web.

    Hi Ripel
    You have downloaded the file to CSV which is also excel based format and uses most of the Excel's features, and when data is CSV file is in scientic foirmat , same will come in notepad..just do one thing select the format as number in the csv file by selecting column...and save it...in csv/notepad you will now see actual value
    Thanks
    Tripple k

  • Numeric value and scientific notation

    Hi,
    with Oracle 8 or 10, the query (via TOAD or my app : Delphi + BDE)
    SELECT 0.0008 FROM DUAL returns 0.0008,
    but the query
    SELECT 0.00008 FROM DUAL returns 8E-5.
    Is there a way to avoid this display in scientific notation, except changing all my queries ? Or to push the limit for this display one digit later ?
    Maybe with an Oracle parameter ?
    Thanks for your help !

    duplicate for thread
    numeric value and scientific notation

  • Convert scientific notation value into normal number

    hi,
    I am importing excel(.csv) file into Oracle database, a value in excel file 8.70773E+11 is displaying in scientific notation format, i want to store it like 870772521002.

    i have already run this query, it gave me 871000000000.0000000000 this result.
    Table Structure,
    SQL> desc cdr;
    Name Null? Type
    INVOICENO VARCHAR2(50)
    OCEANREGION NUMBER
    CALLDATE DATE
    CALLTIME VARCHAR2(10)
    ORIGINATORNO                             VARCHAR2(50)
    SUBSCRIBER VARCHAR2(75)
    DESTNO VARCHAR2(50)
    VOLUME FLOAT(50)
    UNIT VARCHAR2(5)
    this above Originatorno field had Number data type, but it wasnt working.

  • Scientific notation in numeric fields

    I need to be able to input scientific notation in numeric fields for my adobe forms.  I can put the pattern to num{9.99E} and it will allow me to put positive exponents and negative exponents to -3.  However, I need to input the number 4.76E-19 and it always changes it to 0.00E0.  What kind I do to keep this small of a number as 4.76E-19?

    Hi,
    Unfortunatly in approach with text field numbers will not be formatted in scientific  notation, users will have to type numbers in correct format.
    In approach with NumericField and patter {9.99E} i think there is some bug.
    I can type this number:
    After i lost focus from this field it will be formatted in tis style:
    And sfter button click i will get this:
    For big values everything working fine.
    Is this bug!?
    BR

  • Converting from a double to scientific notation

    does anyone know how I can convert a double value to scientific notation?

    java.text.DecimalFormat can do that.

  • Function module to convert character value of month into numeric value?

    Hi Experts,
                     I need to convert a character value of a month in three alphabets to its numeric value.
    e.g. 'jun' should be converted into '06' and 'jan' into '01' using a function module.Can anybody please provide me a similar function module?
    TIA
    Abhishek

    try this code:
    DATA: text(20) TYPE c,
    date TYPE sy-datum.
    text = '06. Jul 06'.
    TRANSLATE text TO UPPER CASE.
    TRANSLATE text USING '. '.
    CONDENSE text NO-GAPS.
    CALL FUNCTION 'CONVERSION_EXIT_SDATE_INPUT'
    EXPORTING
    input = text
    IMPORTING
    output = date.
    WRITE date USING EDIT MASK '__.__.____'.
    Regards,
    Dara.

  • How do u convert a numeric value to char

    hi,
    how do u convert a numeric value NUMBER(22) to a character value.... like a to_char() function?
    i've tried the CAST function it won't work.

    Hi,
    Use of CAST function will convert NUMBER to CHAR but it takes a lot of time if there are large number of recrods.
    Syntax:
    CAST(col_name AS char)
    I have tried this, it worked fine for less records.
    Are you getting any error while using cast function or while querying..
    As far as I know it won't give error in these cases (if correct syntax used) but it will take very much time (depending on the number of records) while querying.
    -Vency

  • Display Scientific Notation values in columns

    Hi,
    I have a column in a table that apparently displays the values in
    Scientific Notation. That is, the value in each column is always
    displayed as "6.4211E+15". Each value in this column should be a
    unique or different value. If I type "select * from <table_name>
    where <column_name> != 6.4211E+15;", I still get every row in
    this table. Is there a way to display the full value of this
    column so that I can view the unique value for each of these
    rows? If so, how does one accomplish this?
    Thank you,

    Welcome to SDN.
    do you mean to say that in some rows some column values will be blank and you want to replace the blanks with '-'.
    loop thru the itab which you are passing to tableview and for the blank cells pass '-'.
    <i>Also when the value is inserted at run time</i>
    so you are having editable tableview. to update the value back to the dbtable, you have to read it in oninputprocessing and update it to dbtable .
    search the forum on how to read the user entered value from the table view so that you can update the dbtable.
    Regards
    Raja

Maybe you are looking for

  • Sync Purchased/Downloaded Apple TV content to Itunes

    I have configured quite the home entertainment network replete with a mini, a NAS, a couple ATVs and a couple Airport Expresses over a new wireless N network. All is well. I have been using my ATVs for streaming content from the iTunes share only. Ho

  • Upgrading office machines to Mac Minis?

    Hello all. I work for a small design office (5 total, 3 designers) that is way behind the times in terms of upgrading. My boss has been researching it for some time now as he continues to suck as much life out of his old Macs as possible. Anyhow, bec

  • ANNOUNCEMENT: Adobe Enterprise Developer Program is LIVE!

    I'm happy to announce a brand new developer program targetting individual developers. Benefits include: - Developer licenses of all Adobe enterprise software, including Adobe LiveCycle & Adobe Acrobat - Unlimited e-mail and web based support for 1 ye

  • Archive ZIP files to IXOS

    Hi , Can the FM ARCHIV_CONNECTION_INSERT be used to archive .zip files, to IXOS server ? If no, any other function module that can be used to archive the ZIP files?

  • Simple photo editing software

    Hi, I know this may not be the best section to put it but I was not sure where else it should go, my parents have just bought a new 27" iMac and almost everything is fine however I need a recommendation, I need a piece of software which has a simple