cancel
Showing results for 
Search instead for 
Did you mean: 

SAC Planning via BPC: .submitData() for two tables with the same live model

maxboo
Explorer

Hi Experts,

i am trying to distribute value from one table to another which share the same model (live connection bw query).

So code goes similar to this:

var resultset_A = Table_A.getDataSource().getResultSet();

var value_A = resultset_A[0][Alias.MeasureDimension].rawValue / countervariable;

//Zeroing the initial value

Table_A.getPlanning().setUserInput({"@MeasureDimension":"abc", "Dimension1":"xyz", "Dimension2":"0001"}, "0");

Table_A.getPlanning().submitData();

//Writing it into another selections with the countervariable calculation

Table_B.getPlanning().setUserInput({"@MeasureDimension":"abc", "Dimension1":"xyz", "Dimension":"0002"}, "value_A");

Table_B.getPlanning().submitData();

The problem is now with the first Table_A.submitData(). It refreshes also Table_B and while Table_B is also loading/refreshing the code Table_B.submitData() seems to have problems submitting the values because it is in an "Illegal State" (Maybe cause refresh?!). Both submitData return true though.

Do i really need to have somehow a hidden table where both columns i want to change are in the same table widget?

Regards,

Max

N1kh1l
Active Contributor
0 Kudos

maxboooo

Can we not do both Table_A and Table_B submit togeher ?

maxboo
Explorer

Hi @Nikhil Anand

as far as i know , it is not possible.

The .getPlanning().submitData(); code api is only available by giving a specific table in front. Theres nothing like

Application.getPlanning().submitData();

Regards,

Max

N1kh1l
Active Contributor

maxboooo

The error shows Cannot retrieve Resultset which in your code is being done only or Table A and not B. What I meant was after you set both the setuserinputs.

Table_A.getPlanning().submitData();

Table_B.getPlanning().submitData();

maxboo
Explorer

Executing both in the end one after another directly leads to the same result.

Accepted Solutions (0)

Answers (0)