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:

DS_1.loadDataSource(); 

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

DS_1.moveDimensionToRows("_XPr0MA43EeevVezvPM6kBA"); 

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 “”.

DS_1.reloadData();

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 comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • 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 :-)

    Add comment
    10|10000 characters needed characters exceeded

  • 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.loadDataSource();
    DS_1.setFilterExt("_XPr0MA43EeevVezvPM6kBA", '0001);
    DS_1.moveDimensionToRows("_XPr0MA43EeevVezvPM6kBA"); 

    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.

    Regards,

    Mustafa.

    Add comment
    10|10000 characters needed characters exceeded