Skip to Content
avatar image
Former Member

DS GetMembers() brings master data not query set values

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

8 Answers

  • Mar 13, 2017 at 05:31 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 13, 2017 at 10:20 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Mustafa Bensan

      Thank you for this!

      Well, in my example, the radio button works correctly for some months... So, I wonder if your result was, perhaps, a fluke? :-) You only filtered out one airline after all.

      Are you able to spread your data a bit more, so airlines results are a bit more distributed across (like my results are, with lots of gaps in individual months)? What I am trying to get at is an example in which filtering brings back different airlines each time - that way it would be easier to spot any extra airlines showing in the results.

  • Jan 04, 2017 at 11:35 AM

    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?

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 04, 2017 at 12:02 PM

    Tammy,

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

    A.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 04, 2017 at 12:40 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 06, 2017 at 02:16 PM

    Tammy,

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

    A.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 06, 2017 at 04:21 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 13, 2017 at 03:57 PM

    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?

    Add comment
    10|10000 characters needed characters exceeded