cancel
Showing results for 
Search instead for 
Did you mean: 

Difference between Variables and Input parameters in HANA

Former Member
0 Kudos

Hi All

   As variables and input parameters both are for giving flexibility to user by accepting input from user at runtime.But i could not understand the difference between Variables and Input parameters.Request all of you to share your views.

Thanks

Santosh Varada

Accepted Solutions (1)

Accepted Solutions (1)

nikhil_joy2
Active Contributor
0 Kudos

Hi Santhosh,

Before the revision 26, we had only variables. after 26 variables have been split into variables and input parameters.

Both variable and parameter can be specified before executing a query on the view. Usually both are entered manually by the user on variable popup. The difference is that, variable defines a filter on an attribute of the view. So it is always assigned to an attribute. whereas parameter defines an internal parameterization of the view. ie the engine needs to know it and uses the parameter value during execution to find calculated measures. It will not filter the data set.Parameter can have only single value. Variable values are not known by the engine but only by the client. The variable values are passed to the engine via the WHERE clause of the SQL statement. parameter value is passed to the engine via the PLACEHOLDER clause of the SQL statement.

For the end user there is no distinction between variables and parameters. Both appear as input fields on the variable popup.

Refer SAP Note 1691126 for more details.

Regards,

Nikhil Joy

Answers (2)

Answers (2)

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi Santosh,

The key difference is input parameters can be used in calculated measures and attributes.. for e.g. in currency conversions where the users enters the target currency at runtime. With variables, however you are only able to filter attribute values to the value user enters at runtime.In addition to attribute values, it can also take static values, currency & date values as input which can then be used for calculation within the analytic/calc view.

Another difference is in the way the parameters are passed into the SELECT statement. The variable filter goes in into the WHERE clause of the statement whereas input parameters go in as a PLACEHOLDER.

Have a read through SAP Note 1691126.

Thanks,

Anooj

Former Member
0 Kudos

Hi Nikhil and Anooj

Thanks for helpful answers.But can you give me one clarification regarding variables that we can enter multiple values where as Input parameters we can only enter single value.in addition to the above mentioned views.and there are several variable types suchas currency, static list etc... these are common for both .please correct me if I am wrong.

Regards

Santosh Varada

nikhil_joy2
Active Contributor
0 Kudos

Hi Santhosh,

before the revision 26, we had only variables and no input parameters. There we had these types of variables like currency, static list etc. But now variable can  only be attribute value type. and input parameters we have these four types. We cannot select multiple values for input parameters.

while defining a variable you can see option to enter multiple values.

here for input parameters we cannot have multiple values. In type dropdown we can select attribute,date,currency and static list.

Regards,

Nikhil Joy

Former Member
0 Kudos

Hi Nikhil

It cleared my doubts, but one more thing I want to cofirm is even if we chose Input parameter type of attribute we can't chose multiple entries right, infact I don't see that option at all in Input parameter screen .Thanks Once again

Regards

Santosh Varada

Former Member
0 Kudos

Sorry to revive an (almost) dead thread, but now this feature - multiple selection entries in a single input parameter is now possible from SPS9 onwards.

Hope this helps.