Create SAP Analytics Cloud Story URL for Mash-up in C4C
An SAP Analytics Cloud (SAC) story URL is comprised of the following parts:
Each of the component is described below :
- a – SAC tenant URL
- b – Tenant name in lower case
- c – Unique story ID
- d – Story parameters
Let us see how we can get details for each component of this URL.
a, b – SAC tenant URL and Name
When you launch SAC, the information of the tenant can be found as highlighted in the screenshot below:
c – Story ID:
Follow the steps showed below to get the Story ID:
c – Story parameters
The story parameters are divided into UI URL Parameters and Filter parameters. UI Parameters define how the report will be shown in mash-up while the Filter Parameters filters the report.
UI URL Parameters
Parameters can be appended after the ? sign in the URL. The parameters will come after the Story ID in the URL.
Indicates what mode the story will open in.
|edit||edit sets the story into edit mode. In edit mode, you can see the mainbar, toolbar, and the pagebar.
· The user can switch to present mode via the UI by clicking the present button.
· If the user doesn’t have edit rights then they will have a read-only view.
· If the user does not provide a then the mode must be edit. If a story id is not passed in the url, this can be used for creating a new story.
Syntax: https:///sap/fpa/ui/tenants//bo/story/?mode= edit
|present||present sets the story into presentation mode. In present mode, you can see the pagebar, but the mainbar is removed and the toolbar is hidden. The toolbar will show if you hover the mouse over the top of the pagebar.
The user can switch to edit mode via the UI by clicking the present button.
|embed||embed sets the story into embed mode. In embed mode, you can see the pagebar with a filter button, but the mainbar and toolbar are removed.
If the pageBar is set to ‘disable’, then the pagebar will not show.
Syntax: https:///sap/fpa/ui/tenants//bo/story/?mode= embed
Show or disable the pagebar in embed mode only. Will be ignored in other modes.
|show||show makes the pagebar visible. There should be a filter button on the right side of the pagebar.
|disable||disable makes the entire page bar go away – also prevents the user from opening the filter bar (since the buttons no longer appear).
If there are filters pre-defined then the filter bar will be shown.
Launches the story with the given page open. Page referenced by index (1,2,3,…) or by UUID.
|using page_index for a reference: (page=n) directs to the nth visible page.
If there are 4 pages in total and the first page is hidden, page=2 will direct to the third page
note that page_index when entered in the URL will be automatically converted to id in the URL fragment.
Example display with page=2
|using page_id for a reference
every page has its own unique id, so having the page_uuid will direct to that specific page with the uuid.
To Access the page unique id, first use the relative page url pointing to the page whose uuid you need. In the url that gets generated, you will be able to retrieve the page uuid as shown in image below.
If your SAC story has filters then you can pass these filters though the URL. This is very useful when you are adding a SAC story as a mash-up in C4C. You can pass C4C fields as value for these parameters. e.g You can add mashup in Account TI and pass Account ID as a filter to the story.
The following behavior occurs:
- If filters already exist for the specified story the filters specified in the URL will replace the filters of the same dimension.
- Any additional filters for dimensions not already present will be added to the story level filters.
- Any existing filters that are not replaced using the URL will continue to be applied in addition to the URL specified updates and additions.
To pass filters, you need to provide the Model ID, Dimension ID, Dimension value and Operator i.e. include, exclude etc.
The table below explains how to get these details from your story.
|fxxModel||Identifies the model to filter. This is the technical name of the model. In a story, you can find the model used in a chart as shown in the image below by selecting a chart and seeing it’s context in the Designer Builder Tab.
The syntax for building the parameter is fxxModel=modelname:modelname where xx is a number between 0 and 01 and 99. If there are several model passed for filtering then assign a unique value of xx to each model.
Example, if we use the model shown in the screenshot as the only model for filters, the construction would be
|fXXDim||Identifies the dimension on which to apply the filter. This is the technical name of the dimension.
Technical name of a dimension can be found as shown in the image below:
Note that a dimension can only be filtered once. If a dimension is repeated, the dimension with the highest index (fxx) will be applied.
Example, if we use the dimension shown in the screenshot
|fXXVal||These are the filter values for a dimension. They are ids of the dimension members you want to filter on. The IDs can be found as shown in the image below. These IDs should be same as the ID from C4C.
If you want to pass more than 1 value then syntax is
Example based on screenshot
Eg for single value
Eg for multiple values
Indicates which operator to use to filter with.
|in||Use in if you want to include the filter values in the selection
|notIn||Use in if you want to exclude the filter values in the selection
Once you have the URL ready, you can create a Mashup in C4C to view the SAC report within C4C. The details for that can be found at the blog below: