Output to 2 decimal places

Hi there,
Got a small problem the output's are coming out like this 155.5 and i need them to come put like this 155.50
<cfparam name="FORM.twin" type="string" default="1" />
<cfquery name="twin" datasource="strand">
SELECT *
FROM hotel_rooms
WHERE hotel_rooms.ID = 1</cfquery>
<!---Twin CFIF--->
<cfif form.twin gt "0" and form.nights eq "1">
<cfset tprice = 1*#twin.price_night1#>
<cfelseif form.twin gt "0" and form.nights eq "2">
<cfset tprice1 = 2*#twin.price_night1#>
<cfset tprice = #tprice1#*0.95>
<cfelseif form.twin gt "0" and form.nights eq "3">
<cfset tprice1 = 3*#twin.price_night1#>
<cfset tprice = #tprice1#*0.90>
<cfelseif form.twin gt "0" and form.nights gte "4" and form.nights lt "8">
<cfset tprice1 = #form.nights#*#twin.price_night1#>
<cfset tprice = #tprice1#*0.85>
</cfif>
<cfoutput>#tprice#</cfoutput>
Any one any ideas.
Thanks
Jonathan Hemmings

I have tried this:
<cfoutput>#numberFormat(tprice,”-£____.__”)#</cfoutput>
But i keep geting this error:
The following information is meant for the website developer for debugging purposes.
Error Occurred While Processing Request 
Invalid construct: Either argument or name is missing. 
When using named parameters to a function, each parameter must have a name.
The CFML compiler was processing:
An expression beginning with numberFormat, on line 269, column 57.This message is usually caused by a problem in the expressions structure.
The body of a cfoutput tag beginning on line 269, column 47.
The body of a cfoutput tag beginning on line 269, column 47.
Am i using it wrong?
Thanks
Jonathan hemmings

