Convert amount with four decimal places to amount with two decimal places

Hi,
for specific reasons we have set the prices to four decimal places. However, in an invoice the staff needs to see all prices with two decimal places. Therefore I have created new user-defined fields which should show the rounded values However, I have not yet found the right formatted search that outputs the value with two decimal places including currency symbol.
The statement 
SELECT $[$38.20.NUMBER]
outputs the value with two decimal places which is fine, but it does not contain the currency.
The statement
SELECT $[$38.20.0]
outputs both value and currency, but the value still has four decimal places as the original price.
And the statement
SELECT CAST($[$38.20.NUMBER] AS VARCHAR(20)) + $[$38.20.CURRENCY]
outputs a value with even six decimal places.
Did anyone already have the same problem???
Or does anyone have any idea???
Thanks and regards
Corinna

Hi again,
the value should be displayed in a user-defined field of the screen.
The result of the query
SELECT $[$38.20.NUMBER]
has already two decimal places, so that I do not need a round here. But the currency is missing.
When I add the round function to the query
SELECT $[$38.20.0]
it does unfortunatly result in an error.
Any ideas????
Thanks so much in advance!

Similar Messages

  • Rounding to two decimal places in BPC/NW

    Hello,
    I am dealing with the task to round values to two decimal places. I have found some discussions in BPC-MS where the statement ROUND should work in logic. Unfortunately I am not able to make it work in the NW version.
    Isn't there also a parameter in the appset or application administration which would cut the numbers only to two decimal places (this task would be also a possible solution for us).
    Thanks for any help
    Jan

    Hello Pravin,
    the second import worked fine. I realized that the class has changed to ZCL_BPC_SL_ROUND.
    I debugged the class and noticed that the parameter it_cv is not filled at all. Therefore the program ends before starting the rounding procedure. Here is the part of the code:
    Take CV into account
      clear l_success.
      loop at it_cv into ls_cv.
        clear l_val_string.
        loop at ls_cv-member into l_member.
          if sy-tabix eq 1.
            l_val_string = l_member.
          else.
            concatenate l_val_string l_member into l_val_string separated by ','.
          endif.
        endloop.
        if l_val_string ne space.
          l_success = add_dim_restriction( i_param = l_val_string i_dimension = ls_cv-dimension i_clear = abap_true ).
          if l_success eq abap_false.
            concatenate 'Failed to successfully add Dimension' ls_cv-dimension into l_log_msg
            separated by space.
            cl_ujk_logger=>log( l_log_msg ).
            cl_ujk_logger=>log( 'Exiting Round Method' ).
            cl_ujk_logger=>empty_line(  ).
            raise exception type cx_uj_custom_logic
              exporting messages = et_message.
            exit.
          endif.
        endif.
      endloop.
      if l_success eq abap_false. exit. endif. - here the program exits and therefore doesn't do any rounding.
    If I comment this part the system rounds correctly but runs on all records in the cube which degrades performance a lot.
    Could you please advice further if it is possible to restrict the data region only to the submitted data?
    Best regards
    Jan

  • Incorrect decimal notation of amounts for different countries

    Hi,
    We are making payments to vendors across different countries through Cheques and BACS.
    We are facing an issue with the decimal notation of amounts trhough APP run.
    For UK based  vendors amount are passed to the cheque in the format 10,000.00 (Ten Thousand)
    For non UK based vendors amounts are passed to the cheque in the format 10.000,00 (Ten Thousand)
    Could you suggest on this issue?
    Thanks,
    Naresh

    Hi Naresh ,
    Check the country specific settings in your system . The path for the same is:
    SPRO > SAP Netweaver > General Settings > Set Countries > Specify Countries in mySAP system.
    Check the Decimal point format setting for both US and UK in the same. I think in your system its maintained differently and because of which you are getting the error
    Hope it helps
    SJ

  • I bought this iPhone from Apple Retail Store for the full amount, but  it does not work with my SIM card only works with AT&T

    Hello,
    I have an iPhone 4S 32Gb White AT&T, product part No. MC921LL/A, Serial No. C39GMLPWDTDC
    I bought this iPhone from Apple Retail Store (from Fifth Avenue, NY) for the full amount. Now it does not work with my SIM card only works with AT&T. I restored the phone several times, but I have not received "Congratulations your iPhone has been unlocked". Please activate my iPhone to work with different SIM cards
    Thanks,
    Best Wishes

    When did you buy it?
    Apple did not begin selling an unlocked version of the iPhone 4S in the US until 11/11/11. I believe it went on sale only through the online store at that time. I'm not sure if it's available at retail yet.
    What you purchased was a phone without a contract commitment. It is still locked to AT&T. AT&T will NOT unlock iPhones for any reason.  Return it and get your money back, then use that to purchase an unlocked phone.

  • ME13-Difference in the decimal notation in amount in conditions

    Dear All,
    I get this issue in the conditions of ME13(PIR). The value in the database(KONP-KBETR) has 2 decimal places, whereas in the screen, decimal notation is not present. i.e., the value looks like being multiplied by 100. This is present only in one system. The other system shows the value as it is in the database. This is common for all users.
    How can I change this? Is it some screen setting? Please help.
    Thanks,
    Sumanth

    The database always stores the values with 2 decimals, but  dependend on the currency settings the SAP programs that show the values to the user (except they are using SE16)  or calculate values, or printing puchasing documents   will take care to show it in the right form.
    If you develope your own programs, then you have to take care about this by yourself.

  • Uploading Number with Two Decimal Places

    I am trying to import data from my excel file to table in the database using SQL Developer.
    It is working fine except that in my excel file I have data with two decimal places, but during import it shows only one decimal place. Is there any way I can import data with two decimal places?

    This works well with SQL Dev 1.5.X.
    Guess it would have been a bug in prior versions.

  • Control with a foot pedal the amount of signal ?

    I would like to control with a foot pedal, the amount of signal that goes to an effect bus.Thus using the pedal to increase/decrease the amount of effect. Anyone know how to do that?

    mooblie I would expect he does since two of the external HD showup/work but a third does not.
    mooblie wrote:
    I assume you're all set OK here:

  • Is it possible to convert a float to two decimal places

    Can anyone help me to convert a float to two decimal places
    float f=16;
    System.out.println(f);
    It will print 16.0
    But I want to get printed as 16.00

    "convert" no, as no conversion is needed, obviously. Format the output, yes. Read the API for String and its printf method.

  • Help!printing float values with two decimal places

    hi there java pips! im a newbie to this technology so forgive me for this really stupid question....i would like to perform mathematical operations on two float values....the problem is i want to print them in a standard format and that is i want them to be displayed with two decimal places (e.g 190.00, 12,72, 1,000.01) how can i do this?

    Try java.text.DecimalFormat
    NumberFormat nf = new DecimalFormat("0.00");
    System.out.println(nf.format(x));

  • Convert to two decimal places

    Hi I have some code which I have written but am unable to convert it to two decimal places. Have tried various techniques by looking through some of the forums. My problem is that my data starts off as varchar(500) and initially I have to substring to get
    the actual numeric part of the data.
    At the moment i get a result such as 48487.800000. I would like 48487.80.
    Just wondering if anyone has any ideas where I could be going wrong. Here is my effort.
    select SUM(Next_Value)/100 AS ResultExpected from
    Select A.ID,  A.LogData,
          (Select Top 1 
    --CONVERT(numeric,
         -- cast(substring(B.LogData,6,36) AS numeric(10,2))
          --CONVERT(numeric(8,2),cast(substring(B.LogData,6,36) as numeric(8,2)) )
           cast(substring(B.LogData,6,36) as numeric(10,2))
          From HMRC_Load B
             Where B.Id > A.Id and A.LogData like 'NewFigure%'
             order By B.Id) as Next_Value 
    From HMRC_Load A
    where A.LogData like 'NewFigure' 
    ) AS ResultExpected
    Top Geezer

    select CAST(SUM(Next_Value)/100 AS Numeric(10,2)) AS ResultExpected from
    Select A.ID, A.LogData,
    cast((Select Top 1
    substring(B.LogData,6,36)
    From HMRC_Load B
    Where B.Id > A.Id and A.LogData like 'NewFigure%'
    order By B.Id) as numeric(10,2)) as Next_Value
    From HMRC_Load A
    where A.LogData like 'NewFigure'
    ) AS ResultExpected
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Why the doc total amount is not matched with the total item line amount?

    Hi,
    Recently when i try to update something in sales order via my add-on, i got an error said u201CThere is a difference between the document total and its components.  [ORDR.DocTotal][line: 0] Iu201D Then i checked the sales order in SAP B1, I found the document total amount was not matched with the item line total amount. Actually the item line is quite simple, there is only one item line with qty 1. How comes the document total could be different with the amount from item line? I know the document total amount is a read-only field which is calculated automatically by SAP. This is really weird for us, we don't know how this happened.
    Has anyone experienced similar situation like mine and how this happens?
    Thanks,
    Lan

    I am having this same issue and I have additional information.
    I am on ver. 8.8 PL 16.
    Periodically (mulitiple times a week), when a Sales Order is created, the Doc Total amount is -zero- when there are clearly items that have a price associated with them. This causes an error when Adding the document. Sometimes, I can just change the quantity of one of the items, which forces the Doc Total to update.  Most of the time this does not work, though.  I end up having to restart the SAP client and then everything begins to work as it should.
    This behavior is occuring on mulitple machines in our office.
    Earlier in this thread, Rahul mentioned that they currency rounding was turned off and that this could be part of the problem.  In fact, we were having issues with Currency Rounding and did turn it off not long ago.  Rahul, can you explain better what you meant by "give the proper amount so that you can overcome the error..."
    Randy Davis
    Denver, CO
    Edited by: Randy Davis on May 16, 2011 2:01 PM

  • HT1923 I have a Vista Operating system with 2 users.  Somehow I got two different play lists each with one user.  One is too big for the storage and has a vast amount of duplicates.  Can I delete the one that is twice as large and then access the other li

    I have a Vista operating system with 2 users.  Somehow I got two diffent libraries for the users.  How can I delete the one and then access the correct library on the other users profile?

    Use the trackpad to scroll, thats what it was designed for. The scroll bars automatically disappear when not being used and will appear if you scroll up or down using the trackpad.
    This is a user-to-user forum and most people will post on here if they have problems. You very rarely get people posting to say there update went smooth. The fact is the vast majority of Mountain Lion users will not be experiencing any major problems with the OS, or maybe with apps which are not compatible, but thats hardly Apple's fault if developers don't update their apps.

  • How to custom select minimum amount of addons and plugins to load with Firefox browser?

    Hello, I am using latest Firefox 24.0 along with Window xp service pack 3, with approx 1 1/2 Gb memory along with Firemin Plugin to keep Firefox Memory up. I will hopefully be upgrading my PC by early next year.
    However even when using Firemin along with Firefox, many times regular Firefox is bloated, and still uses too much memory, so, many times I have to open Firefox in Safe Mode, just to be lighter.
    Is there any way to open Full Version of Firefox, in a Custom select mode, where I can have set just the minimum Addons and plugins actually needed at the time, without having to go thru and disable the ones do not need? I wish I could use Firefox in safe mode all the time, because is so much lighter, but sometimes I just need the full feature version. Please advise, and thanks for your help!

    You can use multiple profiles and the -no-remote command line instance
    to load different (clean vs addon bloated) profiles.
    SEE
    * http://kb.mozillazine.org/Command_line_arguments
    AND
    * [[Use the Profile Manager to create and remove Firefox profiles]]

  • 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();
    }

  • Need only two decimal places, but BigDecimal isn't working

    Hello again. This time I've got a problem with getting only two decimal places. I tried using BigDecimal but when I compile it, I get an error "cannot find symbol class BigDecimal" and a "cannot find symbol variable BigDecimal".
    Grrr... I just want my value to have only 2 decimal places before it ends up in my text field.
    Any help will be appreciated.
    - Phonse
    if (ostuff1.equals("amt tendered"))
                     finalamt = total1 * 1.12;
                     change = cash1 - finalamt;
               BigDecimal finalamt2 = new BigDecimal(finalamt);
                  finalamt2 = finalamt2.setScale(2, BigDecimal.ROUND_DOWN);
                  BigDecimal change2 = new BigDecimal(change);
                  change2 = change2.setScale(2, BigDecimal.ROUND_DOWN);
                  finalamt = doubleValue(finalamt2);
                  change = doubleValue(change2);
                     addItem(String.format("Amount Tendered:          "+"P "+finalamt));
                     addItem(String.format("Change:                     "+"P "+change));
                   }

    @ georgemc
    Isn't it better to import whole packages instead so
    you can have everything available when you call them?
    I mean, it's kinda hard to import individual classes
    everytime you need to call them.No. You can get conflicts when importing complete packages. If you importjava.awt.*;
    java.util.*;and then declareList list;the compiler does not know which List you meant, java.util.List or java.awt.List.
    Offtopic @ prometheuzz
    LOL. When I was a kid still playing my Playstation I
    wanted to have a career in computers when I got to
    college. Now I'm 14 and a 3rd year high school
    student and I just got a reality check -- computers
    just isn't for me. And alot of those professionals
    say Java is the "easiest" programming language. O_O
    Meh. I'll just follow my other dream of becoming a
    chef. Just seems like my parents won't like it...
    Bleh... Two more years... Two more years...Sure, but if you like programming, work (hard) for it. Most people have to work hard in order to become good at something, no one is born as a programmer. This goes for becoming a chef as well.

Maybe you are looking for