Aim: To create a calculation view with multiple input parameter that should display data corresponding to the input parameter.
The entire calculation view is here,
Step 1
- It is necessary to create a Input parameter in a calculation view to get input from the user.
- In our case, I created input parameters for Company code, Date and Profit centre.
Step 2
- In our case I m going to get multiple inputs for Company code and Profit centre.
- Make sure that you have enabled the Multiple Entries option while creating and defining the Input parameter.
- You can also provide default values here itself.
Step 3
- To achieve multiple input parameter, it is necessary to filter the input parameters in the filter expression.
Step 4
Syntax:
(in("field name in table", $$ Input parameter $$) or match("field name in table", $$ Input parameter $$)) and (in("field name in table", $$ Input parameter $$) or match("field name in table", $$ Input parameter $$))
Expression formula in our case:
(in("BUKRS", $$Company_code$$) or match("BUKRS", $$Company_code$$)) and (in("PRCTR", $$Profit_centre$$) or match("PRCTR",$$Profit_centre$$))
Explanation:
- It is possible by using in() or match ()
- In (): It is used to filter the data by condition of the input data is IN the table => display those data.
- Or: It allows to check two conditions.
- Match (): it is used to filter the data by condition of the input data is MATCH any entires in the table => display those data.
(in("BUKRS", $$Company_code$$) or match("BUKRS", $$Company_code$$)) and (in("PRCTR", $$Profit_centre$$) or match("PRCTR",$$Profit_centre$$))
- $$Company_code$$ - Input parameter that we created.
- "BUKRS" - company code field name in the table.
- $$Profit_centre$$ - Input parameter that we created.
- "PRCTR" – profit centre field name in the table.
Step 5
Executing for
Date: 201812
Company Code: 3000
Company Code: AJSC
Profit Centre: 0000001000
Profit Centre: 0000002000
Profit Centre: 0000003000
Output
Data filtered successfully for the corresponding input parameter.
Thank You !