Automatic view selection for Broadcasting

biExport supports Broadcasting scenarios by allowing you to specify different views of your SAC stories in the schedules. For this, biExport uses SAC’s URL parameter API, so you can define several different filters or variable selections that should be passed to the SAC executions.

While for a lot of scenarios it is sufficient to explicitly define the values that shall be used for the filtering, creating documents by cost center or fund center department calls for an automated solution.

This is mainly because:

  • we have a large number of filter values, which quickly reach the hundreds

  • the specific filter values are changing from month to month

So maintaining the values again and again is not an option.

For these requirements, biExport provides a solution quite similar to the Broadcasting setup known from SAP WebI. The feature is described in the following.

A simple use case

Let’s say we want to generate documents individually by cost center.

For this, the SAC story has been prepared with a script parameter COSTCENTER, which is enabled as URL parameter.

In biExport Scheduler, we add this parameter and simply set it to “Automatic”.

We now also need to tell biExport where to get these automatic parameters from. This is handled by a dedicated story, which is selected as “Control Report (Automatic Values)”:

Of course you can also set Story Filters (f01Val, f02Val…) and Story Variables (v01Val, v02Val …) to “Automatic” value determination.

Providing automatic values

The “Control Report” is an SAC Unified Story, which must include a table named BIEXPORT_AUTOVALUES.

In our example, we define the table to show a column named COSTCENTER. This column shows all valid cost centers, which should be automatically passed to the story.

biExport matches the table column to the URL parameter by name. So in case you are using v01Val as an automatic parameter, you have to call the column “v01Val”. If the dimension of your model is named differently, SAC allows you to rename that column.

To populate the automatic value list you can now leverage SAC’s flexibility:

-       connect to an SAP BW query which only returns those cost centers that are currently booked

-       connect to an SAP BW master data query, which provides the cost center – mail recipient assignment directly from the master data table

-       connect to an SAC Import Model, which receives data from an offline flat file or directly from a planning form

This does not only allow you to migrate your existing SAP WebI Broadcast solution, but also streamlines the process by eliminating the steps of recreating the WebI report and creating a new Broadcast: Instead, you simply upload a new file into the SAC Import Model before the scheduled start time of the generation.

Parametrizing the list

Let’s enhance above example by Cost Center Group, i.e. we would like to schedule different generations, which shall be responsible for all cost centers of a specific cost center group.

This means that now, we have to retrieve only those cost centers that are assigned to the specified cost center group.

Again, we leverage SAC features:

1.     We add Cost Center Group to the Import Model that provides the automatic values.

2.     We add a URL parameter to our Schedule which specifies a value for Cost Center Group

biExport automatically provides all explicitly set URL parameters also to the Control Report. Thus, if you specify a Cost Center Group and this parameter is known to the control report, it will be filtered accordingly.

Multiple auto parameters

Of course you can use the same concept also for multiple automatic parameters. Simply add additional columns to the table in the Control Report and make sure they have the same name as the URL parameters that you defined in the biExport Schedule (and your Story).

Publishing the documents

biExport offers a wide range of different output channels, such as SharePoint, SFTPS and Mail.

You can automatically determine the recipients by adding an additional column to the BIEXPORT_AUTOVALUES table.

In case of mail broadcasting, you have to name this column “EMAIL” and provide the mail address of the recipient in it.

Also for Sharepoint and sFTP you can automate the path or library the export should be published to. Simply include the endpoint into the table (e.g. “ENDPOINT”)…

… and add URL parameter ENDPOINT as Automatic to the Schedule:

This paremeter can then be used as a placeholder in the Output Channel configuration:

Special requirements, e.g. adressing recipients by name

You can use the “Multiple Auto Parameters” approach also to add e.g. first and last name of your mail recipients atomatically:

1.     Provided that the SAC Model includes this information, add the respective dimensions to the BIEXPORT_AUTOVALUES table

2.     Add URL parameters to the biExport Schedule for each of the columns. Note that the parameters of course do not have to be valid URL parameters of the SAC story in that case

3.     Now you can reference the table columns via placeholders, e.g. in the mail body

Dynamic date variables

For the parameters of the biExport Scheduler, we last but not least also support Excel formulas. This is usefull in particular if you want to use selections like “last week” or “current month” for a reoccurring schedule, and you do not have Custom Exit variables in place which provide this feature.

Here are two examples:

Current Month:          =MONTH(NOW())

April as "04":              =TEXT("4","0#")

Last Week:                  =WEEK(NOW())-1

You can also create more complex formulas, e.g. with IF conditions. For a complete list of supported formulas see here.

Thilo Knötzele
Author: Thilo Knötzele
Creation date: 17.10.2024
Category: Scheduling & Broadcasting
back to overview