Skip to Content
author's profile photo Former Member
Former Member

CrossTab Navigation/DrillDown with Dimension object not working

Hi All,

Initial Problem: I am having a Cross tab with few rows and columns ( 1 Dimension and 5 Measures), and Dropdown box, Filtering crosstab based on dropbox value. used the below code for DrillDown navigation. My issue is, when user clicking on Dimension object in the Cross tab, its working fine, but when user clicking on any key figure/measure value its giving all values irrespective of dropdown selection (SetFilter value of dropdown)

Requirement: Giving the ability to drill down few levels (Drill down functionality like drill/navigation in Webi report)

Example Drill down Hierarchy: Country-->State-->City-->Store

Used the following methods to achieve drill down functionality: SetFilter, RemoveDimension, MoveDimensionToRows

Procedure followed:

  1. Added Country Dimension and few measures to the initial view, and added to crosstab.
  2. Created a dropdown box and assigned Country Dimension to it.
  3. created a global variable “level” assigned a default value “Country”
  4. Changed Selection type to “Single” in the User Interactivity panel of Cross tab.
  5. Use the below code in the On Select of CrossTab

if (level == "Country " ) {

level = "State";

DS_1.setFilter("0COUNTRY", CROSSTAB_1.getSelectedMember("0COUNTRY"));

DS_1.removeDimension("0COUNTRY");

DS_1.moveDimensionToRows("0STATE");

}

else if (level == "State" ) {

level = "City";

DS_1.setFilter("0STATE", CROSSTAB_1.getSelectedMember("0STATE"));

DS_1.removeDimension("0STATE");

DS_1.moveDimensionToRows("0CITY");

}

Else{ if (level == "City" ) {

level = "Store";

DS_1.setFilter("0CITY ", CROSSTAB_1.getSelectedMember("0CITY "));

DS_1.removeDimension("0CITY ");

DS_1.moveDimensionToRows("0STORE");

}

}

Code Works like this: Initially created a global variable “Level” and its default value is “Country”. By using IF condition I am reassigning/changing the values based on drill down to the variable. And using Setfilter to filter the data source, and RemoveDimension and MoveDimensionRows methods to add the respective dimension to the cross tab.


My main issue here is, When user clicking on the dimension its drilling down to the next level, but when user clicks on the any keyvalues/Measures, its pulling all values from the data source(Set filter not working)

I tried changing all the Use Interactivity options of the cross tab.

Can some suggest the work around to disable mouse click on measures (or any alternative?)

I searched SCN for similar issues/post but dint find any help

https://scn.sap.com/thread/3309990

https://scn.sap.com/thread/3827568

Thanks,

Kumar.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Aug 15, 2016 at 08:25 AM

    Hi Kumar,

    On further testing, I have been able to replicate your issue. The problem is that when you click a measure cell instead of a dimension cell, getSelectedMembers() returns "(ALL_MEMBERS)". Normally, I would expect that if the Crosstab interaction properties are set as Selection Type "Single" and Selectable Area "Rows", the getSelectedMember() method would always return the dimension member, regardless of where in the row is clicked. However, it appears that the functionality has not been designed this way and the dimension member is only returned if you explicitly click on a dimension cell. This is not intuitive to me but is appears that this is how the functionality has been implemented.

    I remember seeing another post on the SCN with the same issue, where the request was to try to disable clicking on a measure cell to prevent this problem but haven't been able to find it.

    I'm not sure that there is a good workaround because as you've already discovered, there doesn't appear to be an interaction property combination that provides the desired result of returning a dimension member when any cell in the row is clicked. Perhaps others in the community may have ideas.


    Regards,


    Mustafa.


    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 15, 2016 at 07:38 AM

    Hi Kumar,

    A couple of questions and comments:

    1) Why do you have a separate dropdown box for Country instead of performing the Country drill from the Crosstab as well?

    2) Try including an APPLICATION.alert() message in your code to check the value returned by getSelectedMember() to confirm why all values are being returned;

    3) What version of Design Studio are you running?

    Regards,

    Mustafa.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.