How to use dynamic values from an SAP BW “Customer” or “Exit” variable when scheduling a Web Intelligence Document
Beginning in BI 4.1 Support Pack 04, there is new functionality that allows you to schedule a Web Intelligence Document that contains a dynamic variable to input a value at the time the report is scheduled.
The BI 4.1 What's New guide (available at http://help.sap.com) states "If there is a prompt on a BW mandatory, dynamic variable, the BI administrator can now allow the BW data source to automatically enter a value for that prompt when the scheduled document is executed."
Below are the specific steps to configure the BI environment to make this happen.
Section 188.8.131.52 in the Business Intelligence Platform Administrator guide (available at http://help.sap.com) discusses how to set up the application server so this functionality exists.
- Perform one of the following actions in the <InstallDir>\<WebAppServer>\webapps\BOE\WEB-INF\config\custom folder:
a. If an AnalyticalReporting.properties file is located in the folder, open the file in a text editor.
b. If no AnalyticalReporting.properties file exists in the folder, create a file with that file name, and open it in a text editor
- Perform one of the following actions in the AnalyticalReporting.properties file:
a. If the file already exists, locate the bex.dynamic_variable.schedule property in the file, and ensure that its value is set to true
b. If you created the AnalyticalReporting.properties file, add bex.dynamic_variable.schedule=true to the end of the file
- Save and close the file, and then restart the web application server.
Once this is completed, then the Prompt section within the scheduling interface should contain a “Clear” button.
There is a Web Intelligence Document created that contains a prompt that comes from a BW query. This prompt is dynamic and generates a date/time stamp object at the moment the Document is run.
When saving this Document, purge the data, including checking “Purge Last Selected Prompt Values”. This step is essential for the scheduling to work properly.
With the updated settings to the AnalyticalReporting.properties file in place, schedule the Document. In the scheduling interface in the Prompts section, click the “Clear” button next to the dynamic variable prompt (because it inserted the current timestamp at the time of this scheduling).
Now when the Document runs at the scheduled time(s), the variable is inserted in at the moment it runs.
Notice each Document's instance timestamp and compare it with the timestamps in the report:
In this example, 12:27 Pacific Time in the instance history translates to 2127 CET in the Document.
In this example, 12:26 Pacific Time in the instance history translates to 2126 CET in the Document.
Note this new functionality is intended for scheduling workflows - it is not intended when refreshing documents real-time.