Query design question - Adding Key Figures (NW04s)

I have a simple query defined as follows:
-- Rows:
2 characteristics with result 'Always suppress'
-- Columns:
1 characteristic (posting period)
1 Structure with 2 calculated key figures
I want to add a formula that adds all the CKF's on each row and displays only once on the far right of row. Best method?

Hi,
You can go ahead with restrictions for keyfigures with two variables. One variable is for ready for input and another variable with customer exit which should pick the first month of the year entered in the previous variable.
Ex: if a user enter a month for 02.2008, then the customer exit will pick the year based on the enterd month and finds first month of that year and display the data with month ranges.
In the variable you have take value ranges.
Reg
Pra

Similar Messages

  • Error CL_RSD_MULTIPROV  in Query Designer while restricting Key Figures

    Hello,
    I am trying to create Query on Multiprovider in Production envirnoment.
    I drag  key figure in row and try to restrict it to Product Hierarchies as I don't want to create restricted  Key figure.
    While Saving Query I am getting following  Error Massage.
    'System error in Program CL_RSD_MULTIPROV and Form GET_PART_IOBJNM_CMP-01'.
    When I save Query without giving any restriction in Key Figure . I could save it.
    Please suggest in above error.
    Thanks and Regards,

    Hi,
    Check the note 1090490.
    hope this helps,
    Regards,
    Rama Murthy.

  • Adding key figures using commands in Web Application Designer?

    Hello, all.
    I have a query the contains several key figures.  From that query, I created a query view in which only one of the key figures is displayed.  I'm using this query view for one of the data providers in a web template.  In Web Applicaiton Designer, I would like to be able to hide the key figure from the data provider and show a different one.  How can I accomplish this using the built-in commands?
    I know I can hide all key figures using the CLEAR_SELECTION_STATE command, but I can't figure out how to use a command such as SET_SELECTION_STATE_SIMPLE to show a different key figure.  Any help would be great!  Thanks.

    I've tried that using the GUI to configure the command, but WAD crashes when I try to open the window where I choose the member name.  The error says:
    "4A6DM1A4LTXPJKA1BA3LD9TTD is not a valid characteristic for InfoProvider MQM_M01."
    I also tried entering the commands as you suggested in the XHTML editor, but that resulted in an error when I tried to execute the command.
    Maybe I can do what I'm trying to do using some method other than changing key figures.  Basically all I want do is change the date range of the data shown using offsets.
    The key figures that I'm trying to add and remove are restricted in Query Designer to different date ranges.  These date ranges use offsets to set the restriction.  For example, one key figure is restricted to display values for only the last 7 days and I'm trying to replace it with a key figure that's restricted to the last 14 days.
    If I knew how to set a filter with offsets using commands in WAD, then I'd use that method, instead.  Any suggestions would be appreciated.

  • BO( WEBI,QAAWS ) can't sustain bw query : create new calculate Key Figure ?

    BO( WEBI,QAAWS ) can't sustain bw query : create new calculate Key Figure ?
    I create three new calculate  Key Figure : TotalQty1,Rate1,TotalRate1  on bw query. Return values:
    TSAS defect1     Qty     TotalQty1     Rate1     TotalRate1
    weight inaccuracy     33.000     33.000     37.500 %     37.500 %
    poor function     10.000     43.000     11.364 %     48.864 %
    gap out of spec     9.000     52.000     10.227 %     59.091 %
    scratch  /crack/ dam     8.000     60.000     9.091 %     68.182 %
    broken glass/mat     5.000     65.000     5.682 %     73.864 %
    missing display     6.000     71.000     6.818 %     80.682 %
    assembly defect     4.000     75.000     4.545 %     85.227 %
    plastic deformed     4.000     79.000     4.545 %     89.773 %
    no function     4.000     83.000     4.545 %     94.318 %
    poor  printing     5.000     88.000     5.682 %     100.000 %
    But Create on universe  connect  to this bw query, I used QAAWS and WEBI to runat , TotalQty1,Rate1,TotalRate1   key figure values are Qty value, that is error:
    TSAS defect1     Qty     TotalQty1     Rate1     TotalRate1
    weight inaccuracy     33     33     33     33
    poor function     10     10     10     10
    gap out of spec     9     9     9     9
    scratch  /crack/ dam     8     8     8     8
    broken glass/mat     5     5     5     5
    missing display     6     6     6     6
    assembly defect     4     4     4     4
    plastic deformed     4     4     4     4
    no function     4     4     4     4
    poor  printing     5     5     5     5
    pho:
    BW QUERY: [http://space.itpub.net/attachments/2010/04/10339719_201004211645561.thumb.jpg|http://space.itpub.net/attachments/2010/04/10339719_201004211645561.thumb.jpg]
    WEBI:[http://space.itpub.net/attachments/2010/04/10339719_201004211637351.thumb.jpg|http://space.itpub.net/attachments/2010/04/10339719_201004211637351.thumb.jpg]
    QAAWS:[http://space.itpub.net/attachments/2010/04/10339719_201004211637591.thumb.jpg|http://space.itpub.net/attachments/2010/04/10339719_201004211637591.thumb.jpg]
    Why? BO can't sustain bw query : create new calculate Key Figure ?
    Who to figure out this question?
    Because I can't to do create new calculate Key Figure   in webi or Xcelsius ,So ,I create new calulate Key Figure  on BW QUERY.
    Thank you.
    BestRegards,
    Howard.
    Edited by: flying on Apr 21, 2010 10:48 AM

    HI Ingo,
        Didier Mazoue  say universe accept bw query Restricted KF and calculated KF :
       [ Restricted and calculation keyfigures| Restricted and calculation keyfigures]
       Why I create new Restricted KF and calculated KF for bw query, QAAWS,WEBI are can't return ok datas for new Restricted KF and calculated KF ?
      I create KF on Universe :
        select ued : <EXPRESSION>@Select (Key Figures\Qty)</EXPRESSION>   OR <EXPRESSION>SUM(@Select (Key Figures\Qty))</EXPRESSION>  
    parse error: Parse failed:Invalid definition(UNV0023)
       Thank you.
    Regards,
    Howard.
    Edited by: flying on Apr 23, 2010 6:00 AM

  • Query with a hidden key figure

    I would like to build a query which will include just one key figure which will be hidden is this possible?  Thanks

    Hi akreddy,
    There will be no results if the query has only one key figure and it is hidden.
    Such query makes no sense to me.
    The only logical way I can think of having this query is:  have this only key figure properties as Hidden (Can be Seen).
    so users can change the local setting of the query when they want to see the report results.
    Feng

  • Query on 0IC_C03 with key figures 0valstckqty and 0valstckval

    Hello Gurus,
    I want to make a query on  0IC_C03 with key figures 0valstckqty and 0valstckval for a single month eg October 2011. I have 0plant in rows. The problem is that I just see the key figures for planst which have movements in October 2011.
    I dont want choose all months in global filter to get key figures for all plants.
    How can I solve this problem?
    Jesper

    Jesper-
    You're looking at a "Transactional" info cube. That means that the query you create will ONLY provide data for a selected period in which data exists. Plants with no movements will not appear. That's how it's supposed to work.
    Now... you can create a hidden selection in your columns. For example:
    First column (hidden)... 0valstckqty + 0valstckval. No other restrictions
    Second column (visible) 0valstckqty  restricted to the date range of interest
    Third column (visible) 0valstckval restricted to the date range of interest
    be sure to NOT suppress Zero rows.
    Plants that never had a transaction will, however, not appear at all. The query will also take a long time to execute because it's extracting all data.
    The best solution is to explain to your user that it's working the way it's supposed to.. if a plant has no values then there were no transactions.

  • Query design question (NW04s)

    In query designer, how do I hide a column that has no data. I know how to suppress zero result columns, but these columns are not zero because they had no data.
    Can this be done using a local formula?

    Hi Raynald,
    Yes you can do this by restriction. I mean you restrict the report only display for the column that has a data.
    How you do this :
    1. Open your query.
    2. Right click for the characteristic (column), choose restrict.
    3. Choose for fix values, and singles value for selection type.
    4. (there will be 2 area) You restrict it by choose no-data / symbolized by # (move it from left to right pane).
    5. (After moving it to right pane) You right click to that symbol then choose exclude from selection in the context menu.
    If you have already made it, the column that has no data will be hidden.
    Hopefully it can help you.
    Regards,
    Niel.
    award points if it helps you.

  • Bi Query Design Question

    Hi,
                I have a question regarding a query design issue I was faced with today. I was asked to designed a Query, however all the fields required are all defined as characteristics but I would like to display one as a key figure. I would have a characteristic for a row, the column also for a characteristic and have another characteristic displayed instead of the key figured…… Is that possible?
    Thanks for any feedback

    Hi Serge,
    This question would be more appripriate -- and you will get a quicker answer -- in the BI Forums.  Please open your question there.
    Best Regards,
    Matt

  • Query design question: multiple plan versions in single column

    I have a standard financial statement query with current month "Actual" restricted to Value Type 10 and current month "Plan" using Value Type 20.  This scenario is repeated for year-to-date Actual and Plan along with $ and % variance calculations.   Until recently we were only loading plan version so I had no reason to restrict the plan to version 0 Actual/Plan.
    We are now loading an alternate plan version, Version 1, and I would like to report both versions in the same query.  I though I could just bring in "Version" as a Free Characteristic to easily switch between version 0 and 1 but that didn't work as expected. 
    With "Version" as a filter item my Plan amount will report both plan versions combined which is fine and when "Version" is filtered to the alternate version 1 Plan correctly displays the alternate amount, in both cases Actual is unchanged and displays correctly.   The problem is when I change the filter to just show Version 0 which is defined as "Actual/Plan".  When version 0 is selected the Plan amount displays correctly but ALL Actual values disappear.
    No Version filter set = Actual/Plan and Plan Version 1 combined correctly.   Actual displays correctly.
    Filter set to 1 and 0  = Actual/Plan and Plan Version 1 combined correctly.   Actual displays correctly.
    Filter set to 1 = Plan Version 1 only.  Actual displays correctly.
    Filter set to 0 = Plan Version 0 only.  No actual data is displayed.
    Is there a better way of displaying multiple plan versions in a query or will I have to add additional columns for each plan version?
    Thanks for the ideas,
    Jeff

    Thanks Amit that was the help I needed.
    I added "Version" to every actual Key Figure and made each a Constant Selection.  I also added Version as a Free Characteristic of the query for a filter.
    By adding Version to each Key Figure no matter which plan version I select in the Version filter Actual data alway remains correct and just my Plan column changes to show the plan version I selected.
    Thanks for your help,
    Jeff
    Edited by: Jeff Mayfield on Nov 11, 2009 11:51 PM

  • Query problem with accumulated key figures

    Hi BI Gurus!
    I have a report problem that I hope you can help me with!
    In my report I have 2 key figures. One for accumulated revenue previous year (KF1) and one for accumulated revenue current year (KF2). Both key figures should be presented in a graph in monthly buckets.
    January figures from both the key figures shoule be presented in the same bucket. Therfore I can't use 0CALYEAR since we have the "year" information in there. Instead I'm using 0CALMONTH2 which is only two digits, 01 for January. That way I can map figures from both previous year and current year in the same bucket.
    I need the figures to be accumulated and this is what I have problem with. When I run the report today in February 2010 it looks like this:
    Month   KF1   KF2
    01        10     15
    02        10     20
    03        15    
    04        10    
    05        20    
    06        10    
    07        10    
    08        15    
    09        15    
    10        20    
    11        20    
    12        10    
    This is how I would like the report to look like:
    Month   KF1   KF2
    01        10     15
    02        20     35
    03        35    
    04        45    
    05        65    
    06        75    
    07        85    
    08        100    
    09        115    
    10        135    
    11        155    
    12        165
    I have tried to use the setting "accumulated" for the key figures but then I get this result:
    Month   KF1   KF2
    01        10     15
    02        20     35
    03        35     35
    04        45     35
    05        65     35
    06        75     35
    07        85     35
    08        100   35
    09        115   35
    10        135   35
    11        155   35
    12        165   35
    Since the KF2 is revenue for current year and I run the report in February I don't want any figures to be displayed in Mars...
    I have tried to restrict the key figures by 0CALMONTH2 and 0CALYEAR. The KF1 is havein a restriction to only show values for 0CALYEAR - 1 and an interval for 0CALMONTH2 from JAN - DEC.
    The KF2 is having a restriction to only show values in the interval "first month in year - current month" (in this example JAN - FEB) for 0CALMONTH2. And current year for 0CALYEAR.
    Despite my restrictions for KF2 the numpers repeats itself for every month...
    Any suggestion how I can resolve this?
    Best regards
    Anders Florin

    Hi Khaled and thank you for trying to help me!
    I agree with you and think the users should accept the report as it is. But they are claiming that top management will not accept this and they would really want this to be fixed the whay that they want. I have tried to push back on this and said that I'm not sure that it can be resoleved and that it could cost them a lot of money if I try.
    But I will try to resolve it for them if I have spare time in the end of the project. I have not promised them anything but it would really be nice if I could fix it.
    So when you say I need to use a structure and a calculated key figure. How should the calculated key figure and the structure be configured?
    If I use a structure in the rows I guess I can't use same object in calc.key.figure right? Like if I use 0CALMONTH2 in the structure I'm not able to restrict the key figure with the same object? If that is correct I also have a ZMONTH object, different story why I have that... , that I can use in the same way as 0CALMONTH2. Or is this only a problem when I use "local" formulas within the query and not using a "global" calculated key figure? Cause I have only used the "loacal" formula calculated key figure in this report....
    Br
    Anders

  • BEx Query - Stop Aggregation of Key Figure upon Drill

    Hi,
    I have a situation wherein I am joining Header and Line Item details using a BW InfoSet (Header - DSO1 and Line Item DSO2). A query is built off this InfoSet providing a single view of both the Header and Line Item information. This works great and users love it. Note that this information is coming from a 3rd part application sitting in ECC and is data before posting into SAP.
    Using BEx Analyzer, we have Header and Line Item fields in the rows along with the Line Item Amount and the Header Amount. If I remove the Line Item characteristics from the rows, the Amounts get aggregated(SUM UP). This is OK for the Line Item Amount (sum up all the different lines), but not so good when the Header Amounts sum together providing an incorrect header amount.
    Ex: Document Number 123 has 3 distribution lines. Total Header Amount is $100.
    Doc Number(DSO1) |     Line Item Number(DSO2) |      Line Item Amount(DSO1) | Header Amount (DSO2)   
    123                                   1                                             $20                                   $100                      
    123                                   2                                             $20                                   $100                      
    123                                   3                                             $50                                   $100                      
    This view looks good. Say, we remove Line Item Number from the rows, we now get:
    Doc Number |      Line Item Amount  |      Header Amount
    123                              $90                       $300                       
    The Header Amount is incorrect as it should be $100.  My initial plan was to use Line Item Amount as it would aggregate up and provide the detail at the line item level and sum up to the header level.
    As this information is before posting into SAP. None of the SAP validations are called up for this data and the sum of the line item amounts will not always tie to the header amount  (there could be tax and freight amounts at the header level in different key figures). As seen in my example above, Line Item Amount sum up to $90 whereas the Header Amount is $100.
    I guess the simplest solution would be to set the Header Amount on this report to not change with any navigation/filtering etc. As in the example, the header amount remains $100. Any way this can be achieved?
    Any ideas/suggestions are welcome. Thanks in advance.
    -Vivek

    Hi Yasemin,
    Thank you for the prompt reply. I like your idea of counting line item numbers and dividing the header amounts with the count. For my situation though, Akshay and Anshu's answer worked best and like the fact that I can leverage BEx functionality out of the box.
    Akshay & Anshu,
    Thank for the prompt reply. Your suggested solution worked great.
    Many Thanks,
    Vivek

  • Query Designer - Hide Repeated Key Values - Doesn't work in the web

    Hello Experts,
    I'm facing a problem with a query. The user requested that he/she wants to see all the values of the key values.
    I already unchecked the option "Hide repeated key values" in query designer, but it still hiding it. I tested in BEx and it's working fine, but when I run it in the web the key values are being hidden.
    Anyone knows what is happening? I'm not using WAD and there is no possibility to use it.
    Thanks,
    Helder

    Hi,
    I have seen this problem - setting that option still does not show the repeated key values in web. You will indeed need to use WAD and uncheck that option in the properties of the analysis item. If you can't do that, the other option would be to do this change in the default web template (which is generally 0Analysis_pattern for BI WAD) but note that this will affect all queries.
    Also, please note that if the query is exported to excel, it will show the repeated values. This is the reason sometimes the users ask for key values to be repeated - maybe you would want to confirm that.

  • Query design question

    I am writting a query against 0IC_C03 (Material stocks/movements).  To simplify the situation, here is what I have: material and posting date in rows, issue total stock and receipt total stock in columns. I'd like to add another column to display the LAST DATE of all movements for that material.  Can I do it?  How?  Any suggestions or comments will be greatly appreciated.
    Thanks!
    Tim

    Hi,
    You can directly drag and drop on Key figures then, data (keyfigure  values) will be displayed date wise in columns.
    Hope this helps..............
    Rgs,
    I.R.K

  • Query regarding characteristics and key figures

    Hi All,
    Can anybody pls tell me in what scenarios a key figure can be used as a attribute of a characteristic?
    what are the scenarios in which each type of DSO can be use?

    Hi,
    Can anybody pls tell me in what scenarios a key figure can be used as a attribute of a characteristic?
    if  your key figure in trasnctional data level it's give you the Fact.
    If you use your key figure in your master data lvel it's give you the present truth.
    Like this you have 0Material and Material price has the attribute of 0Material.
    read below link
    http://help.sap.com/saphelp_nw04/helpdata/en/dd/f470375fbf307ee10000009b38f8cf/content.htm
    what are the scenarios in which each type of DSO can be use?
    We have 3 DSO in BI 7.
    1. Standard DSO : it's contaions 3 tables (New,Active,Change log tables) : If you want overwrite funcationality go for this dso
    2. Direct Update DSO : It's Contaion only Active Table : If you want write some data using with  APD and BAPI go for this dso.
    3. Write Optimized DSO : It's Contaion only Active Table : If you want load mass uploads and stageing purpose we use this dso.
    Hope it helps you.
    Regards,
    Venkat.

  • Basic JPA native query design question

    Is this ok to reuse the lookup of the EntityManager and not close it?
    //Database call
    try {
    Query query = Resource.getEntityManager().createNativeQuery(sqlStatement);
    results = query.getResultList();
    catch(Exception pExc) {
    LogTool.error("Error running this query CALENDAR sqlStatement:" + sqlStatement);
    public final class Resource {
    private static EntityManager entityManager;
    public static EntityManager getEntityManager() throws NamingException {
    if(entityManager==null) {
    Context ctx = new InitialContext();
    entityManager = (EntityManager) ctx.lookup(JPA_PERSISTENCE_CONTEXT);
    return entityManager;
    }

    917903 wrote:
    Well, it felt silly in every instance to do this same lookup everytime A. so I made the function B.First case
    1- It represents a resource to which you shouldn't hold onto.
    2- It doesn't represent a resource.
    If the first then you should always look it up. If the second it doesn't matter if you look it up every time. So everytime wins for that case.
    Second case only applies if there is a measurable and significant performance impact and it does NOT represent a resource (so 2 from above.) If that is the case then hanging onto it makes sense. But I doubt that it would have such an impact.
    I wouldn't be surprised that if your JEE container allows you to redefine the pool while the app is running that you would find that choice 1 above is what is going on.

Maybe you are looking for