Correction of Calculation Handling in Script APIs with SAP Analytics Cloud 2019.18

With version 2019.18, we’ve changed the calculation handling in script APIs. Due to this change, you need to adjust your existing analytic applications that use calculations on the account dimension. Learn how to apply the changes and make your applications run again.

Prior to SAP Analytics Cloud 2019.18, calculations on the account dimension were not handled properly by script APIs such as setDimensionFilter or getData on the DataSource type.

In addition, the value help returned incorrect member identifiers. Prior to the change, member IDs would look like this: [Account_BestRunJ_sold].[parentId].&C4A#CALC0. After the change, the member identifiers are GUIDs and look like this 25880968-9230-4045-b252-417449111942. As of version 2019.18, all script methods accepting or returning member IDs use the new member IDs (GUID format) only. If you have used a hard-coded member ID of such a calculation in your application, you need to change it to the correct format.

Steps Required After the Update to Version 2019.18.
  1. In your application, choose the appropriate widget and choose Edit Scripts.

  2. Adjust the script where calculated measures are used, for example for the API method addMeasure, by replacing the old calculation measure ID with new one: In the script editor, click Ctrl + Space and select the calculated measure with the new ID.

Example
Old calculated measure ID prior to version 2019.18:
Sample Code
Chart_1.addMeasure("[Account].[parentId].&[C4A#CALC0]",Feed.ValueAxis);
New calculated measure ID as of version 2019.18:
Sample Code
Chart_1.addMeasure("16387401-6533-4893-9825-833760248992", Feed.ValueAxis);