You are not using a modern browser version. As a result, the website may not be displayed correctly. You can find more information here.

Making changes in SAP HANA Calculation Views – Part 2


Changes to existing Calculation Views

Welcome to the second part of my blog, in which we will take a closer look at how to handle changes to old (already existing) Calculation Views. Here I will continue with my example from the first part of the blog (see Figure 1).

Figure 1 – Example of a calculation view

In this example we need to extend the model at the position2_14_Join and integrate a new logic (see Figure 2).

Figure 2 – Extension of the Calculation View with NEW_CONTENT

Linking New Content

To link the join node NEW_CONTENT to the node 2_16_Join , the previously linked node 2_14_Join must be deleted. Here, as we all know, the upward mapping is lost. Of course, we do get an advance warning of this (see Figure 3), but in practice this warning doesn’t mean much, since we still have to complete this step anyway.

Figure 3 – Deleting a data provider in a join

Here, as we saw in the first part of the blog, all attributes and key figures of the 2_14_Join are lost with the mapping (see Figure 4).

Figure 4 – Before / After Mapping

Minimize work / avoid remodeling

To avoid all of this and save yourself the extra work of remodeling, I will now show you a way to avoid deleting the node and the mappings just described, and make remodeling obsolete. Here no new nodes are formed and the original structure remains in place.

I do this by making use of the definition of the Calculation View. First, I extend NEW_CONTENT by adding DUMMY_UNION (see Figure 5). This step is not required and can be ignored, but as explained in the first part of the blog, it is practical as a way to simplify things when making extensions and changes later.

Figure 5 – Extension with DUMMY_UNION

Then all you have to do is save the modified Calculation View; no activation is required. Next, it is exported locally to the computer in XML format in Developer Mode (see Figure 6). The exported file “NameOFCalcview” with the ending “calculationview” can now be opened and edited in the text editor of your choice.

In the text editor you search for the (Calculation:JoinView) in which the old data source to be replaced is located (here: 2_16_Join) and you replace the logic there.

Figure 6 – Export XML Definition

Save and import

After the change, the file must be saved and the updated definition of the Calculation View must again be imported in the Developer Mode. When this is done, all that remains is to supply the new attributes (see Figure 7).

Figure 7 – completed extension

And that concludes my short blog entry. I hope that this nice little trick will be of use to you when modifying or extending old Calculating Views.

Kostenloses Factsheet

SAP Analytics Cloud

Für viele Unternehmen ist die SAP Analytics Cloud (SAC) die erste Cloud-Lösung im Analytics-Bereich überhaupt. Von daher überrascht es nicht, dass schon vor der Implementierung der SAC regelmäßig die gleichen Fragen auftreten. Wir erklären Ihnen unseren Fahrplan für eine erfolgreiche SAC-Implementierung.

Nehmen Sie Kontakt zu uns auf!

    I hereby consent to my personal data being collected, processed, and used for the purpose of processing my inquiry. I may revoke my consent anytime without stating my reasons for doing so. More information can be found in our privacy statement.

    E-Book: Was ist SAP S/4HANA?
    Alles über das aktuelle ERP von SAP

    Vor dem ERP-Umstieg stellen sich viele Fragen, etwa nach Deployment-Optionen, Funktionen, Migrationsszenarien oder Vorteilen. Die Antworten gibt unser E-Book.

    • Welche Funktionen bringt SAP S/4HANA mit?
    • Welche Vorteile bietet SAP S/4HANA?
    • Wie ist SAP S/4HANA aufgebaut?
    • Was kostet SAP S/4HANA?
    • Wie erfolgt der Umstieg meines ERPs auf SAP S/4HANA?