Convert non numeric field

I'm looking for a function that will allow a conversion from a non-numeric field to a numeric field. Any suggestions?

CAST(col as INTEGER) or CAST(col as DOUBLE)

Similar Messages

  • Error when converting a numeric field to XML

    Hi,
            When i run the Adobe intractive form,i am getting following exception
    "Error when converting a numeric field to XML"
    Anyone plz suggest
    Regards,
    vinoth

    Hi Vinoth Raja,
    For resolving the following exception
    "Error when converting a numeric field to XML"
    You have to follow the below link:-
    http://www.saptechies.com/error-when-converting-numeric-field-xml/
    May be it will help you
    Regards,
    Sushma Yadav

  • At new- command - making non-numeric fields as ******* how to correct this

    Hi,
    I am using the following code.
    Tables : vbap.
    DATA: t_vbap TYPE STANDARD TABLE OF vbap,
          x_vbap TYPE vbap.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-000.
    SELECT-OPTIONS: s_vbeln FOR vbap-vbeln.
    SELECTION-SCREEN END OF BLOCK b1.
    START-OF-SELECTION.
      SELECT * FROM vbap
        INTO TABLE t_vbap
        WHERE vbeln IN s_vbeln.
      LOOP AT t_vbap INTO x_vbap.
        at new vbeln.
          write:'new vbeln'.
          ENDAT.
      ENDLOOP.
    In debugging mode, the non-numeric fields on x_vbap becomes ****
    I want to know whether this can be done using oops.. any methods available for at new
    Moderator message: please search for available information/documentation before asking (as you can tell from some of the replies so far)
    locked by: Thomas Zloch on Oct 1, 2010 3:25 PM

    see documentation:
    "If the INTO addition is used in the LOOP statement to assign the content of the current line to a work area wa, its content is changed upon entry into the AT-ENDAT control structure as follows:
    The components of the current control key remain unchanged.
    All components with a character-type, flat data type to the right of the current control key are set to character "*" in every position.
    All the other components to the right of the current control key are set to their initial value.
    When the AT-ENDAT control structure is exited, the content of the current table line is assigned to the entire work area wa. "

  • How do I take two separate non numeric fields in a acrobat form and combine the data to display in a third separate field?

    How do I take two separate non numeric fields in a acrobat form and combine the data to display in a third separate field?

    You have to use custom JavScripting to concatenate the first 2 fields. You cannot use the first 2 calculation options because they force the values of the fields to a numeric value or ignore string values.
    Possible scripts for the 3rd field are:
    event.value = this.getField("Text1").valueAsString + " " + this.getField("Text2").valueAsString;
    or
    event.value = this.getField("Text1").valueAsString.concat( " ",  this.getField("Text2").valueAsString);
    If you do not want change the separator or not show the separator when on or the other field is empty, you will need to add more code to adjust for change.
    The above scripts will also concatenate number because the field values are read as strings and not numbers.
    There is also a generalized user written function to concatenate up to 3 fields with a separator that adjust for missing data.

  • How to convert a numeric field representing UNIX time to a standard report

    Looking for some help on the creation of a formula that will allow me to convert a numeric string which represent Unix time to a standard date format.
    Sample string value "1199149200", Jan 1 2008, 1 AM

    Hi,
    Use the DateAdd formula convert Unix epoch to normal datetime (Unix epoch = number of seconds that have elapsed since January 1, 1970).
    DateAdd("s", 1199149200, datetime("01/01/1970 00:00:00"))
    Cheers,
    Fritz

  • Adding leading zeros to a non-numeric field

    Hello
    I have an application which currently does not validate a field and the user can enter any string on this specific field. The customer wants me to write a view to bring information from a child table which uses the free format field as the key to join.
    Example, the field A is free format, but, we would expect something like "0000001-AB', however the users are inputing '1' or '001-AB'. The client wants to see these cases to be displayed (and joined) as '0000001-AB'. The format is 7 digits + '-' + two digit code.
    I would like to know, how can I display this on a view, since most of my cases are '1' or '001-AB'. But there are others with crazy things like '1+2+3+4' and these cases are giving me an error of "invalid number" since I am using the TO_NUMBER function so far.
    Thanks!
    Eduardo Ferrari

    WITH t AS (SELECT '1' txt FROM DUAL
               UNION
               SELECT '001-AB' FROM DUAL
               UNION
               SELECT '1+2+3+4' FROM DUAL)
    SELECT CASE
              WHEN LENGTH ( (REGEXP_REPLACE (txt, '[-AB]') || '-AB')) < 10
              THEN
                 LPAD ( (REGEXP_REPLACE (txt, '[-AB]') || '-AB'), 10, '0')
              ELSE
                 REGEXP_REPLACE (txt, '[-AB]') || '-AB'      
             end  txt
    from t
    TXT
    0000001-AB
    0000001-AB
    1+2+3+4-ABunion
    Edited by: pollywog on Nov 10, 2010 3:41 PM
    Edited by: pollywog on Nov 10, 2010 3:53 PM

  • ALV SUM for non numeric fields.

    Hello Gurus,
    I have a requirement where i have a alv output and i have a check field of char 1 length...and it displays X as the output. Now i need to have X at the sum line at the end.is there is any possibility with the fieldcatalogue.

    Hi
    U can not do sum for char type fields,it will only possible for numaric fields.
    This u can do by program,after populating the output data,do the sums for the required fields in program and append that to output table as last record.Display the last row with differant color.
    Regards,
    Raghu/

  • CONVERT NUMERIC TO NON NUMERIC

    Hi experts,
                      How can i convert from numeric field into non numeric field i.e) if i declare a type c  and b type i.
    i want to convert b to type c. how can i do ...help me please....

    Hi Manjula
    use this FM : CONVERT_STRING_TO_INTEGER
    else tyr using Field symbols:
    field-symbols: <fs> type any.
    a type c,
    b type i.
    assign a to <fs>
    move <fs> to b.

  • Null values in Numeric fields of Datasets

    I am wondering if anyone has run into this problem before and
    checking to see if anyone has an elegant solution.
    I have a rather large data set. (actually 5 of them on a
    single page) I am sorting certain columns in a table as numbers so
    i assign the variable " ds1.setColumnType("somenumbercolumn",
    "number")" In most cases Spry works great and it sorts by numbers
    properly. The problem is some of the fields in the XML file are
    null and I am trying to sort them as a number. Spry actually
    adjusts for this (as far as i can tell) and treats them like a 0
    which isn't exactly ideal considering there are real zero values in
    the data. I know spry doesn't currently format numbers:
    So here is my question. Does anyone one have a solution to
    fixing null values in a table so that it is still sortable but
    doesn't display a "0" and instead displays something like "--" or
    whatever. I have the option of editing the XML file as well, but I
    still need the table to sort by number.
    If not null values, how about non numeric fields which can
    still be sorted in a numeric column?

    Hi,
    We have an old post that raised a similar problem with yours.
    The post can be found
    here
    For you situation, you should add an if condition for the
    rows that have 0 and to add a custom string instead 0.
    for (var i = 0; i < numRows; i++)
    if(rows
    [ "field_name"] == 0)
    rows[ "field_name" ] = '--';
    Hope this helps you,
    Diana

  • Non numeric @Id being treated as numeric (EJB3/ADF Faces) [Please Frank]

    Hi,
    I have a non-numeric field (varchar2) defined as such:
    public class DepartmentV implements Serializable {
        @Id
        @Column(name="DEPT_ID", nullable = false)
        private String deptId;
    ...When I run the program, I get the following error:
    Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.8 (Build 060829)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-01722: invalid numberThis is because the column in the table has some non-numerics in it. However the column is defined as varchar, and in the EJB it is defined as String, so why is it being treated as a numeric and how do I fix it?
    many thanks
    R

    Hi,
    tried to reproduce in JDeveloper 10.1.3.2 with no success
    @Entity
    @NamedQuery(name = "Testtable.findAll", query = "select o from Testtable o")
    public class Testtable implements Serializable {
    private Long age;
    @Id
    @Column(nullable = false)
    private String idf;
    private String name;
    public Testtable() {
    public Long getAge() {
    return age;
    public void setAge(Long age) {
    this.age = age;
    public String getIdf() {
    return idf;
    public void setIdf(String idf) {
    this.idf = idf;
    public String getName() {
    return name;
    public void setName(String name) {
    this.name = name;
    Works as designed
    Frabj

  • Large numeric field in a .csv file will not display

    A .csv file contains a numeric field which in some rows contains an 11-digit number (like 14024583126).  These will not display (blank or null).  Some of the rows contain numbers of 5-digits or 7-digits and these display fine.  How can I get the 11-digit numbers to display correctly?
    I have no capability to change the .csv file to make this field type as string.  Would there be a way to convert the numeric field to string?

    Thank you for the formula.  However, the string field displays just like the numeric field did.  If the numeric value in the row is a 5-digit or 7-digit number it converts to text and displays fine.  But if the numeric value in the field is an 11-digit number nothing is displayed after conversion to text.  The numeric field must have some limit on what the size can be.  How can we get around that limitation?
    FYI - the data I'm trying to process is a dump of monthly Call Detail Records from Cisco's Unified Communications Manager.  The 11-digit number is a Long Distance Number like 14021234567 (ex., 1-402-123-4567).  The 5-digit numbers are VoIP extension numbers while the 7-digit numbers are local calling numbers.

  • ALV subtotal for non numeric

    hi could you pls tell me how to do the subtotal for non-numeric fields in ALV.

    see the following example
    REPORT z_demo_alv_total.
    TYPES :
      BEGIN OF ty_vbak,
        vkorg TYPE vbak-vkorg,             " Sales organization
        kunnr TYPE vbak-kunnr,             " Sold-to party
        vbeln TYPE vbak-vbeln,             " Sales document
        netwr TYPE vbak-netwr,             " Net Value of the Sales Order
        waerk TYPE vbak-waerk,             " Document currency
      END OF ty_vbak.
    DATA:
      vbak    TYPE vbak,
      gt_vbak TYPE TABLE OF ty_vbak.
    SELECT-OPTIONS :
      s_vkorg FOR vbak-vkorg,              " Sales organization
      s_kunnr FOR vbak-kunnr,              " Sold-to party
      s_vbeln FOR vbak-vbeln.              " Sales document
    SELECTION-SCREEN :
      SKIP, BEGIN OF LINE,COMMENT 5(27) v_1 FOR FIELD p_max.
    PARAMETERS p_max(2) TYPE n DEFAULT '20' OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    INITIALIZATION.
      v_1 = 'Maximum of records to read'.
    START-OF-SELECTION.
      PERFORM f_read_data.
      PERFORM f_display_data.
    *      Form  f_read_data
    FORM f_read_data.
      SELECT vkorg kunnr vbeln netwr waerk
          UP TO p_max ROWS
        INTO TABLE gt_vbak
        FROM vbak
       WHERE kunnr IN s_kunnr
         AND vbeln IN s_vbeln
         AND vkorg IN s_vkorg.
    ENDFORM.                               " F_READ_DATA
    *      Form  f_display_data
    FORM f_display_data.
      TYPE-POOLS: slis.                    " ALV Global types
      DEFINE m_fieldcat.
        add 1 to ls_fieldcat-col_pos.
        ls_fieldcat-fieldname   = &1.
        ls_fieldcat-ref_tabname = 'VBAK'.
        ls_fieldcat-do_sum      = &2.
        ls_fieldcat-cfieldname  = &3.
        append ls_fieldcat to lt_fieldcat.
      END-OF-DEFINITION.
      DEFINE m_sort.
        add 1 to ls_sort-spos.
        ls_sort-fieldname = &1.
        ls_sort-up        = 'X'.
        ls_sort-subtot    = &2.
        append ls_sort to lt_sort.
      END-OF-DEFINITION.
      DATA:
        ls_fieldcat TYPE slis_fieldcat_alv,
        lt_fieldcat TYPE slis_t_fieldcat_alv,
        lt_sort     TYPE slis_t_sortinfo_alv,
        ls_sort     TYPE slis_sortinfo_alv,
        ls_layout   TYPE slis_layout_alv.
      m_fieldcat 'VKORG' ''  ''.
      m_fieldcat 'KUNNR' ''  ''.
      m_fieldcat 'VBELN' ''  ''.
      m_fieldcat 'NETWR' 'X' 'WAERK'.
      m_fieldcat 'WAERK' ''  ''.
      m_sort 'VKORG' 'X'.                  " Sort by vkorg and subtotal
      m_sort 'KUNNR' 'X'.                  " Sort by kunnr and subtotal
      m_sort 'VBELN' ''.                   " Sort by vbeln
      ls_layout-cell_merge = 'X'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                is_layout   = ls_layout
                it_fieldcat = lt_fieldcat
                it_sort     = lt_sort
           TABLES
                t_outtab    = gt_vbak.
    ENDFORM.                               " F_DISPLAY_DATA

  • Non numeric value in numeric field giving error

    Hi All
    I am using BAPI for creating sales order. If user is giving non numeric value in Quantity field it is giving error. Because quantity field data type is Double.
    Please Help.
    Thanks
    Raktim

    Hi Banerjee,
                 Create a String/int/long Context variable and point it to UI Input element.Do the validation  for correct input value. once the validation is succesful assign that value to RFC BigDecimal variable by Explicit casting.
    Hope this might solve your problem .
    Thanks
    Madhan

  • How to check a field in Message mapping wether it is Non Numeric?

    Hi XI Guru's
    I am totally new to XI world, Kindly help hopw can I chexk a field while doing message mapping whether the field is non numeric or not.
    I dont find any built in function for the same.
    If it is using UDF can some body help me in providoing a UDF for this.
    Many Thanks
    Arun

    Hi Arun,
    In SAP PI, all the XML contents by default treated as STRINGS.
    So if u want to check whether the incoming field is numeric or not... the only way is to write a UDF code for the same.
    the UDF will be,
    1. At first
    import java.util.regex.Matcher;
    import java.util.regex.Pattern;
    in functions.
    2.UDF content:
    input: field,container
    output:boolean
    Code
    boolean return_Value;
    Pattern p = Pattern.compile("[0-9]*");          // If u are using the decimals please change the regular expression accordingly.
    Matcher m = p.matcher(field);
    if(m.matches())
    retuen_Value = true;
    else
    return_Value = false;
    return return_Value ;
    I hope this will solve ur problem....
    Babu

  • How to check non-numeric value in a field

    Hi all,
    I have a field 'MVALUE'. HOw can I check if I have a non-numeric value in my field. Let us say if I have a value '<25' in this field. How can I check if the value in this field is non-numeric. The field MVALUE is of CHAR datatype.
    Please help. Waiting.........

    Might have to add a space in the string...
    if not mvalue co ' 0123456789'.
    * error
    endif.
    if you allow decimals and commas...
    if not mvalue co ' .,0123456789'.
    * error
    endif.

Maybe you are looking for

  • Iphone 5s cannot call out any calls, but still can receive incoming calls and sms

    Hi anyone experiencing this problem? After buying iphone 5s less than 2 months which I never did in the past, I could no longer make any phone calls out, yet i still can receive incoming calls and data. Could someone kindly assist in this? 

  • DVI video output

    Is there any way to use the DVI port for an HD monitor in FCP? Seems like a no brainer to have that option.

  • Portlet Timeout error

    Hi, The following error is displayed when accessing a Portal page with protlets: "Error: Timeout for content=20015" . The used Oracle Portal is 3.0.9.8.0 Any work around to increase the timeout vakue for the portlets ? Ayman

  • Premiere Elements 11 - online-content-download not working

    Download of online-Content (movie-menues etc.) is not working. Are the Servers down?

  • Iphone power button doesn't work and LED is on

    Have a black 64gb iphone 4s, (ios 6.1.3), no case - for about 1yr4mo.  last week i fell asleep on the phone and when i woke up, the power button wasn't working.  I left the phone plugged in for the rest of the night, and when i got up it was working