Populating dynamic default values in report variables without user entry is a powerful feature in reporting tools that allows the default value for a variable to be determined at runtime based on certain conditions or logic, rather than being fixed or manually specified by the report designer.
In SAP BW/4HANA, dynamic default values can be set using customer exit variables. The I_STEP variable helps define which stage of processing the exit is at, such as initialisation, selection, or validation. Typically, when I_STEP = 1, the exit is in the initialisation stage, where you can dynamically set default values based on custom ABAP code, but how do we achieve the same results in SAP Datasphere?
In this blog, I will walk through the process of populating dynamic default values in SAP Datasphere Analytical Model variables without requiring user entry, using a combination of built-in functionality and SQL Script.
In this example, I will explain the process of setting the previous fiscal year period by default in the FISCPER analytical model standard variable.
Step-by-Step Guide: Assigning the Previous Fiscal Year Period to the FISCPER Variable dynamically.
Step 1: Create a table function with the required logic to define the dynamic variable value. This table function will be triggered in real-time during the execution of the analytical model in Datasphere.
Sample SQL Script:
This functionality can be implemeneted in below variables:
It's a simple functionality but a powerful feature in Datasphere.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 27 | |
| 24 | |
| 13 | |
| 12 | |
| 12 | |
| 11 | |
| 10 | |
| 10 | |
| 9 | |
| 9 |