on 03-31-2017 10:43 AM
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!
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
Regards,
Mustafa.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.