on 03-27-2015 5:36 AM
Issue: When an applications data sources are set to load in script, attempting to set variables within On Variable Initialization ceases to work.
Workaround: Move setVariableValueExt() code to On Background Processing AFTER the data source has been loaded (i.e. DS_1.loadDataSource()).
Questions:
Hi Taygan,
you have picked up quite complex topic 😉 I will try to answer, but still feel free to re-ask on details...
1. yes, this is correct behavior - this event is triggered only once when the application is starting (shortly before onStartup event). It was done to have a place to react directly before the system tries to SUBMIT the variables to the BW server. The important point is the SUBMIT, not the SET event.
2. No, there are script functions which are classified as "data changing" and others as "data requesting". as long the sequence is containing only the "data changing" scripts, there is no SUBMIT of variables (which costs time). This means, if you want to set 10 variables, you should make it in one sequence - and then you can call other scripts like getData or so. Making this in a mixed-sequence, the system will be forced to SUBMIT variables in between.
3. see point 2, the loadDataSource script function is also "data changing".
you can test your scenario with profiling parameter, see .
then, you should see the sequence like here (press "Refresh" button and expand until you find the SET_TEMPLATE command)
In summary, the SUBMIT of variables will be triggered automatically on first call which is requesting data after the variables were un-submitted - and this is the effect of setting new variable value.
Karol
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Karol,
Thanks for the detailed response.
I still find it strange that loadDataSource() needs to be called before setVariableValueExt() can be used. If both functions are "data changing" and not actually requesting anything, shouldn't we be able to set variables within On Variable Initialization?
Scenario:
From what I have observed, I won't be able to call setVariableValueExt() until all three data sources have been loaded. Even though setting variables is an application level function. Why the dependency to load data?
Design Studio is not holding the variable values, those are passed directly through BICS layer to the OLAP processor. This means, you can set values only on variables which are available. Variables which are in data sources which are not yet loaded are not available.
in your scenario, once DS_1 is loaded, you can set the variable values for 1,2 & 5. then if you load DS_2, the value of variable 1 is already available (variable merge is active in DS per default). You need set the variable 4 immediately, other wise - in case it is a mandatory variable - the prompt screen will be shown.
If you have a chain which you interrupt (like DS_1 in first backgroung processing call), then you render and call background processing again for DS_2 - the variable SUBMIT will be done shortly before rendering starts (as nothing can be rendered w/o submitted variables.
[...]I won't be able to call setVariableValueExt()[...]
-> what you mean here, check this against explanation above.
Always, first the DS must be loaded, then all variables which are already "known" in OLAP processor can be set.
Karol
Hi,
we will try to improve - have you seen the flow at page 181 in http://help.sap.com/businessobject/product_guides/AAD14/en/ds14SP01_user_en.pdf
?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.