cancel
Showing results for 
Search instead for 
Did you mean: 

Variable value ignored for one query - Design Studio

Former Member
0 Kudos

Hi,

I have a design studio application with three datasources loading on inialisation with common variables. However, one of the queries does not seem to apply the variable values entered:

  • DS_PLAN - an input ready query on an aggregation level with two hierarchy selection variables, one for employee and one for cost center
  • DS_EMPLOYEE - a non-input ready query on employee master data with one hierarchy selection variable (shared with DS_PLAN)
  • DS_PROJECT - a non-input ready query on cost center master data with one hierarchy selection variable (shared with DS_PLAN)

I load all three datasources at the application initialisation (load in script = false) and have tried with merge variables as both true and false (when false, I use the "on before prompts submit" script to pass the variable values from DS_PLAN to the others.)

The two master data queries are then used to populate dropdown lists as I need the dropdown lists to include all possible values where the planning query should show only those with data in the planning cube.

However, I am seeing different behaviour from the two datasources:

  • The employee list behaves as expected, and always populates the dropdown with just the employees that are within the selected hierarchy node.
  • The project list is populated with every single cost centre in the system, NOT the selected hierarchy nodes.

If I add the DS_PROJECT datasource to a crosstab and display that in the application, it applies the variable selection and shows me only the reduced picklist. But *only* once I have viewed the content of the crosstab. If I have the crosstab on a hidden panel and do not look at it then the variable is not applied.

The two master data queries are as identical as I can make them, as are the two hierarchy selection variables (several single values / mandatory / ready for input). All script elements are matching and the employee datatsource is not referenced anywhere else in the application.

The only difference I can see is that cost centre is a compound characteristic but employee isn't.

I have checked the following posts among others, but have found nothing to suggest why my variables are applied to 2 from 3 queries on application initialisation.

https://archive.sap.com/discussions/thread/3718981

https://answers.sap.com/questions/101899/dsloaddatasource-ignores-variable-initialization.html

Can anyone please suggest why my cost centre query might be behaving in this way?

I am using Design Studio 1.6 SP04 connecting to BW 7.5 SP06.

Thanks,

Sue

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Sue,

1) Is your initial view of DS_PROJECT showing unfiltered data? If your variable is ignored, the initial view should be entire data set.

2) Have you double-checked the 0COST_CTR settings in the initial view of your DS_PROJECT data source so that the values are not set to master data, but query results?

Former Member
0 Kudos

The initial view of DS_PROJECT shows filtered data and the result set is set to members with posted data not master data.

I have discovered that if I use a script to assign the datasource, then assign the variable value and then use a getData method to read some of the data in the report, that is enough to filter the dataset so my picklists show the correct value. But I have to have all three steps in the script, and it has to be the assignDataSource method - loading a pre-assigned datasource is not enough. This is obviously not great as a solution but will do as a workaround for now.

I've tried using a different query on cost centre and a different datasource definition but get the same issue. It does seem to be specific to the cost centre characteristic but other than being a compound characteristic, I can see no differences in the settings.

Former Member
0 Kudos

It is a strange behaviour, and I have been having problems with this myself. For example, when using a getMembers method to filter my radiobuttons or dropdown components, Design Studio produces completely random lists of members. But I am glad you have found a workaround - unfortunately there are a few bugs in Design Studio that we have to live with...

Former Member
0 Kudos

Hi Tammy,

I'm not sure if the note matches exactly, as I get the same issue whether or not I have the variables merged, whether I load in script or not. There seems to be something specific about this query which stops the variables from applying.

Thanks,

Sue.

TammyPowlas
Active Contributor
0 Kudos

Hi Sue - please see this note - https://launchpad.support.sap.com/#/notes/2383843/E - does it apply? It says it will be fixed in SP5 which is not out yet to my knowledge.