cancel
Showing results for 
Search instead for 
Did you mean: 

setVariable/setfilter spend too much time in DS

07-05-2017 5:43 AM
1457 views 6 comments
0 Likes
SAP Managed Tags
Subscribe

Hello everyone.

I'm use SAP BusinessObjects design studio 16.5 to develop report,and I'm use http OLAP to connect HANA. When I filter the datasource,I just use DS.setFilter or APPLICATION.setVariable,I hava 5 different datasource,and all of them have a variable(

Z-site),and I have set them in different datasource group.But when I use setFilter to filter datasource,which average filter cost 3.4s,when I change to APPLICATION.setVariable("Z-SITE","2001"),it spends 20 seconds,and most time spend there.Application.setVariable() shouldn't run all variabes in datasource that the variable name is same?

Waiting for your help.

Thanks.

Jing

0 Likes

Accepted Solutions (0)

Answers (1)

Answers (1)

MustafaBensan
SAP Champion
SAP Champion
0 Likes

Hi Jing,

Some points to note:

1) In general, setFilter() always performs better than setVariable();

2) If you are taking advantage of the parallel processing groups, then since prompts are not merged, I would expect all common variables to be run in separate variable containers, perhaps explaining your performance issue;

3) The following blog posts may help you optimise your data loads based on processing groups:

https://blogs.sap.com/2015/09/28/parallel-processing-and-scripting/

https://archive.sap.com/documents/docs/DOC-63888

https://archive.sap.com/documents/docs/DOC-64462

Regards,

Mustafa.

Former Member
0 Likes

Hi Mustafa.

Thans for your reply.

I'm use the different query as 4 data sources, and both of them have the same variables in query.And I have divided them into 4 groups.The merged also have setting.SetVariable shouldn't better than filter? which isn't filter data on HANA before Design Studio load datasource?

Thanks.

Jing

MustafaBensan
SAP Champion
SAP Champion
0 Likes

Hi Jing,

I suggest you try the setFilter() approach without variables and compare the results. You can execute the setFilter() immediately after the loadDataSource().

Regards,

Mustafa.

Former Member
0 Likes

Hi Mustafa.

I've solved it.I just set all datasource to load in javascript=true,and application.setvariable,and then application.loaddatasource([array]).Which just 1.7-1.9s.And I still don't know why.

Thanks.

Jing

MustafaBensan
SAP Champion
SAP Champion
0 Likes

Hi Jing,

Thanks for the confirmation. I had assumed you had already set the Load in Script property to true. That is very interesting that you were able to apply setVariableValue() before APPLICATION.loadDataSources(). Normally, if the data source has not been initialised first, setVariableValue() returns an error. I just tried it and in my case there was no error this time but the setVariable() did not get applied. In which event did you apply your script?

Regards,

Mustafa.

Former Member
0 Likes

Hi Mustafa.

Follow is my code.

APPLICATION.setVariableValue("Z_SITE", "2001");
APPLICATION.loadDataSources([DS_2,JR,JRYD,YD,XC]);

Regards.

Jing