SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
โคข Open full site

xP&A CX Commercial Planning - Customize Table Settings Dialogue

This tutorial will explain to you how to customize the table settings dialogue and add new measures to the selection.

Overview

🎓 beginner 20 min. SAP Analytics CloudBeginnerSAP Analytics Cloud Analytics Designer

You will learn

  • โœ”how to customize the table settings dialogue available in some of the planning stories. This includes…
  • โœ”…adding new measures to the selection
  • โœ”…removing existing measures from the selection
  • โœ”…properly dealing with measures which have conditional formatting applied to them
Rudolf Lindt R Rudolf Lindt August 7, 2024
Created by July 31, 2024

Prerequisites

Prerequisites

Steps

Intro

Now that you have successfully gone through the introduction tutorials and know how to use the content package like an expert, you may want to start customizing it and adjusting it according to your own business needs.

This tutorial provides information on how to change the default selection for the table settings dialogue which can be found in some of the planning stories.

As presented in the introduction tutorials, this dialogue can be called by using the Table Settings button and provides a set of measures to be displayed in your planning table. In particular you will now learn how to add or remove measures from the selection.

In case you have any questions or require further support, please use the SAP Question Form.

If you have a specific request to our team in regards to the business content, you may also submit a request using the SAP Influence Platform.

If you are interested in more xP&A topics, related business content packages, or videos showing the content in action, feel free to check out our community page Extended Planning & Analysis Business Content.

Step 1 Extend Selection
โ€”

In this step you will learn how to add new measures to the table settings dialogue.

  1. Open the the story in which you want to edit the table settings dialogue in edit mode. In this example, we will use the List Price Planning story (SAP_MKT_PortfolioPlanning_ListPricePlanning).

  2. Open the Left Side Panel, go to the Outline tab and edit the onInitialization script of the story object.

    xp&A Commercial Planning
    xp&A Commercial Planning

  3. Look for the line where the variable cfg_measureMapping is initialized.

    xp&A Commercial Planning
    xp&A Commercial Planning

    INFORMATION:

    • As a reminder - the cfg_measureMapping dictionary is a global variable which stores all measures of the data model in a dictionary.
    • The left column is the so called key, while the right column is known as the value.
    • The key in this dictionary is a kind of descriptive version of the corresponding measure maintained in camel case and can be freely defined by you, while the value always represents the technical ID of a measure as it is stored in the data model.
    • This dictionary stores all base measures, calculated measures and also story-based calculated measures.
  4. Scroll down inside the script a little further until you find the array called cfg_tableSettingOptions.

    xp&A Commercial Planning
    xp&A Commercial Planning

    INFORMATION:

    • This array defines which measures are displayed for selection in the table settings dialogue.
    • All measures which are listed here will show up in the dialogue eventually.
  5. In order to add a new measure to the selection, add a new line with a syntax according to the existing lines.

    • First you must provide an id, which you can either type in manually by entering the technical measure ID as it is defined in the data model or by calling it from the cfg_measureMapping dictionary.

    • The next value you must provide is the description. The description is the text that will be displayed in the measure selection pop-up. You can either provide a manual description or fetch the description stored in the data model by calling it from the previously initialized measuresDictionary object. In order to do so, simply add into the square brackets of measuresDictionary[] your technical measure ID.

    • The last information you must provide is the displayId. Provide an x if the measure should be checked as selected per default or pass an empty string if the checkbox should be unchecked per default.

    • All these three pieces of information must be contained inside swirly brackets {....}, as it is the case for the pre-defined measures.

    • Let us assume that we have a measure in our data model called Revenue_GlobalCurrency. If we wanted to add this to the list of selections, the cfg_tableSettingsOptions would now look like this:

    xp&A Commercial Planning
    xp&A Commercial Planning

    • Now that you have configured which measures you want to display in the pop-up window, you need to adjust the back-end logic so the table layout changes accordingly as well.
  6. Next, look for the script applicationScripts.applyTableSettings in the Left Side Panel and click on Edit Scripts.

    • Scroll down until you find this big switch-case block.

    xp&A Commercial Planning
    xp&A Commercial Planning

    • Make sure that all measures you have maintained in your cfg_tableSettingOptions dictionary from the onInitialization script are represented in this switch-case block.
    • If you added a new measure that had not been there initially, make sure to add a respective case block for that new measure.
    • Simply copy one of the existing case blocks and paste it somewhere in between the other case blocks. The order does not matter. In regards to the screenshot, one of the existing case blocks you could choose to copy from ranges from line 29 to 33.

    xp&A Commercial Planning
    xp&A Commercial Planning

    • Make sure to change the measure IDs in the new case block accordingly. In regards to the previous screenshot, this must be done in lines 29, 31 and 32.
    • Following the previous example, your result should look like that:

    xp&A Commercial Planning
    xp&A Commercial Planning

    • Save your changes.

    INFORMATION

    If you maintain your measure in the cfg_measrueMapping dictionary (for example by using the key revenueGlobalCurrency) located in the onInitialization script, you could also call the new measure by writing cfg_measureMapping.revenueGlobalCurrency instead of using the technical ID Revenue_GlobalCurrency.

Step 2 Remove Measures
+
Step 3 Formatted Measures
+
Step 4 Final Remarks
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 4
1. Extend Selection 2. Remove Measures 3. Formatted Measures 4. Final Remarks

Learn more →