Similar Messages

  • Help wanting to limit output to 2 decimal places :O

    im trying to make it so i only output over 2 decimal places.
    here is my code. can someone tell me what to add? thank you mucho
    package javaapplication2;
    import java.util.*;
    import cs1.Keyboard;
    public class Main {
    public static void main(String[] args) {
    double Hours_Worked,
    Hourly_Wage,
    Total_Money;
    final double COMMISSION = 3.59 * .1;
    int noSoldFish;
    String UserName;
    System.out.println("Please enter the employee's name: ");
    UserName = Keyboard.readString();
    System.out.println("Please enter hours worked by employee: ");
    Hours_Worked = Keyboard.readDouble();
    System.out.println("Enter employee's hourly wage: $");
    Hourly_Wage = Keyboard.readDouble();
    System.out.println("Enter the number of fish sold by employee:");
    noSoldFish = Keyboard.readInt();
    Total_Money = Hours_Worked * Hourly_Wage + noSoldFish * COMMISSION;
    System.out.println("\n===========================================" +
    "\n Employee's Information" +
    "\n===========================================" +
    "\n" + UserName + " worked " + Hours_Worked + " hours this week" +
    "\n" + UserName + " makes $" + Hourly_Wage + " per hour." +
    "\nThe total salary and commission for "
    + UserName + " is $" + Total_Money);
    System.exit(0);
    }

    read up on, or search the forum on NumberFormat and in particular the factory method NumberFormat.getCurrencyInstance(); This is what you need here.

  • How can I stabilize the DAQ output to four decimal places

    I have a daq 6009. I sent a optical signal. DAQ provides a output which varies in 3rd  decimal place. I done averaging all using a program which I'am attaching with this. So can you please help me in this regard 
    Attachments:
    data acquisition 2 (SubVI).vi ‏71 KB

    You need to find a DAQ with a lower Absolute Accuracy.
    Also, looking at the spec, you can get a better accuracy with a Differential measurement than you can with a RSE.  Apparently the RSE only works in the +-10V range.  By changing to a differential, you can get down to a +-1V range.  That will help your resolution a little bit.  Just wire the ground to the - terminals on the DAQ.
    Another issue could be noise in the system.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • ALV output is 2 decimal places, but prints as 3

    Hi,
    In my current ABAP program, the output is shown as 2 decimals, using the following domain:
    Data Type: QUAN
    No. Characters: 13
    Decimal Places: 2
    Output length: 17
    However, during unit testing, it was found that during printing, instead of printing it out as 2 decimals (ex. 12.00,) its printed out as 3 decimals (ex. 12.000.)
    The same thing can be noticed when using Print preview. It starts at the editable fields and continues onward to others.
    Why is this occurring and what can I do to fix this problem?
    Points will be rewarded and all help will be greatly appreciated.
    Thanks,
    John

    Hi
    Check once again the attributes of that Qty field in Dataelement and domain
    Because for all QUAN type fields it is always 3 DECIMAL places
    you are saying it is 2
    check it
    All the qty fields in SAP with data type QUAN uses/prints 3 decimals
    so check and  see
    like fields LFIMG.MENGE,FKIMG,KWMENG all fields with 3 decimals
    Reward points for useful Answers
    Regards
    Anji

  • Help with limiting JOptionPane output to 2 decimal places

    I don't seem to be able to figure out how to specify 2 decimal points in my output to a JOptionPane. I know how to do this in a standard program with no gui interface but I have been unsuccessful in my attempts with JOptionPane. I have included my code below and any assistance at all would be appreciated.
    import javax.swing.JOptionPane;
    public class Vehicleanalysis2
    public static void main( String args[] )
    String januaryRepairs =
         JOptionPane.showInputDialog( "Enter January's repair costs:" );
    String februaryRepairs =
         JOptionPane.showInputDialog( "Enter February's repair costs:" );
    String marchRepairs =
         JOptionPane.showInputDialog( "Enter March's repair costs:" );
    String aprilRepairs =
         JOptionPane.showInputDialog( "Enter April's repair costs:" );
    String mayRepairs =
         JOptionPane.showInputDialog( "Enter May's repair costs:" );
    String juneRepairs =
         JOptionPane.showInputDialog( "Enter June's repair costs:" );
    String julyRepairs =
         JOptionPane.showInputDialog( "Enter July's repair costs:" );
    String augustRepairs =
         JOptionPane.showInputDialog( "Enter August's repair costs:" );
    String septemberRepairs =
         JOptionPane.showInputDialog( "Enter September's repair costs:" );
    String octoberRepairs =
         JOptionPane.showInputDialog( "Enter October's repair costs:" );
    String novemberRepairs =
         JOptionPane.showInputDialog( "Enter November's repair costs:" );
    String decemberRepairs =
         JOptionPane.showInputDialog( "Enter December's repair costs:" );
    double january = Double.parseDouble(januaryRepairs );
    double february = Double.parseDouble(februaryRepairs );
    double march = Double.parseDouble(marchRepairs );
    double april = Double.parseDouble(aprilRepairs );
    double may = Double.parseDouble(mayRepairs );
    double june = Double.parseDouble(juneRepairs );
    double july = Double.parseDouble(julyRepairs );
    double august = Double.parseDouble(augustRepairs );
    double september = Double.parseDouble(septemberRepairs );
    double october = Double.parseDouble(octoberRepairs );
    double november = Double.parseDouble(novemberRepairs );
    double december = Double.parseDouble(decemberRepairs );
    double annualrepaircost = january + february + march + april + may + june + july + august + september + october + november + december;
    double payment = annualrepaircost / 12;
    if (annualrepaircost <= 3600 )
         JOptionPane.showMessageDialog(null, "          Keep your car.\n          Your monthly repair\n          costs only average\n           out to be: " + payment + "\n          Your annual repair costs\n          this year\n were: " + annualrepaircost, " Recommendation", JOptionPane.PLAIN_MESSAGE );
    else
         JOptionPane.showMessageDialog(null, "          You should consider purchasing a new\n          car if you can get a payment\n          for less than: " + payment + "\n          Your annual repair costs\n          this year\n          were: " + annualrepaircost,
         " Recommendation: ", JOptionPane.PLAIN_MESSAGE );
    }

    Hi,
    try the following:
    double payment;
    JOptionPane.showMessageDialog(null, String.format("Payment: %.2f ", payment));
    /Mattias

  • ToGB() decimal places

    Hi All,
    I have this piece of code which outputs the values to a html file.
    (get-mailboxdatabase)|foreach-object {
     $database= $_.name
     $accounts= (get-mailbox -database $_.name).count
     $size = (get-mailboxdatabase $_.name -status).databasesize.ToMB()/1024
         add-content $wfile "<tr>"
         add-content $wfile "<td align= 'center'>$database</td>"
         add-content $wfile "<td align= 'center'>$Accounts</td>"
         add-content $wfile "<td align= 'center'>$size</td>"   
    My issue I can't get the size to output to 2 decimal places it outputs 8 decimal places.
    If I use ToGB() instead of ToMB()/1024 I only get the whole number
    I have tried using {N0:02} but it doesn't help
    What am I doing wrong?
    TIA
    Andy

    How are you applying the format string?
    $size = '{0:N2}' -f ((get-mailboxdatabase $_.name -status).databasesize.ToMB()/1024)
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • How to take float precision to two decimal places?

    Hi, everybody:
    I'm a straight noob...first week in Java programming. Before you bash me for not checking FAQs and such, believe me, I have.
    I have tried BigDecimal movePointLeft, but I don't know how to construct it using proper syntax. I also tried currency and toString but I keep messing up my syntax somehow. Four hours into this and nothing is working.
    Here is the problem: I have a float. I want to format its output to two decimal places, trying to achieve in Java what C would produce as:
    printf("The amount you owe is $%.2f", fltAnyName);
    Any help would be appreciated.
    Thanks,
    Rob

    Sorry, guys. I have tried both recommendations and I can't get either to work. I'm getting a compile error pointing to the delineating period between the "out" and "printf" when I try the C-like code. I have 1.5, too. I know your advice is sound so I must be doing something wrong. Can you insert the code DecimalFormat code that will correct this problem where it needs to go? The packages below have been included becasue of all the different solutions I have attempted.
    import java.io.*;
    import java.math.*;
    import java.text.*;
    import java.lang.*;
    public class CoinCalculator2
         public static void main(String[] args) throws IOException
              String strQuartes, strDimes, strNickels, strPennies;
              int intQuartes, intDimes, intNickels, intPennies;
              float fltValue;
              BufferedReader dataIn = new BufferedReader(new InputStreamReader(System.in));
              System.out.println("THE COIN CALCULATOR");
              System.out.println();
              System.out.print("Enter the number of quarters you have: ");
                   strQuartes = dataIn.readLine();
                   intQuartes = Integer.parseInt(strQuartes) * 25;
              System.out.print("Enter the number of dimes you have: ");
                   strDimes = dataIn.readLine();
                   intDimes = Integer.parseInt(strDimes) * 10;
              System.out.print("Enter the number of nickles you have: ");
                   strNickels = dataIn.readLine();
                   intNickels = Integer.parseInt(strNickels) * 5;
              System.out.print("Enter the number of pennies you have: ");
                   strPennies = dataIn.readLine();
                   intPennies = Integer.parseInt(strPennies);
              fltValue = (intQuartes + intDimes + intNickels + intPennies) / 100;
              System.out.println();
              System.out.println("The value of your coins is $" + fltValue);
              System.out.println();
    }

  • Round to two decimal places

    my cost per month textbox typically returns multiple decimal places, is it possible to limit it's output to two decimal places like real monetary calculations?
    calculatebutton.addEventListener(MouseEvent.CLICK, doMyCalculation);
    calculatebutton2.addEventListener(MouseEvent.CLICK, doMyCalculation2);
    costpermonth.restrict = ".0-9";
        var myAnswer : Number;
        myAnswer = Number(costofitem.text) - Number(amountsaved.text);
        amountneedtosave.text = String(myAnswer);
    function doMyCalculation2(e:MouseEvent):void
        var myAnswer2 : Number;
        myAnswer2 = Number(amountneedtosave.text) / Number(howmanymonths.text);
        costpermonth.text = String(myAnswer2);

    use the toFixed() method of numbers:
    amountneedtosave.text = myAnswer.toFixed(2);

  • To remove decimal places and round

    hi all ,
    select       (sum(case when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3)) <> upper('Top')) then
                (((((H.SLURRY_VOL_ACTUAL * 5.6146)/H.SLURRY_YIELD)*94)/2000)   )
                 when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3)) = upper('Top')) then
             (   ((nvl(H.CLASS_V_CEMENT,0)*94)/2000)   ) 
            when F.ITEM_UOM =  'Pound' then
          CEIL(  ROUND((((((H.SLURRY_VOL_ACTUAL * 5.6146)/DECODE(H.SLURRY_YIELD,0,NULL,H.SLURRY_YIELD)))*94)*F.ITEM_PERCENT/100)))/2000
           end)*(j.opn_value/2))  SUM_MAT_ACT_TON ,--------transport
                       sum(case when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3)) <> upper('Top')) then
                ((H.SLURRY_VOL_ACTUAL * 5.6146)/H.SLURRY_YIELD)
          when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3)) = upper('Top')) then
                nvl(H.CLASS_V_CEMENT,0)
            when F.ITEM_UOM =  'Pound' then
                ROUND(((ROUND(((H.SLURRY_VOL_ACTUAL * 5.6146)/DECODE(H.SLURRY_YIELD,0,NULL,H.SLURRY_YIELD)))*94)*F.ITEM_PERCENT/100 )/P.ATTRIBUTE5)
       end) SUM_sload ,    ----sload
       sum(case when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3)) <> upper('Top')) then
                ((H.SLURRY_VOL_ACTUAL * 5.6146)/H.SLURRY_YIELD)
         -- when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3)) = upper('Top')) then
              --  nvl(H.CLASS_V_CEMENT,0)
            when F.ITEM_UOM =  'Pound'  and F.BLEND <> 'PH'then
                ROUND(((ROUND(((H.SLURRY_VOL_ACTUAL * 5.6146)/DECODE(H.SLURRY_YIELD,0,NULL,H.SLURRY_YIELD)))*94)*F.ITEM_PERCENT/100 )/P.ATTRIBUTE5)
       end) BLENDING
      ,e.opn_job_desc
         FROM xxnp_opn_joblog_001 E,
              XXNP_OPN_JOBLOG_EST_002   F,
              XXNP_OPN_JOBLOG_STAGE_002 G,
              XXNP_OPN_JOBLOG_SLURRY_003 H,
        XXNP_OPN_JOBLOG_RES_005 J,
         MTL_SYSTEM_ITEMS_B P
          WHERE E.OPN_JOB_DESC   = 'K/D/SP158/SA399/1338/D/0510/1' AND
            E.MANUAL='N'
       and J.opn_resource_desc='4X4  PICK-UP OR LIGHT VEHICLES'
        AND E.OPN_JOBLOG_001_ID = J.OPN_JOBLOG_001_ID
         and F.INVENTORY_ITEM_ID=P.INVENTORY_ITEM_ID
           AND p.ORGANIZATION_ID='103'
          AND E.OPN_JOBLOG_001_ID = G.OPN_JOBLOG_001_ID
            AND G.OPN_JOBLOG_006_ID = H.OPN_JOBLOG_006_ID
            AND H.OPN_JOBLOG_007_ID = F.OPN_JOBLOG_007_ID
            AND G.OPN_JOBLOG_006_ID = H.OPN_JOBLOG_006_ID
            AND H.OPN_JOBLOG_007_ID = F.OPN_JOBLOG_007_ID
                                    GROUP BY E.OPN_JOB_DESC,j.opn_value
    o/p  i am getting
    SUM_MAT_ACT_TON      SUM_SLOAD                         BLENDING                                   OPN_JOB_DESC
    11587.7954154787         1957.62401925833               1454.62401925833                       K/D/SP158/SA399/1338/D/0510/1
    well can anyone guide me on  obtaining the following output (to remove decimal places and round )
    SUM_MAT_ACT_TON      SUM_SLOAD                         BLENDING                                   OPN_JOB_DESC
    11588                           1958                                      1455                                          K/D/SP158/SA399/1338/D/0510/1thanking in advance
    Edited by: makdutakdu on May 25, 2010 12:48 PM

    select      round( (sum(case when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3))  upper('Top')) then
                (((((H.SLURRY_VOL_ACTUAL * 5.6146)/H.SLURRY_YIELD)*94)/2000)   )
                 when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3)) = upper('Top')) then
             (   ((nvl(H.CLASS_V_CEMENT,0)*94)/2000)   ) 
            when F.ITEM_UOM =  'Pound' then
          CEIL(  ROUND((((((H.SLURRY_VOL_ACTUAL * 5.6146)/DECODE(H.SLURRY_YIELD,0,NULL,H.SLURRY_YIELD)))*94)*F.ITEM_PERCENT/100)))/2000
           end)*(j.opn_value/2)))  SUM_MAT_ACT_TON ,--------transport
                       round(sum(case when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3))  upper('Top')) then
                ((H.SLURRY_VOL_ACTUAL * 5.6146)/H.SLURRY_YIELD)
          when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3)) = upper('Top')) then
                nvl(H.CLASS_V_CEMENT,0)
            when F.ITEM_UOM =  'Pound' then
                ROUND(((ROUND(((H.SLURRY_VOL_ACTUAL * 5.6146)/DECODE(H.SLURRY_YIELD,0,NULL,H.SLURRY_YIELD)))*94)*F.ITEM_PERCENT/100 )/P.ATTRIBUTE5)
       end)) SUM_sload ,    ----sload
       round(sum(case when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3))  upper('Top')) then
                ((H.SLURRY_VOL_ACTUAL * 5.6146)/H.SLURRY_YIELD)
         -- when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3)) = upper('Top')) then
              --  nvl(H.CLASS_V_CEMENT,0)
            when F.ITEM_UOM =  'Pound'  and F.BLEND  'PH'then
                ROUND(((ROUND(((H.SLURRY_VOL_ACTUAL * 5.6146)/DECODE(H.SLURRY_YIELD,0,NULL,H.SLURRY_YIELD)))*94)*F.ITEM_PERCENT/100 )/P.ATTRIBUTE5)
       end)) BLENDING,
       e.opn_job_desc
         FROM xxnp_opn_joblog_001 E,
              XXNP_OPN_JOBLOG_EST_002   F,
              XXNP_OPN_JOBLOG_STAGE_002 G,
              XXNP_OPN_JOBLOG_SLURRY_003 H,
        XXNP_OPN_JOBLOG_RES_005 J,
         MTL_SYSTEM_ITEMS_B P
          WHERE E.OPN_JOB_DESC   = E.OPN_JOB_DESC  AND
            E.MANUAL='N'
       and J.opn_resource_desc='4X4  PICK-UP OR LIGHT VEHICLES'
        AND E.OPN_JOBLOG_001_ID = J.OPN_JOBLOG_001_ID
         and F.INVENTORY_ITEM_ID=P.INVENTORY_ITEM_ID
           AND p.ORGANIZATION_ID='103'
          AND E.OPN_JOBLOG_001_ID = G.OPN_JOBLOG_001_ID
            AND G.OPN_JOBLOG_006_ID = H.OPN_JOBLOG_006_ID
            AND H.OPN_JOBLOG_007_ID = F.OPN_JOBLOG_007_ID
            AND G.OPN_JOBLOG_006_ID = H.OPN_JOBLOG_006_ID
            AND H.OPN_JOBLOG_007_ID = F.OPN_JOBLOG_007_ID
                                    GROUP BY E.OPN_JOB_DESC,j.opn_value

  • Key figure, number of decimal places are not showing in report output

    Dear experts,
    At cube level PO qty value is getting 0.010 where as in bex report output of PO qty showing as 0. I have chosen decimal places as 0.000 in key figure additional properties tab. In query designer also I have chosen no of decimal places as 0.000 in display propertiesu2026please help me out. How can I get 0.010 value in report o/p.
    Thanks in advance.
    Srivalli.

    Hi,
    Try to run the query in RSRT. CHeck if you are getting the same output. Also make sure that in the reports all the filters are same as you have applied in the info -cube to see the data.
    - Jaimin

  • 2 decimal places in alv output

    Dear Experts,
    I need to display an quantity value with 2 decimals places in output. I have tried many options like,
    1.wa_fieldcat-decimals = '2'.
    2.wa_fieldcat-decimals_o = '2'.
    3.wa_fieldcat-ref_table = 'VBAP'.
      wa_fieldcat-ref_field = 'NETPR'.
    But its always coming with 3 decimal places. I have assigned a variable with type p & decimals 2.
    Also I searched sdn & found many threads. But still its coming as 3 places.
    Can you please guide me on the same.
    Bharath

    3.wa_fieldcat-ref_table = 'VBAP'.
    wa_fieldcat-ref_field = 'NETPR'.
    it's a currency field, you should give a column with currency to get the correct format
    wa_fieldcat-cfieldname = 'WAERS'.

  • DIsplaying WRBTR (AMOUNT FIELD)WITHOUT  DECIMAL PLACES

    Dear all,
    I am facing a problem in displaying amount field  in alv report. I have two currency keys (US dollar and Japan yen). if it is japan yen I should not have to show decimal places and if it is US dollar I should show decimal places.
    How can I do it in a alv report if I have only one output amount field?
    thanks
    Ranjan.

    Hi chittaramjan,
    1. use this kind of funda (just copy paste in new program)
    Important things
    a) one extra field in internal table
      declared in the same exact fashion
    waers LIKE tcurc-waers,
    b) Populate this field
    c) REST THE System will take care
       (based upon country settings)
    2.
    REPORT abc.
    TYPE-POOLS : slis.
    DATA : alvfc TYPE slis_t_fieldcat_alv.
    DATA  : BEGIN OF itab OCCURS 0,
            f1  LIKE P0008-BET01,
            waers LIKE tcurc-waers,
            END OF itab.
    START-OF-SELECTION.
      itab-f1 = '-4.15'.
      itab-waers = 'KRW'.
      APPEND itab.
      itab-f1 = '4.68'.
      itab-waers = 'GBP'.
      APPEND itab.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_program_name     = sy-repid
          i_internal_tabname = 'ITAB'
          i_inclname         = sy-repid
        CHANGING
          ct_fieldcat        = alvfc.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program      = sy-repid
          it_fieldcat             = alvfc
        TABLES
          t_outtab                = itab
        EXCEPTIONS
          OTHERS                  = 2.
    regards,
    amit m

  • U261B An Issue due to 3 Decimal Places in Percentage - Help Required

    I've an Issue in BEX report output, which is like when I try to create a 'Percentage' computation on a Key Figure Value, I'm getting 3 decimal places as 'default' output.
    The 'Calculations' settings I made for this KF is
    > Calculate Result as ... Nothing Defined
    > Calculate Single Values as .... Normalize According to Next Group Level Result
    > [✔] Apply to results
    > Calculation Direction - Along Rows
    ☹  I ran SAP_RSADMIN_MAINTAIN and set object 'IGNORE_T006_ANDEC' to the value 'X' - Not woking! Should I choose Update/Insert/Delete??
    ☹  T006-ANDEC & T006-DECAN for '%' has 0 decimal places only. Am I checking the correct stuff?
    ☹  OSS note 866505 not helpful for my issue. BW 7.0 Stack
    I'm getting my output as expected, but the only worrying factor is 3 decimal places due to the 'Calculations'. I'm unable to resolve using existing methods. Should I raise an OSS Note for this?
    Please help...

    Hi, I posted a message to SAP on this topic and got an explanation - it is a behaviour that cannot be changed in certain cases:
    it is the known design that it is always displayed with three decimal
    places for normalized values and the setting in Query Designer for
    decimal place doesn't take effect. This is because that normalization
    changes the number dimension of this structure element.
    You may refer to below notes about more details.
    > 869135 Decimal places and scaling for "Calculate Single Values As"
    You cannot set the number of decimal places or the scaling for some
    columns or structural components.
    For 2: Some "Calculate As" functions change the number dimension of a
    KID. In this case, the scaling and the number of decimal places set for
    the KID are no longer relevant. In this case, the system ignores the
    original setting and selects a setting that corresponds to the new
    number dimension. This cannot be overwritten. The following functions
    are affected:
    Calculate Single Values as Scale to Result, Overall Result or Query
    Result: Scaling 1 and three decimal places.
    > 501930 Number of decimal places setting is not applied
    As a result, normalized values resulting from the list calculation are
    displayed with three decimal places and without scaling by default.
    best regards, thom

  • Decimal places adjustment based on company code or currency

    Hi experts,
        my requirement is i have to adjust the decimal places in amount fields of internal table based on company code or currency given by user.
    suppose for example in my internal tables having 5 amount fields like 1.50 1.234 1.45 1.34, 1.67  for  company code is in01
    the same values for VN01 should be like this
    150 1234 145 134  167  ....
    can any body plz tell me any functional module is there to covert or abapcode?
    Thanks in advance,
    veena.

    That code is a bad idea.  Why would you hard-code that type of action for currency/amount handling?
    @poster: If the output is based on the local currency defined for the specified company code or one specified by the user, then use it.  SAP handles amount output automatically with a currency specification because the currency definition identifies where/how the decimal is output. 
    Just use WRITE as Florian indicated but  use the CURRENCY extension instead of DECIMALS.  You can do this dynamically based on the company code easily...
    A simple 3 line program shows you how this works:
    PARAMETERS: p_wrbtr type wrbtr.
    write:/ p_wrbtr CURRENCY 'USD'.
    write:/ p_wrbtr CURRENCY 'JPY'.
    Edited by: Brad Bohn on May 12, 2011 1:07 PM

  • Decimal places in Smartforms

    Hi All,
    In smartforms, to control the number of decimal points in a field we can use the formatting option
    &symbol(.N)&
    for e.g.
    The EKPO-MENGE field contains the value 1234.56. The Dictionary definition specifies 3 decimal places and an output length of 17.
    &EKPO-MENGE(.1) -> 1,234.6
    &EKPO-MENGE&(.4) -> 1,234.5600
    &EKPO-MENGE&(.0) -> 1,235
    Can we use a variable instead to giving the number directly ?
    like
    data length type i .
      length = '1'.
    &EKPO-MENGE(.length) -> 1,234.6
    Will this approach work.
    Thanks,
    Mandeep

    Hi,
    remove quotes.
    length = 1.
    try it now.

