cancel
Showing results for 
Search instead for 
Did you mean: 

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

0 Kudos

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!

TammyPowlas
Active Contributor
0 Kudos

Would you please share which version and SP of Design Studio you are using? Which version of BI platform?

0 Kudos

Hi Tammy,

I'm using

- SAP BO Server 4.2 SP3

- SAP Design Studio 1.6 SP3

Thank you!

Accepted Solutions (0)

Answers (2)

Answers (2)

MustafaBensan
Active Contributor
0 Kudos

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.

0 Kudos

Hi Mustafa,

thank you for your reply! The type of "P_DATJOURN_ZBUKR" is String.Unfortunately your suggestion did not work, as result I got the same warning like in the second screenshot above.

Do you know a good tutorial to use prompts as parameters to reduce the selected data from the database through the SAP Universe? Thank you!

Best regards,

Thorsten

MustafaBensan
Active Contributor
0 Kudos

Hi Thorsten,

Based on your experience and that of others, unfortunately it looks like the standard setFilter() approach does not work for Universes in this scenario. Here are some links that may be helpful with the use of Universe Prompts:

https://www.youtube.com/watch?v=sCmtJ2_c4lY

https://blogs.sap.com/2014/05/29/how-to-create-multiple-dropdown-boxes-cascading-filters-when-using-...

Regards,

Mustafa.

naveen_kumar29091984
Participant
0 Kudos

is there any way ,can we restrict Dimension hierarchy at edit initial view?

0 Kudos

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 🙂