Hi Friends,
Lately, I am trying to pass the values of the BEX variables on click of dropdown component. I noticed the different execution styles of setVariableValue function. Can you please try to explain what actually happens in background. I have seen several threads to understand the logic but still it is unclear as I read somewhere setvariablevalue function also load the datasource along with setting the value of the variable.
Passing BEx variables to the Design Studio filter panel component
Possibility to Bypass mandatory prompts on DS startup
How can I set from ~ to date to APPLICATION.setVariableValue ?
//Variable 0P_CALYE is a mandatory variable on 0CALYEAR.
var varyear = YEAR.getSelectedValue();
-----------------------------------------------------------------------------------
A
DS_2.loadDataSource();
DS_2.setVariableValue("0P_CALYE",varyear);
DS_2.setVariableValue("/PKG/HR_P_0CALMONTH_O", "");
DS_2.reloadData();
---------------------------------------------------------------------------------
B
DS_2.setVariableValue("0P_CALYE",varyear);
DS_2.setVariableValue("/PKG/HR_P_0CALMONTH_O", "");
DS_2.loadDataSource();
----------------------------------------------------------------------------------
C
DS_2.setVariableValue("0P_CALYE",varyear);
DS_2.setVariableValue("/PKG/HR_P_0CALMONTH_O", "");
----------------------------------------------------------------------------------
D
DS_2.setVariableValue("0P_CALYE",varyear);
Eventually, the code written in section A worked for my requirement. However, I dont understand why the other three did not work.
Thanks,
Gaurav