cancel
Showing results for 
Search instead for 
Did you mean: 

Automatic assignment of BEx query variables in SAC Analytic Application on startup

chaznosterous
Explorer
0 Kudos

Hi experts,

I have tried to find a way to assign BEx query variables before the application loads the query, in the same way we were able to do in Lumira Designer (with "On Variable Initialization" and "On Startup" scripts).

This was especially useful when a default time period (rolling 12 months for instance) was needed for the initial startup, but the users required to functionality to input their own time periods.

Following the tips in this blog: https://blogs.sap.com/2021/03/10/performance-best-practices-for-sap-analytics-cloud-analytics-design..., the following steps could be used:

  1. Using "On Initialization" script with "setRefreshPaused"
  2. Initialize Variables via URL parameters

However solution 1 seems to load the data once (before the "On Initialization" script is executed) and once more after setVariableValue is executed, meaning that the startup of the application is prolonged (2 roundtrips to the backend), which in turn is not ideal.

Solution 2 requires URL parameters to be set, which means that target application would need to be launched from a separate application, for deriving a dynamic time period (based on current date for instance), which again is not ideal.

A solution could be to prompt the users for an initial timeperiod, but deriving this at runtime while offering the users the option to select their own time periods, was a really nice feature in Lumira.

Have I missed something here? Or is this an improvement request?

Kind regards

Rasmus

Accepted Solutions (0)

Answers (2)

Answers (2)

axel_
Participant

Another option you might want to consider is to use BEx-User-Exit Variable.

You can fill the rolling 12 month as values before prompt is displayed (via I_STEP = 1 section) but users can overwrite them in the prompt in SAC. Requires some ABAP but not that much.

Best regards
Axel

chaznosterous
Explorer
0 Kudos

Hi axel0102,

An interesting approach, I have only used empty (or static prefilled) BEx variables or exit variables (not input ready) so far. But I will look into this aswell, and see if this is viable solution.

Thanks!

Kind regards

Rasmus

JBARLOW
Contributor
0 Kudos

Must admit i'm not really sure of the solution, however would saving all the widgets at design time with
'Always Pause' enabled.

This would reduce the number of initial queries being sent to the source.

chaznosterous
Explorer
0 Kudos

Hi jbarlowjb,

Examining this further in the Chrome Dev tools (looking at GetResponse) does show less calls to the backend, you can even find the GetResponse call with the values wrapped within here (see this note: https://userapps.support.sap.com/sap/support/knowledge/en/3112158).

I guess this might be the way forward, but comming from Lumira Designer I was expecting a script section to deal with this.

Thanks!

Kind regards

Rasmus