Formula at characteristic level

Hi All,
I have a scenario in which I need to implement the formula in BeX at characteristic level. For example
Comp Code     Plant     Material     Sales     Qty     Actual Rate(Sales/Qty)     Target Rate     Variance (Actual Rate - Target Rate) * Qty
1001               TT01     ABC          100        10      10 (Rs/Kg)                         5 Rs/Kg           5 * 10 = 50Rs
1001               TT01     ABC          500        10      50 (Rs/Kg)                         5 Rs/Kg           45 * 10 = 450Rs
1001               TT01     BCA           900        10     90 (Rs/kg)                         100 Rs/kg        -10 * 10 = -100 Rs
From above calculations, total variance is 50 + 450 - 100 = 400 Rs
So, I need to make one report in which there is only one selection 'Variance' and it should display 400 Rs
i.e.
Variance = 400 Rs
Please help how should I create such requirement in BeX.
Thanks.

Hi Sameer,
I think in bex level you can't do it if your requirement is showing 450 when removing the material characteristic. You can add a KYF to your infoprovider and do the calculation through transformation and in the query that will work fine.
Regards
Yasemin...

Similar Messages

  • Logical Formula at query level?

    I have requirment like if D =  0 then ' ' (SAPCE) else E / F.
    I dont know how to get space ?
    please help me to create this formula at query level?

    hi Hari,
    I am not really sure ,but u can try this...
    if D = 0 then ' ' (SPACE) else E / F.
    use the same formula and make it Zero instead of space and then in the Query properties replace Zero with Blank or Space Values.
    Rgds
    SVU123
    Edited by: svu123 on Sep 30, 2010 6:53 AM

  • Formula "At Current Level"

    Post Author: mlowrance
    CA Forum: Formula
    Is there a concept in Crystal to have it calculate a formula "at the current grouping level".  In our report we have several formulas that calculate a number of statistics.  The report has a sum for the fields at each group level and then uses those sums to calculate the formulas. However since this sum field is different, or at least has a different name at each group level, we have to create a copy of the formula for every level of the report we want it to appear at (Group 1, Group 2, Grand Total,etc.)Is there any way in Crystal to tell a formula to calculate "At the current level".  This way we could have one copy of the formula that would just plug inthe total field for the current group it is working in.This obviously is a really pressing issue since we can fix it by just having multiple copies of the formula, however it would be nice to not have to modify each one or create new ones each time the grouping is changed. I hope this made sense, it was the only way I could come up with to explain it.Thanks,matt 

    Post Author: yangster
    CA Forum: Formula
    what you've described it not feasible or a way to calculate to begin withthe sum/count/etc at a particular grouping will differ at each group level for the exact reason that you are grouping to begin witheach group level represents a distinct break in the dataif you are using crystal reports xi release 2  you can use the insert summary into all levels to speed things upbut if you are doing a statistical calculation at each level you will need to evaluate it at each group level

  • BI IP - Planning Function Type Formula Error "Characteristic not Supported"

    Hi all,
    I have created a planning function type formula with very simple code. The code was copied from SAP Library and FISCPER was replaced with 0CALDAY. I continue to get an error 'Characteristic 0CALDAY is not supported".
    The characteristic 0CALDAY is in the Infoprovider and the aggregation level. I have tried 'To Characteristic Usage' with both changed and in condition.
    DATA D1 TYPE D.
    DATA D2 TYPE D.
    DATA I1 TYPE I.
    DATA I2 TYPE I.
    DATA CALDAY TYPE 0CALDAY.
    FOREACH CALDAY.
    CALCULATE 1ST DAY OF ZCALEND
    D1 = C2DATE( CALDAY, S ).
    CALCULATE LAST DAY OF CALDAY
    D2 = C2DATE( CALDAY, E ).
    CALCULATE THE DIFFERENCE BETWEEN LAST AND 1ST DAY MINUS TWO DAYS
    I2 = 2.
    I1 = D2 - D1 - I2.
        MESSAGE I001(UPF) WITH 'DIFFERENCE' I1.
    ENDFOR.
    Thank you in advance for any help.
    Teri

    Thank you very much for your reply. What would you suggest? I must use 0CALDAY.  As you can tell I am very new to IP, I have tried other options for example:
    DATA ZDAYS TYPE I.
    DATA ZDT TYPE ZCALSTART.
    DATA ZDF TYPE ZCALEND.
    ZDT = ZCALSTART.
    ZDF = ZCALEND.
    ZDAYS = ZDT-ZDF.
    {KF,ZDT,ZDF} = ZDAYS.
    I received an error "ZCALSTART could not be recognized"
    I also tried to call a function. 'FIMA_DAYS_AND_MONTHS_AND_YEARS'.
    DATA D1 TYPE D.
    DATA D2 TYPE D.
    DATA DD TYPE I.
    DATA CALS TYPE ZCALSTART.
    DATA CALE TYPE ZCALEND.
    D1 = CALS.
    D2 = CALE.
    CALL FUNCTION 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
      EXPORTING
        I_DATE_FROM          = D1
      I_KEY_DAY_FROM       =
        I_DATE_TO            = D2
      I_KEY_DAY_TO         =
      I_FLG_SEPARATE       = ' '
    IMPORTING
       E_DAYS               = DD.
      E_MONTHS             =
      E_YEARS              =
    I received an error "Types of parameter I_DATE_FROM () and variable D1(D) are inconsistent".  From what I could find they should be consistant.  Please provide any suggestions. Thank you!
    Teri
    Edited by: teri chandler on Mar 30, 2010 3:26 PM

  • Logic in Formula at Query level

    Dear All,
                  We are creating query, we want to use the sum of working days for perticular machine iin formula.
    Machine No=M1,  Calendar=1/12/2009, out put=100, workingdays=1, average out per day(formula)
    Machine No=M1,  Calendar=2/12/2009, out put=105, workingdays=1,
    Sum                                                        out put=205, workingdays=2,
    Machine No=M2,  Calendar=1/12/2009, out put=100,    workingdays=1, average out per day(formula)
    Machine No=M2,  Calendar=2/12/2009, out put=101,    workingdays=1,
    Machine No=M2,  Calendar=3/12/2009, out put=105,    workingdays=1,
    Sum                                                        out put=306,    workingdays=3,
    We want to use the sum of working days each machine wise in the formula (Average out per day). please help me
    Thanks&Regards
    Subba Rao
    Edited by: subba rao koyalakuntla on Dec 21, 2009 5:41 PM

    Did you try activating the sub-totals at Machine Level.. that might give you the summary values you are looking for..
    alternatively, we can use some VBA code for this.. or may be macros can help you as well..
    I know this is not an answer.. but some alternative to how we can get there..

  • Restrict formula by characteristic

    Hi forum,
    For an accounts receivable report I need to show two KFs by customer:
    1. Balance on a key date
    2. days overdue (i.e. how many days the customer is late). This CKF should only be shown for document type = DR (invoice).
    KF 2 I get through formula: IF (net due date < key date) THEN (key date - net due date).
    However, how do I get the additional restriction document type = DR into the formula?
    As far as I know, you cannot restrict formulas by a characteristic, but if I set a global filter for document type, it will affect KF 1 (balance). I also investigated Constant selection, but it doesn't work.
    Any idea, how this could be solved?
    Thanks in advance.
    BR, Alex

    Hi Alexendar,
    This is possible !!!
    1)Create new Selection
    2)Drag the char  document type on the Right side
    3)Click on it and restrict it with DR.
    4)create a new formula and use this New selection.
    It will be applicable to only that KF.
    Rgds
    SVU123

  • Formula at Transformation level

    Hi All,
    One formula has written at transformation level for the infoobject Zvendor. 
    Formula is as follows RIGHT( 10, REPLACE_FIRST( '2VEN', '0000', GN_VENDOR ) ).  As per my understanding Vendor number will take 10 digits and it is replacing with '0000' if the value is '2VEN'
    Can you please confirm whether my understanding is correct or not?
    Thanks in advance.

    What i understood is:
    It will replace the first occurance of 2VEN with 0000 and take first 10 digits of the resulting string.
    Edited by: Pravender on May 26, 2010 1:26 PM

  • Dynamic modification at characteristic level

    Hi Experts,
    Advance thanks.
    I am implementing QM for a client. There are two characterisitcs to be inspected in a part number received from a vendor. I wish to record first inspection characterisctic only one time per month for SPC purpose and another one is to be inspected for every lot when the material is received. For this scenario, what are the steps to be followed in different transactions. So that, I can do the results recording as per my client requirement. Can anyone share your experience in this scenario if already you faced?
    Regards,
    VRMP.

    Simply assign the DMR to the characteristic that requires a skip.  You can't set up SAP to require and inspection on a given day, (i.e. the first of the month).  You can set the skip duration to 30 days however in the DMR so that the characteristic will be required to be done once thirty days has passed.  If you were getting in regular shipments every day or every week this would probably work fine for you.  If shipmetns are irregular, you might have the rule reset to required, but if a shipment doesn't come in for a week, you'd have 37 days between inspections.
    FF

  • Apply formula at result level

    Hi,
    I need to build a report to get a KF of inventory turnover, the formular used is:
    <i>turnover =total consumption / average stock</i>
    while we use the formular below to get the
    <b>average stcok =(begin of stock + n stock at month's end)/(n+1)</b>
    what I need is to based on user's date input(let's say 09/2005 to 11/2005 for example),
    1,get the "total consumption" for Oct and Nov,
    2,and also get
    "average stock" = (Stock at Sep + Stock at Oct + Stock at Nov)/(2+1)
    3, get the turnover = "total consumption" /"average stock"
    let's say KF "Total cnsumption" for 10/2005 is 10, for 11/2005 is 20. so <b>"Total cnsumption" for Oct and NOv</b> will be 10+20=30;
    and if KF "Stock at Sep" = 12, "Stock at Oct" is 24,
    "Stock at Nov" = 30
    then <b>"average stck"= (122430)/(2+1) = 22</b>so the "turnover" will be
    <b>"Total cnsumption"/"average stck"= 30/22= 1.36</b>
    I am not sure how the report lay out will be, but as long as i can get the turnover based on teh user input's month during, that would be good enough. so probably the report will look like:
    "Month"  "Totalcnsump" "Stck"  "averageStck" "TurnOver"
    09/2005                  12
    10/2005       10         24       
    11/2005       20         30        
    <b>result:       30         66       22         1.36</b>
    Does any one have any idea how to make it done???
    Your input is very much apprecieated,
    ping

    Dear Ping,
      This may not suit your requirements perfectly.
      But if your report layout is "fixed," how about adding a formula in the XLS workbook for example at column "G" such as:
      = IF(cell = "Result", apply the turnover formula cell1/cell2, else 0).
      As I have said, this is not the best way to do it.
      How about defining 2 structures in your query and try the options using cells definition in the query designer. You may wish to try and have a look at it for other possible solutions.
      Thanks a lot.

  • Batch determination at Characteristic level

    Hi All
    Anyone can tel either one can determin batches at charateristic level.
    your answer is highly appreciated
    Regards

    Hello Mohamed,
    SPRO --> Logistics General - Batch Management - Batch Determination and Batch Check.
    I have linked a good read from SAP help on this matter:
    http://help.sap.com/erp2005_ehp_03/helpdata/EN/25/283b894f7811d18a150000e816ae6e/content.htm

  • Limited number of formula operators on InfoProvider level

    Hello.
    I read in documentation that when you create the Calculated Key Figure on the InfoProvider level, there is less operators available, than if you create CKF (formula) on query level. I am a bit confused, because I can see exactly the same list of available operands either i create CKF locally or globally, on InfoProvider level. Do you have the idea, what functions are not available on IP level?
    Arelis

    No answers, closed.

  • Cumulative Key Figure (Running Total) - how to use in formula?

    We have a scenario where I need to use the cumulative value of a Key Figure in a subsequent formula. The “Cumulated” property setting at the Key Figure level in the query is a “Displayed Data Only” setting, however, so the cumulated values are not available for use in a formula  The individual values are used by BW as opposed to the cumulative values that are displayed in the column.
    I’ve tried using the “Cumulated” property at the characteristic level. I am then able to use the displayed cumulative values in a formula. However, I also need to display the individual (not cumulated) Key Figure values in a column. These individual values are no longer available for display if the “Cumulated” property is set at the Characteristic level.
    I thought that the “Define Cells” functionality could possible be used, but there is only one Structure in the query, so the “Define Cells” functionality is unavailable. I could not think of a way to use a second structure in the rows, as the rows need to be dynamic (two characteristics, populated based on user input variables).
    It may be possible to accomplish this requirement by adding a column using VBA in the SAPBEXonRefresh sub, but use of VBA is not a preferred option, as the query may be run in either the Excel Analyzer or the Web Analyzer.
    The infoprovider does not contain a Key Figure field for Cumulative Volumes.
    The scenario details:
    Rows (Characteristics):
    A: Plant (values based on user input variable)
    B: Calendar day (values based on user input date variables for start & end dates)
    So there is one row for each day within each plant.
    Columns (Key Figures):
    A: Cumulative Volume at Start of Period (uses user input date variable for start date, and “Constant Value” property. Hidden column.)
    B: Daily Volume (for each day in the period defined by the user input variables for start and end dates)
    C: Cumulative Volume at End of Each Day (formula, meant to be equal to the sum of the Cumulative Volume at start of period plus the total so far of the Daily volumes. In other words, equal to the sum of Column A plus the running total of Column B).
    Does anyone out there have any more ideas on how to accomplish the required Cumulative Volume computation?

    Thanks for your reply Jurgen.
    I've created a Global Calculated Key Figure (CKF), and have looked at and tried a number of settings in the Properties of this new CKF.
    I have not yet been able to make this work for me.
    The "Cumulated" property for a Global CKF is also a display-only property. The displayed running total is not used in any formula containing this CKF, only the individual values are used in the formula.
    If I select the 'Enhance' option, where exception aggregation can be done as I think you suggested, I do not see a 'cumulated' option. If I select the 'Summation' option for 'Exception Aggregation', then the 'Reference Characteristic' pull-down is not available.
    Is there a different 'Exception Aggregation' option I should be using for running totals at the calendar day level?
    Or am I unclear on the concept of your suggestion?
    Perhaps you're on a later version of BW that has more Exception Aggregation options? (We're on BW3.5)

  • Change Column Value based on Characteristic in Rows

    I am not sure it is possible.
    We have product prices at different levels of customer hierarchy.
    Channel > Division > Region > Market
    One Region can have multiple Markets.  Each market can have different Rates.  But the Region will have a different Rate which many not be the average rate of all market (assigned as part of master data)
    I have a column for Product Price.  So when a Report is run at Market Level it should use Market Rate.  If Market is Removed and Region is dragged into the report it should use Region Rate for Product Price.
    Product Price is Restricted by Rate Type value to determine which Rate is used.
    Is there a way to dynamically determine the define the column value based on the characteristic value in the ROWS.
    Thanks

    Hi,
    For every CHAR like Market/Region there will be some key. For example Maket1 = 11 and Market2 = 22. If that key is a number then you may create replacement path variable on that and convert the same in numbers then you may create various CKF (for various rate type) and put "If" condtion and check for those replacement path CKF and use the apprpriate one.
    You need to write some tricky formula at CKF levels. This is one of the way to achieve that.
    I hope it will help.
    Thanks,
    S

  • Parent member level rollups of amount

    I have dimension formula in base level members of account and values are properly being calculated in base level.
    But these values are not being properly rolled up in to parent account in the report.
    Is someone is experiencing same issue in BPC7NW.
    This issue is not in BPC5.1, What is the solution for this?
    Is there any workaround.
    Appreciate your inputs..

    The issue closed...

  • Create a formula based on UserResponse()

    Am trying to create a var based on Count(Payperiod) for overall report however whenever I include the formula at row level the value reverts to the individual row.  How can context be overriden? e.g. Formula is  Sum(HrsWorked)/Count(Payperiod)
    Where Count(Payperiod) is based on a range of dates selected from UserResponse() for a Beginning and Ending Payperiod.
    Report contains record for each employee and If Count(Payperiod) = 3 but that employee may have only HrsWorked recorded for one of the Payperiods
    I want calculation to use HrsWorked for each employee but I need to use the number of payperiods based on the UserResponse()s not on number of Payperiods recorded for employee.

    Hi
    try this syntax
    Sum(HrsWorked)/(Count(Payperiod) In Report)
    Regards,
    Stratos

Maybe you are looking for

  • Canadian Using NationWide Canada + 29.99 Unlimited Data Plan

    I think this question has been answered before, however I just finished talking to 2 seperate customer service reps online and I get a different story. I live in Canada but work in the US quite frequently. I use a Rogers Digital One rate for Canada a

  • Problem with SQL driver

    Hi We're on Sap Dataservices version 4.1 We're trying to control the SQL driver to be used for communicating with external warehouse. currently we get this error <[Microsoft][ODBC SQL Server Driver] Optional feature not implemented We have had a look

  • BAPI_ASSET_REVERSAL_POST, Please advise.

    Hi Experts, I want to use this bapi, ( BAPI_ASSET_REVERSAL_POST) to reverse the posted depreciation of assets. Can someone please share some knowledge on how to use this bapi in an ABAP program. Thanks in advance. Thanks rik

  • My phone comes up as private or blocked call on other phones

    Whenever I make a call to other phones whether land lines or cell my phone always comes up as blocked or private. How can I change this?

  • Offset Variables

    Hi I have a doubt and need to know if the offset functionality (replacement path) for variables (start and length) could be used? I have the following business requirement: There are two selection variables on the initial selection screen for a repor