Dynamic columns in query depending on hierarchy nodes

Hello all
I want to design a query with dynamic number of columns depending on hierarchy node.
A hierarchy node is selected while running the query and user has authorization to see all subsequent nodes below the selected node.
e.g. consider grp hierarchy with units and sub-grps as nodes.
level1 Grp1
levele2 unit1     :       grp2               :      grp3
level3              :      unit2   unit4      :    unit4 grp4
Suppose user select node Grp1, then there should be 3 columns for unit1, grp2, grp3
If user selects node grp2, then there should be 2 columns for unit2 and unit4
Please help. Any suggestions highly are highly appreciated.
Rgds
Sanjyot

Surekha,
Try this.
Place heirarchy/characteristic in columns, under this place required keyfigure.
Restrict with variable.
Srini

Similar Messages

  • Dynamic columns in query

    Hi,
    This is regarding creation of dynamic columns in an input ready query. We were able to create dynamic data columns in the layouts of BPS. For example if I choose fiscal year then the layout can show one columns for each of the fiscal periods 'dynamically'.
    Is there the same feature in BI input ready query as well?
    Please advise.
    BR,
    SSC

    Hi all,
    Sorry if I was not that clear before.
    Let me try to explain it with another example. Lets say we are working on a rolling forecast scenario. We forecast from the current running period to the end of fiscla year. Meaning if we are in April then April- December (case-1) and if we are in Sept. then Sept-December (case-2). I want data columns which are combinations of period and 0amount. In case-1 above we will have 9 such columns and in case-2 above we should have 4 such columns. I was able to achieve this in BPS by restricting the column with a variable for periods and then marking it 'dynamic'. It would automatically expand based on the number of periods in the variable at run time.
    Could you advise how to configure the input-ready query in such a way?
    Regards,
    SSC

  • Refreshing Hierarchy node variable in BEx query with change in hierarchy

    Hi all,
    We have used a hierarchy node variable on Characteristic ZECCSAC (user-defined) and used it in a BEx query with default value set to a particular node value. Upto this, it is working fine.
    The hierarchy used in the query, with the hierarchy node variable, was later changed ( and in future it can undergo changes ). Since the number of records in the hierarchy are changing, the nodenames of the hierarchy nodes are changing. But the hier node variable default value is still set to the earlier nodename for that node description. So at runtime it is giving an error "ECCS Account Number is invalid"!
    Can anyone suggest how to refresh a hierarchy node variable default value each time a query is run so that the latest nodename is always taken ?
    Quick reply will be appreciated.
    Thanks

    Hi,
    You get this with User exits.
    Thnaks

  • BPC Excel: Select hierarchy nodes & exclude an account within

    Hello All
    u2013 in EVDRE, is there a way to define a column selection for a account hierarchy node, however exclude one of the accounts within this group? THis is simmilar to BEX query, where you can select a hierarchy node and then also select to exclude a member within.
    EG From the account hierarchy below, select the hierarchy node u2013 u2018group1u2019 , however exclude account 2.
    Account Hierarchy     
         Hierarchy - group1
              Account1
              Account2
              Account3
              Account4
    I have a couple of different column definitions, so this definition would need to be defined inside the column header area & not in the column member set.
    Thanks
    Glen

    Hello Nilanjan
    Firstly, thanks for your reply, much appreciated. One of the requirements is to have multiple column definitions in my report. To achieve this, i was planning to define the definitions inside the columns and adjust the colkeyrange to include all column definitions. This would mean that i would not use the column expansion and hence not have access to the suppress function.
    Is there a way of including the suppress function in a column definition?
    EG Include hierarchy node 'Parent - Group1" and exclude 'Account2'
    Account Hierarchy          
         Parent - Group1     
              Account1
              Account2
              Account3
              Account4
    Thanks, Glen

  • Passing hierarchy node variable in a hyperlink

    Hi,
    We are on XI 3.1 SP3.
    We have a BW summary query with hierarchy active, with hierarchy node variable as "optional" selection variable. Created Universe based on the query and built a WebI report. Have activated "Drill". That way we are able to drill down per the levels. This works fine.
    We have another BW detail query with optional hierarchy node selection. Created a universe and a WebI report for the detail report..
    When we try to create a hyperlink from the summary WebI report to the detail WebI report in "display" mode, creation of Hyperlink is very intutive. We are able to pass parameters.and the hyperlink works fine.
    The only problem occurs when we try to pass the hierarchy node variable value. The value of the hierarchy node gets passed, but the report does not bring over any data,
    Is this a known bug? Is there a workaround.
    Kindly advice.
    Rgds

    Hello,
    Ingo, thanks for your comment Sorry for the delayed response.
    Let me explain my scenario. On my report I have the following:
    1. Sales Hierarchy (5 level hierarchy)
    2. Product Group (Hyperlink created - want to pass Sales Hierarchy node value + Product group to detail report)
    3. Key Figure 1
    4. Key Figure 2
    I have activated drill which allows me to drill down the Sales Hierarchy.
    Scenaio A.  Pass just the Product Group Key. Success
    If I just pass the  "Product Group Key", the detail report shows me the data for the specific Product Group as expected. This is a successful test
    Scenario B -  Pass the Sales Hierarchy Node key and the Product Group Key Fails
    In this case, I am passing the "Product Group key" along with the "L00 Sales Hierarchy key". When I click on the hyperlink, it gives me an empty detail report. I know for sure that values exist for all levels. If I run my detail report stand-alone, I am able to get values for all levels.
    However if I drill down to the last level in the Sales Hierarchy, the detail report shows correct value. For last level, the Sales Hierarchy Node value gets passed correctly along with the Product Group key.
    URL generated is as follows:
    http://<bobj server>:<port number>AnalyticalReporting/WebiView.do?bypassLatestInstance=true&cafWebSesInit=true&appKind=InfoView&service=/InfoViewApp/common/appService.do&loc=en&pvl=en&actId=216&objIds=6933&containerId=6923&bypassLatestInstance=true&lsMProductGroup=11101101&lsSGeoSales+Hierarchy=B01&isApplication=false&pref=maxOpageU%3D10%3BmaxOpageUt%3D200%3BmaxOpageC%3D10%3Btz%3DAmerica%2FDenver%3BmUnit%3Dinch%3BshowFilters%3Dtrue%3BsmtpFrom%3Dtrue%3BpromptForUnsavedData%3Dtrue%3B&sRefresh=N
    In the URL you can see that correct values are getting passed
    Product+Group=11101101
    Sales+Hierarchy=B01
    Do I need to append any value to the "B01" value ?
    I did not understand the part about appending [ ] or 0HIER.
    Can you please explain.
    Thnaks for all your help.
    Rgds

  • Create link or dropdown for hierarchy nodes.

    Hi friends, I need your expertise in solving my senario. We have a costcenter with about 10+ hierachy levels. The customer wants to bypass the query varible screen (hierarchy node varible, year, month,mandatory) by selecting the node either from dropdown box or radio button or link from the intranet web page. This is little bit challenging for me. How can I create nodes, level by level and pass to the queryString. What is the best way to implement this.
    Thanks for your help.
    Ram

    Moorthy -
    A dropdown or radio button will work but you will need to use JavaScript to pass the hierarchy and node values and build the command through URL parameterization. First you will need to set the hierarchy, this can be done by passing a hierarchy value to a hierarchy variable using the "Set Variable Values" command. Then you can filter to a specific node using the "Set Selection State Simple" command. This link is a good place to start and get familiar with the fundamentals.
    http://help.sap.com/saphelp_nw70/helpdata/en/43/ef05462480025ae10000000a1553f7/frameset.htm
    A bit of advice learned the hard way. When filtering the node, you must use the "Set Selection State Simple" command and include the controlling area as part of the string.

  • Displaying dynamic columns in the query output.

    Hello,
    Depending on current quarter output of the query would vary.
    If current quarter is 'Q1'
    O/p : InvQ1  Del  BackQ1  BackQ2  BackQ3  BackQ4
    If current quarter is 'Q2'
    O/p : InvQ1  InvQ2  Del  BackQ2  BackQ3  BackQ4
    If current quarter is 'Q3'
    O/p : InvQ1  InvQ2  InvQ3  Del  BackQ3  BackQ4
    If current quarter is 'Q4'
    O/p : InvQ1  InvQ2  InvQ3  InvQ4  Del  BackQ4
    So, out of 9 columns, 6 columns would display at any given time depending on the current quarter.
    Invoice of 4 quarters, Deliquency and Backlog of 4 quarters.
    I am not getting any way how to display dynamic columns or hide unwanted/blank columns.
    For the time being I have added all 9 columns in the query, and in the output unwanted columns shows blank.
    Can anybody please suggest me how to display only 6 columns in the output depending on current quarter.
    Thanks and Regards
    Shilpa

    Hello,
    This shouldn't be too difficult. Assuming you have a variable with the selected quarter, you may choose to display Inv (whatever that is) for quarters 1 through variable, Del, and Back for quarters variable through 4. You also need a drilldown on quarter in the columns (after the key figure structure). You would probably need to restrict 'Del' on the variable as well if you haven't already done it.
    Best regards,
    Christoffer

  • Select key date of time-dependent hierarchy before select a hierarchy node

    Hello experts!
    I have a Web Application which has a selection on 0ORGUNIT (organizational unit). The selection is on hierarchy nodes and the hierarchy is time-dependent.
    Because of the time-dependency I have to give a key date for the hierarchy. But I want to select the key date at runtime/execution of the query and additionally I want to select the hierarchy node and other selection criterias.
    Maybe there is a solution to get all this in one pop-up or maybe in two or another solution how I can implement this requirement.
    Thanks for help!
    Peter

    Hey!
    You don't have to use the same presentation-hierarchy like  the selection-hierarchy is which you use for the variable. While presentation-hierarchy always has a key-date, the selection-hierarchy has none. So you see all values for selection but just this which are valid for the presentation-hierarchy are selected. And there is a warning which you can supress over RSRT.
    This solution works for our problem, maybe not for yours, don't know.
    Best regards,
    Peter

  • Hierarchy node in query rows not showing values in report

    Hi sdn
    I'm taking hierarchy node on rows and some plan and actual values on columns but i'm unable to get values in the report for only plan values
    How did I reconcile the values whether that value is available in hierarchy or corresponding value's for plan data is available in the cube,pls give me clues
    rubane

    Hi,
    Could you please share the steps you have taken to fix the problem?
    We do have a similar problem and for some reason the newly added hierarchy node for 0Profit_ctr is not showing up in the variable selection screen F4 (input selection for query execution). However we can see this node when we display that hierarchy in RSA1. I did try applying the changes recommened by Jerome but unfortunately it didn't work.
    Any help on this would be greatly appreciated.
    Thanks,
    Krish

  • Reassignment of hierarchy nodes dynamically

    Hi Experts,
    I have a requirement wherein I need to re-assign the hierarchy node for an account based on Functional area.
    Currently, we load 0ACCOUNT info object with hierarchy defined in KDH3 transaction in R/3. Here, the account 650000000 is defined under local accounts node of the hierarchy. Hence, when we use the 0account infobject in BEx with hierarchy activated, all the records in transaction data with account no. 650000000 are aggregated under local accounts node.
    However, the user wants us to check the functional area for each of the record with 65000000 account and re-assign it to a different node of the hierarchy. For example, if the transaction data has account number 65000000 and functional area 400, then the record needs to be aggregated under a different node in hierarchy, say overhead costs. Similarly, if there is another record with account 650000000 and functional area 300, then the record needs to be aggregated under Sales & marketing.
    How do we handle such conditional assignment of hierarchy nodes?
    Regards,
    SS

    Hi,
    I really doubt if dynamic reassignment of hierarchy nodes is possible in BW, but could be wrong.
    Alternatives which you can consider
    a. A flat hierarchy modeled in the dimension of the cube i.e. higher levels of 0ACCOUNT can be filled during transformations based on functional area. Major disadvantage here is that any change to the hierarchy or assignment could require reloads depending on your requirement i.e. touch history data or not
    b.Customized Hierarchy created by combining the original hierarchy and the assignment details
    for eg 
    Leaf Node: 650000000_400 under parent Overhead Costs
    Leaf Node: 650000000_300,under parent Sales & Marketing
    Regards,
    Advait

  • How to filter hierarchy node in BEX query designer

    Dear experts
    We are working on FI balance sheet with hierarchy infoobject 0GLACCEXT. Example of our balance sheet is as follow:
    Parent Node A = 20
         Sub-parent Node A1 = 10
             Leaf A11 = 5
                 Leaf A12 = 5
    Parent Node B = 20
         Sub-parent Node B1 = 10
                   Leaf B11 = 5
                   Leaf B12 = 5
    We require only:
        Sub-parent Node A1 = 10
        Leaf B12 = 5
    So I filter those out in BEX restriction;  however, after we examine the report in tcode RSRT, "Sub-parent Node A1" is not shown in BEX Report, and the result is as follow:
    Parent Node B = 5
         Sub-parent Node B1 = 5
                 Leaf B12 = 5
    Are there solutions for us to show merely A1 and B12 ?

    Hi Chu
    Try the following steps.
    Initial Output
    In this example I will restrict the query for only displaying Node 8603 and leaf 9000
    Proceed to restrict the Characteristic. Please be aware of the difference between hierarchy nodes and leaf characteristic values. Also set the Hierarchy display properties to expand up to level 1.
    Execute the query again:
    Please be aware that users will still be able to expand node 8603 and see the lower level nodes/leaf. In order to restrict users from doing this set up users authorizations.
    Regards,
    Carlos

  • Exclude a hierarchy node by using exit variable (not in query designer)

    Hi gurus!!
    I have a hierarchy for the infoObject 0COSTELMNT. Depending on the user who executes the report, the node '0599ADJUSTMENTS' must be displayed or not.
    I am trying to solve it by using an exit variable:
    Varible Type: Hierarchy Node
    Processing : Exit
    On the exit, I have entered the following code:
          IF ( sy-subrc = 0 ).
              l_s_range-sign = 'E' .
              l_s_range-opt  = 'EQ' .
              l_s_range-low = 'AJUSTES'.
              APPEND l_s_range TO e_t_range.
         ENDIF.
    But unfortunately does no work!!
    Any ideas?
    Thanks in advance
    Regards.
    Carmen Rodríguez

    Hi,
    Check the below link gives good knowledge on variables:
    http://help.sap.com/saphelp_nw04s/helpdata/en/cf/579b3c494d8e15e10000000a114084/content.htm
    Reg
    Pra

  • Creating Query with dynamic columns to show results

    Hi experts,
    I need to know how to create a query with dynamic columns. Meaning, I don't want to create a query with fixed columns representing the 12 periods of the fiscal year to show me actuals as the fiscal year proceeds.
    For example, if I am currently in the middle of period 3 (March) of a fiscal year, when I execute the query, I need it to automatically only show me the 'Actuals' for periods 1 and 2, without seeing the columns from periods 3 to 12 showing blank.
    Then when I am in the middle period 5 (May) the query should ONLY show me the columns for periods 1 to 4 'Actuals', no results should be shown for periods 5 to 12 yet, and I don't want to even see blank columns for period 6 to 12.
    How do I define my columns, to achieve this.
    Maximum points will be awarded.
    Thanks Everyone.

    Hi Josh,
    I'm having a little difficuluty understanding what should be included in my restricted key figures.
    The time characteristics that I have available to use are:
    0FISCPER3 (posting period)
    0FISCYEAR (fiscal year), currently using SAP EXIT to default current fiscal year.
    0FISCVARNT (fiscal year variant).
    In addition, I have the following characteristics available to be used in the columns:
    Value type (10)
    version (currently I'm using variable for it)
    Currency type (020)
    Currency (USD).
    Can you explain what my restricted key figure should be based on and how it should look.
    I tried to create a restircted key figure using 0AMOUNT, and 0FISCPER3. For 0FISCPER3  I created a range from 1 to previous period (using SAP EXIT that supplied previous period).I also had value type, version, currency type, and currency included in that restricted key figure.Then when I tried to drag 0FISCPER3 under the restricted key figure once again, it wouldn't let me, probably because I've already used 0FISCPER3 in the restricted key figure.
    Please let me know if my explanation is not clear.
    Your step by step help would be great.
    Thanks
    Edited by: Ehab Mansour on Sep 23, 2008 2:40 PM

  • Bex Query which uses Dynamic columns to display actuals

    Hi Bex experts,
    I have a query issue/question.
    I currently have a Bex query which shows me the the planned values for each period, spanning 6 years into the future. My Key figure columns are defined as follows:
    Value type  = '020'
    Version  = mandatory variable, entered at execution.
    Posting period (FISCPER3)  = These columns are fixed values using periods 1 to 12 for each column.
    Fiscal year (0FISCYEAR) = Each column contains SAP exit for current year, and using the offset +1, +2, +3, +4 etc, when I define the future years coulmns.
    Currency = fixed 'USD'.
    Fiscal year variant = fixed 'Z4'
    The above works fine for plan data.
    I want to now include is:
    Seperate 'Dynamic columns' to show only actuals for period ranges from period one to the previous period (or current period minus 1). Each period should have it's own column for actuals.
    The dynamic actuals columns should be grouped together to the left of the plan columns.
    Actuals are only for current year, so I will still use the SAP EXIT for current year in the column definition.
    Example: If I am currently in period 10, the query should show me actuals from period 1 to period 9 in seperate columns, then continue to show me my plan values columns that I have in place already.
    How can I construct these actuals columns in to my existing query. If you have possible screens shots.
    Thanks, and maximum points will be alotted.

    The way I have approached this you may not like as it involves quite a bit of coding
    12 CKFs
    each CKF adds up 2 RKFs
    So 24 RKFs
    example Column 6 CKF
    Adds Column 6 RKF Actual and Column 6 RKF Plan
    Column 6 RKF Actual contains Actual version + key figure + Period variable column 6 Actual
    Column 6 RKF Plan contains Plan version + key figure + Period Variable column 6 Plan
    Period variable column 6 Actual
    is a cmod variable which reads the entered date
    if the period of entered date is LE 6
    then return period 6 into "Period variable column 6 Actual"
    else put 0 into "Period variable column 6 Actual"
    Period variable column 6 Plan
    is a cmod variable which reads the entered date
    if the period of entered date is LE 6
    then return period 0 into "Period variable column 6 Plan"
    else put 6 into "Period variable column 6 Plan"
    Now what happens is that if you enter period 6 in your selection screen all the Actuals of columns greater than 6 all have period 0 put into their selection so return 0 and all the columns less than or equal to 6 return the values for the fiscal period (ie column 1 gets period 1)
    And in addition all the Plans columns return the value of their column ie for their period for those greater than 6 and for those less than 6 they all return 0
    It's convulted - but you get the idea - and yes it works
    There may be a better way to do it - and I am open to suggestions
    (this does assume that NOTHING is posted to period 0 otherwise it won't work)

  • Hierarchy nodes as characteristics in a query

    Hi all,
    I would like to ask if there is a way to use hierarchy nodes of InfoObject 0cost_elemnt as characteristics in a query.
    In other words I have a grouping of cost elements in R/3 and uploaded this group as a hierarchy in BW. Now the users want to have the ability to drag and drop in a query report any node of this hierarchy.
    Can this be done?
    Thanks in advance,
    Panos

    Hi,
    I guess, if I am getting you correctly the user wants to see teh hierarchy levels individually or on adhoc basis.
    Is that right?
    Regards,
    Ray

Maybe you are looking for

  • How to edit text in MS Word HEADER using bookmarks?

    I've been using the ActiveX calls to edit text in Word docs for a while. I assumed there was no trick to doing it in the header of a Word doc, but there seems to be no way to get into the header via LabView ActiveX calls. Regretably, Word also makes

  • How do i change transition length in fcpX ?

    Hi Im trying to increase the lenght of transitions using FCP X version and having no sucess. thanks.

  • APP CRASH in WP7, unable to reinstall and run

    Problem signature: Problem Event Name: APPCRASH Application Name: firefox.exe Application Version: 22.0.0.4917 Application Timestamp: 51c06b1b Fault Module Name: ntdll.dll Fault Module Version: 6.1.7601.17725 Fault Module Timestamp: 4ec49b8f Exceptio

  • X2-01 Camera Isnt Working ??

    Hi, i bought X2-01 Almost in less then a month. I liked it and using it well no problem. But i dnt know im unable to use camera since 2 days, Blue ,black, white, red lines are coming infront of it. When i start cam it hapens automatically. It becomes

  • Quick way to format text cut and pasted from a web browser into Pages?

    I work a lot by cutting and pasting text from web browsers into my word processor. When I was using Word, I had built a very useful macro that allowed me to re-format the font, font size, colour, line spacing etc, as well as to remove hyperlinks, all