SAPUI5 Decimal Places in sap.m.ColumnListItem

Hi all,
I have an odata binding to a table using a column list template.  One of the fields is an amount and because of currency conversion the data is (correctly) returning the amount to 4 decimal places.  I have tried a number of different approaches but am unable to get the template to render the data to 2 decimal places:
       var oModel = new sap.ui.model.odata.ODataModel("services/livesales.xsodata", false);
       oModel.setCountSupported(false);
       var worldTemplate =  new sap.m.ColumnListItem({
       cells: [
     new sap.m.ObjectIdentifier({
      title: "{LAND1}",
         visible: false
     new sap.m.ObjectIdentifier({
      title: "{LANDX}"
     new sap.m.ObjectNumber({
      number:"{EXT_NET_PRICE_CENTRAL}",
      unit : "GBP",
I've seen a suggestion from DJ that seems to acheive desired results for a sap.m.ObjectListItem
template : new sap.m.ObjectListItem({
type : "Active",
title : "{ProductName}",
numberUnit : "EUR",
attributes : [ new sap.m.ObjectAttribute({
text : "{QuantityPerUnit}"
number : {
path : "UnitPrice",
type : new sap.ui.model.type.Float({
maxFractionDigits : 2
but I don't think this syntax is valid for a sap.m.ColumnListItem
Does anyone have any suggestions?
Thanks,
Jon

Thanks for the reply DJ.
I bind the template to a table later on (as part of a pull to refresh control:
     salesList.bindItems({
       path: "/SALES",
       parameters: {
       select:  "LAND1,LANDX,EXT_NET_PRICE_CENTRAL"
       filters: 
      [new sap.ui.model.Filter("BUSINESS_DATE", sap.ui.model.FilterOperator.GE, today),
      new sap.ui.model.Filter("VTEXT", sap.ui.model.FilterOperator.NE, 'Direct')],
       template: worldTemplate
and the declaration of the table is as follows:
var salesList = new sap.m.Table({
         headerText: "Store Sales By Country",
         noDataText: "Refreshing",
                columns: [
                          new sap.m.Column({
                            header: new sap.m.Label({text:"Country Code"}),
                            minScreenWidth: "Phone",
                            visible: false
                        new sap.m.Column({
                        header: new sap.m.Label({text:"Country"}),
                        minScreenWidth: "Phone"
                        new sap.m.Column({
                        header: new sap.m.Label({text:"Net Sales"}),
                        minScreenWidth: "Phone"
                     ...(some other stuff here)    
So with your example the template and binding are combined but mine is separated to I'm struggling to figure out the syntax.   I'm a bit of a hacker when it comes to this stuff.
Thanks in advance for any help.
Jon

Similar Messages

  • Problem while changing decimal places in SAP B1 2007

    Hi Experts,
    I want change the decimal places of Quantity type fields from 2 decimal places to 4 decimal places. But while changing it in Genral settings form ,it shows the error message "Cannot update while another user is connected to the company". it is working in SAP B1 2005B but not in SAP B1 2007
    Please help me if you have any solution on this issue..
    Thanking you in advance

    Paul,
    Please see SAP Note 1247060 as is discusses the fact that this did work in 2005, but the behavior was changed in version 2007 ...
    https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/smb_searchnotes/display.htm?note_langu=E&;note_numm=0001247060
    Eddy

  • Increase decimal Places in SAP B1

    Dear Experts,
    (Using SAP B1 PL 49)
    I am trying to change the Decimal places in the General Settings->Display (Decimal Places), from 2 to 6 to in all the fields.
    When i try to update it gives me the following error:-
    "Cannot update while another user is connected to the company"
    Any help will be appreciated.
    Regards,
    Feroz

    Dear Asif,
    Thank you for the information.
    I logged all the users out from the SAP server and i stopped the SQL services and then re-started the SQL services again.
    I logged into SAP b1, but was getting the same error message.
    I removed the network cable of the server and I restarted the SAP server and then logged into SAP and tried to change the decimal places, but was still getting the same error message.
    I'm all out of ideas, this has never happened before to me.
    regards,
    Feroz.

  • Difference of decimal place in SAP R/3 and BW

    Hello SAP experts,
    I am extracting purchasing data from SAP R/3 using datasource 2LIS_02_SCL.
    In BW I see a difference of one decimal place.
    In RSA3  amount is shown as 17.350,00
    Whereas in PSA above value is displayed as 1.735,000
    Decimal notations are same in both R/3 and BW.
    Please help me to understand the reason behind difference in values.
    Thanks and Regards
    Shilpa

    Hello All,
    The issue is resolved. The difference in Amount is due to different decimal configuration settings in TCURX table in both R/3 and BW. Ideally these settings should be same in R/3 and BW. If decimal settings doesn't match misalignment has to be taken care of either in ETL or during query design.
    Thanks and Regards
    Shilpa

  • Change of the quantity field to 5 decimal places in SAP

    Hi Gurus,
    The quantity field is appearing with 3 decimal places in BOM, Process Order, etc. Is it possible to make the decimal places to 5.
    All the decimal digits from SAP are 3 digits. We have an interface through which the data flows from another legacy system (Fow system) to SAP. And the Fow system setting was 5 digits. The issue is some of the raw material requirement qty was really minor and it might be below the decimal 3 digits.
    In that case, when the data flows to SAP from Fow system it will cause the material stage failure. so please help me to investigate how to let the SAP also could have the 5 digits decimal. Thanks.
    Regards
    Brijesh

    Dear ,
    Its SAP standard ,to put and use decimal places in BOM qty .You can use upto 3 decimal places in BOM qty.
    At SE11 you need to see what measure field is linked to the quantity field.Then goto tranaction CUNI and chage the decimal places of the unit of measure for the qty field unit , it will not allow you more than 3 decimal places in case of BOM qty.
    You have following choice :
    1. With the access key make changes in the standard program and take help from ABAPer
    SAPLCSDI, Table Name-RC29P, Field Name- MENGE.
    2) Change the base quantity in BOM header to 1000 aand accordingly change the component quantity.
    Hope this is clear
    Regards
    JH

  • Save data with more than 6 decimal places in SAP MDM 5.5

    Hi there,
    I need some help concerning saving data with about 20 decimal places (e.g. 0,00452961328622164) in MDM. I declared the datatyp "REAL", there are only 6 decimal places possible.
    How can I save this Data? Maybe exponential function?
    Please help.
    Thank you
    Thomas Pfab

    currency takes you to 14 decimal places, if you want to have it as a little work around....you can always take out that symbol if it is annoying.(ohhh and decimal is multilingual too in currency, probably not a good hack!)
    or without even knwoing what your requirement is? try normalizing the value, How many more decimal places can you hit?
    One 100 1. "ten to the zero"
    tenth 10-1 0.1 "ten to the minus one"
    hundredth 10-2 0.01. "ten to the minus two"
    thousandth 10-3 0.001. "ten to the minus three"
    ten thousand 10-4 0.0001. "ten to the minus four"
    hundred thousandth 10-5 0.00001. "ten to the minus five"
    millionth 10-6 0.000001 "ten to the minus six"
    ten millionth 10-7 0.0000001. "ten to the minus seven"
    hundred millionth 10-8 0.00000001. "ten to the minus eight"
    billionth 10-9 0.000000001. "ten to the minus nine"
    ten billionth 10-10 0.0000000001. "ten to the minus ten"
    hundred billionth 10-11 0.00000000001. "ten to the minus eleven"
    trillionth 10-12 0.000000000001 "ten to the minus twelve"
    ten trillionth 10-13 0.0000000000001. "ten to the minus thirteen"
    hundred trillionth 10-14 0.00000000000001. "ten to the minus fourteen"
    and put that field label indicating the 10th power. Like "Accuracy in 10 POW -9"
    Just a wild guess.well thats how we usually show data in catalogues too!
    (or)
    separate the integer and decimal portions into two fields and store it in the repository.(split on ',')
    -Sudhir.

  • Decimal places in standard cost

    Dear All
    How many Decimal places does SAP Support for Standard cost estimate.
    Thanks

    Dear Sivaperumal,
    Normally I have noticed it's kept upto 2 places.
    Check the setting in T Code OY04.
    Also check this thread which addresses the same kind of issue,
    Re: Labor cost in CK11n/CK13n
    correct me if I'm wrong.
    check and revert back.
    Regards
    Mangalraj.S

  • Question about decimal places for currencies

    hi ,experts ,
       here is the problem , when i use mb5s, i found the net price has been enlarged 1000 times . I  also found the data of the table EKPO has been enlarged 1000 times. So ,i check the decimal places for currencies , i found there are five decimal places , the standard system is two decimal places . 
       Does this mean that we cann't  change the decimal places in SAP?  If we can change , what should we do for configuration ? 
    Jarod

    When running OY04, you are receivingin the following message:
    Before you continue, please read the following        
    text carefully.                                       
    If you do not heed this note, you can cause
    irreparable damage to the system with this            
    transacton.                                           
    In the R/3 System tables currency fields are          
    stored as decimal figures with a variable number      
    of decimal places. The decimal point is not           
    stored in the field in the database. Instead,         
    each currency field refers to a currency key          
    field. In this transaction you assign the number      
    of decimal places to this currency key uniquely.      
    Example: If you have set currency USD to have         
    two decimal places and you post an amount of 100      
    USD, an amount of 10000 USD is stored in the          
    Do you want to change the decimal places despite      
    all recommendations?

  • Decimal Places SAP 07

    Hi All,
    Does anyone know why we cant change Decimal places settings in SAP 07? I am running PL 08. When I try to change the decimal places settings from 6 to 2, I receive an error that says 'Decimal Places cannot be decreased'.
    We are able to change this in PLD but my client has a problem with viewing this ridiculous amounts of zeros on the screen as-well.
    Please help!

    Not possible to do this AFAIK. You can only increase the number of decimal places, not decrease. This should have been explained at the initial system setup.

  • Decimal Places in Item Cost must be 6 characters while in Journal Entry 2.

    I have the following problem:
    Accounting needs to see and work with 2 decimal places, but the item cost is needed in 6 decimals.
    If I register a A/P Invoice and i go to the Journal Remark, the Journal Entry should be in 2 decimals. If i look for the Item Cost on the Wharehouse this cost should be in 6 decimals.
    Is there a way to handle Accounting in 2 units and Cost in 6 Units
    Thank You very much

    Hi Saul,
    The request appears illogical, how can the accountant work with 2 decimal places & the item valuation is held with 6? The stock account with 2 decimals will never match the stock audit report with 6 decimals.
    I'm afraid the SAP Business One core functionality does not cater for this need. There are no 'behind the scenes' journal entries. A JE is legally binding so you need to decide whether you wish to work with the most accurate calculations regarding item cost as possible (6 decimals) or accommodate the accountants & work with 2 decimals in the journals.
    You might want to take the nature of the stock into consideration, if there are huge quantities at small individual prices 6 decimals might be better, if you use mainly standard cost &/or have no major cost fluctuations when using MAP/FIFO, 2 decimals might be sufficient.
    All the best,
    Kerstin

  • 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

  • Rounding off to a variable value to 4 decimal values in sap script ouput

    Hi All,
    I have a value getting displayed in sap script output as 235.6789 i want to Round off this variable value to 4 decimal values!
    What is the formatting option need to be used & how!
    Thanks in advance.
    Thanks,
    Deep.

    Hi,
    1.In layout just call that variable, where you need like:
    &variable(.4)&.
    Just see these:
    &symbol(Z)&  Omit Leading Zeros 
    &symbol(S)&  Omit Leading Sign 
    &symbol(<)&  Display Leading Sign to the Left 
    &symbol(>)&  Display Leading Sign to the Right 
    &symbol(C)&  Compress Spaces 
    &symbol(.N)&  Display upto N decimal places 
    &symbol(T)&  Omit thousands separator 
    &symbol(R)&  Right justified 
    &symbol(I)&  Suppress output of the initial value
    Regards,
    If helpful reward with points(Don't forget).

  • Decimal places in Query generator

    Hi All,
    I am observing a weird behavior in Query generator's execution of a simple sql query. the query is :
    Select 0.002834
    now, in the general settings - display - amounts , I put the decimal value as 4 or 6,  then only it prints 0.0028 or 0.002834.
    else it prints 0.00 (if the decimal place is 2). it should ideally have nothing to do with the display of amount. any idea?
    (the effect is shown only after you change the decimal display, update it and close and reopen the SAP application.
    Thanks,
    Binita
    Edited by: Binita  Joshi on Apr 12, 2010 4:03 PM

    Hello Binita,
    >I have tried converting it to numeric(19,4) and numeric(19,6) but still the result was same.
    Check your decimal places settings in
    \Administration\System Initialization\General Settings\Display tab
    Check the following values:
    - Units (For meaurement)
    - Decimals in Query
    Now let' s say,
    - Unit set to 6 decimal places
    - Decimals in Query set to 2
    run the following query in query generator:
    select cast(0.000245 as decimal(19,6))
    result will be
    0.00
    run the same query as FMS on item master data in any measurement field (lenght)
    select cast(0.000245 as decimal(19,6))
    result will be
    0.000245
    Now set the - Decimals in Query set to 6 on  \Administration\System Initialization\General Settings\Display tab
    run the following query in query generator:
    select cast(0.000245 as decimal(19,6))
    result will be
    0.000245
    This is a normal habit of SAP B1 rounding engine / displaying engine.
    Regards
    J.

  • Cannot Update Decimal Places in General Settings

    When I try to update the decimal points in the Administration > System Initialization > General Settings > Display path, SAP B1 gives me the following error:
    "Cannot update while another user is connected to the company."
    I am the only one on the system as "manager" with "Super User" and "Full Authorization"...
    The SAP B1 Guide titled "How to Make Initial Setting in Business One - US" says "you can change these settings at any time".
    QUESTION:  What might be stopping this change, and more importantly, how do I get around this error to be able to change the decimal points?
    Thanks all - Zal

    Hi Zal,
    I agree with you about the strange messaging used by SAP.
    But blocking the possibility to decrease the decimal places is extremely important.
    Suppose you have inserted a sales document with two items in this way:
    Item 1 ___Qty 1,234  ___Unit price 1,22  ___Line total  1,51
    Item 2 ___Qty  5,756 ___Unit price 3,15  ___Line total 18,13
    ____Document total 19,64
    Then, someone wants to change the number of decimal places of the quantity from 3 to 2.
    What happens would be:
    Item 1 ___Qty 1,23  ___Unit price 1,22  ___Line total  1,51
    Item 2 ___Qty  5,75 ___Unit price 3,15  ___Line total 18,13
    ____Document total 19,64
    If you try to do the calculations manually you will see that the results are not correct. In fact all the document would have to change in:
    Item 1 ___Qty 1,23  ___Unit price 1,22  ___Line total  1,50
    Item 2 ___Qty  5,75 ___Unit price 3,15  ___Line total 18,11
    ____Document total 19,61
    Also if the document total will show correct (in the case of rounding the second decimal position of item 2), the totals of any line is wrong. In fact there is no recalculation at all in SAP (and must not be done).
    Imagine such a modification over thousand of documents and all of the descendants (mainly if the have lead to printouts - as say confirmations - sent to customers or vendors).
    None of the economic figures will match.
    BR
    Antonio

  • Decimal Places are not Permitted for Chile Country

    Hi All,
    In OVA8 settings for Chile country at the field max.doc value, i am not able to use the decimals. getting error message as Decimlas are not permitted (Message no - 00011). checked OY04 - there is no decimals for Chile currency. checked - OY01 Dec.Pt. format as 1.234.567,89
    For Argentina, Peru and Uruguay same settings has been done and i am able to save the decimal points in OVA8 at the field max.doc value.
    Please let me know if there is any specifis settings for Chile or SAP NOTE
    Thanks,
    Mahesh

    HI,
    just looking at a brand-new ECC60 / EhP4 system where nobody changed OY04 settings.
    I can find CLP (Chilean Peso) in the list with ' ' decimal places, so thats why there are no decimal places allowed.
    Check again OY04, if you find an entry for CLP and NOTHING is maintained it means that ZERO dec. places are allowed.
    If you find an entry in OY04 with a number of decimal places >0 than this decimal places are allowed.
    If there is NO entry for a given currency then its used with 2 decimal places (SAP standard).
    So OY04 is only for the currencies that should be treated different as SAP standard.
    Best regards, Christian
    Edited by: Christian Ortner on Feb 3, 2011 5:09 PM

Maybe you are looking for

  • How do I restore calendars in Lion iCal Server? Where are the files?

    I am ready to pull my hair out. I am an Apple Consultant as well.  However, Apple's choice to move to a postgres database without proper management tools is astounding. So, Apple makes a dump file every night into /Library/Server/PostgreSQL/Backup. 

  • IBook with Dell Monitor

    I'm thinking of getting a Dell 2005FPW monitor. According to Dell, it a system needs to support WSXGA+ resolution (1680 x 1050)to maximize performance out of the monitor. Can an iBook do this? Thanks.

  • Centered flash site with no margins

    I was wondering if any one could help me in "coding" my site to have my flash page be centered and have NO margins.... I know Kirupa.com had a code on his site in regards to some code to be placed in the "head" tag of the .html "page" but it has sinc

  • ICWC: Is it possible to create a link in a message in the error line

    Hi, after saving a service order in the IC WebClient the success message (including the object id) is shown in the persistent header area of the ICWC - in the error single line.  Is there a possibility to have a link in this area? I want to create a

  • Calling Methods from Business Object BUS2032

    Hi all,           Is it possible to call methods from the Business Object BUS2032.    If so, how can it be done??  Regards,