Skip to Content
0

Edit Initial View of Datasource using script

Feb 15, 2017 at 11:11 PM

120

avatar image

Hi guys.

I'm using SAP Design Studio 1.6 SP04 and have a doubt about Editing the initial view of a datasource.

I explain my case. I have a HANA View which hits ECC tables VBRK and VBRP, if I execute a SQL, for example: select * from _SYS_BIC.MyView where plant = MyDATA and calmonth = MyMonth it works perfect.

But when I create the datasource in SAP Desing Studio it takes to long to load data in order to edit the initial view, have to say that in our ECC Tables we have data since 2010.

So for these case, is there a way while editing the initial view to select just one month and one plant using scripting?. I can see that the datasource has an event on result set changed but not sure how to make work.

By the way, I'm using SAP HANA Connections through ODBC.

Any suggestion is welcome, thanks in advance.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Mustafa Bensan Feb 16, 2017 at 04:56 AM
0

Hi Oscar,

The reason for the longer load time of a HANA View in the Design Studio Client compared to clients such as HANA Studio is explained in the blog Design Studio: Why is HANA Studio Faster?

Regarding your specific question, it sounds like you want to reduce the load time of the HANA data source in the Initial View Editor of the Design Studio client, yet your question is about scripting which is completely independent of this. Using scripting you can indeed apply filters to the data source such as selecting one month and one plant for example but scripts only execute at run-time and not design-time. Similarly, the "On Result Set Changed" event is only triggered at run-time. Therefore, any scripting in the "On Result Set Changed" event will have absolutely no impact on the data source load time of the Initial View Editor.

Here are some options you could try:

1. Applying a background filter for month and plant in the Initial View Editor or direct filters. This may reduce subsequent load times when you open the Initial View Editor but the first time you open it to apply the filters will still require loading of the entire result set which as you have observed, takes time;

2. Include mandatory prompts in the HANA View itself for Month and Plant, in which case I think you should get prompted when you open the Initial View Editor which would then allow you to narrow down the result set that is loaded;

3. If appropriate, you could simply build the filters into the HANA View itself to return a smaller result set.

In any case, if you can clarify your intended requirement we could make further suggestions. At the moment you are asking about load times and filtering with the Initial View Editor and with scripting, which are two totally separate and unrelated operations.

Regards,

Mustafa.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Mustafa.

Thanks for the clarification about scripting options in Design Studio, now I have a clear idea how it works.

Narrowing the issue, yes I want to reduce initial load time of the datasource when assigned to Design Studio. I'm following suggestions of post Design Studio: Improving Performance of HANA Views, but if you have more suggestion, these are welcome.

Have a nice day!!

0