Blogs / SAP / SAP BW/HANA / SAP BW/4HANA / Cockpit / How to pass values from SAP BEx to HANA calculation view? ​

How to pass values from SAP BEx to HANA calculation view? ​

May 11, 2020

SHARE

SAP BW powered by SAP HANA or BW/4HANA provides means of integrating native HANA models into the BW environment. One such scenario is the consumption of HANA calculation views in composite providers. 

In HANA views, we use input parameter to restrict the data based on user input provided. We do have some limitations in this approach as the input parameter accepts only single value and ranges are not supported.  

In this blog, we are going to see how to consume the input parameter in BW and pass values from BEx. 

Step 1: Create a calculation view in HANA.

How to pass values from SAP BEx to HANA calculation view? ​

Step 2: Create input parameters based out of Calendar day. In our case, we are creating two input parameters and show how to handle ranges bypassing “from” and “to” values from BEx.

How to pass values from SAP BEx to HANA calculation view? ​
How to pass values from SAP BEx to HANA calculation view? ​

Step 3: Create an expression as shown below. Use the input parameter we had created already. This would act as a filter to the entire view.

How to pass values from SAP BEx to HANA calculation view? ​

If you try to preview the data, you can see that the input parameters are being requested.

How to pass values from SAP BEx to HANA calculation view? ​

Step 4: Create a Composite Provider (HCPR) on top of this HANA view and consume the input parameters as well.

How to pass values from SAP BEx to HANA calculation view? ​

Step 5: Create a BEx query on top of this HCPR. Filter the query based on the input parameter fields using variables. Make sure that the variable created accepts only “Single value”.

How to pass values from SAP BEx to HANA calculation view? ​

You can also use fixed value as a filter or populate the variable value through customer exit.

Step 6: Run the query in RSRT and fill in the required fields.

How to pass values from SAP BEx to HANA calculation view? ​

You can see that the values we have entered are passed into the HANA view through the input parameters and the data gets filtered accordingly.

How to pass values from SAP BEx to HANA calculation view? ​
How to pass values from SAP BEx to HANA calculation view? ​

Limitations

  • Do not use the fields mapped to input parameter in drill-down as it will throw an error. They are just placeholders to pass the values to the HANA view.
  • Input parameter currently supports the only single value and in case you create variables with range/selection, BEx will throw an error. You can follow the approach shown above in case you need to deal with ranges.

Read more from BW/4HANA Cockpit category here. Know more about Visual BI Solutions SAP/BW Services offerings here.


Corporate HQ:
5920 Windhaven Pkwy, Plano, TX 75093

+1 888-227-2794

+1 972-232-2233

+1 888-227-7192

solutions@visualbi.com


Copyright © Visual BI Solutions Inc.

Subscribe To Our Newsletter

Subscribe To Our Newsletter

Join our mailing list to receive the latest news and updates from our team.

You have Successfully Subscribed!

Share This!

Share this with your friends and colleagues!