cancel
Showing results for 
Search instead for 
Did you mean: 

SAP analytics Cloud designer setvariablevalue

0 Kudos
1,496

Hi All,

I am trying to develop an application in sac based on live connection to bex.

I am trying to set the variable values of my application within oninitialization using setvariablevalue.

but when i run the application, the application tends to run twice. once without setting any variable values. then once more by where it sets the values defined in the oninitialization using setvariablevalue.

Why is it doing this. This blows up the run time cos the first run it tends to run for all the data and then then second run for the specific variables set.

How can i stop the first run.

Some body please help

Thanking you

View Entire Topic
chia-yu_wu
Active Participant
0 Kudos

Hi kumar.swami,

to your question why it is loading the data twice, the reason is that, SAC tends to load the data when you initiates the app. After the app is loaded, it runs the script from the oninit page where you defined your codes.

There is actually a couple of ways to avoid this problem.

1 is to set the variable in your url link, so the variable is set while calling up the app. This is an example:

'your SAC url '/sap/fpa/ui/app.html#;view_id=appBuilding;appId='Your application id';mode=view;v01model='your model id';v01Par='your variable id';v01Val='your variable member'

This is the URLAPI page from SAP if you need more inforamtion:

https://help.sap.com/viewer/a4406994704e4af5a8559a640b496468/release/en-US/3fa25603111049fba11eb898c...

Hope this helps you out.

Cheers,

Chia-Yu

shwetaphillips
Discoverer
0 Kudos

Hi Chia-Yu,

Is there a way to pass the current date dynamically to the URL for SAC story?

Regards,
Shweta