Selection of key figure(s) from a structure

Hi,
I have defined a structure in my query that contains several calculated and restricted key figures. When I execute the query I only want that one (or a selection of) key figure(s) from the structure is(are) available in the report. It is also desirable to be able to select another key figures from the structure at run-time of the query. How can I solve this???
Thanks and regards
Eivind

Hi Eivind,
why don't you use BEx filter functionality? It allows you to restrict the drilldown to one or more key figures.
If you are reporting in web browser, you can also create a web template where you select the displayed key figure in dropdown box.
Best regards,
Björn

Similar Messages

  • "new selection", restricted key figure and basic key figure

    Hi,
    I have a test report and i have a basic keyfigure "ZRevenue" and "restricted key figure"(its defined over "ZRevenue") and
    a "new selection"(its defined over "ZRevenue").
    Now that i have "material number" and "material color" and "request id" in the rows. ("Material color" is a navigational attribute of material number).
    In the column level i have a basic key figure  "ZRevenue" and "restricted key figure"(its defined over "ZRevenue")  and
    a "new selection"(its defined over "ZRevenue") .
    In a "restricted key figure" or "new selection", we can include a basic key figure or new formula or calculated key figure or an already restricted key figure into it, then we restrict it, with one or more characteristic values. In the report output we get KF values only for those characteristic values, with which it has been restricted. Please correct me if my understanding is wrong.
    Initially i restricted the "new selection" (with material number 1 to 3) and "restricted key figure" (with material number 1 to 4).
    In the cube i have material numbers 1 to 11. Now all the values were displayed from 1 to 11, but for the
    "new selection" (with material number 1 to 3) and "restricted key figure" (with material number 1 to 4) i got values only for 1 to 3 and values for 1 to 4 respectively. This is as expected and is working fine.
    Now i tried to restrict the basic keyfigure  "ZRevenue" with material number 1, the output was only until the material number 4 (this is the greatest value of the material number defined over the "restricted key figure").
    Then i tried to restrict the "new selection" (with material number 1 to 9) , then the output was from 1 to 9 material numbers.
    If i remove the restriction over the basic keyfigure  "ZRevenue" , then i get all the material numbers from 1 to 11, for "new selection" i get values for the material number 1 to 9 and for "restricted key figure" i get values for the material numbers 1 to 4.
    Can some one explain me why this behavior?
    Edited by: sapbi enthusiastic on Jan 31, 2012 11:48 AM

    Hi,
    This is where set theory comes in handy
    So what you have is a basic KF (BKF), a selection (SEL), and an RKF.
    When producing an output, BEx seems to be looking for the union of all the restrictions you place on these. So when your BKF is not restricted, the union comes out to everything in the underlying DSO. When you restrict the BKF for material number 1, this is how the restrictions might have been processed internally
    BKF: Restriction on material 1
    RKF: Restriction on material 1-4
    SEL: Restriction on 1-3
    Union of these three: 1-4
    When you remove the BKF restriction and make SEL restricted to 9, this is how it plays out
    BKF: NO Restriction on material
    SEL: Restriction on material 1-9
    RKF: Restriction on 1-4
    Union of these three: everything.
    As the union ends up giving you everything, you get 11 records. However, as SEL is restricted for 1-9, the SEL will have values for the materials 1-9. Likewise for RKF, you'll get values only for materials 1-4. Hope this clears things up!
    Regards,
    Suhas

  • Dynamically Selecting a Key Figure at Runtime

    I need to develop a 12-month BEx workbook which shows for each record for each month (column): 
    1)     <i>Forecast Quantity</i> (key figure);
    2)     <i>Actual Quantity</i> (key figure); and
    3)     <i>Most Reliable Quantity</i> (somewhere, somehow calculated).
    For any given month of data, <i>Most Reliable Quantity</i> is to report either the <i>Forecast Quantity</i> or <i>Actual Quantity</i> based on the month/year of the data and the month/year in which the report is being executed.  More specifically, if the current month/year is greater than the month/year of the data, report the value of <i>Actual Quantity</i>.  Otherwise, report the value of <i>Forecast Quantity</i>.
    I would appreciate any suggestions as to how I should go about doing this in BW v.3.10?  (By the way, the report also requires that I present a 12-month total for each of these three quantity types.)

    I apologize for taking so long to evaluate and respond to the most recent suggestions.  My boss suddenly pulled me from this project and gave me several higher priority projects.
    I took this topic's most recent replies to someone in my company who has more years and depth of experience with BW than I do.  His conclusion (and I concur) is that while some of what is being suggested can be accomplished, it cannot all be pieced together into one complete solution.
    So, I have awarded some points to the most recent replies, and I am giving up on accomplishing this with BEx.  Instead, I am going to investigate if there is some way to periodically iterate through the cube updating a new key figure, <i>Most Reliable Quantity</i>.
    Thank you for all of the help that was offered.

  • Select the Key Figures to be presented in a query before execute the it

    Hi,
    I want to select(through checkbox) the Key Figures to be presented in a query before executing the query. I'm creating BEX queries and web templates (I'm working on BEX 7.0).
    I haven't found clear post about this so if you have implemented something like this please help me and share your solution.
    Kind regards,
    Ana

    Hi,
    If you set a property of your KF as "Hide and can be shown", you will get a filter option for these KFs after executing the report in the navigational block of web report.
    When you click on that filter, you will get the list of KFs, then you can select the desired KFs using check box.
    Regards,
    Yogesh.

  • Short Dump When Installing Key Figure Catalog from BI Content

    Hi Friends,
                    I get a Short dump when trying to Install a Key Figure Catalog (in Purchasing) from the BI content. This is what the Error Says ,
    " You Attempted to Use a "NULL" object reference (Points to nothing) access a component (variable : "  "). An Object reference must point to an object (an instance of class ) before it can be used to access components.
    Any input will be greatly appreciated,

    Hi Michal,
    this bug hits only patch level 201 of the DBSL. Please update the DBSl.
    Regarding the ABAP code I do not believe that the hint helps in this case but it should not cause any problems either. If this hint is applied more PREPARE calls are neccessary since before every execution a new statement text is assembled.
    The advantage of SUBSTITUTE_VALUES hints is that the database optimizer get more information through the statement text. The downside is that a new statement is generated every time. E.g. you won't find the statement as a top scorer in a SQL cache analysis if the access plan is still bad.
    Regards
                   Frank

  • Code to sum up multiple record key figure values from one ODS to another OD

    We've got two ODSs: ODS1 and ODS2 and ODS1 feeds data to ODS2 through update rule.  In ODS1, multiple records could contain one same doc records and we would like to sum up a key figure value for these multip records with the same doc number in the update rule and populate a key figure (a sum-up value or total value) in ODS2 for this doc number.  We wonder how the code would look like.
    Welcome the valuable input!
    Thanks

    Hello Kevin,
    In this case there is no need of a code. As in ODS2, contract number is a key and PO is not a part of key, you can have update type for the key figure as "Addition". Value for that particular key figure will be added for all the recordes with same contract number irrespective of PO number.
    Hope it helps.
    Regards,
    Praveen

  • Unable to create new structure to hold key figures - BI 7.0

    Hi All,
    I am trying to create a new structure in a query - this structure will hold restricted key figures.  I right click in the Columns section and select New Structure. The system won't allow me to drag/drop the restricted key figure into the structure - it's added as another key figure in the existing structure.  If I right click on the structure and choose New Selection, the key figures are not shown as options for adding to the structure ... only characteristics are listed.  Any ideas on why this is happening?
    Thanks,
    Pam

    Hi Pam,
    i think cell restrction will solve your problem, i am not sure.
    Just try to do cell restriction.
    Just go throw the below description.
    You can use any cell that you define in a formula. If you want to reuse the value from the implicit, generic cell definition that is automatically created at the intersection of the two structural components of a query, select this cell in the Cell screen area and, using the secondary mouse button, choose New Cell Reference. A description taken from the two structural components now automatically appears in the cell. The symbol shows you that a cell reference exists for this exception cell. Now you can reference this cell. You can continue to use the implicit cell definition and do not have to manually generate this value using a new selection.
    Functions of explicitly defined cells:
    Select a defined cell and choose the required function from the context menu (secondary mouse button).
    &#9679; Edit
    &#9679; Cut
    &#9679; Copy
    &#9679; Paste
    &#9679; Remove
    &#9679; Where-Used List
    Before you delete a cell, you can check for the formulas in which the defined cell is used in the where-used list.
    You reach the properties of a defined cell by selecting the defined cell. In the Properties screen area you can also make changes such as:
    &#9679; Changing the description of the cell
    &#9679; Changing the highlighting of the cell
    &#9679; Hiding the cell ( if you do not want to see the values of the cell)
    Help cells
    In the Help Cells area you can define additional cells for help selections or help formulas. You can use the functions New Selection and New Formula in the context menu to define help cells that are not displayed in the query to serve only as objects for help selections and help formulas.
    For example, you can define an invoice in a help cell and use this in a “real” cell to calculate a duplicated invoice.
    a. Using the secondary mouse button, click on the empty cell next to Help Cells to reach the context menu. From here, choose New Selection.
    b.Use Drag&Drop to drag the Invoice key figure into the right-hand Details of the Selection area.
    c. Enter a description.
    d. Choose OK. The cell contains the description of the selection. The symbol shows you that a selection exists for this exception cell.
    e. Now choose New Formula from the context menu of the required cell of the query. The new formula that is not yet defined appears in the cell.
    f. Select the new formula and choose Edit from the context menu.
    g. Use Drag&Drop to drag the cell you have just defined, which you can find in the Available Operands window under Cells, into the Detail View window. Click on the button twice.
    h. Enter a description.
    i. Choose OK. The cell contains the description of the formula. The symbol shows you that a formula exists for this exception cell.
    Result
    You have defined one or more exception cells for a query.
    Regards,
    shailaja

  • Adding new key figure in Info structure

    Hi all,
    I am in a need to add a new key figure to our info structure here in my company.
    The way I understand it is, it would be best to create a NEW info structure and copy all existing key figure and characteristic and then insert my new key figure into this and rewrite the macro if required.
    So my question is
    1. How to determine which info structure is currently in use in my company? If i check in MC89 - the key figures match what is in Info structure S076. So is it safe to assume that we are using standard S&OP in my company? Is that a correct way to identify the currently used info structure?
    2. For our KMAT, when i open a planned order I see that there in another info structure (not S076) under configuration tab. So can we have diff info structure in use at a same time ?
    Please guide.
    Thanks,

    Hi Nisha,
    1. First of all, How would I determine which info structure is being used at this time in my company?
    I need to know this so that when I am creating my own custom (S500 - S999) info structure, i can copy the existing KFs and Characteristics and add them to my info structure and then Add a specific key figure on top of that.
    Info structures are nothing but tables so in se16 you can check which are Info structures are having update values.
    Yes you can add the specific key figure on existing self defined info structure in MC22 after that you need to generate it.
    2. Can multiple info structure be in 'use' at the same time in any scenario? 
    For self defined info structure are application specific you can not have multiple info structure for same scenario. If you take the example of flexible planning with self defined info structure then you can transfer the demand from only one info structure.
    Regards,
    R.Brahmankar

  • ABAP Code for Key Figure selection in Report

    Hello Experts,
    I am working on one of the development request that requires following logic to be implemented at query execution. There will one KF column and based on valid combination of characteristics value from the cube, Key Figure value from the same cube will be selected and reported.
    If ((Plant = A1) and (Division = B1))
      OR ((Plant =A2 ) and (Division = B1))
      OR ((Plant = A3) and (Division = B2))
      OR ((Plant = A6) and (Division = B2)).
      Price = Moving Avg.
    Else
      Price = Standard.
    Can somebody please suggest, how to do this? Thanks in advance.
    Regards,
    Nimesh

    Nimesh,
    Step 1.Create a formula (say F1)variable with customer exit. In the customer exit code read the values of Plant and Division. If the Plant and Division combination is the one that you specified below return a 1 (for Moving Avg.) or return a 0 (for Standard).
    Step 2. Create a column with a formula having the following definition
             (F1=1)'Moving Avg.' + (F1=0)'Standard'
    So, if the combination satisfies Moving Avg will be shown else Standard will be shown.
    You can avoid customer exit coding by using  replacement variables and using them in a formula, this would make your calculation clumsy and confusing. Let me know if you cannot get the customer exit solution work.
    Hope it helps...

  • Mandatory Variable in Key Figure(new selection) does not give Input Screen

    Hi,
    I have created a query based on a Multiprovider, which uses 0FIGL_C10 & one target DSO.
    In colums I was trying to create one new selection type key figure using 0BALANCE infoobject, restricted it by 0FISCYEAR using one mandatory variable. When I am executing this query fiscal year variable is not asking for any value as input.
    Being it a mandatory variable it should ask for some input, which is not happening.
    Please suggest if I am missing something here or there is some problem with the SAP.
    Regards,
    Lokesh Kumar
    +91 9871097220

    Only making a variable mandatory will not make it input enabled...it should be also " Variable ready for input" then only you will get input screen.
    Rgds
    Amit

  • Restricted key figure

    HI,
    can any body explain me what is the difference between Restricted key Figure and the filter option in BEX reporting.

    Hi Ali,
    If you want restrict particuler key figure based on characteristic value, that you have to go for restricted key figure.
    For example: You have calender year month data from 2005 to 2006.An dyou have also have sales data for the period.
    If you want see the say some feb 2005 to may 2006.
    than you can use restricted key figure to see the values.
    where as Filter will show the values which you have filtered irrespective of key figure (only characteristic value).
    just go throw the below description.
    Hi,
    Restricted key figure:
    Use
    You can restrict the key figures of an InfoProvider for reuse by selecting one or more characteristics. The key figures that are restricted by one or more characteristic selections can be basic key figures, calculated key figures, or key figures that are already restricted.
    Procedure
    Defining a new restricted key figure
    1. In the InfoProvider screen area, select the Key Figures entry and choose New Restricted Key Figure from the context menu (secondary mouse button).
    If a restricted key figure has already been defined for this InfoProvider, you can also select the Restricted Key Figures entry and then choose New Restricted Key Figure from the context menu.
    The entry New Restricted Key Figure is inserted and the properties for the restricted key figure are displayed in the Properties screen area.
    2. Select the New Restricted Key Figure entry and choose Edit from the context menu (secondary mouse button.
    The Change Restricted Key Figure dialog box appears.
    You can also call the Change Restricted Key Figure dialog box from the Properties screen area by choosing the Edit pushbutton.
    Calculated key figure:
    Use
    In the Query Designer, you use formulas to recalculate the key figures in an InfoProvider so that you can reuse them. Calculated key figures consist of formula definitions containing basic key figures, restricted key figures or precalculated key figures.
    Procedure
    Defining a New Calculated Key Figure
    1. In the InfoProvider screen area, select the Key Figures entry and from the context menu (secondary mouse button click), choose New Calculated Key Figure.
    If a calculated key figure has already been defined for this InfoProvider, you can select the Calculated Key Figures entry and, from the context menu, choose New Calculated Key Figure.
    The system adds the New Calculated Key Figure entry. The properties for the calculated key figure are displayed in the Properties screen area.
    2. Select the New Calculated Key Figure entry and, from the context menu (secondary mouse button), choose Edit.
    The Calculated Key Figure dialog box appears.
    You can also call the Change Calculated Key Figure dialog box from the Properties screen area by choosing the Edit pushbutton.
    Formula:
    Use
    You can recalculate the key figures in a structure using a formula. You can include basic key figures, restricted key figures, and calculated key figures in the formula definition.
    Procedure
    Defining a Formula
    1. If the query does not yet have a key figure structure, create a New Structure in the Rows or Columns of the Query Designer by highlighting the row or column directory using the secondary mouse button and selecting New Structure from the context menu.
    2. If the structure does not yet contain any key figures, use drag and drop to transfer a (basic) key figure of the InfoProvider into the directory of the new structure.
    3. Select the structure directory, and choose New Formula. The New Formula entry is inserted and the properties for the formula are displayed in the Properties screen area.
    4. Select the New Formula entry and, from the context menu (secondary mouse button), choose Edit. The Change Formula dialog box appears.
    You can also call the Change Formula dialog box from the Properties screen area by choosing the Edit pushbutton.
    Regards,
    Shailaja

  • Hiding different characteristic columns for 2 separate key figures - Part 1

    Hi,
    I am defining an input ready query for Integrated Planning. The aggregation level and layout in BEx Query Designer are as follows:
    Company Code - Column
    Business Area - Column
    Chart of Accounts - Column (Hidden)
    G/L Account - Column (with Hierarchy display based on FSV enabled)
    Fiscal Year Variant - Column (Hidden)
    Fiscal Year - Column (Hidden)
    Fiscal Year / Period - Row
    Budget (Custom Key Figure like 0BALANCE) - Row
    LV Budget (Custom Key Figure like 0BALANCE) - Row
    The output is as follows (for three months, without hierarchy display for ease of understanding):
                                             LV Budget                      Budget
    CCode  Bus Area  G/L Account  FY/Period  Jan 2010  Feb 2010  Mar 2010   Jan 2010  Feb 2010  Mar 2010
    ABC    1100      1022514                 1000.00   1500.00   2000.00    1200.00   1600.00   2200.00
    ABC    1100      1022515                 1100.00   1600.00   2100.00    1300.00   1700.00   2300.00
    So far so good. The KF are input ready and I am able to save values. The problem is that the business requirement is for a different number of columns to be displayed for LV Budget and Budget, i.e. LV budget is only maintained for, say the first 2 months and budget is maintained for 3 months. Ideally the output should be 2 columns (Jan and Feb 2010) for LV Budget and 3 columns for Budget (Jan - Mar 2010). Currently, I am getting 3 columns each for LV Budget and Budget (Jan - Mar 2010).
    I have tried removing Fiscal Year / Period from the drilldown (across) and creating a structure with five selections, 2 for LV Budget and 3 for Budget with the appropriate selections accordingly:
    Key Figure = LV Budget, Fiscal Year Variant = K4, FY / Period = 001.2010 - 002.2010
    Key Figure = Budget, Fiscal Year Variant = K4, FY / Period = 001.2010 - 003.2010
    The issue is that the query is no longer input ready if FY / Period is removed as a drilldown across. I have tried adding it to the new structure but it gives rise to three columns for each selection, two of them blank (the ones for other FY / Periods than the one specified in the selection), for example:
    LV Budget   Jan 2010 Feb 2010 Mar 2010   Jan 2010 Feb 2010 Mar 2010
                1000.00                               1500.00

    Hi,
    Just try swapping Key figures with Fiscal/Year period in your basic structure (the very first one)
    I hope it will help.
    Thanks,
    S

  • Unable to find key figure attribute in the cube

    Hi all of you,
    I am struggling while working on this "Display Attribute". Please read this and help me out.
    I want to create attributes and then load data into a cube.
    I had created an InfoArea IA_ATTRIBUTES.
    Under this IA_ATTRIBUTES I created an InfoObject Catalog IOC_DISPATTR.
    Under IOC_DISPATTR I created an InfoObject ZCUSTNUMB which is my primary key.
    After defining the ZCUSTNUMB I clicked on the Attributes tab and entered the other attributes like ZCUSTNAME, ZCUSTADDR, ZCUSTREGI, ZCUSTLOCA, and ZPRICE. All of these attributes except ZPRICE are characteristics WHILE ZPRICE is a keyfigure.
    I've also made sure that the Attributes only check box is not checked for all the characteristics.
    I then activated the InfoObject ZCUSTNUMB and came back.
    Now I created a cube DISP_ATTR. I clicked on the InfoObject Catalog button and selected the above mentioned catalog IOC_DISPATTR and transferred the IOs from the template into the structure.
    Now when I transfer IOs in this way all the IOs both characteristics and key figures should come into the structure of the cube isnt't. But only characteristics have come and the keyfigure ZPRICE hasn't come.
    Moreover when I hit on the key figures tab and hit on the find button and find ZPRICE I am getting a message saying "No (further) object found". So when I hit on the create button and create a key figure ZPRICE I am getting a message saying "InfoObject ZPRICE already exists as Key Figure (please rename)".
    However when I double click on ZCUSTNUMB which is the primary key, the screen "Display characteristic ZCUSTNUMB: Detail" opens. In this screen I find all the attributes in the attributes tab that I had defined while defining attributes including ZPRICE.
    So what I don't understand is when all the characteristics IOs are visible under the characteristics tab then why am I unable to find the key figure ZPRICE under Key figures tab when I created it while defining attributes. Can anyone please explain me this situation and tell me how should I find the key figure ZPRICE so that I can go ahead and create the cube.
    Lastly I want to know what are the differences between InfoObjects and Attributes. Is an attribute also an IO?
    Please explain.
    I would appropriately rewards your answers.
    Thank you.
    TR.

    Hi Oscar Romero,
    Thanks a lot for your reply. As per your suggestion I created another IOC FOR key figures called IOC_ATTR_KF. In this IOC I had included the key figure ZPRICE and activated the IOC.
    Now I have created a cube again ATTR_DISP. On the right corner where we find 5 buttons I clicked on the InfoObject Catalog button. The screen "Select InfoObject Catalog" opened displaying the IOC_ATTR_KF that I had created earlier. When I double clicked on the IOC_ATTR_KF I got the msg asking "Do you want to transfer the IOs from the template into the structure?" I clicked on Yes. But I don't find any key figures either in the Structure pane or in the Template pane. Both the panes are empty.
    I also clicked on the All InfoObjects button and searched for ZPRICE but again I am getting the message "No "further) object found". However when I try to create ZPRICE I am getting the message ZPRICE already exists.
    Please explain me why this is happening like this?

  • Cummulative key figures

    Hi experts. please explain me what are cummulative KFs and how to use them?
    regards
    rajesh

    Dear Rajesh
    Flow/non-cumulative value
    You can select the key figure as a cumulative value. Values for this key figure have to be posted in each time unit, for which values for this key figure are to be reported.
    Non-cumulative with non-cumulative change
    The key figure is a non-cumulative. You have to enter a key figure that represents the non-cumulative change of the non-cumulative value. There do not have to be values for this key figure in every time unit. For the non-cumulative key figure, values are only stored for selected times (markers). The values for the remaining times are calculated from the value in a marker and the intermediary non-cumulative changes.
    Non-Cumulative with inflow and outflow
    The key figure is a non-cumulative. You have to specify two key figures that represent the inflow and outflow of a non-cumulative value.
    Note
    For non-cumulatives with non-cumulative change, or inflow and outflow, the two key figures themselves are not allowed to be non-cumulative values, but must represent cumulative values. They must be the same type (for example, amount, and quantity) as the non-cumulative value.
    Aggregation Behavior of Non- Cumulative Key Figures Locate the document in its SAP Library structure
    http://help.sap.com/saphelp_nw04/helpdata/en/80/1a62f8e07211d2acb80000e829fbfe/content.htm
    The non-cumulative key figures are used in the Inventory cube.
    Assign Points if useful
    Regards
    Venkata Devaraj !!!

  • Key Figure Sorting in Workbook

    Hi Experts,
    I am creating a workbook where the key figures are supposed to be sorted in descending order. I tried using a Condition the displays the Top 100% of the results (because I want to display all, I just want to sort). The condition is working fine during the first run. However, when I save the workbook and re-open it again, the sort does not work anymore. Please advise. Any help is greatly appreciated.
    Thanks,
    Juice

    Hi Juice,
    Why dont you use the key figure sorting property present in the the Bex Analyzer.?
    Steps:
    1.  In analysis mode, select a key figure cell in the analysis grid and access the context menu. This can be done in 2 ways..
    ○       Choose the cell with your right mouse button (secondary mouse button).
    ○       From the menu, choose BEx Analyzer --> Context Menu for Selected Cell
    2. Choose Properties.
    The properties dialog box for the selected key figure appears.
    On the Sorting tab, you can configure the different sort options for the selected key figure.
    Hope this helps you!
    -Pradnya
    Edited by: Pradnya Rane on Mar 24, 2009 5:20 AM

Maybe you are looking for