Skip to Content
0

DS GetMembers() brings master data not query set values

Jan 04, 2017 at 11:30 AM

437

avatar image

Hiya,

I have come across a thread on this topic already and I am aware that this is an issue (bug?):

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

but was wondering if it has been resolved in the newer version of DS?

Most of our BW queries contain some sort of filters, conditions etc. Using GetMembers() functionality becomes useless if it always brings master data values, as they are of no interest to me most of the time. I need to write complicated JavaScript code to create arrays of real query set values. There must be a better way, though...?

Thanks,

Agata

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

8 Answers

Mustafa Bensan Mar 13, 2017 at 05:31 PM
0

Hi Agata,

Depending on the scenario, what you have experienced is by design and not a bug. Can you provide a specific example of how you are using getMembers() in a filter scenario and the desired outcome? Normally in a cascading filter scenario, when you apply getMembers() on any dimension that does not have a filter directly applied to it, it will return the filtered values as expected and not the entire master data. The master data issue occurs if you want to retrieve the filtered values of a dimension to which a filter has been directly applied. In that case the workaround is to simply use getFilter()/getFilterExt() on that dimension instead of getMembers().

Regards,

Mustafa.

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

Mustafa,

Thanks for your comment.

I was running my BW query for a specific user for a period of 12mths (0FISCPER) and the query retrieved a list of projects (OPROJECT) that the person was working on during that time. I wanted to use this list of projects in a dropdown box to let them select each project at a time. However, the dropdown box would display all projects they EVER worked on, not just in the last 12mths. I have tried to use dropdown, radio buttons, and getMembers() to limit the list of matters just to those that are displayed for the 12mths period. Nothing worked. Projects list does not have any filter directly applied to it - it is a result of filtering the query by user and 0FISCPER. So I guess, it encompasses the first scenario you described. Yet, it doesn't return the list of filtered values.

I am since trying to work on a much much simpler scenario - running a query for 12 mths and simply displaying those 12 mths as radio buttons. Again, I am getting a list of all 0FISCPERs since the beginning of SAP :-) However, I am not using any getMembers() or any JavaScript - simply directly binding radio buttons to data source.

Whatever I try, whichever component or getMembers() I use, I always get master data lists.

0

Here's the example of the latter scenario i.e. when I run the query for 12 mths and want to use the 12 mths as radio buttons. I am directly binding radio buttons components to the data souce 0FISCPER. This is what I am getting:

6grs3.png (84.3 kB)
0

I have since tried using this script on start up:

RADIOBUTTONGROUP_1.setItems(DS_9.getMemberList("0FISCPER", MemberPresentation.INTERNAL_KEY, MemberDisplay.KEY, 5));

limiting to just 5 members to see if it's going to take effect, but it's not working, and still showing me the old list with a 100 members.

UPDATE: sorry, forgot to unbind my radiobutton component. Here's the result I am getting using JavaScript:

Still nothing to do with the 12mths for which the query runs.

wrkje.png (2.5 kB)
0

I can't do:

RADIOBUTTONGROUP_1.setItems(DS_9.getFilterExt("0FISCPER"));

either.
0
Mustafa Bensan Mar 13, 2017 at 10:20 PM
0

Hi Agata,

Thanks for the additional details. Please make sure that in the data source Initial View, the Members for Filtering option of dimension 0PROJECT is set to "Only Values with Posted Data". You can then populate the filtered project listbox using property binding on the items and specifying dimension 0PROJECT, so no need for getMembers() or setItems() to populate the listbox in this case.

The issue you have described is also discussed in the following post:

https://answers.sap.com/questions/150399/how-to-get-b-demission-value-that-after-filter-dem.html?childToView=150416#answer-150416

Since you are filtering a dimension other than the one you want to retrieve the filtered values for, there is no need to use getFilterExt("0FISCPER") unless you explicitly want to display the pre-filtered periods in a component. In this case, for your Radio Button Group example, the string returned by getFilterExt will probably be comma delimited, so you can't apply setItems(). Instead, you'll need to convert the string into an array using the string split method, iterate through the array and then apply addItem() to populate the Period Radio Button Group.

Regards,

Mustafa.

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

Mustafa,

