Professional Documents
Culture Documents
SAP HANA SP10 provides the ability to create Input Parameters with parameter type “Derived
from Procedure/Scalar Functions” with input parameters. Prior to HANA SP10 the Input
Parameters of type “Derived from Procedure/Scalar Functions” did not provide the ability to pass
values as input which limited the use of the input variables based on procedures or
functions. The ability to pass values to the procedure based input parameters provides an array
of options to meet business requirements.
Step-by-Step Process to provide dynamic QTD Key Figures in a HANA Calculation view:
Save Procedure.
Test Procedure by right clicking within the procedure body and selecting “Invoke Procedure”
Enter Input Year/Period and Execute.
Figure 4: Test Procedure
2. Create Generic Input Parameter with User Input with view you desire the QTD restricted Key
figure.
Open the view within HANA Studio you would like to update with the QTD Metric.
Create a generic input Parameter within the view which accepts a Year/Period value.
“ZFISCPER” is a generic test column in the test view formatted as “YYYYMMM”.
Figure 5. Generic Input Parameter
3. Create Procedure based Input parameter
Create new Input Parameter with Parameter Type “Derived From Procedure/Scalar Function”
Figure 6: Procedure Based Input Parameter
Click “Manage Mappings”, this is key action which maps the value of the generic input parameter
value to the input parameter to the Input parameter of the procedure based input parameter.
Figure 7: Map input parameter
4. Create Restricted Key Figure based with filters based on Input Parameters
Within the HANA view open the node under Semantics which will have the option to create
“Restricted Columns” available.
Create a new restricted key figure and enter the desired Name and Label and the Key Figure
column which the Restricted Key figure should be based on.
Under “Restrictions” select the column which will be filtered, in this case “ZFISCPER”.
Select the “Between” Operator.
Select the Procedure based input parameter as the “From Value” and the generic input
parameter as the “To Value”
Figure 8: QTD Restricted key figure
5. Review results of QTD Restricted Key Figure
Execute Data Preview to test the Key figure.
Enter Year/Period “2016005” when prompted.
Pull required objects into Label and Values to view data.
Figure 9: Data Preview Results.