cancel
Showing results for 
Search instead for 
Did you mean: 

How to create Dynamic Calculation Views?

Former Member
0 Kudos

Hi Experts,

I am working on a use case where i need to create dynamic views on the run.

Scenario : User selects data for age>65 and applies filter on the same data whose visited the doctor >5 times this month.

In this case we have two views age>65 and then >5 times visit.

similarly i have more than 1000+ filtering scenarios.

First question:

1. What is the best approach to deal with this situation?

2. I found that there is a calculation view approach that can be used since CACHE mechanism is also required in this :

    

EXEC 'CREATE CALCULATION SCENARIO "SchemaName"."View_Name" USING ''<?xml version="1.0" encoding="utf-8" ?>

                            <cubeSchema version="3" operation="createCalculationScenario" defaultSchema="SAP_HPH">

                              <calculationScenario name="Hello_World">

                                <dataSources>

                                    <sqlViewDataSource name="INPUT" view="ViewName">

                                    <attributes>

                                        <attribute name="Filename" datatype="string" sqlType="NVARCHAR" />

                                        <attribute name="DOCUMENTNAME" datatype="string" sqlType="NVARCHAR" />

                                      </attributes>

                                        ....

Where can i find documentation to create such kind of views? <cubeSchema > <dataSources> <sqlViewDataSource > Where can i find the definition for all these XML components?



Thanks,

Abhishek.

Accepted Solutions (1)

Accepted Solutions (1)

lbreddemann
Active Contributor

The XML definition for calculation views are not open for development outside SAP.

As a SAP developer you have access to internal JAM communities, documentation and core SAP HANA development teams.

I recommend to reach out internally instead of posting here in a public forum,

Former Member
0 Kudos

Thanks Lars. I will do so.

Answers (2)

Answers (2)

chandan_praharaj
Contributor
0 Kudos

I am not sure about the scenario, but if you are after BRF+ kind of scenario, please check the link which Krishna has given for HRF.

I would suggest why cant you create a decision table with all the condition and

You can create Calculation view and inside that you can consume decision table. that way you can update the decision table also and calc view will run based on the rule present in decision table .

Former Member
0 Kudos

Thank you Chandan for the response.

For the time being i am going forward reading about HRF and checking whether it suits my implementation or not.

former_member182302
Active Contributor
0 Kudos

Not sure if the scenario you are sharing is focussed on more number of rules, instead of creating calculation views dynamically, may be you can use HRF? did you check?

Regards,

Krishna Tangudu

Former Member
0 Kudos

Thanks Krishna for the suggestion and the link.

Cant Possibly say that this would suit the implementation so early. I will go through HRF and let you know if this works out for me.!