I think you are missing a point :-) I do set my dimension 0PROJECT to "Only Values with Posted Data".

My backend settings are as follows:

InfoObject setting in BW backend: Only posted values for navigation

InfoObject setting in BW Query: Only posted values for navigation

DS data source initial view setting: Only values with Posted Data (Both Members for filtering and members in result set).

This is all set up property, but it's not working, any component which is using binding to that dimension, or JavaScript commands such as getMemberList, show me unsorted master data - thus my update and plan to raise a SAP ticket :-)

0

Hi Agata,

Okay, I get the picture now :) That's unusual it's not working for you as expected. I'd be interested to know the response from the SAP ticket when you receive one.

Thanks,

Mustafa.

0

Thanks, I have also tried testing the other scenario, where my filter is on 0FISCPER but I am bringing 0PROJECT into the radio button.

When I filter 0FISPER to just one month, the user gets the following set of projects (matters) they worked on:

Yet, my radio button which is supposed to be bound to 0PROJECT shows me this:

So extra two matters. Bizzare! Isn't it?

Yes, I will make sure to let you know if and when SAP comes up with an answer.

ktd09.png (2.2 kB)
laftr.png (4.0 kB)
0

Here's what settings on 0FISCPER are (apologies, the Members for Filtering was set to Master Data, ooops, but changing to Posted Data did not fix the problem).

Result:

Well, i theory it DOES show me only 0FISCPERs to which data has been posted. EVER. So I guess, this is correct from an InfoProvider point of view. But it has no relevance to Query result set whatsoever... It's as if I need another setting to achieve this: "Only Query Results", or something along these lines.

eyycu.png (28.7 kB)
iiy4d.png (33.3 kB)
j5lo6.png (5.9 kB)
0

I think I have figured it out!

My 0FISCPER was sitting in the Default Values section of my BW query, which means that it's prefiltered on the initila run, but the filter can be changed once the query is run. I think this is why DS wasn't "seeing" it as a filter at all.

Now I have moved it to the Characteristic Restrictions area, and the radio button seems to be showing the correct number of months (12), albeit in the wrong order:

Now, all I need to do is to figure out the other scenario with 0PROJECT, but I have a suspision that my overly complicated query with many key figures etc. may be at fault here. I will try to simplify my data sources and see if I get anywhere.
0vutx.png (9.5 kB)
0

Hi Agata,

Thanks for the additional details. Now that you mention the issue with placing 0FISCPER in the Default Values section of the BW query, I have a vague recollection of having encountered a similar issue before. Anyway, good to know it is working for you now.

In theory, complexity associated with the number of key figures shouldn't be impacting the 0PROJECT filtering issue. I'm curious now, so would you mind providing some screenshots of your fully expanded query definition in BEx Query Designer, including structure for Columns, Rows and Filters? I'd also be interested to know how you're restricting the initial data set to a specific user and the last 12 months? For example, are you using BW Analysis Authorizations to restrict the data returned by a BEx Query to what the user is authorized to see? Are you applying a BEx User Exit Variable to restrict 0FISCER to only the last 12 months by default?

0

Thanks for your time Mustafa. Very much appreciated!

Well, 0FISPER seems to be working fine for me now. I have simplified by BW query, so that it only includes one key figure now (thought incorrect zero suppression for other key figures might be interfering with 0PROJECT selection for the radio button, so left just one key figure to rule that out).

This is the structure of the BW query - the only key figure is PCB:

Filters that matter:

0FISCPER shows the last 13 months and is filled with a customer exit variable "Current fiscal year period" with an offset - it's sitting in the Characteristic Restrictions area of the query and my radio button is fine with it, displaying the last 13 months correctly.

The only other filter is on Matter manager (on the right) and will be using a customer exit variable to fill the current user name (I am not using any auths to do it).

At the moment I am just using a standard input variable for testing. Matter manager variable is sitting in Default Values, as I want to be able to pre-run this query for all our users and cache the results to speed up performance of my DS dashboard - this is something I do routinely.

There is nothing else of interest in the query.

Now, let's move back to the 0PROJECT radio button issue. Here's the full list of projects in the last 13 mths for one of the users (Mar 2017 is missing as this is QA data, but ignore it):

