Mdx rounding of values included in calculation

Hello Experts
We have a problem with decimals which result in very large figures for some calculations so therefor wan't to add a rounding like this but then we will only round the result, but we need to round the values included in the calculation:
// Calculated in PS
*function fn_INDIPS(%denominator%,%numerator%,%p3%)
     iif( (%denominator%,[currencydim].[sek],strToMember(categorydim.properties("PS_INDEX_CAT"))) = 0,Null,round((%numerator%,[currencydim].[sek],strToMember(categorydim.properties("PS_INDEX_CAT"))) / (%denominator%,[currencydim].[sek],strToMember(categorydim.properties("PS_INDEX_CAT"))),4) * %p3%), solve_order = 9
*endfunction
So i think what would solve it would be to add a rounding to the "if devided by 0 then null" or a if OR(<0.0001;>0.0001) but from what i have tried that is not possible. Do you know if it's possible or du you have any other suggestion for how we should get aroudn the problem?
// Calculated in PS
*function fn_INDIPS(%denominator%,%numerator%,%p3%)
     iif( (round(%denominator%,[currencydim].[sek],strToMember(categorydim.properties("PS_INDEX_CAT"))),4) = 0,Null,(%numerator%,[currencydim].[sek],strToMember(categorydim.properties("PS_INDEX_CAT"))) / (%denominator%,[currencydim].[sek],strToMember(categorydim.properties("PS_INDEX_CAT"))) * %p3%), solve_order = 9
*endfunction
Best regards
Jonas

Hi Perven,
You can definitely do a round off using the native excel formulas. However, the problem lies with the EVDRE. Whenever an EVDRE template is expanded, all the custom formulas maintained in the expansion range gets overwritten. So, it will be little difficult. One option would be to turn off the expansion for either rows and columns and use the custom functions for you purpose.
Hope this helps.

