Skip to Content

xP&A CX Commercial Planning (Sales) - Add a new Spend Type

This tutorial provides information on how to add a new spend type and use it inside the different applications.
You will learn
  • Which steps are required in order to add and use a new tactic
  • This includes…
  • adding a new spend type in the model
  • adjust the planning applications
  • adjust the data actions
Hendrik GrobbelAugust 7, 2024
Created by
HeGro
November 9, 2023
Contributors
HeGro

Prerequisites

The SAP Commercial Planning (CX) Sales Planning content package comes with several pre-defined assumptions, such as the mapping between Tactic – Spend Type and GL Account, which can be used for your planning activities. Nevertheless, you might want to add more spend types according to your own business needs. In this case, you would need to adjust the planning applications, data actions as well as the dimension master data.

In this tutorial, you will learn how to add a new spend type member into the dimension and how to make it available in the planning applications of this content package.

  • Step 1

    In the first step, it is necessary to add a new member to the SpendType dimension.

    1. In the SAP Analytics Cloud Menu, navigate to the Files section, search for SAP_SD_IM_SalesPlanning and click on it.

      model
    2. Open the SpendType dimension.

      model
    3. Add a new member to the SpendType dimension. The spend type is meant for long-term regular customers.

      model
      • Use SPEND_06 as your Member ID
      • Use Premium as your Description.
      • Use PRICE as your Base_Account/Measure (Sales Planning)
    4. Save your change.

  • Step 2

    In the next step the Sales Planning Admin Page (SAP_SD_SalesPlanning_AdminPage) must be modified, and a new mapping should be provided for the new SpendType member created.

    1. In the SAP Analytics Cloud Menu, navigate to the Files section, search for SAP_SD_SalesPlanning_AdminPage and select Open in Story Edit Mode.

      canvas_story
    2. Select the Mapping page of the story. Right click on the Spend Type input control or select the button More Actions. Click on Edit Filter….

      canvas_story
    3. Click on Settings. In the members display settings, and select All Members in the Available Members drop down. Then select your newly added Spend Type Premium. Click on OK.

      canvas_story
    4. Save your change and go to View mode.

      canvas_story
    5. Select the Mapping page of the story. Right-click on the column SpendType in the Mapping Table. Select the Show/Hide option and select Unbooked.

      canvas_story
    6. The new SpendType Premium is now visible in the table. Perform a manual input on the desired combination of SpendType, Tactic and GL Account to create a valid driver combination to be used for the sales activity planning.

      canvas_story

      For instance, enter 1 for the following combination:

      Column Value
      SpendType Premium
      Tactic Price
      GL Account Sales Discount - Domestic
    7. Click on Confirm to publish your change.

      canvas_story
    8. Confirm your intention by pressing Yes.

      canvas_story
  • Step 3

    Now, you are going to learn the different ways how your SpendType is treated in the data action.

    1. In the SAP Analytics Cloud Menu, navigate to the Files section.

    2. Search for the affected data action SAP_SD_IM_SalesPlanning_ActualActivityP&LCalculation and open it.

      canvas_story
    3. Click on step Calculate Incremental Spend - Rate.

      canvas_story

      The following table explains roughly what the data action step is about.

      Line Purpose
      1-4 Sets the configuration definition for the advanced formula like hierarchy and time zone.
      5-21 Sets the member set for the data action. The data action operates on the previous year, amount, sales deductions (FPA1/023) and by parameter given activity.
      24-40 This step only fires based on the Base_Account/Measure (Sales Planning) of your SpendType, in this case PRICE. It adds the quantity and prorated baseline quantity for the booked drivers, which you defined in the mapping table of the Sales Planning Admin Page (SAP_SD_SalesPlanning_AdminPage). The sum of it is multiplied with the spend input of the given sales activity, which you enter in the pop-up, whenever you edit or create an activity in the story Sales Activity Planning (SAP_SD_SalesActivityPlanning).

      That means, if you create a new sales activity with SpendType Premium and an Spend Input of 12, this step would sum the quantities and multiply it with 12 to get the incremental spend rate. Because previously we defined that the SpendType Premium has PRICE as the Base_Account/Measure (Sales Planning). So line 24 is true.

    4. Click on the last three steps and compare them.

      • Calculate Incremental Spend - Rate
      • Calculate Incremental Spend - Lumpsum
      • Calculate Incremental Spend - Percentage

      The first 23 lines are the same in each step. The data action steps differ in the last part. They distinguish between the Base_Account/Measure (Sales Planning) of the SpendType. The SpendType has currently three different base accounts:

      canvas_story
      • SPEND_PERCENTAGE
      • AMOUNT
      • PRICE

      If you want to add a fourth Base_Account/Measure (Sales Planning), you would need to add another step at the end of the data action SAP_SD_IM_SalesPlanning_ActualActivityP&LCalculation. The step would follow the same pattern like the others you just looked at.

  • Step 4

    You need to incorporate the option to select your new SpendType Premium whenever you interact with Sales Activities.

    1. In the SAP Analytics Cloud Menu, navigate to the Files section.

    2. Search for SAP_SD_SalesActivityPlanning, click on More actions and select Open in Story Edit Mode.

      model
    3. Adjust the master data.

      While the page is being initialized master data is being retrieved and stored in local variables. You need to add your new SpendType.

      • Click on Left Side Panel
      • Search for Masterdata_RetrieveMemeber
      • Click on Edit Scripts.
      • Add the following line to line 22 to add your SpendType.
        dimension_SpendType[6]=temp_SpendType[6];
        
      model
    4. Adjust the logic how the values of the rates are stored when you create a new activity.

      When you save an activity the rate value is treated in two ways. It is either converted into a percentage value by dividing the entered value by one hundred or it is stored as it is. As a digression please have a look at the screenshot below. It shows the dialog for creating and editing an activity. Once you are done, you will be able to select Premium as SpendType in this dialog as well. You can see the referred value.

      model

      As of now the value for SpendType Premium is not saved to the data model. You need to do the following change to make it happen.

      • Search for Activity_CreateUpdate
      • Click on Edit Scripts.
      • Add the following line to line 163 to add your SpendType.
        case "SPEND_06": // Premium [Price]
        
      model
    5. Adjust the logic how the values of the rates are stored when you edit an existing activity.

      You have to do the same exercise for the PopUp_EditActivity script.

      • Search for PopUp_EditActivity
      • Click on Edit Scripts.
      • Add the following line to line 48 to add your SpendType.
        case "SPEND_06": // Premium [Price]
        
      model
    6. Save your changes.

  • Step 5
Back to top