SAC Stories: How to create Briefing Books
In the blog post SAC Stories: Fully customizable export we have already seen how an export of SAC Stories can be set up with biExport. In the examples we have already used the definition of URL Parameters to export all pages of an SAC Story.
In today’s blog post we will see how the same feature can be used to create a complete Briefing Book based on an SAC Story, comprising of many different views of the same or multiple Stories.
URL parameters with biExport
The feature of adding URL parameters is a flexibly designed solution: biExport does not care about the parameter that you want to pass - it merely adds the parameter name and the parameter value to the URL, which it uses to execute the SAC Story during the export process.
As a matter of fact, you can use all parameters, which SAP provides for SAC Stories, with biExport.
Find Story parameters
For SAC Stories, SAP provides a generic approach for filtering any dimension of a dashboard. A complete documentation on Story parameters can be found on help.sap.com in the SAP Analytics Cloud URL API section:
- How variables can be prefilled via the URL
- How dimension filters can be passed via the URL
- Display parameters that control e.g. the selected dashboard page
The documentation on filters not only describes the parameter names, but also where you can find information on dimension names, the IDs of the used models etc.
Filters are always applied on a single model of the SAC Story. If you want to filter multiple models at the same time, you have to add the filter parameters for all of them separately. However, it also makes sense to link the models – in this case you only have to apply the filter to one model and the other models are adapted accordingly.
Add Filter parameters
In a typical simple scenario, you will need to pass only f01Model, f01Dim and f01Val. Let’s say you have identified the following values for the parameters:
- f01Model: 64123017734E89790182ABFE86CD0A8
- f01Dim: 0COUNTRY
- f01Val: FR;DE;EN
The semicolon-separated values for f01Val result in three separate URLs being generated. Hence, biExport will execute the dashboard three times with separate filters on FR, DE and EN.
Let’s download the export schedule we have created in the blog post SAC Stories: Fully customizable export. Then we enter the following on the Parameter List tab:
Only for f01Val we have to set Iterative to "X", in order to enforce the iterative execution of three separate URLs, all three parameters being added:
[story_url]&f01Model=64123017734E89790182ABFE86CD0A8&f01Dim=0COUNTRY&f01Val=FR
[story_url]&f01Model=64123017734E89790182ABFE86CD0A8&f01Dim=0COUNTRY&f01Val=DE
[story_url]&f01Model=64123017734E89790182ABFE86CD0A8&f01Dim=0COUNTRY&f01Val=EN
You could also keep the page parameter iteration - then, all three pages will be executed for all three filters.
Export multiple dashboards
If you want to generate a Briefing Book from multiple SAC Stories and/or SAC Analytic Applications, you can add them on the Schedule List tab as Story (column X) or Designer Application (column Y). Multiple IDs must be separated by semicolon:
By default, parameters are passed to all Stories / Applications. If you want to pass a parameter only to one specific dashboard, you have to add its ID in column G of the Parameter List.
For example, you might want to filter only one of the dashboards by country, and the other dashboard consist of multiple pages that need to be exported:
Define the Export document
There is already a general description available on how to create an Export Template for biExport. If multiple dashboard views are collected for the Briefing Book, you have additional choices:
- You can use an Export Template with a CONTENT placeholder. biExport replaces it with a screenshot of each dashboard iteration. If you add a selection of Widgets to Visible Components, these widgets are shown one after another for each view that they are contained in.
- You can use an Export Template with explicit placeholders for selected Widgets. You can add a condition to the placeholders in order to control exactly where which information shall be contained:
- To show Panel 1 for France:
%__panel1%{0COUNTRY=FR}
- To show Panel 1 for Story 64123017734E89790182ABFE86CD0A8:
%__panel1%{DOCUMENT=64123017734E89790182ABFE86CD0A8}
- As a combined condition:
%__panel1%{0COUNTRY=FR;DOCUMENT=64123017734E89790182ABFE86CD0A8}
- To show the panel 1 on page 1, repeated for all countries:
@REPEAT@%__panel1%{page=1}
- To show Panel 1 for France:
- By default, biExport generates one document that contains results from all iterations. You can instruct biExport, though, to generate separate documents for at least one iteration.
With the following setting, separate documents are generated for each filter – each containing all pages of the dashboard: