Hi Arunnesh,
I encountered exactly the same issue when implementing a hierarchical filter example where a crosstab selection drives a chart as well as updating a text field with the selected value. So, as I understand it, as was the case in my scenario, your problem relates to the description returned when a row is DESELECTED, rather than the description returned when a results row ("Overall Result") is selected.
When a crosstab row is deselected, the standard behaviour is that the getSelectedMember() method returns "(ALL_MEMBERS)" for the internalKey and null for the text. I can confirm this behaviour is the same in DS 1.5. So all you need to do in your script is test for "(ALL_MEMBERS)" and then substitute your own more user-friendly text.
I have demonstrated this in the example below.
Since you have indicated your scenario includes two dimensions, I have replicated this for completeness, showing both key and text values, in one case without substitution and the other with substitution so the difference is clear.
The "On Select" event script of the crosstab is coded as follows:
var selectedDimension1 = me.getSelectedMember("ZAIRLINID__ZAIREGN");
var selectedDimension1_Key = selectedDimension1.internalKey;
var selectedDimension1_Text = selectedDimension1.text;
var selectedDimension2 = me.getSelectedMember("ZAIRLINID");
var selectedDimension2_Key = selectedDimension2.internalKey;
var selectedDimension2_Text = selectedDimension2.text;
var textWithoutSubstitution = ": " + selectedDimension1_Key + " " + selectedDimension1_Text + " - " + selectedDimension2_Key + " " + selectedDimension2_Text;
TEXT_3.setText(textWithoutSubstitution);
// "(ALL_MEMBERS)" and substitute alternative text if selected key is "(ALL_MEMBERS)"
if (selectedDimension1_Key == "(ALL_MEMBERS)"){
selectedDimension1_Key = "Overall Dim 1 (Key)";
selectedDimension1_Text = "Overall Dim 1 (Text)";
selectedDimension2_Key = "Overall Dim 1 (Key)";
selectedDimension2_Text = "Overall Dim 2 (Text)";
}
var textWithSubstitution = ": " + selectedDimension1_Key + " " + selectedDimension1_Text + " - " + selectedDimension2_Key + " " + selectedDimension2_Text;
TEXT_4.setText(textWithSubstitution);
On startup, the text defaults to "ALL" as shown below:
When a single row is selected the output is as shown below. Both texts are the same since no substitution occurs.
When the row is deselected the output is as shown below. This time you can see the result of the substitution logic in the second text line.
If your crosstab includes result rows then you will also need to include substitution logic for those as well, otherwise you will get the default values as shown below:
I think the above solution via scripting would be the quickest and easiest. If you want to change the result descriptions permanently for all BEx queries you could consider implementing the modification described in SAP Note 527707. However, I'm not sure if Design Studio would automatically pick up the modified texts in this case.
EDIT: On further review, I've realised the SAP note will not impact the non-result rows which is the main issue here, so I think that leaves the scripting solution above as the only option.
Regards,
Mustafa.
Message was edited by: Mustafa Bensan - added comment about SAP Note.



