Round up a figure like 26.54

Can any one tell Function module to round up a figure.

Hi,
Here is the answer
DATA: X TYPE P DECIMALS 2 VALUE '12493.97'.
WRITE: /X ROUND -2,      "output: 1,249,397.00
       /X ROUND  0,            "output:    12,493,97
       /X ROUND  2,             "output:       124.94
       /X ROUND  5,              "output:         0.12
Regards
Sudheer

Similar Messages

  • Rounding - for Key figures

    Hi All,
    I have a requirement in BEx .
    lets say i have keyfigure A1 having value , A1 - 345.5678. if i will do the rounding for two decimals then the ideal result will be A1 - 345.57.
    but, i want to keep the value for A1 - 345.56 after rounding also.
    Please suggest.
    Regards,
    Macwan James.

    Hi,
    Actually the number of the decimal places to which rounding should
    be performed for keyfigures are defined in table T006-ANDEC.
    Please refer to the following notes and carry out the manual steps which will solve the rounding issue.
    442987 - Decimal places/rounding units of measure
    866505 - Unwanted rounding of units T006-ANDEC
    Please also check the following SDN link.
    No Rounding of Key Figure
    Regards,
    Amit

  • Rounding UP Currency figures?

    Hello!!!
    I have the following piece of code:
    SELECT
    LPA_HISTORY.CLAIM_NO,
    SUM ((LPA_HISTORY.END_DATE - LPA_HISTORY.START_DATE +1 ) * (LPA_HISTORY.LPA_AMT /7))
    FROM LPA_HISTORY
    GROUP BY LPA_HISTORY.CLAIM_NO
    I use this in Oracle reports and use the format mask $NNN,NN0.00 to round up the final figure.
    But the final figure always seems to be a few pence out, i think i need to be rounding up the *(LPA_HISTORY.LPA_AMT /7)* before i multiply it!!!
    How would i do this??
    Thanks :)

    Not sure rounding up will solve your calculation inaccuracies, but anyway...
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select rownum/10 as rn from dual connect by rownum <= 25)
      2  -- end of test data
      3  select rn, trunc(rn+0.5) as rnd_up
      4* from t
    SQL> /
            RN     RND_UP
            .1          0
            .2          0
            .3          0
            .4          0
            .5          1
            .6          1
            .7          1
            .8          1
            .9          1
             1          1
           1.1          1
           1.2          1
           1.3          1
           1.4          1
           1.5          2
           1.6          2
           1.7          2
           1.8          2
           1.9          2
             2          2
           2.1          2
           2.2          2
           2.3          2
           2.4          2
           2.5          3
    25 rows selected.
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • GR/IR rounding difference in LC

    Hello Team,
    We have client specific scenario in P2P cycle. Please find below our scenarios and suggest further on this issue.
    We will Create PO                                                  QTY   Price    Amount.
                                                                                       10     100        1000
    Then We book an Invoice                                          12     100        1200
    Then we Goods Receipt                                            10     100        1000
    Then we book a credit memo                                      2     100          200
    After all above  transactions done, then, In MB5S -> we see a difference of 0,01 in the value of the GR and invoice,
    even if the quantities are in balance:
                                                                                    QTY   Price     Amount
                                                        Goods Receipt     10      100        1000
                                                        Invoioce receipt   10      100        1000.01
    In FAGLL03 for the GR/IR account, we see also the open amount of 0,01
    euro:
    Thanks,
    Raj.

    This is probably because of rounding. I assume that . is decimal point in the example you have mentioned.
    If you use distribution by percentage, it may not be possible to exactly split the quantity unless your percentages are nice round figures like 10% or 50%. So there will be some rounding off if you have 27%, 31%, etc.
    The usual practice is to use the a smaller unit of measure if more accuracy is needed. For example, in your case, you may have used 3360 dm3 instead of 3.360 m3 (I know it does not sound logical since people are not used to dm3) or 3360000 cm3. This will make the splitting easier, but the downside is - there will be some confusion for the users - particularly vendor, goods recipient, etc.
    Lakshman

  • Rounding

    Hi
    In sales Order row lines i have fiven 2 decimal places . for eg it is not rounding off figure like 280.34 it is o.k , but in Total (LC) is is rounding off for eg 3245.47 to 3245.5 which i don't want
    Thanks

    hi manish
    what i a can suggest you is to mannulay do the rounding off to thetotal price of the AR AP INVOICES if that is accepted please reply ill tell u how to mannual round off the balance
    Regards
    Manish
    Edited by: manish.malik on May 7, 2010 11:04 AM

  • Problem in formula:value getting round off

    Hi All,
    I  need to divide 2 keyfigures and fill it in one keyfigure..
    What i am doing , In transformation  i have 2 fields in datasource one is value and other is quantity and i  am mapping these 2 fields with one keyfigure in ODS..
    I am creating formula in rule in which I am dividing value by quantity (value/quantity) but when i am running DTP and loading data the value in my keyfigure is coming after rounding off... like
    I have value 4,311,781.58 and quantity 16,200.000 , if i divide i should get  266.159
    but in my ODS this value is coming as 266.16..
    Please advise how to remove this roundoff functionality...
    Regards
    Shweta

    Hi shweta,
    You have two options in this case.
    1. Go to your created key figure. After clicking on change go the tab 'Additional properties".
        There you can see Decimal Places under business explorer. you can change the number of places if you know to what    places you need the calculated value.
    2. Go to your created key figure. After clicking on change go to the first tab Type/unit and change your data type to FLTP- Floating point number.
    Hope it helps.
    Thanks,
    Rahul

  • PO price rounding

    Hi All,
    There are three instances for this issue:
    1) When creating the PO, the effective price gets calculated like this Rs 8960.40
    Usually the vendor wants that the PO should be send to them in rounded figures like- Rs8960 or Rs8961.
    At the condition level commercial rounding is set.
    2) Same is the case, when the vendor sends the invoice, he rounds off the price.
    Like
    Gross price= 109
    BED= 17.44 ( he will round off to either 18 or 17)
    Same is the case for other conditions of PO.
    3) Same practice is followed by the client, if he receives the invoice in decimal (4520.23), he also wants rounds off  0.23
    How this scenario can be taken care?
    If the PO value is 8940.40 and vendor send the invoice for 8960, the difference of 0.40 will the stand in GR/IR clearing account.
    thanks and Regard

    Hi Neeru
    we are also facing same problem Rounding off  incase off Excise JMO1 ,We have tried here by putting one routine and attached to JMO1, it is working fine in the PO
    when we go bring material document it is not bringing that JMO1 value ,
    if u  got any solution pls help me , thanks in advance
    Regards
    Srinivas .Rangi

  • Rounding a float value

    totalamount = totalamount + Float.parseFloat(amount1);
    From the above code I am getting totalamount which is of float datatype. The value has more than two decimals like 123.23232 I need to round it to 123.23. How could this be done ? Any help is appreciated.

    You can do the following to round to two figures after the decimal point, rounding to the nearest neighbor, if they are equidistant, round up:
    totalamount = totalamount + Float.parseFloat(amount1);
    BigDecimal bigDecimal =new BigDecimal(totalamount ).setScale(2,bigDecimal.ROUND_HALF_UP);
    I hope this helps,
    Val.

  • Round Edged boxes in rtf templates

    Hi all,
    I have been really struggling to design rtf templates for XML Publisher with round edged boxes.
    The client requirement is to have all the tables/objects that contain data to have rounded edges..Just like a flowchart box..
    I have tried using the flowchart box, but when I increase the height/width of the object, the radius of the actual round edge object increases, thus distorting the entire look of the template.
    Can anyone give me some pointers on how I can overcome this issue using rtf templates.
    I would have gladly done this as a PDF template, but for the issue with lack of support for conditional logic.
    Any help will be truly appreciated
    Thanks,
    Lavina

    Hi ,
    You can select the number format in RTF template .Double click the Form Field select
    Type :Number
    Number Format :#,##0.000
    Thanks.

  • Currency Translation with a Calculate Key Figure

    Hi,
    Does anyone have experience with applying currency translation in BEX/Query Designer on a Calculated Key Figure? 
    I have a need for a calculated key figure to be converted to a target currency of USD (which is already defined via RRC1).  I also need the Results Row to display the summation in USD. 
    Currently, my calculated key figure displays two currencies (MYR and USD) and an incorrect summation of both currencies.
    Here is how I have defined my calculated key figure:
    NODIM ( 'Consumption (STOs)' ) * NDIV0 ( 'Material Source Plant Cost' / NODIM ( 'Source Plant Price Unit' ) )
    I am multiplying a quantity field by amount field and then dividing by a price per unit field.  I have applied NODIM on the other fields so that the amount field will retain it's properties.
    Running this query through transaction RSRT and clicking on the Generate Report button, I get the following message:
    "<b>Currency translation cannot be carried out for element 20 (my calculated key figure). Element 20 neither contains a Basic key figure nor a variable with type Amount. For this reason, you cannot and do not need to perform a currency translation</b>."
    From the above message, I must be setting my calculated key figure incorrectly. 
    Any ideas?
    Thanks!
    Hau

    Hello Ajeet and N Ganesh,
    Thank-you for your help.  I verified that the dimensions of my key figure 'Material Source Plant Cost' was of type 0AMOUNT, so that was not the issue.
    The issue was in the error message that was returned when I pressed the Generate Report button in RSRT.  Essentially, currency conversions in BEX can only be performed on basic key figures or simple replacement path variables. 
    I can perform the currency translation on a SIMPLE calculated key figure that contains only the replacement path variable (where 'Material Source Plant Cost' is an attribute of my master data characteristic ZMAT_SRC).  However, I found that I cannot perform the currency translation on COMPLEX calculated key figures, like in my example above. 
    To get around this currency translation issue and as suggested by the error message, I created a SIMPLE calculated key figure for replacement path variable 'Material Source Plant Cost' and performed the currency translation.  The problem with this solution is that while I get my currency translation, I also get a calculated key figure that is aggregated, according to the query layout.
    To get around the aggregation issue, I also created a dummy counter as a master data attribute (of ZMAT_SRC) to capture the aggregation.  I assign a value of ‘1’ to this dummy counter/master data attribute in the update rules to my ZMAT_SRC infoobject.
    I then divide my new (aggregated) calculated key figure for 'Material Source Plant Cost' by the dummy counter (which is also aggregated).  Essentially, I divided the aggregated replacement path variable by the scaling factor.  The result is that I get a new calculated key figure that has been translated into the target currency and in the correct scaling factor.  I can use the new calculated key figures in the above formula; regardless of the report is rolled-up.
    Again, thanks for your help.  It gave me the pieces to solve this puzzle.

  • Currency Translation for Calculated Key figures

    Hello Friends I want to use the Currency Translation for Calculated Key figures.
    But when I go to Query and go to conversion tab it is always greyed out. Does that mean we can set the fixed conversion type for calculated key figures. like ZSAD Total debit - credit -flow value.
    What is the way to do fixed currency translation in query for calculated key figures.
    All the below is done now just want to specify this in query but I can'nt since it is greyed out.
    All the below is done
    I have created a Currency Translation Type " FiscperConversion" "ZVHGR" now this has Exchange Rate Type from Variable "ZVARN" (Which is a variable single value manual input on 0RTYPE Infoobject for exchange rate.)
    2. Now Currency Tab: Target Currency is selected from Variable placed in the Report. ZRPVAR.
    3. Now the Variable Time Reference is used. Standard Infoobject 0FISCPER
    which is beginning of period.

    Hi soniya
    Your calculated KF is result of some calculation ...so system will not allow u to do any translation on it...to get CT on CKF you should do it on base key figure...still if you wish to do then you can create a formula variable having processing type a customer exit...write code in cmod to rad exchange rate and multiply ur CKF by this formula variable....
    Thanks
    Tripple k

  • Multiple Key figure in a single column of a query

    Hi,
    Is it possible to use muliple key figure like Amount and Qty field together in a column of a query?
    Please advise,
    Best Regards,
    UR

    Hi,
    You will be able to do it with the help of cell definitions.
    Say,you have a structure in Rows :
    A
    B
    For A ..in corresponding column cell,use cell definition with KF1
    For B.....in corresponding column cell,use cell definition with KF2
    this way,you will be able to see both in one column
    I m not sure how much it is relavant to your requirement.But this is one way of gettin it

  • What is the BAPI or FM that returns figures as seen on Txn MMBE ?

    Hello friends,
    I have to create a custom report that shows some of the figures as seen on Txn MMBE.   So may I know which BAPI or Function Module to use for getting figures like MMBE ?
    Thanks,
    - Chetan
    PS: I searched this forum, but the earlier response of "BAPI_WHSE_STOCK_GET_LIST", or  "BAPI_MATERIAL_STOCK_REQ_LIST", or "BAPI_MATERIAL_AVAILABILITY" are all not for MMBE report.

    Looks like the different stock types/categories/special stocks  are gathered individually. Try function modules in Function group MBBS.

  • PHP Rounding Up Issue

    Hi Chaps,
    I have an SQL query that calculates a word count multiplied by a fixed figure:
    "...$pricegross = ($row_rsInvPending['projanalysis_total']*$row_rsInvPending['costbase']);..."
    Then use a bit of php code to round up the figure to 2 decimal places....
    <?php echo number_format($pricegross, 2, '.', ''); ?>
    I then total up $pricegross for all records:
    ".....SELECT SUM(projanalysis_total) as total_pricegross..."
    If I have two records:
    ($pricegross) 1. £2.295
    ($pricegross) 2. £2.295
    There are both displayed as £2.30, which is what I want
    Then the total ($total_pricegross) shows up as £4.59, but what I want is: £4.60
    Is this possible?
    Hope this is clear?!

    I don't know php, but wouldn't you just use the same rounding function (assuming that's what number_format is doing)?
    <?php echo number_format($total_pricegross, 2, '.', ''); ?>

  • How to write conversion routine for key figure?

    Our customer has this requirment:
    we need to know the last time of some TV program in BEx report, If a TV program last 500 seconds, we need show the key figure like this:  00:08:20, If a TV program last 100000 seconds, we need show the key figure like 27:46:40 (27 hours and 46 minitues and 27 seconds), If we define a key figure as time,  BW system will report a error that say it is not acceptable time.  If we want to define a integer, but we need display it like hhmmss format.  We know we can write conversion routine for char.  but I don't how to write conversion routine for key figure.   Please give me any hint if any other solutions?
    Edited by: SY DONG on Dec 2, 2010 3:36 AM

    If you want to do in Transformation Layer :
    You can use routine ...break up the seconds into minute hour and seconds
    you will have to handle few cases in this:
    let say your variable lv_seconds holds the number of seconds you want to convert to hour min and seconds
    DATA: lv_seconds type i,
               lv_hrs  type  i,
              lv_sec type i,
              lv_min type i.
    lv_hrs = lv_seconds / 3600
    if lv_hrs >= 1.
    lv_min = (lv_hrs - trunc(lv_hrs))*60
    here again handle seconds if min >60.
    else.
    lv_hrs = '00'.
    lv_min = lv_hrs*60
    It is just hint ..how you can manipulate the seconds to get it...you will have to think about the complete algorithm
    Regards,
    RK

Maybe you are looking for

  • How to Refresh a Page once saved to database in ADF.

    Hi, I created a JSF page using project template as "JSF,ADF,business components". There is a List of values displayed in a dropdown list, User can create new value and once it is saved to the database it should reflect in the list of values.But it is

  • Full Package

    Hey am new to this and im a bit confused with all the different licensing  options, do i understand it to be rite if i perchase a full package do i get full use out of it for life but pay full price, and if you have a different licence it last for a

  • Processing in Idoc

    Hi I have a Scenario. Loop at idoc records. Step 1: Thru User Exit Before Posting I Called a BAPI but did not Commit. Step 2.Idoc  is proccessed.            If Idoc _status = successfull                Will My BAPI will commit Automatically ? Endloop

  • Installation help - Ultra 450

    I just purchased a used Sun Ultra Enterprise 450 server to experiment with Solaris (I'm an old SCO Unix guy but new to Solaris). It's loaded with 20 9GB drives. I'd like to set up software RAID. Where is the best place to get good installation / conf

  • Extending DPS reader with static libraries and frameworks

    Is there any initiative within Adobe's roadmap to enable extending DPS reader within Xcode by use of static libraries and frameworks? Core functionality of the reader could be linked and distributed as binary assembly via static libraries. Shared res