cancel
Showing results for 
Search instead for 
Did you mean: 

Create Calculation View via Script

Former Member
0 Kudos

Hi guys,

I wanna create a calculation view (inside a content package) via script. You can find the actual view inside _SYS_BIC. The referring objects or tables between schema and content package are located in _SYS_REPO thou. Does anybody have experience in creating a calculation view using this way? Which objects in SYS_REPO does actually refer to the catalog object?

Regards, Christoph.

Accepted Solutions (0)

Answers (2)

Answers (2)

rindia
Active Contributor
0 Kudos

Hi Christoph,

If your question is creating SQLScript calculation view inside content package, then yes.

Just right click your package --> New --> Calculation view. Select Sub-type as SQLScript.

  

If you are using older version then it may be slightly different.

Regards

Raj

former_member184768
Active Contributor
0 Kudos

Hi Christoph,

I am not sure if I understand your requirement completed and also not sure why such requirement is needed, but can add a couple of points.

If you look into the activation log for the calc view, you will find that respective column views are created in _SYS_REPO. The activation log also has "create column view" statements which creates such views. You can also find that the column views are created from some of the system tables which contain the information about the included objects.

I think graphical Calc views creation from a script is not supported by SAP. You need to create it from the Studio itself as on activation the internal tables like active_objects, active objects reference etc are updated accordingly. In case you need scripted option, then you can also create scripted calc views, but again from the Studio. Taking a step further, if you look into the system repository, then the SQL Calc view create procedures in the repository. So in effect, you can create procedures with the similar code as you can have in scripted calc views with CE functions and can still achieve the required performance.

Please let us know your exact requirement and I am sure the experts on this forum would provide their point of view.

Regards,

Ravi

Former Member
0 Kudos

Hi Ravi,

I know its not supported by SAP, but you´re getting my point. I´m trying to understand how HANA works regarding the creation of an calculation view from scratch. I found some corresponding tables and views in _SYS_BIC and _SYS_BI and already spend a lot of time scriting sql statements to fill the tables inside the schema, but I´m not able to see an activated view inside the content package so far. So its really like a technical deep dive inside the database: I dont wanna use the regular or supported way like the graphical or SQLScript option via Studio. As a result I wanna build a sql statement which creates an activated calculation view inside the content package. I´m working on a project using HANA for hot and Hive for cold data where I need to build flexible calc views by script. So I know its not easy, but should work somehow.

Regards, Christoph.

former_member184768
Active Contributor
0 Kudos

Hi Christoph,

I think SAP will not make it public that how a Calc view is created outside the HANA Studio. As you might be aware the runtime object information is not completely stored in the database. It is also the XML format (or JSON not sure). Secondly the Calc view that you see in content is the design object, the runtime objects are the column views.

In your scenario, I'd suggest you should use procedures with CE functions which can be created dynamically and would produce the same output as any Calc view.

Regards,

Ravi

Former Member
0 Kudos

Hi Ravi,

I need the Calculation View for reporting with BO frontend tools like AOffice thou.

This document helped me to understand the data model inside HANA: http://scn.sap.com/docs/DOC-27761

Regards, Christoph.