Maybe you are looking for

  • How do I fix updates in iPod Touch 4th generation?

    I know I cannot update my iPod Touch to iOS 7. The App Store icon shows that there are three updates available, but when I go to the update page there are none shown. If I look at all updates I notice there are three apps in the list that show as nee

  • I need help, I sent a job to my eprint address and it did not print

    I need help, I send two jobs to my eprint address and it didn't print, nor does not even show that it even got the job. I sent it from both of the e-mails that I have set up for it to except. Can someone please let me know what I am doing wrong. By t

  • How do I put themes from my Mac to my curve?

    I got a new curve (8310) and can not get my macbook to sync with my blue tooth or to transfer files. I'm trying to transfer a new theme to my curve but all only directions I can find are through the downloan manager for a pc. please help!

  • Streaming to TV

    Since my AEX is active through my iTunes app, and connected to my stereo through my TV, is there a way to stream video thats on my iTunes library through the TV? Or, can I connect a hard drive to the AEX and select movies through it? Hope this questi

  • Optimal settings for MPEG Streamclip convering mpgs to quicktime format

    Hello Folks, a newbie to this video converting world. I've got loads of mpgs from the past, which I'm trying to convert to Quicktime(mov) format for use on my apple tv and also to publish to DVDs. I tried the following: - Compression - Apple Intermed