2

Multiple Input parameter in Hana Calculation graph... - SAP Community

 1 month ago
source link: https://community.sap.com/t5/technology-blogs-by-members/multiple-input-parameter-in-hana-calculation-graphical-view/ba-p/13575847
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

vignesh3027

Explorer

‎09-06-2023 9:24 PM

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,

img1.png


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.
    img2-1.png

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.
img3-1.png
img4.png
Step 3
  • To achieve multiple input parameter, it is necessary to filter the input parameters in the filter expression.

img5.png
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$$))
img6.png
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
img7.png
Output

Data filtered successfully for the corresponding input parameter.
img8.png
Thank You !

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK