cancel
Showing results for 
Search instead for 
Did you mean: 

Design Studio and Default Customer Exit Variables

Hello , a question please.

I have a query with a default value of the current month with a -1 offset - see below.

This means that when my design studio application opens it will do so with the previous month's data but, also allow the end user to filter on other months.

The issue I have is with the data sources in design studio itself insomuch as they do not seem to update when we move into the next month.

The above was captured today (05/07/2016) but, I had to change the value in the data source myself because the value was showing 05.2016 which is current month -2 not -1 as per my variable.....

What I would like is for the value in my data source to change to the previous month whenever we cross a month end.

Cheers,

Guy

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

We experienced the same behaviour and "reset initial view" seems to fixed the issue, at least for now. I don't know if it will happen next month unfortunately ...

Thanks for the testing Mustafa !

For you first question, I think he's referring to the default values in the filter pane, where the user can choose to remove or change them.

MustafaBensan
Active Contributor
0 Kudos

Hi Franck,

Thanks for the feedback.  I also tried the Reset Initial View option during my testing and have a suspicion that it only resets as an updated static filter value but I'd be interested to know whether you have to reset again next month.

Regards,

Mustafa.

Answers (6)

Answers (6)

MustafaBensan
Active Contributor

Hi Guy,

After some further testing, I've made some interesting observations about how Design Studio appears to treat dimensions with associated BEx Exit Variables, as follows:

1)  If the dimension is placed in either the Columns, Rows, or Background Filter pane of the data source Initial View Editor, the default value of the variable at the time is captured and applied as a STATIC filter, which is the issue you are experiencing;

2)  If the dimension is placed in the Filter pane of the BEx Query Designer WITHOUT also placing the dimension in the Columns, Rows, or Background Filter pane of the Initial View Editor then the value from the Exit Variable is respected each time the application runs or the data source is refreshed.

I think this is very peculiar and undesirable behaviour.  In many cases, we will want to display the value(s) of a dimension associated with an Exit Variable in either the columns or rows.  I assume this is your requirement too.

It would be interesting to know if others in the community have also observed this behaviour?

Regards,

Mustafa.

0 Kudos

Hey,

we are also experiencing this behaviour in two of our Design Studio applications.

We have several data sources which should be displaying the data for the current month initially. The user should be able to change the month via a dimension filter in case he wants to analyze data from another month.

In our case, we used the solution with the default value that is preset in the query for saving time during the initial loading of the application.

At the beginning, we also filtered each data source to the current month by applying scripting functionality. We thought that using the solution with the default value would save valuable loading time, changed all the queries accordingly and replaced the old data sources with the new queries. This was a whole lot of work for nothing it seems!

For me personally, it is a bug that these default values are interpreted as static filters within Design Studio if the dimension is in the columns, rows or a background filter (thanks, Mustafa, for finding out this valuable information ).

I think about opening an incident because of this, but I am pretty sure that the answer by SAP will be "this works as designed, please open a new thread in the Idea Place"...

BR

Agnetha

MustafaBensan
Active Contributor
0 Kudos

Hi Agnetha,

Thanks for the feedback.  I think it is still worth raising an OSS support ticket as this behaviour of exit variables being saved as static filters defeats the whole point of using exit variables.

Regards,

Mustafa.

0 Kudos

Hi Mustafa,

I was complaining about this issue to a colleague today and I still can't believe it, but he told me the solution for this. I tested it and it worked perfectly!!

The trick is as following:

Open your query in the Query Designer, click on the dimension the variable corresponds to and open the "Extended" tab in the Properties panel. There you have to check "Refresh as Designed" in the "Refresh Variables" section and it does the trick:

If this is checked, then it doesn't matter if the dimension is in the columns, rows or background filter in the initial view. It works all the time. I even didn't have to refresh the initial view in Design Studio, it just worked as expected - finally!

I don't know why "Refresh Dynamically" does not work as expected and is the default setting, but now I know what to do in the future.

So please try if this does the trick for you too.

BR

Agnetha

MustafaBensan
Active Contributor
0 Kudos

Hi Agnetha,

Thanks very much for sharing this tip!   That's very helpful and good that we now have a solution.

I'm curious to know if your colleague came across this "undocumented feature" through testing or if he found some official documentation that explains the reason for this behaviour?

Regards,

Mustafa.

0 Kudos

Hi Mustafa,

I asked him how he came across the solution and he said that he faced this issue several times in the past. So he remembered it.

I assume he found this out initially by trial and error, but he is really a hardcore query specialist.

BR

Agnetha

MustafaBensan
Active Contributor
0 Kudos

Hi Agnetha,

Good to know, thanks.  I had come across a similar issue quite a while ago with scheduled Webi reports based on BEx Queries, whereby the Exit Variable values were also being preserved as static values as of the time the schedule was created.  It would be interesting to see if the tip you've provided also solves the WebI problem

Regards,

Mustafa.

miguel_varela
Explorer
0 Kudos

Hi,

Maybe this counts as an "official" documentation

OT-OLAP-VARIABLE-REFRESH - SAP NetWeaver Business Warehouse - SCN Wiki

Regards,

  Miguel

MustafaBensan
Active Contributor
0 Kudos

Hi Miguel,

I'll accept that as official documentation    It certainly explains the variable refresh options.

Thanks very much,

Mustafa.

0 Kudos

Hello All, thanks for your replies.

Yes I do have a filter in design studio that allows the user to change the month following the original refresh but, as seems to be the consensus it is the month value in the data source that is the issue as it does not update once we move into a new month.

This has happened over a couple of month ends and each time I have had to change the month manually. It would appear that this will be the case going forward.

Thanks again.

Guy

MustafaBensan
Active Contributor
0 Kudos

Hi Guy,

Having to change the month manually each month is not an ideal solution, as I think you'll agree.  One approach that should work is as follows:

1)  Do not use any filters for month in your Design Studio app

2)  Create a BW BEx input-ready customer exit variable that populates the default value

3)  Place the BEx variable only in the Filters pane in BEx Query Designer

4)  Allow users to change the default month via the variable prompt dialogue in Design Studio

That being said, when you mention "yes I do have a filter in Design Studio that allows the user to change the month following the original refresh", can you explain how exactly you've implemented this?

Regards,

Mustafa.

0 Kudos

Hello Mustafa, what I mean is that I have included the Design Studio filter panel to allow the user to chose their own selections. I do however need the default opening view of the previous month. I will keep on searching. Cheers, Guy

MustafaBensan
Active Contributor
0 Kudos

Hi Guy,

Okay, so in this case I assume this is what happens:

1)  The default value is set as your Background Filter

2)  The Filter Panel shows this default value and the user must then deselect the default and select the desired new values.

The problem is that for any given dimension, you have to use EITHER variables OR filters but not both.  Although the preference is generally to use filters where possible, for your scenario I think the variable prompt approach I've outlined above, instead of the filter panel is the only way to avoid your current monthly manual updates of the background filter.

Regards,

Mustafa.

MustafaBensan
Active Contributor
0 Kudos

Hi Guy,

My curiosity has got the better of me with this issue, so I have another question for you.  When you say "also allow the end user to filter on other months", how have you implemented this?  Do you display the variable prompt dialog to allow the user to change the date, or are you using setFilter()?

I also have the same question as Swapnil regarding the purpose of setting the Calendar Year/Month dimension as a background filter when it is already being filtered by way of the BEx Variable itself?

Regards,

Mustafa.

MustafaBensan
Active Contributor
0 Kudos

Hi Guy,

To help assess the problem can you provide screenshots of the following?:

1)  The complete BEx Designer window, showing both the Rows/Columns tab and the Filter tab

2)  The complete Design Studio Initial View Editor Screen

Thanks,

Mustafa.

Former Member
0 Kudos

Hi Guy,

If you are filtering out data at BEx level by default to show only the previous month data then why do you again need a background filter for it in the Initial View of the data source.

If that is not the case and there actually is a need to apply a filter on the data source then why don't you write a BIAL script in On Startup Event of the application to dynamically filter it to show the data for previous month.

You can extract the current month easily with one of the following ways,

1.  Using the BEx variable value,

     i.e. <DATA_SOURCE>.getVariableValueExt("<VARIABLE_NAME");

2.  Current date from the user system,

     i.e. APPLICATION.getInfo().dateNowInternalFormat;

Regards,

Swapnil Koti