I have two radio buttons now in my dashboard. One for 0FISCPER:

The other will be for 0PROJECT.

Now, I filter the query using 0FISCPER radio button to view APR 2016 data. This results in cross tab showing the following list of matters, exactly as expected:

but the 0PROJECT radio button is showing me three extra matters:

If we compare with the original data source, greens are the correct matters, reds are extra matters:

The three red matters have nothing in them in APR 2016...

I have tried drilling into my query to see if there is perhaps positive and negative lines with postings in APR 2016 that cancel each other out, but there is nothing.

I really don't know why these three extra matters are showing up in my radio button.

A.

ikc3h.png (23.4 kB)
4gywo.png (20.2 kB)
n7m8i.png (19.7 kB)
amhxa.png (8.5 kB)
9zjjs.png (2.9 kB)
cqiax.png (4.9 kB)
mvmou.png (19.4 kB)
0

Hi Agata,

Now that's what I call a detailed explanation! :) Based on your query structure and data source initial view settings, I would expect the 0PROJECT Radio Button values to match the Crosstab. Unusual that it doesn't.

I have created a similar albeit simpler example with pre-filtering as follows and it worked as expected:

BEx Query Rows/Columns

BEx Query Filter

All Years


2013 Selected

2014 Selected

You'll notice in 2014, Endeavor Air has dropped off, which is the expected result for the data. Both Crosstab and Radio Button Group match.

I am populating both Radio Button Groups with Property Binding to the data source.

I do wonder what the issue could be in your scenario.

bex.png (423.9 kB)
bexfilter.png (392.7 kB)
allyears.png (153.4 kB)
2013selection.png (170.8 kB)
2014selection.png (170.8 kB)
allyears.png (170.9 kB)
2014selection.png (153.4 kB)
0
Show more comments
Tammy Powlas
Jan 04, 2017 at 11:35 AM
0

Agata - please review this recent SAP Note: https://launchpad.support.sap.com/#/notes/2067424/E - it also references this wiki - https://wiki.scn.sap.com/wiki/display/BOBJ/Member+access+modes+and+returned+list+of+values+in+Design+Studio - have you checked your backend settings?

Share
10 |10000 characters needed characters left characters exceeded
Agata L. Jan 04, 2017 at 12:02 PM
0

Tammy,

Thanks a lot. I will have a look at the documentation now.

A.

Share
10 |10000 characters needed characters left characters exceeded
Agata L. Jan 04, 2017 at 12:40 PM
0

Tammy,

My backend settings are as follows:

InfoObject setting in BW: Only posted values for navigation

InfoObject setting in Query: Only posted values for navigation

DS data source initial view setting: Only values with Posted Data (Both Members for filtering and members in result set).

Yet, Get.members() brings in unsorted, random master data set.

Any suggestions? My version of DS 16.0.5.

Thanks,

A.

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

Hi Agata - you are on an initial version of 1.6, perhaps upgrade to the latest patch (SP4 or SP3)

0
Agata L. Jan 06, 2017 at 02:16 PM
0

Tammy,

Thank you. I will recheck this in the newer version, when I get my hands on it.

A.

Share
10 |10000 characters needed characters left characters exceeded
Poovarasan Boopalan Jan 06, 2017 at 04:21 PM
0

Hi Lukas,

Instead of using getMembers(); function use getMemberList(); function.

Then it only gets filtered list ignoring filter on same object.

Like if you filter a country, you will get the filtered list of it's states(i.e., states belong to filtered country).

But if you filter states as A,B and use getMemberList(); script it will ignore filter and bring all values.

Thanks,

Poovarasan

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

Thank you, I will try that.

0
Agata L. Mar 13, 2017 at 03:57 PM
0

An update on my question. I have now tested the getMembers() function and different components (dropdown, radiobuttons, checkboxes) etc. in the newest version, latest patch of Design Studio and all of these are still reading master data instead of query set values.

I have double-checked that my settings on the initial query view in DS, on InfoObject, and on InfoProviders are all correct.

Is there a known solution to this problem, please? Or, do I need to raise an SAP ticket?

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

At this point, I would raise a ticket with SAP and reference this thread

0

Thank you Tammy. That's what I thought :-)

0