Export a story with variable prompt

In this blog post, we show in detail how you can export those SAC Stories, which are based on a Live Connection to SAP BW and a BEx Query with variables.

In general, SAP Analytics Cloud supports variables to be passed via URL parameters. For details, please refer to the SAP Documentation on Variables.

In short, for each variable, three URL parameters have to be passed:

  • var01Val: The value that shall be applied to the variable
  • var01Par: The ID of the variable
  • var01Model: The SAC model that is used for the BEx Query

The following sample URL opens story "28C1372C88D73B229FB8E46BA70CBC70" with variable "ZTK_DELIVERY" set to "80003482":

<your tenant>/sap/fpa/ui/app.html#/story&/s/28C1372C88D73B229FB8E46BA70CBC70/?mode=view&v01Val=80003482&v01Par=ZTK_DELIVERY&v01Model=t.12:C1w6xkuzbrep453qqejj1lbjeo
If you select Automatically open prompt when story opens in the Story definition (see screenshot), the popup will also appear if varaibles have been passed via the URL (see next screenshot)! In this case, biExport will not be able to execute the story. Deactivate this setting to enable the Story for biExport.

Determine variable name

The value of var01Par corresponds to the technical ID of the variable that is used in the BEx Query. In my example, the variable for "Delivery" is "ZTK_DELIVERY":

Create the export schedule

The value of var01Model can easily be found in biExport SAC Scheduler:

  1. Click on + Create new schedule
  2. Switch to the SAC Settings tab
  3. Enter your SAC User and Authorize it. This loads the SAC meta data.
  4. Choose the Story you want to export. For above example "28C1372C88D73B229FB8E46BA70CBC70" corresponds to "Test Popup & Hierarchy"
  5. Click on + Story Variable
  6. Enter the value you want to select for v01Val
  7. Enter the variable ID for v01Par
  8. Select the model ID from the value help for v01Model

Now you can click on OK to schedule the export.

Thilo Knötzele
Author: Thilo Knötzele
Creation date: 16.09.2021
Category: SAC Stories
back to overview