Skip to Content
0

Tree component and personalization

May 10, 2017 at 06:38 AM

170

avatar image

Hi all :)

I am struggling with the tree component and personalization. I have a simple report on finance data (actuals vs budget) with dimensions like companycode , glaccount and profitcenters. The tree component is used to make the user able to browse and select prifitcenters from the hierarchy. This works fine. And also setting personalization works fine.

But if personalization is set and the user changes the companycode the tree component goes blank and shows no data. All the other components are updated accordingly.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Tor Einar Jørgensen May 15, 2017 at 12:14 PM
0

I have made an even simpler applicaition to isolate my issue:

It consists of 2 datasources using the same Bex Query.

DS_1 displays a crosstab with data, and DS_2 displays the corresponding pctr-hierarch so that the user can make selections from the tree component and get the correct result displayed in the crosstab.

I also have a dropdown showing the relevant companycodes for this case.

Code for the dropdown (on select):

DS_1.clearFilter("ZPROF_CTR");
DS_2.clearFilter("ZPROF_CTR");
DS_1.clearFilter("0COMP_CODE");
DS_2.clearFilter("0COMP_CODE");


APPLICATION.setVariableValueExt("V7C_USM_COMPCODE", DROPDOWN_1.getSelectedValue());

Code for the tree component:

DS_1.clearFilter("ZPROF_CTR");
APPLICATION.setVariableValueExt("V7C_USM_COMPCODE", DROPDOWN_1.getSelectedValue());
DS_1.setFilter("ZPROF_CTR", TREE_1.getSelectedMembers());

This works perfect before I set personalization. I can browse and select profittcenters and I can change companycode and the tree-structure changes to the relevant part of the hierarchy.

Then if I click on "set personalization" with a selection made in the tree-component this also works when I reopen the report, but if I navigate away from the personalized pctr in the three component nothing changes. It seems like the tree component stays "unrefreshed", the crosstab changes like I would expect.

Anyone have a solution to this issue?

BR
Trond Erik

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi Trond,

Can you perhaps show steps and corresponding screenshots to clarify your issue further? At the moment, I am unable to reproduce your issue. For me the personalization navigation is working as expected.

Regards,

Mustafa.

0

This is the sample report opened with personalization active. If I now select another profitcenter from the tree model this is not reflecetd in the crosstable.(this is working perfect without personalization set). And also changing CC in the drop down has no effect on the tree model now.

It seems that the tree model is not refreshed correctly with active personalization.

BR

Trond Erik

with-pers.png (59.9 kB)
0
Mustafa Bensan May 16, 2017 at 02:29 AM
0

Hi Trond,

Thanks for the clarification. Another question. What is the reason for using a BEx Variable to filter Company Code instead of setFilter()? Is it because the BEx Query is configured to default the initial BEx Variable value to the user's company code? Otherwise, for performance reasons, it is generally recommended to use setFilter() in preference to BEx Variables.

All that being said, let's take this step-by-step and simplify the application further to try to trace the cause of the issue. Please make the following changes to your application:

1. Update the code for your dropdown so that it reads as follows:

// DS_1.clearFilter("ZPROF_CTR");
// DS_2.clearFilter("ZPROF_CTR");
// DS_1.clearFilter("0COMP_CODE");
// DS_2.clearFilter("0COMP_CODE");

// APPLICATION.setVariableValueExt("V7C_USM_COMPCODE", DROPDOWN_1.getSelectedValue());

DS_2.setVariableValue("V7C_USM_COMPCODE", me.getSelectedValue());

There is no need to clear filters as each time a new filter value is applied, any existing filters on the same dimensions will be overwritten. Also, since you are simply selecting a single company code for your BEx Variable, there is no need to use setVariableValueExt(), setVariableValue() is preferred. Furthermore, since the intent of the BEx Variable is to restrict the list of available profit centres to a specific company code, there is no need to set the variable at the application level, so you should set it at the data source level, as per the updated code above. As data source DS_1 is filtered by profit centre, it is redundant to also set the company code BEx Variable at the application level since any given profit centre can only belong to one company code anyway.

2. Update the code for your tree component as follows:

// DS_1.clearFilter("ZPROF_CTR");
// APPLICATION.setVariableValueExt("V7C_USM_COMPCODE", DROPDOWN_1.getSelectedValue());

DS_1.setFilter("ZPROF_CTR", TREE_1.getSelectedMembers());

There is no need to set the value of the BEx Variable again since it has already been set as a result of the dropdown selection.

3. Set the Bookmark Loading property of your application to "Hide and Keep Prompts".

Let me know how you go.

Regards,

Mustafa.

Share
10 |10000 characters needed characters left characters exceeded
Trond Erik Bones May 16, 2017 at 07:55 AM
0

Hi Mustafa, and thanks a lot for taking time to guide me! :)

I was using the BEx Variables because they were there in the original query built for another report. No other reason, I have now updated my query to disregard those.

My drop down now look like this:

DS_2.setFilter("0COMP_CODE", me.getSelectedValue());
DS_1.setFilter("0COMP_CODE", me.getSelectedValue());

(I guess I need to set the new company code in both data sources?)

The tree component looks like this:

DS_1.setFilter("ZPROF_CTR", TREE_1.getSelectedMembers());

This is also working as expected, I can freely change company codes and select one or more profit centers and get my data.

When I then select one profit center and set my personalization and reopen the report my start page is as expected. But if I then select another profit center the cross table updates once and when I select another one nothing happens. If I select another company code the data in the cross table changes, but the tree model don’t (it still shows the hierarchy that “belongs” to the personalization.)

It’s like the tree model is “disconnected” from the rest of the application when using personalization.

Best regards

Trond Erik Bones

Show 10 Share
10 |10000 characters needed characters left characters exceeded

Hi Trond,

Let's continue to simplify. Can you do the following?:

1. If you are not already doing so, populate the dropdown items by property binding, specifying the 0COMP_CODE dimension in data source DS_2 as both the Source and Target in the items;

2. Remove the script code in your dropdown, as we are now filtering using direct property binding;

3. Set the Bookmark Loading property of your application to "Hide and Clear Prompts".

Let me know how that goes,

Mustafa.

0

Hi Mustafa :)

Same result. After I set personalization the tree component stops working. I can click once in the tree model, but after that it goes silent. Also changing CC in drop down has now effect at all, which is no surprise since the target DS is set to only DS_2. I have tested both wirh "Hide and keep" and "hide and clear".

BR
Trond E

0

Hi Trond,

This is interesting, as I can't seem to replicate the issue. Just one more tweak. Please add the following code to the "On Select" event of your dropdown script, assuming the Source/Target property binding for the items are still in place as per Step 1 above:

DS_1.setFilter("0COMP_CODE", me.getSelectedValue());
DS_1.clearFilter("ZPROF_CTR");

By the way, what version of Design Studio are you running?

Regards,

Mustafa.

0

Hi again :)

Same result. I also noticed now that I get a warning when I repoen the report after setting personalization. The warning is "Web Item could not be found in current Web Application".

I am running version 16.1.2

BR
Trond Erik Bones

0

Hi Trond,

Further questions:

1) The message "Web Item could not be found in current Web Application" suggests that the personalisation is trying to load a component which no longer exists. Are you using any custom components in your application?

2) Are you running your application locally or on the BI Platform? Is your Design Studio version the same as the BIP Add-on version? If you created your application locally and then published it to the BI Platform, it could even be that a new standard component, like the tree component is missing because the client and server versions of Design Studio are not in synch.

3) Sounds like you are on DS 1.6 SP1 Patch 2. Is there any possibility you can upgrade to the latest version?

Regards,

Mustafa.

0

Hi :) and thanks again for taking your time.

1) No, we dont have any custom components.

2) When I test personalization and bookmarks I run the application on the BI Platform. I am not sure what version the BIP Add-on is, but I guess server/client where in sync until today because I upgraded the client to 16.4.2 (the latest) and now I get warnings that the BIP Add-on and client are on different versions.

3) I upgraded the client, but need som more time to also upgrade the BIP Add-on.

Regards
Trond Erik

0

No problems :). Let me know your results once you have upgraded the BIP add-on as well and we can take it from there.

0

Hi, we have finally upgraded our systems with SP04 and the error is gone :) Now it works as expected.

Do you btw have release notes for SP05 which just got out?

One final question: Is the BIP add-on used by already published reports? Or is it used only when developing in Design Studio? (Can we upgrade this in our production enviroment and be sure that already published reports are ok?)

Thanks for your time Mustafa, a working community is essential for this kind of software!

BR

Trond Erik

0

Hi Trond Erik,

The BIP add-on applies only to Design Studio applications. It does not affect other report types such as Webi or Crystal Reports. If your question relates to already published Design Studio reports, then yes the BIP add-on applies to these. So before upgrading the BIP add-on in your Production environment, you should satisfy yourselves that the already published reports are working as expected after upgrading the BIP add-on in your Dev and QA environments.

Regards,

Mustafa.

1

Release notes for SP05 can be found here: https://launchpad.support.sap.com/#/notes/2376849

0