Showing posts with label VARIABLES IN SAP HANA CALCULATION VEW. Show all posts
Showing posts with label VARIABLES IN SAP HANA CALCULATION VEW. Show all posts

Saturday, June 13, 2020

Input Parameters in SAP HANA


Input Parameters are used to Filter the data dynamically in any node of the calculation view and also perform calculation based on the dynamic input from the user.

Let us consider a scenario where we need to restrict the CALMONTH (i.e user will define which CALMONTH data should display at the run time). And also the Pass Mark will be decided by the user at the run time of the calculation view.


Please find the below sample data we have without implementing Input parameter.

Now goto Parameter/Variables table in semantics. Click the ‘+’ sign and select create Input parameter.


Input parameter for pass mark:


Input parameter for CALMONTH filter:

When can also mention whether Input parameter whether it is going to be mandatory or not in the new input parameter creation window.


Crating new calculated column to filter on calmonth data


Filtering on calmonth in projection 1


Calculated column for pass/fail status based on passmark_ip

Now activate the Hana view and give display preview in semantics




Below is the output of the view



DIFFERENCE BETWEEN INPUT PARAMETER AND VARIABLE IN SAP HANA CALCULATION VIEW:

  • INPUT PARAMETER is used to do any calculation or filter on any node based on the dynamic input given where as the Variables is used to do dynamic filter on the final result of the hana view
  • We can set Data type of the Input parameter where as variable is bound to attribute of the view


We will see about usage of RANK Node in the next post

Friday, June 12, 2020

VARIABLES IN SAP HANA CALCULATION VEW


Variables are the dynamic filters which needs to be applied on the final result (i.e. User can provide the filter during the runtime of the execution).

HOW TO CREATE VARIABLES

To Create variables click on the Semantics and go to Parameter/Variable tab and click on the PLUS Sign.


Variable creation


In the new variable creation widow, we need to give the Variable name, Label(Description) and the attribute  the field where the dynamic filter going to be applied and the selection type needs to be mentioned

  • Single Value
  • Interval
  • Range


We can also mention whether multiple entries are allowed for this variable and whether this variable is mandatory based on the requirement.

For our understanding I have created HANA View on top below table with variable on Plant.


Data without variable



    Entering PLANT = 1000,2000 as variable






Now records with plant 1000 and 2000 alone got filtered.





We will see about creation of input parameters and difference between variables and input parameters in SAP HANA in next post.


Featured Post

Extending/Increasing Key figure Length with custom Domain

  In this Post, We will learn how to increase Key figure length with new domain or custom Domain.   Go to RSD1 Tcode and enter NOHDB Tcode...

Popular Posts