Calculation in Multiprovider

Hi, The problem is in the Query, I need to calculate a key figure based on the other 2 key figures.
KF3 = KF1 * KF2
the only issue here is i need to find the KF1 for each material/country/fiscal period from cube 1 and KF2 for each material/country/fiscal period from ODS.
and multiply and then aggregate according to the filter & selection conditions.
can anyone let me know how to do it..
<b>its very urgent.. and any helpful answer appreciated</b>
thank you
Emil

Hi Bjorn, there is no formula collision. its a calculated key figure (KF3). the requirement is even though the reporting is done at a higher level than material & country and results should be sum of products of individual values per material & country & fiscal period.
Rows: KF1 & KF 2
Column: Fiscal Period
<b>New row to be added: KF3 (Sum of mathematical Products of KF1 & KF2 at the material/country level) even though we run the report at high level of hierarchy.</b>
Usually we get the mathematical product of Sums in the query..
am i able to put my point through ?
Suppose there are 3 levels of material (producy hierarchy) and 5 levels of country (geographical hierarchy)
suppose when you run the report at the level 1 for both hierarchies and want the results as sum of products at the material & country level. as that is combination that gives unique values (KF1 & KF2)
Someone please let me know if you have already faced this situation..
Thanks in advance
Emil
Message was edited by: Emil
Message was edited by: Emil J

