Use openSelectModelDialog and setModel APIs
You can change the table's model at runtime by using the openSelectModelDialog API in analytic applications and optimized stories to call the Select Mode dialog or directly via the setModel API and a valid model ID.
API Definition
This API opens the model selection dialog:
Sample Code
Table_1.openSelectModelDialog();
Example
Sample Code
(1) Open SelectModelDialog Table_1.openSelectModelDialog();
This API enables you to set a new table model directly via modelID:
Sample Code
setModel(modelID:string);
Note
You can open any desired model in the Modeler to find the correct modelId of the related model in the according URL:
Example
Sample Code
(2.1) Set model via CUID Table_1.setModel("Cday9flz5ihs3xt1aoaoa5iw3k"); (2.2) Set model via EPMObjectId Table_1.setModel("sap.epm:BestRunJuice_SampleModel");