Skip to Content

How to restrict data in Datasource via Design Studio (not a security issue)

Hi everybody,

I’ve got the challenge to handle many data in Design Studio, so I want to access my data through a SAP Universe as Datasource in Design Studio via a filter parameter.

I’m not sure, if this is the right way. Maybe anyone of you've got a better idea.

What I’ve already done – I’ve added my SAP Universe as DataSource to my Design Studio application. Because I want to have access to all data in all combinations, I did not set up an initial view – these configurations I’ll do in the scripts with something like: DS_1.moveDimensionToRows("<BUKRS>") when needed.

To simplify - in this case, I want my datasource DS_1 to be loaded at startup with a given value for the dimension “BUKRS”, so I scripted the following code into the “On Startup” script of my application and I’ve also changed the “Load in Script” – Property of my datasource into “true”.

At first load datasource:


...because I changed the “Load in Script” property to true. Afterwards I want to define a dimension (BUKRS) as row:


in this case the CUID "_XPr0MA43EeevVezvPM6kBA" means BUKRS => now my “initial” view is defined like all measures related to the field BUKRS. Then I want to reduce the data:

DS_1.setFilterExt("_XPr0MA43EeevVezvPM6kBA", "0001"); 

I only want to see data with BUKRS = 0001, I’ve also tried single quotes ‘’ for the parameter value instead of double quotes “”.


At last - a reload, to include the filter above.

When starting my application I get this result:

and a warning:

In my underlying datasource there are only about 6000 rows with BUKRS = 0001.

In addition I also removed the flag “Limit size of result set” in the universe definition!

Thank you for your answers!

Best regards!

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Mar 31, 2017 at 11:12 AM

    Once again the coding, to see, that BUKRS = P_DATJOURN_ZBUKR. Because of the length of the original fieldname i've chosen the short form "BUKRS" in my description - but the shortform does not match to the "warning" message. Perhaps someone gets confused about that :-)

    coding.jpg (28.5 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 31, 2017 at 01:08 PM

    Hi Thorsten,

    One thing to check before trying the suggestion below: what is the data type of P_DATJOURN_BUKR in your Universe?

    Please try the following code:

    DS_1.setFilterExt("_XPr0MA43EeevVezvPM6kBA", '0001);

    There is no need to reload the data. Now under normal circumstances, as long as you execute the setFilterExt() immediately after the loadDataSource(), the two statements should get combined for execution purposes and return the filtered result set. At least this is how it works for BW data sources. However, I have seen other postings with similar issues where the filter does not appear to get applied during loading, resulting in a too much data error.

    Let me know how you go with the above code. If you are still receiving the same issue, we may need to go the route of variable prompts.



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.