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).
In this example we need to extend the model at the position2_14_Join and integrate a new logic (see Figure 2).
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.
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).
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.
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.
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).
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.