Similar Messages

  • Bw multiprovider problem

    hi all, i have a problem with a multiprovider. I activated 0FIAR_C03 cube in order to execute balance aging for customers. I want to calculate top N costemers' balance aging so I created a sales cube based on an S9* info structure. both cubes have right values and I can report them. but when I want to calculate the aging report with sales amount from multiprovider, sales data isn't coming. I want to see
    customer, sales amount, balance, time range1, time range 2.....
    when I look the data from LISTCUBE, I can see sales data. when I debug with RSRT, it gives DBMAN 143 mistake about SAP Note 489135. i found its explanation from sdn. it is below. what should I do?
    Reason and Prerequisites
    The problem occurs in the BW BEX component and is related to a query.
    Solution
    First, execute the query via the RSRT transaction. If the problem also occurs there, it is usually related to the BW BEX OT component.
    If you remove the 'RSRT classic' indicator in the
    RSRT transaction, you will be able to access the
    context menu (as in BEx Analyzer) and to navigate through the component.
    When you encounter ET/OT problems, check if you can
    find relevant notes on the "SAPNet - R/3 front end" (OSS) for the BW BEX ET/OT components.
    For ET problems, the information in note 137153 is also important:
    - Front end patch
    - Versions of the front end programs (sapbexc.xla -> note 197460)
    Often, an OLAP trace (note 112458) can be helpful
    (for both ET and OT), especially if additional
    navigation steps are required for reproducing the problem.
    List all the information mentioned above in any
    problem notification.

    Hi Dhanya, thanks for your reply.
    query doesn't give any error. when I look from LISTCUBE, 0INFOPROV characteristic takes two values (one for sales cube, one for fi cube).
    I matcehed 0CALDEY (SD time) with 0NETDUEDATE (FI time). 0DEBITOR (FI) with OCUSTOMER (SD).for sales data, some of the FI values are empty becouse sales cube doesn't have these charactheristic (as an axample posting key.) but the other values are coming. there isn't any problem about FI data. the report based on a SAP exit variable 0P_KEYDT. I restricted sales aomunt key figure with this variable: 0PKEYDT - (0P_KEYDT -365) (the last year's sales amount). even I don't restrict, it doesn't calculate any value...
    actually I defined a seperate report for sales data. it is calculating with multiprovider but when I try to get the sales amount in the aging report, it is not calculating.

  • Copying Calculated Key Figs into Multiprovider

    I have two cubes ZAC_CUBE and ZPL_CUBE the structure of the cubes is not same...
    By using these cubes I have a MULTIPROVIDER (ZMUL_CUBE)am currently creating queries using the multiprovider.
    I would like to use the Calculated keyfigures from the cubes (CAN I COPY) into a MULTIPROVIDER.. Its taking a lot of time to create the same Calculated keyfigures with another Technical Name... Any Suggessions..Please..
    Preetham...

    dear pritham
    if u are sure about the containt of multiprovider then u can do one thing, add all the objects from the source cube to the multicube, tehn transfer ur queries from baic cubes to the multicube. Now a note of caution: key fig technical names are unique in a system so while copying by RSZC the technocal names will be incremented by either by next available digit or get appended last by '_1', but u can identify ur calculated KFs and Restricted KFs by their Text (I mean Title).
    Now u can remove unwanted objects from the multicube.
    may this will help u out.
    kindly assign the points if it helps.

  • Multiprovider design

    dear all,
    The dimension design of infocube are important for performance and each dimension will link to some master data and SID id.
    but is this concept still true for a multiprovider? thanks.

    Hello,
    Check this Thread:
    Analysis and Performance tuning of a query
    u2022 When the reporting scenario is to be extended, use a MultiProvider as central interface between
    query definition and basic InfoProviders. When another InfoProvider is added to the MultiProvider
    definition, the technical name of a query based on the MultiProvider remains unchanged.
    u2022 Use a MultiProvider to reduce the size of the basic InfoProviders. Advantages: parallel access to
    underlying basic InfoProviders, load balancing, resource utilization, query pruning.
    u2022 Make sure that your MultiProvider only retrieves data from relevant basic InfoProviders at query
    runtime by
    o Using constants in the design of the basic InfoProviders
    o Using different key figures in the design of the basic InfoProviders
    o Using characteristic 0INFOPROV when designing a query on the MultiProvider
    u2022 Are you planning to use a MultiProvider? If so, you have to ensure that the characteristics you want
    to report exist in all basic InfoProviders.
    u2022 Do not use more than one non-cumulative InfoCube (InfoCube with at least one non-cumulative key
    figure) because this could lead to incorrect query results.
    u2022 Do not use calculations before aggregation on MultiProvider because this may lead to wrong query
    results.
    u2022 Do not combine basic InfoProviders having inhomogeneous data models in a MultiProvider. Use the
    report-report interface between queries defined on the basic InfoProvider instead.
    u2022 Avoid using only parts of compound characteristics in the constituent basic InfoProvider of a
    MultiProvider. For more information, see SAP note 702542.
    Assign points if this helps,
    Regards,
    Jorge Diogo

  • Data Issue in MultiProvider

    Hi All,
           We have a Key Figure in the Cube that is summation of two figures (this being calculated in the Transfer Rule) and is showing up corectly in the Info Cube when I do LISTCUBE but the data is for the same Key Figure is not showing up in the Multi Provider LISTCUBE (this Cube is part of a MP). I verified this KF is in Multi Provider.
    I would appreciate if you coould shud light on this issue?
    Thanks
    BI Cosultant

    did u check Indentification tab in multiprovider. which plays important role in Multiproviders.
    Which will determine source of Data .
    Nagesh ganisetti.

  • Query takes long time on multiprovider

    Hi,
    When i execute a query on the multiprovider, it takes very long time. it doesnt show up the results also. It just keep processing. I have executed the report only for one day but still it doesnt show any result. But when i execute on the cube, it executes quickly and shows the result.
    Actually i added one more cube to the multiprovider and ten transported that multiprovider to QA and PRD. Transportation went on successfully. After this i am unalbe to execute the reports on that multiprovider. What might be the cause? your help is appreciated.
    Thanks
    Annie

    Hi Annie.......
    Checklist for the performance of a Query........from a DOc........
    1. If exclusions exist, make sure they exist in the global filter area. Try to remove exclusions by subtracting out inclusions.
    2. Use Constant Selection to ignore filters in order to move more filters to the global filter area. (Use ABAPer to test and validate that this ensures better code)
    3. Within structures, make sure the filter order exists with the highest level filter first.
    4. Check code for all exit variables used in a report.
    5. Move Time restrictions to a global filter whenever possible.
    6. Within structures, use user exit variables to calculate things like QTD, YTD. This should generate better code than using overlapping restrictions to achieve the same thing. (Use ABAPer to test and validate that this ensures better code).
    7. When queries are written on multiproviders, restrict to InfoProvider in global filter whenever possible. MultiProvider (MultiCube) queries require additional database table joins to read data compared to those queries against standard InfoCubes (InfoProviders), and you should therefore hardcode the infoprovider in the global filter whenever possible to eliminate this problem.
    8. Move all global calculated and restricted key figures to local as to analyze any filters that can be removed and moved to the global definition in a query. Then you can change the calculated key figure and go back to utilizing the global calculated key figure if desired
    9. If Alternative UOM solution is used, turn off query cache.
    10. Set read mode of query based on static or dynamic. Reading data during navigation minimizes the impact on the R/3 database and application server resources because only data that the user requires will be retrieved. For queries involving large hierarchies with many nodes, it would be wise to select Read data during navigation and when expanding the hierarchy option to avoid reading data for the hierarchy nodes that are not expanded. Reserve the Read all data mode for special queriesu2014for instance, when a majority of the users need a given query to slice and dice against all dimensions, or when the data is needed for data mining. This mode places heavy demand on database and memory resources and might impact other SAP BW processes and tasks.
    11. Turn off formatting and results rows to minimize Frontend time whenever possible.
    12. Check for nested hierarchies. Always a bad idea.
    13. If u201CDisplay as hierarchyu201D is being used, look for other options to remove it to increase performance.
    14. Use Constant Selection instead of SUMCT and SUMGT within formulas.
    15. Do review of order of restrictions in formulas. Do as many restrictions as you can before calculations. Try to avoid calculations before restrictions.
    16. Check Sequential vs Parallel read on Multiproviders.
    17. Turn off warning messages on queries.
    18. Check to see if performance improves by removing text display (Use ABAPer to test and validate that this ensures better code).
    19. Check to see where currency conversions are happening if they are used.
    20. Check aggregation and exception aggregation on calculated key figures. Before aggregation is generally slower and should not be used unless explicitly needed.
    21. Avoid Cell Editor use if at all possible.
    22. Make sure queries are regenerated in production using RSRT after changes to statistics, consistency changes, or aggregates.
    23. Within the free characteristics, filter on the least granular objects first and make sure those come first in the order.
    24. Leverage characteristics or navigational attributes rather than hierarchies. Using a hierarchy requires reading temporary hierarchy tables and creates additional overhead compared to characteristics and navigational attributes. Therefore, characteristics or navigational attributes result in significantly better query performance than hierarchies, especially as the size of the hierarchy (e.g., the number of nodes and levels) and the complexity of the selection criteria increase.
    25. If hierarchies are used, minimize the number of nodes to include in the query results. Including all nodes in the query results (even the ones that are not needed or blank) slows down the query processing. The u201Cnot assignedu201D nodes in the hierarchy should be filtered out, and you should use a variable to reduce the number of hierarchy nodes selected.
    Also check this.........Recommendations for Modeling MultiProviders
    http://help.sap.com/saphelp_nw70/helpdata/EN/43/5617d903f03e2be10000000a1553f6/frameset.htm
    Hope this helps......
    Regards,
    Debjani......

  • How to calculate the number of records in Multiprovider

    Hi Experts
    I have created a report based on the multiprovider (Consist of Cube and ODS)
    I need count the number of records inside the multiprovider, how can i do it in the reporting level
    Regards
    Santosh

    Hi,
    You can use calculated key figure with replacement path variable.
    Follow This:
    1) From the context menu of the Key Figure directory, choose New Calculated Key Figure.
    2) From the context menu for the Formula Variable, choose New Variable.
    3) Choose the Processing type as Replacement Path.
    4) In the next screen, select the Characteristic Info Object based on which the number of documents is to be displayed in the report (For example: Document Number / Order Number).
    5) Choose Next.
    In the Replace Variable with drop down box, choose Attribute Value.
    In the Attribute drop down, select Characteristic Reference (Constant 1).
    6)Choose Next.
    On the Save Variable page, an overview of the settings made for the variable will be displayed.
    Confirm the entries and Choose Finish.
    7) If the Formula variable is directly assigned to the Calculated Key Figure, a warning Calculated Key Figure is not defined correctly will be displayed while executing the Query.
    8) Properties of Calculated Key Figure dialog box, assign a Technical name for the CKF.
    9) set the Time of Calculation to After Aggregation.
    Hope this will help you.
    Cheers,
    DK
    Edited by: Debasish Khaitan on May 14, 2009 1:03 PM

  • Query Performance Issue based on the same Multiprovider

    Hi All,
    I am facing a performance issue with one of the BEx Query 1 based on a particular Multiprovider.
    I have done all the kind of testing and came o a conclusion that the OLAP: Data Transfer time for the query is the max at around 820 Secs.
    The surprising part is another Query 2 based on the same multiprovider runs absolutely fine without any hassles with OLAP : Data Transfer time with merely 3 Sec.
    Another, surprise is that Query 2 has even more Restricted Key Figures and Calculated Key Figures but it runs smoothly.
    Both the queries use cache memory.
    Please suggest a solution to this.
    Thanks.

    Hi Rupesh,
    There is no much difference between the 2 queries.
    Query 1 - which has performance issue has the same filters as that of Query 2 - which is working fine.
    The only difference is that the selection of Fiscal Week is in the Default Values Pane for Query 2 whereas its in Characteristics Restrictions in Query 1. I doubt whether this setting will have any effect on the performance.
    Both restriction i.e Fiscal Week restriction is based on Customer exit and the rows include Hierarchy for both the queries.
    I assume creating aggregates on hierarchy for the Cube can be a solution.

  • Multiprovider for different set of data

    Hi Experts,
    I need to built multiprovider on top of two InfoCubes. But tricky part here is one Infocube contains data at line item level and second Infocube contains data at summary level. I will get most of the keyfigures from one Infocube and one keyfigure from second Infocube.
    Infocube1 and Infocube2 contains same dimensions except one dimension where Infocube1 contains item level char like item number and document number. Is there any way I can built multiprovider on top of that and provide reporting on that with keyfigrues from Infocube1 and Infocube2.
    advance thank you very much.

    Hi
    As mentioned above u can create an MP on top of the cubes. But in Report u will have to use only those characteristics which are common between the two cubes or the records will come in 2 rows. Say in ur case u cant use Item No and Doc No. But if u dont have any complex calculations u can use 'Constant selection' to get the records in the same row.
    Regards,
    Aparna

  • Multiprovider containing non-cumulative KF and cumulative KF

    I have two infocubes that I have placed in a multiprovidor. Infocube #1 contains one non-cumulative key figure and some cumulative key figures. Infocube #2 contains all cumulative key figures. When running a query against the multiprovider, all key figures (from both infocubes) are displayed except for the non-cumulative key from Infocube #1, in which case the value is blanks. Is there something I am missing?

    Yes SAP has defined some Restriction for Creation of MultiProvider for Non Cummulatived Key Figures.
    "<b>MultiProviders
    • When the reporting scenario is to be extended, use a MultiProvider as central interface between
    query definition and basic InfoProviders. When another InfoProvider is added to the MultiProvider
    definition, the technical name of a query based on the MultiProvider remains unchanged.
    • Use a MultiProvider to reduce the size of the basic InfoProviders. Advantages: parallel access to
    underlying basic InfoProviders, load balancing, resource utilization, query pruning.
    • Make sure that your MultiProvider only retrieves data from relevant basic InfoProviders at query
    runtime by
    o Using constants in the design of the basic InfoProviders
    o Using different key figures in the design of the basic InfoProviders
    o Using characteristic 0INFOPROV when designing a query on the MultiProvider
    • Are you planning to use a MultiProvider? If so, you have to ensure that the characteristics you want
    to report exist in all basic InfoProviders.
    • Do not use more than one non-cumulative InfoCube (InfoCube with at least one non-cumulative key
    figure) because this could lead to incorrect query results.
    • Do not use calculations before aggregation on MultiProvider because this may lead to wrong query
    results.
    • Do not combine basic InfoProviders having inhomogeneous data models in a MultiProvider. Use the
    report-report interface between queries defined on the basic InfoProvider instead.
    • Avoid using only parts of compound characteristics in the constituent basic InfoProvider of a
    MultiProvider. For more information, see SAP note 702542."</b>
    RefS: How to Do Docs

  • Query regarding row level calculations in Bex

    I have a scenario where I am creating a report on a multiprovider. This multiprovider is based on General Ledger and Profit Center Accounting cube. The PCA cube has accumulated balances at G/L account and profit center level, and GL cube has balances only at General Ledger account level.So when a report is created on this the data displayed looks like:
    Account Profit Center Balance
    1000             1234            100000  - From PCA cube
    1000              2345            200000  - From PCA cube
    1000              Not assigned 400000 - From GL cube
    There are some cases where the total balance at G/L account level does not match both the cubes ( as in the above example, as per PCA, balance for G/L account 1000 is 300000 whereas as per GL cube, balance at G/L account 1000 level is 400000.)
    Hence we require a separate row showing this difference ( not column)
    Therefore actual output required for the above scenario is:
    Account Profit Center Balance
    1000             1234            100000 
    1000              2345            200000 
    1000              DIFFERENCE           100000 - (400000 - sum of above 2 balances)
    Total                                 400000
    It would be very helpful if anyone can give inputs on how this can be achieved.

    Have you considered Virtual Key figure. This will allow you to do such complex calculations.
    Thanks
    Sharan

  • Calculated Key figures using different key figures

    Hi All,
    I want to create a calculated key figure based on Actual and Plan.Actual values are coming from InfoCube,Plan values are loaded from Excel sheet into different key figure in another infocube.I've created a MultiProvider for these Cubes.Now I want to find the difference between plan and actual.So I created a calculated keyfigures based on the key figures.But the Query is giving error ..
    Then the connection terminated..
    Let me know how to do..
    Raji

    What is the error you are getting?
    First do this.
    In the query, filter on only 1 infoprovider. Check the KF's and see if correct and if you get the error. Then, do the same thing, for the other infoproviders. Once you get no errors that way. Remove the filter. See if the KF's are ok and no errors. Then do your calculation.
    Also, make sure in the definition of the KF's, you are filtering each on the right infoprovider. (For instance, KF1 has a filter on infoprovider1 and KF2 has a filter on infoprovider2.)
    hope this helps!
    /smw

  • How to calculate and save planning data in bex input-ready query using keyfigures for calculation from different infoproviders

    Hi Dear All,
    We have two real time infocubes and two aggregation levels based on these cubes in one multiprovider
    first cube1 is like
    char1| char2| keyfig_coefficient(single value for each combination of char1 and char2)
    same aggregation level1
    (we have input query to fill coefficients by one responsible user)
    second cube2 is like
    char1| char2| keyfig_quantity| keyfig_result
    same aggregation level2
    Input ready query should be like (for all other users of different org units)
    char1|char2|keyfig_coeff| keyfig_quant(for input) | keyfig_result = keyfig_coeff*keyfig_quant(calculated value, should be saved to cube2)
    And we don't have pregenerated lines in cube2, users have to add new lines themselves by wad.
    Question is, what is the optimal (easiest) way to make calculation and save result data to cube2 where keyfigures for calculation should be used from different infoproviders. I need just a hint.
    Appreciate any help.
    Nadya.

    I found decision, agregation levels sould be based on multiprovider, not included.

  • Error after Copying Query from Cube to Multiprovider

    Hi ,
    I have One cube which  is running fine . Now I have created one Multiprivider  which has only the Cube . Copied the Query in the Cube to the Multiprovider through RSZC transaction .
    Now the Query copied to Multiprovider  is giving error while executing .some SALAR etc ...
    Not sure what does this error mean .
    can anyone help me pls ?
    Thanks
    pankaj

    Hi
    While copying the query using RSZC it will list all the calculated keyfigures you can select the specific keyfigure and click on transfer selections.
    Thanks

  • Selection on Global Calculated Key Figure problem

    Hi all,
    I've got a Calculated key figure, made up of 2 key figures and 2 restricted key figures, saved to a homogenous multiprovider (Customer Sales).  this works fine as is. 
    However, when you create a selection in BEx QD, that limits the CKF further by Distribution channel, and view the result, the result seems to be multiplied by a value to the effect of 2.8???
    If you view the CKF by itself its fine (though not limited to what it needs to be).
    As an example.
    Say sales for a distribution channel was 1 million dollars.  Sales overall was 2 million dollars.  If i drag in my CKF (and have NO characteristics), it comes up with 2 million dollars.
    If i limit it to 1 sales office, no issues, I get that sales office's value.  However, if i limit it to a distribution channel, i get roughly 2.8 million dollars.
    Any ideas?  I can't see the logic in this.  Perhaps someone knows of the issue/has seen a note or something regarding this, cos its got me scratchin my head?
    Cheers

    Hi Pierre,
    I appreciate the fast reply.  This thing is driving me nuts!
    Ok so when you refer to the CKF are you referring to the global CKF on the multiprovider or the CKF i have on the report that is restricted (basically a local RKF)?
    I've had a look through there and have found the calculation tab, but can't really say i've found "Calculate according to current formula".
    What i see are:
    a dropdown list headed "calculate results as..." (nothing defined)
    another dropdown list called "calculate Single Values as..."  (nothing defined)
    a tick box called cumulated (unticked)
    another tickbox called "also apply to results" (unticked)
    another dropdown listbox called "calculation direction" (default setting)
    Underneath all that is a tickbox called "use precalculated value" (unticked).
    is it something under all that that i need to change?
    Do i change the global CKF or the local RKF?
    Thanks for the assist.

Maybe you are looking for