Similar Messages

  • Rounding off value problem in sales order

    Hi All,
    This is related to a rounding off value problem in sales order.
    The problem is described by an example which is as follows -
    Selling Price of Material A = Rs. 176.76
    Excise charged = Rs. 21.80
    Total Price = Rs.176.76 + Rs.21.80 = Rs. 198.56
    On this total Trade Discount (ZDTD) having access sequence,is calculated  at the rate of 4% = Rs. 7.94
    But the condition base value after the discount is showing Rs.198.60 instead of Rs.198.56
    I want the system to reflect the value as Rs.198.56 intact and it should not round up to the nearest value i.e. Rs. 198.60
    Why is this happening? Is it possible to reflect the exact value? If yes what is needed to be done?
    The commercial round off is activated for the DIFF Condition Type.
    Looking forward to some valuable suggestions.
    Thanks & Regards
    Priyanka Mitra

    Hi Ramesh,
    Thanks for your suggestion but the problem has been solved by me.
    Regards
    Priyanka Mitra

  • Event.value = Math.round (a.value * 5.00) / 100; Replace this with an input field for user to change

    I have a taxe calcul script in a field with a annulation check box like this:
    if (this.getField("CheckBoxHST").value=="Off") {
    // no tax
    event.value = 0;
    } else {
    // calculate the amount of tax to be paid
    var a = this.getField("pricehorstx");
    event.value = Math.round (a.value * 5.00) / 100;
    I like to able the user to change the percentage —>  (a.value * 5.00) with a simple text field — Say they enter 6% or any other percentage in there and the calcul become (a.value * 6.00) / 100;
    Not to sure how to acheive that....

    Work perfectly thanks...
    I feel so bad, everything work perfect, almost   — 
    — I just want when I check off (checkbox) the tax calculation to put whatever is in the tax percentage input box to zero and I can’t

  • MIRO u2013 Rounding (IPI value)

    Dear All,
    We have the following scenario (version ECC):
    When is performed manual adjustment during the invoice entry (for IPI) u2013 MIRO the original value: 3.936,08 BRL is replaced, manually, by the new value: 3.936,07 BRL (adjustment of 1 cent)
    The reason for that is:
    Then, SAP calculates 3.936,08 BRL (during MIRO, and that amount goes to Fiscal Books - taxes in MM have only two digits).  We perform a manual adjustment to get the amount 3.936,07 BRL, equal to Vendor´s invoice - The NF provider is calculated up to 6 digits.
    This can lead to inconsistency of values (rounding). This problem is not related to release of SAP.
    -     The divergence of SAP for the fiscal books, generating inconsistency in SPED.  Is there any solution or note for this scenario?
    Tks!

    Resposta by SAP     
    Answering your first question:
    "Is there any solution or note for this scenario?" - No.
    What happens here is that the base amount at Nota Fiscal is rounded
    during the tax calculation, and this cannot be avoided due to the code
    complexity.
    In this case, you have to manually adjust each tax line.
    Unfortunately there is no alternative procedure to reach the desired
    values. Please, see the answer from our second level team:
    The rounding of values is carried out in different function modules
    within the system. In order to guarantee that the Nota Fiscal created inthe system matches the physical document, the only way is to perform amanual adjustment in the NF screen.
    If you think that these fields should have the same value, and manual
    changes should not be the solution, I ask you kindly to contact ASUG andexpose your viewpoint about it, once there is no other solution but
    correcting it manually, according to our development team.

  • Rounding Off Value is not copying from Sales Order to Invoice

    Hi Experts,
    In Pricing Procedure i maintained DIFF- Rounding Off Condition type with the following Combinations.
    Print:X
    Requirement:13
    Cal Type: 16
    Bas Type: 4
    When i create sales order the system is calculating Rounding Off after saving the sales order.The requirement is that it should shows the rounding off value before saving the sales order.Secondly when i make invoice the rounding off value is not copying from the saved sales order.After i save the invoice in VF02 the rounding off value is coming .
    Regards
    Subhasish

    Cond type DIFF has cond catgory L Generally new when copying. So the value from sales order will not be copied, it will be redetermined in invoice.
    Also rounding off cond is to round the total value which can change in invoice based on the invoice qty.

  • Need rounding off value for partial Goods receipt

    Hi,
    My requirement is that the PO value,PO tax value ,GR value and Invoice value(IR) should get rounded off.
    When I am using the PO value which is rounded off in PO, but at the time of posting partial goods receipt the value for the GR/IR clearing or the stock value is not getting rounded off for these G/ls.
    What should I do for this to get the rounded off values in GR.
    Regards,
    Goraksh

    Hi Goraksh,
    The problem is that the pricing (incl. the rule 17) is not normally called at the time of GR. As Jürgen wrote, the system just uses the "net value" field of the PO.
    I have however a "wild" idea. If the price in the PO comes from the info record or from a contract (and not changed manually there), then you can set the "pricing date category" = 5 there, meaning "GR date". This causes the pricing to be called again at the time of GR and your formula 17 will fire.
    The side effect of course is that the price that you had in the PO, printed and sent to the vendor will not be binding: if you change the PIR price before the GR, the GR will be posted to the new PIR price, despite the fact that the PO printout showed something else. So the question is if the price printed on the PO is indeed binding in your business case - in many business cases it is the current vendor price that matters for the billing by the vendor, not the one that you prined on the PO. For such business cases you should have had pricing date category 5 anyway...
    BR
    Raf

  • Urgent Regarding round off values in script

    Hi Gurus,
    I want to display round off values in total amount . Order conformation
    i wrote one suroutine but it is not working , it is going for dump.
    Eg:- total amount = 10004.49 it should display in 10004.
             total amount                 = 10004.51  it should display in 10005.
    Plz help.
    REPORT  ZVALUES.
    tables:komk.
    form round TABLEs INTAB  Structure ITCSY
                                         OUTTAB structure ITCSY.
    data: w_fkwrt type fkwrt,
             w_fkwr type fkwrt.
    read table intab with key name = 'KOMK-FKWRT'.
    if sy-subrc = 0.
    w_fkwrt = intab-value.
    w_fkwr = ceil( w_fkwrt ).
    outtab-value = w_fkwr.
    condense outtab-value.
    modify outtab transporting value.
    endif.
    endform.
    in layout i call this subroutine like this.
    /:DEFINE &KOMK-FKWRT1& := &KOMK-FKWRT&.
    /:PERFORM ROUND IN PROGRAM ZVALUES.
    /:USING &KOMK-FKWRT&.
    /:CHANGING &KOMK-FKWRT1&.
    /:ENDPERFORM.
    SU Final amount,,,,,,,,,,,,,,,,&KOMK-FKWRT(I13)&
    Thanks & Regards,
    Vamshi

    Use this FM
    CALL FUNCTION 'HR_IN_ROUND_AMT'
      EXPORTING
        amount        = p_amt
        rndoff        = '100'.
       RNDLMT        = 'N'
    IMPORTING
       RETAMT        =
       DLTAMT        =

  • Regarding rounding off value in pricing procedure

    hi fi professionals,
    i have an issue regarding pricing procedure, pls help me out, its urgent
    i have a condition type, zrou(rounding off value)
    the fanda is- when i am creating po- my net value is suppose- 19.90.
    so my client requirement is- 0.10
    so i have given 0.10, then total value is- 20.00
    but this value is not pickin up in migo- accounting document
    it is picking 19.90 only.
    so what is the configuraion needed in omsy for picking up the total value in accounting doc.
    regards,
    susanta

    Hi..
    You would need to maintain a account key in the pricing procudure which would calculate the balance to make the total a rounded value.
    In FI perspective, you need to assign a GL account for that..
    Cheers
    Raghu

  • Minimum Value Sucharge not calculated

    Hi Gurus,
    I created condition record ZMIW for material 1234 1000 Euro but in the Salesorder Condion Tab
    SD Minimum Value Sucharge is same with Minumum Order Value
    Mat 1234 1 pc 200 Euro
    Minimum Order Value                            1000 Euro
    Minumum Minimum ValueSurchrg          1000 Euro (it should be 800 Euro)
    I use the Condition types ZMIW and ZMIZ
    In the Pricing Procedure                                                                               
    SubT    Reqt   Calty                  acct
    817       0          ZMIW   Minimum SalesOrdrVal                                      D          2
    818       0          ZMIZ     Minimum ValueSurchrg                                                 2          13                    ERS
    RefCondtTyp is ZMIW fpr CondType ZMIZ
    Could please tell what should I check ?
    BR,
    Emre
    Edited by: Y. Emre Kurnaz on Sep 11, 2009 9:00 AM
    Edited by: Y. Emre Kurnaz on Sep 11, 2009 9:01 AM

    Hi,
    thank you for your reply.
    I maintained the Condtyp ZMIW and ZMIZ
    ZMIW from 800  subtotal D and requirement 2. i typed step number 800 (where Net Value for Item calculated).
    ZMIZ requirement 2 and altcalc type 13
    I maintained Condition record for ZMIW 1000 Euro.
    everything looks right. but minimum order value and surchage are same (both are 1000 Euro.)
    I tried with standard pricing procedure (RVAA01) the result is equal
    I donkt know but  it should not be so complex.
    Thanks in Advance
    Emre

  • Excise Duty Values is not calculated in Po

    Hi,
    Even though we have maintained the Excise rates in J1ID the and the corresponding Tax Code in FTXP
    when we check the Pricing in the PO the Excise Values are not calculated.
    Can any body please help me.

    dear sir
    please check for you vendor , vendor excise details maintained in J1ID , and Excise tax indicator for vendor
    1 you have give or not check.
    also check excise indicator for the plant in J1ID. Excise tax indicator for company, give 1.
    then create the PO and check the excise amount.
    regards
    jrp

  • Rounding up values in Print Layout Designer

    The customer has a database field in print layout designer and this is bringing back a value such as 0.25.  They would like to create another field which shows this value rounded up to the nearest whole number, ie in the case of 0.25 they would like to see 1.
    They have created a formulae field and used the round function, however this rounds the value down to the nearest whole number as per the general rounding rule i.e. round it down if it is below .5 and up to the nearest whole number when it is above .5
    Is there anyway to achieve this using Print Layout Designer in SAP Business One 2007 A?

    Hi Samantha,
    Apologies for the delay.
    Yes, its possible to do this.  Firstly, you will need to use the fields from my earlier post.  However you will also need to add some more formula fields
    The first formula field will work out what the numbers are to the right of the decimal point:
    DecimalRight(Field_101)
    Field_101 in your case will be the field ID for the quantity field and the field ID for the above formula field will be Field_102.
    The second formula field will work out if the quantity is a whole number, here the field id will be Field_103:
    Field_102==' '
    The third formula field will work out if the quantity is not a whole number, here the field id will be Field_104:
    Field_102!=' '
    You can now use the Link To functionality to link the original quantity rounded field to Field_103 and you can link the quantity plus 0.5 rounded field to Field_104.
    Kind regards,
    Adrian

  • Rounding up values in the report. Ex. 10.2345 to 10, 11.7756 to 12.

    hello
    i have one problem. i want to round off the key figures in the report in BEx. like rounding up values Ex. 10.2345 to 10, 11.7756 to 12.  
    pls help. its urgent.

    Make the Decimal setting in teh Key Fig properties as mentioned in the above post. If this does not work try the following. 
    Hide ur actual column of the key figure K.F
    Create a Formula Key Figure.You need to use Mathematical and Boolean Operations .Create the following formula
    ( FRAC ( 'K.F' ) >= 0.5 ) * CEIL ( 'K.F' ) + ( FRAC ( 'K.F' ) < 0.5 ) * FLOOR ('K.F' )

  • How to achieve round off value in SAP?

    here I have given my Query ..I need to calculate rounding off value for this query..
    SELECT (CAST($[OBTN.U_Length] AS FLOAT)/CAST($[OBTN.U_Width] as FLOAT) *($[BTNT.Quantity]))

    Hi Karthick,
    I am not sure wheter I understood you, but are you searching for
    SELECT FLOOR((CAST($[OBTN.U_Length] AS FLOAT)/CAST($[OBTN.U_Width] as FLOAT) *($[BTNT.Quantity])))
    regards,
    Maik

  • About round off values

    Hi Abapers,
                           i am using 'ZTOOL' transaction code which is plant maintainence. my requirement is i am handling bdc table control which fields are give below when i am putting the given values
    work centre    :      140-296
    short text   :       ' sdn is having good experts'.
    work   :              6,5
    duratioon   :      3,7
    but output is coming in the  below way
    work centre    :      140-296
    short text   :       ' sdn is having good experts'.
    work   :              7,0
    duratioon   :      4,0
    it is off rounding the values. i want the accurate value. what you want me  to do? i tryed a lot. please guide me.
    the out put should be
    work centre    :      140-296
    short text   :       ' sdn is having good experts'.
    work   :              6,5
    duratioon   :      3,7

    HI,
    Please use 'STRING' data type instead of the current one.
    It will sort out your issue.
    Regards,
    Anversha

  • Not able to round off value

    Hi guys
    Even after giving indicator "17" in (Rounding as per T001R) in the pricing procedure, we are not getting the round off value while sales processing.. Any suggestions.
    Regards
    Sidhu

    Hi Raghu
    As per your suggestion i checked the rounding rule and its given commercial there. Its been given the same for our other clients also. The thing is that we need to get the round off value in the total.
    regards
    Sidhu

Maybe you are looking for

  • HT1819 How can I update an existing episode of my submitted Podcast?

    I have just launched a podcast and the feed has been accepted by iTunes (https://itunes.apple.com/gb/podcast/saving-next-christmas-part-1/id767756348?i=1 95161397&mt=2). However, I have made certain imporvements to it and have since uploaded a replac

  • TCRMBP_REFCUST --- Replication of BPs from CRM to ECC

    Hi - We have a CRM - ECC (SD / ISU) environment. I have a question about TCRMBP_REFCUST table. 1. How exactly is this table used? Is this table used when replicating the CRM BP into ECC? 2. This table seems to give me a better control over the sales

  • HT204400 Apple TV using surf

    I have a new md199ll Apple TV box, Motorola surfboard SB6120, and a medialink wireless N router. I am not able to mirror or airplay from my dell laptop, latest model ipad, or iPhone 5. I made sure home sharing and latest versions of iTunes are instal

  • Solaris 10 NIC, what do you use?

    Well my previous post http://forum.java.sun.com/thread.jspa?threadID=5258945 yeilded no comments other than a link to the approved hardware list http://www.sun.com/bigadmin/hcl/, thank you SolarisSAinPA for that little bit of info, but I am sill left

  • So Many Sync Problems I Don't Know Where to Begin

    I can't for the life of me get all but a few of my purchased TV shows to sync from iTunes to AppleTV. I've tried switching from "Automatic" sync to "Custom" sync, checking/unchecking boxes, restarting iTunes, repairing permissions -- still nothing be