Removing commas in fmt:formatNumber

Hi
just wondering how to remove commas with numbers outputted within a fmt:formatNumber tag.
So for example instead of showing 1,000 I want 1000 to be outputted.
Thanks in advance

I found out after a bit of testing just have to add
pattern="#"

Similar Messages

  • Question on Issue with fmt:formatNumber tag of jstl

    Hi,
    We have a web application that uses struts framework. In the action class,i am setting an attribute of request object like
    request.setAttribute("Val",new Double(11.25489));
    I am using jstl fmt:formatNumber function in the jsp page to format the value to 2 decimal places.
    <fmt:formatNumber value="${Val}" maxFractionDigits ="2" />
    When i access the jsp page,there is no display of anything.
    If i access using <c:out value="${Val}"/> ,it does print the value.
    Interestingly,tomcat does not generate any corresponding java file in its work area.
    Any clues...anybody ?
    Edited by: gbhakta on Oct 31, 2007 12:23 PM

    Ok you are setting the value in request scope?
    How does the control transfer from the Struts Action to your JSP page?
    Check the struts-config to see if that forward is configured as a "redirect". If that is so, your request attribute would be lost, because a redirect causes a new request.
    The following code prints out all request attributes that are currently in scope.
    It might help checking to see if your "Val" is in scope or not.
    Request scope attributes:
    <table border="1">
    <c:forEach var="attr" items="${requestScope}">
      <tr><td><c:out value="${attr.key}"/>a</td><td><c:out value="${attr.value}"/></td></tr>
    </c:forEach>
    </table>Cheers,
    evnafets

  • Dashboard Prompt - Integer field (material number) - remove commas

    Hi all,
    We have a problem with one number field that added as a prompt in the dashboard. This is an integer field contains Material numbers shows commas and we need to remove commas. Problem is we cannot cast it because we need to keep it as ineteger field to sort the column. Please advise to correct this either repository area or in the dashboard prompt sql statment that applicable to an **integer** field to remove commas.
    Appreciate all your help!!
    Thanks,

    Thank You Svee. I have already tried override and treat number as number but that still showed the commas.
    What I was missing was clicking on save as the system-wide default. I never tried that before and this worked. I appreciate your help.

  • Need to remove Commas REgular Expressions?

    How can I use java to remove commas from a number.
    1,000 string
    need it to be
    1000
    can I pass it through some sort of regular expression?

    I was attempting to do it with regular expressions to learn how to do them better.
    Thanks for your good comment.
    nupevic

  • Fmt:formatNumber when value is blank

    <c:catch var="formatError">
    <fmt:formatNumber value="${row.pay}" type="currency" currencySymbol="" var="payment"/>
    </c:catch>
    when the ${row.pay} is "", looks like the formatNumber does not throw the formatError nor creates the variable payment with value "". When i debug I don't see the var in the page context attributes.
    Is this right?
    Thanks.

    Hi,
    Please verify the datatype ...Whether you are using char or Integer.
    If c ( char)----- it will display space
       i ( integer)---- it will display 0.00.
    Regards
    Arbind
    Edited by: Arbind Prasad on Jan 27, 2010 12:03 PM

  • Removing commas from on address line!!

    I need to remove comma's from an address field:
    substr(s_claim_periods.latest_prop_addr(CLAIMS.cla_refno),1,255) AS D,
    i have tried my usual method of
    translate (CONTACT_ADDRESS, ',' ,' ')
    but im having problems incorporating it with the substr command!!

    you could also use replace
    replace (adr, ',')as in
    SQL> with test as
      2  (select 'address,address,address,address,address' adr from dual
      3  )
      4  -- End of Testdata; here is the actual query:
      5  select adr
      6       , replace (adr, ',')
      7    from test
      8  /
    ADR                                     REPLACE(ADR,',')
    address,address,address,address,address addressaddressaddressaddressaddress

  • Removing commas from report result

    Hello gurus,
    Is there a way to remove commas from data values in the BEx reports?
    I used NODIM() to remove $ signs and units. We need to remove the commas as well.
    Thank you,
    Malli

    hi,
    in query properities you should have option to show unit on the top of column only and in key figure properities should be option to choose how many decimal spaces you want to be visible on report (this option you have in rsa1 -> infoobjects -> your key figure -> BEx reporting tab)
    Regards,
    Andrzej

  • How to remove comma in 1,007

    hi champions,
                              i hv to remove comma in 1,007.....plz help me.I HV TO USE IN ALV.
                              looking forward to an early reply.
           with regards,
           ravi gupta.
    Message was edited by:
            ravi gupta

    Hi,
    In ALV display , we have an option for removing the unit splitting by selecing an option 'no_unit_splitting' in the layout.
    After  selecting this layout option,the structure of layout  has to be passed in the
    ALV function module.
    Check out the code below.
    DATA:  ls_layout   TYPE slis_layout_alv.
    ls_layout-no_unit_splitting = 'X'.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
         i_callback_program             =  sy-repid
      I_CALLBACK_PF_STATUS_SET       = l_status
       i_callback_user_command        = 'USER_COMMAND'
      I_STRUCTURE_NAME               =
       <b>   is_layout                      =  ls_layout</b>
          it_fieldcat                    =  lt_fieldcat
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
       it_sort                        = it_sort
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
       i_save                         = 'U'
      IS_VARIANT                     = 'U'
          it_events                      = gt_events
      IT_EVENT_EXIT                  =
        is_print                       = gd_prntparams
      IS_REPREP_ID                   =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
      IR_SALV_LIST_ADAPTER           =
      IT_EXCEPT_QINFO                =
      I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
        TABLES
          t_outtab                       = it_dlpl
    EXCEPTIONS
      PROGRAM_ERROR                  = 1
      OTHERS                         = 2
    Thanks & regards,
    Sreenivasulu P
    Message was edited by:
            P Sreenivasulu

  • Removing commas

    hi experts,
    is there any possible way removing commas when we define it as a keyfig
    number particularly for this field (Ex:bill no),now it is difficult to define
    it as characterstic
    thanks
    venu

    Hi Venu,
    I am not sure about your issue. But I had faced similar issue with commas coming for key figure and following is how i fixed it.
    If you are getting comma in a key figure then you need to go to SU01. Put the user id for which you are having the problem.Then go to defaults  and change the decimal notation.
    Thanks,
    Rakesh

  • How to show indian rupees in fmt:formatNumber

    Hi guys,
    I want to show the price value like Rs. 12,50,500. If I use like this format Rs. *<fmt:formatNumber type="number" value="${stylePrice}" pattern="#,##0.00"/>* it is showing like Rs. *4,240,000.00*. Instead of I want to show Rs. 24,40,000. Is it possible to show like this format. Please help me guys..
    Thanks in Advance
    Regards Pooja

    Hi guys
    I couldn't solve that issue in fmt:numberformat tag. So i have written java code myself. If anyone wants use this..
    Double value=100000;
    String rupees;
              String lastThreeDigits                                   = "000";
              if(value< 100000){
                   DecimalFormat formatter = new DecimalFormat("#,###");
                   return formatter.format(value);
                             }else{
              DecimalFormat formatter = new DecimalFormat("#,##");
              rupeeFormat = formatter.format(value/ 1000) + ",";
              formatter.applyPattern("#,###");
              value= value- value/ 1000 * 1000;
              java.text.DecimalFormat df = new java.text.DecimalFormat(lastThreeDigits);
              rupees+= df.format(value);
              System.out.println(rupees);          
    Regards
    Pooja

  • Fmt:formatNumber and grouping separator

    I want the code below to print 12 900 (with the space) provided the correct pattern off course:
    <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
    <fmt:formatNumber value="12900" pattern="someMagicPattern"/>I've been trying to come up with a pattern for this, but it's more difficult than I first thought. Can someone help me out?

    No one knows?

  • Removing Commas and Spaces from Field

    I have a table called TableD1 in a database with a field called "Range".
    The ranges are like 1-1000; 1001-2000; etc. up to like 1000000-200000.
    That is how they are supposed to look, they are not numeric fields, just general, containing a low, a dash and a high all in the same field.
    I just discovered that quite a few of the entries have included commas and spaces, like 1-1,000 or 100000 - 200000.
    I need to write a Query that will remove all of the commas from the data in TableD1's "Range" field, then all of the spaces.
    I imagine they are some kind of Update statements but because of the potential to blow up the whole thing, I'm reluctant to experiment.
    Does anyone know what code I should use?
    Thank you in advance for any help.
    Gee

    Making sure you've taken a backup. Pull the data into temp table and do the testing. once you satisfied with the output then do the update on the main table.
    create table #temp
    Range varchar(100)
    insert into #temp values('1-1,000'),('100000 - 200000')
    select replace(replace(Range,',',''),' ','') from #temp
    --update #temp set Range=replace(replace(Range,',',''),' ','')
    Validate the the output of the select statement.
    --Prashanth

  • Removing comma (,) from string

    Hello Friends,
    I have a string something of this nature
    Sting : ',3456,45454,,45454,'
    Need to have just comma seperated value : '3456,45454,45454'
    Tried with replace but getting - '34564545445454'
    select replace ( ltrim(RTRIM(replace(',3456,45454,,45454,', ',,', ','),',')),',', '') from dual;
    Appreciate your help .
    Thanks/Kumar

    Hi, Kumar,
    kumar73 wrote:
    Hello Friends,
    I have a string something of this nature
    Sting : ',3456,45454,,45454,'
    Need to have just comma seperated value : '3456,45454,45454'
    Tried with replace but getting - '34564545445454'
    select replace ( ltrim(RTRIM(replace(',3456,45454,,45454,', ',,', ','),',')),',', '') from dual;Do you want to remove ','s at the beginning of the string, but leave them in the other places?
    If so:
    LTRIM (string, ',')LTRIM removes the given character(s) from the <b>L</b>eft side (that is, the beginning) of string. That's all you want here. (Was your string generated by SYS_CONNECT_BY_PATH? This is a very common problem.)
    RTRIM removes the given character(s) from the <b>R</b>ight side (that is, the end) of string. I don't think you want that; you certainly don;'t need it in the example you gave.
    REPLACE removes the given characters anywhere in the string. You definitely don't want that. If you did, there would be no point in also using LTRIM or RTRIM.

  • How to remove commas from xvbap-kwmeng field

    Hi All,
    Can you guys/gals help me ??
    I am having a issue with comma in xvbap-kwmeng field, I have value 1,662.000,
    How can I get rid of comma.
    and also please be aware that, I may have 1,662,123.000 situtation as well.
    How can I remove all comma's from by xvbap-kemeng field.
    Thanks
    Anitha.

    Hi,
    Check whether TRANSLATE statement works for you
    TRANSLATE xvbap-kwmeng USING ', '.
    In single quote use comma followed by a space after that use  CONDENSE  xvbap-kwmeng NO-GAPS.
    Regards,
    Selva

  • Removing Commas and after zeros

    Hi Experts,<br />
    <br />
    If user enters the values like 56.879.809,00 for me it should take 56.879.809 if user enters the value as 56.879.809,00 use error message.I want to delete the data including comma as well as zeros ",00" in value.This is in Module pool program designing.How to build the logic for this help me for this solution.<br />
    <br />
    <span style="color:red">Moderator Message: Please continue with the previous post Validating the particular value for a particular currency.</span>
    Edited by: Suhas Saha on Sep 29, 2011 1:02 PM

    assign ur value to a variable (lv_gross1)
                    lenght = strlen( lv_gross1 ).
                    search lv_gross1 for ','.
                    if sy-subrc eq 0.
                      if sy-fdpos > 0.
                        move lv_gross1+0(sy-fdpos) to lv_gross.
                      endif.
                    endif.
    it will remove ,00 from ur number.
    Thanks,
    Giridhar

Maybe you are looking for

  • Itunes 11 Starts Automatically on Headphone Jack

    Hello. I have been reading the forums and it appears that there has never been a conclusive resolution to the problem I am facing for all versions of Itunes available since purchase of my Late 2011 Macbook Pro 13" Laptop. Description of Problem Itune

  • Import

    Hi all, i was wondering is the flash import statement the same as a java import statement? in other words is it true that if i want to create a transition simply new fl.transitions.Tween(home_mc, "x",fl.transitions.easing.Elastic.easeOut,1000,0,30,tr

  • Why do some imported jpegs, psd files show as black rectangles?

    I recently scanned a dozen B&W 8x10 prints, plus a color  book dust jacket, into Photoshop, saving all to my desktop variously as jpegs, TIFFs and PSDs, then attempted to import the images to my iPhoto library. Some showed up fine but most were simpl

  • ABAP Client Proxy Issue..

    Hi Folks, I am trying to push the data from R3 to RDBMS ...using proxies.. I am able to push single line item but when i am not able to push multiple line item. <b>I want to know how to handle table type inside a stucture..? sample code will help me

  • Does iWork 09 not work with Lion? I can't get pages to open any docs.

    Helps?