on 2021 Jul 15 6:02 AM
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
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:
Hope this helps you out.
Cheers,
Chia-Yu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
62 | |
12 | |
7 | |
7 | |
7 | |
6 | |
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.