SAC Change Models in Stories 

General 

SAP Analytics Cloud is a powerful frontend tool and offers multiple options to create stories for various consumers for the available data. 

Stories/Dashboards are built on models. In some cases, it can be necessary to exchange a model in a story with a new one. For example: if the story was based on a Hana-live based query and now needs to be exchanged for a BW-live based query.  

In the following, a possible way to change the models within a story is explained. 

Changing the data source of the story 

Before a model can be exchanged within a story, it is necessary to go through the story and the new model query to ensure all necessary dimensions and measures are available to use within the existing story after the exchange.  

Therefore, some pre-work must be done. Looking through available data and measures and ensuring the underlying new query delivers the necessary output for visualization.  

In order to securing a smooth change, it is recommended to copy the original story and exchange the models there and afterwards save as the original to deploy smoothly to the existing users without the necessity to newly share as well as keeping the bookmarks.  

This can be done by overwriting the original with Save As. End users simply have to refresh their existing story to receive all the changes. Through that, the Story-ID has not changed, no further difficulties in accessing the story should occur. 

So, after data preparation and copying the original story, the copy has to be exported through the File System and a *.tgz-file is downloaded locally. 

Sidenote: Unfortunately, it seems like this possibility is probably turned off in the future but that remains to be seen. 

ModelID from source model and destination model must have the same length. If that isn’t the case the best way to work around is to copy the new model and then create a new ID that is hopefully the same length as the old one.  

Unfortunately, Models created in the early days having the following sample ID are not possible to convert with the tool available and have to be exchanged by hand widget by widget.

Sample ID: https://tenant/sap/fpa/ui/app.html#/modeler&/m/model/system-local.bw.bw2hana.query.XEY123:XEYZ123_HVW_001 

After ensuring the IDs have the same length open a freeware tool from RebisConsulting (https://sac.rebisconsulting.com/tools).  

SAP Blog for this as background information: https://blogs.sap.com/2021/02/20/sap-analytics-cloud-how-to-change-a-model-based-on-live-connection-in-a-story/ 

Put in the ID of the model source and destination and select the previously downloaded *.tgz-file. 

If the file is above 10MB, the following pop-up is shown.  

The exported *.tgz-file shouldn’t be bigger than 10MB. If that’s the case, look for small things to delete from the story for the change. For example: delete one or two jpg/png used in the story shortly and after importing the story add them again. Afterwards another export of the updated story is required. 

For example:  

If there are more than one model, change one at a time and use for the next one the newly created download tgz.file . For example: Two models to exchange – first one model produces a new file with the _new extension. Second model – used the newly created file and afterwards ended up with a second file with another _new extension. Examples: 

After exchanging the models, import through the file system the last version of the *.tgz-file and exchange the measures and dimensions in the widgets.  

Conclusion 

To be very clear, after exchanging the models there is still work to be done, but the settings (also hidden ones) for widgets should have been taken over as well. Unfortunately, this is not fool proof. There are still things to do but way less than changing a data source of a widget by hand, which is very time consuming.  

With this tool, and if all is well prepared with the new data source, the exchange can be reduced to a few clicks instead of having to create/change widgets with all the filters, style setups etc.