Create a Data Action

In SAP Analytics Cloud, you can create a data action by specifying a source model, and then add steps to the data action.

Prerequisites

To create a data action, you must have the appropriate permissions for the Data Action item. For example, the modeler and admin roles contain these permissions.

Context

Follow these steps to create a data action from scratch. You can also copy an existing data action by opening (Data Actions) from the side navigation, selecting a data action, and choosing (Copy the selected data action).

Procedure

  1. Select (Data Actions) from the side navigation to open the data actions start page, then select Data Action in the Create New section.

    When working on a planning model in the modeler, you can also create a data action based on it by selecting (Actions) and selecting Data Action.

  2. In the Data Action Settings pane, type a Name for the data action, and optionally type a Description.
  3. Select the Default Model for the data action.

    Most steps will use this model as the data source and target. For cross-model copy steps, this model will be the target, and you can pick a different source model. You can also read and copy data from different models in advanced formulas steps.

    To open the default model in the modeler, select .
    Note

    You also have the option to change the default model after adding steps. If you change the default model after steps have already been added, you might get some validation errors. The validation errors will be marked and you can fix them manually.

  4. Select (Save Data Action).
  5. Create parameters for the data action as necessary. To learn how, see Add Parameters to Your Data Actions and Multi Actions
  6. Add copy steps, cross-model copy steps, allocation steps, embedded data action steps, conversion steps, and advanced formulas steps as necessary.
  7. Complete the data action by editing, reordering, copying, and deleting steps as necessary.
    • To open a step for editing, select it in the left pane.
    • Undo or redo any changes by selecting (Undo) or (Redo) in the Operations toolbar.
    • To reorder steps, drag them up or down in the left pane.
    • To copy a step, select it in the left pane and choose (Duplicate Step).
    • To delete a step, select it in the left pane and choose (Delete Step).
  8. When the data action is complete, select (Save Data Action).

Results

You can debug your saved data action with tracing, to make sure it works as expected. For more information, see Get to Know the Data Action Tracing.

When your data action is ready, it can be set up to run it in a few different ways:

Example Scenario: Creating Data Actions with Copy Operations

For planners who are new to data actions in SAP Analytics Cloud, learn how to create copy steps and cross-model copy steps in a data action.

These example scenarios will illustrate how to create two data actions:

  1. A copy step that copies the Actuals from a Sales model to a Plan version, using a parameter for the source date and target date.
  2. A cross-model copy step that copies the "Gross Sales" and "Discounts" from a Sales model to a Finance model.

Create a Copy Step with Parameters

Prerequisites

You will need to create a data action before you can add steps.

Context

To create a copy step with a customizable source and target date, you can create parameters for these members. A planning user could then choose the source and target dates for the copy step when running the data action.

Procedure

  1. Create a new data action and select a Sales model as the default model.
  2. Select (Add Copy Step).
  3. Type a name and description for the step.

    We will call this step “Copy from Actuals to Plan”.

  4. In the Filters section, change the filter for the Version dimension to Actual.

    By default, the Version dimension is filtered by a parameter called TargetVersion. If you keep this default parameter, you will be prompted to select a version when you run the data action. The same version will be used as the source and target.

    In this example, we want to specify a different source version, so we will filter the Version dimension to Actual.

  5. Select Add Filter and filter the measures you want to copy in the copy step.
    A copy step with a filter on the version dimension and measures
    A copy step with a filter on the version dimension and measures
  6. Select (Show Parameters List) and then select Add Parameter.
  7. Define the parameter’s properties.
    1. ID: Type “FromDate” as the ID.
    2. Parameter Type: Select Member.
    3. Model: Leave the Model as Default Model.
    4. Measures/Dimension: Select the Date dimension.
    5. Cardinality: Select Single to only allow one value.
    6. Hierarchy: Select Any to allow selections from any hierarchy.
    7. Level: Select Any.
    A configured member parameter for the Date dimension.
  8. Repeat step 7 to create another parameter called “ToDate” using the same properties.
  9. Select the copy step to return to the step.
  10. Select Add Copy Rule.

    Select the Date dimension and add the new corresponding parameters for “From” and “To”.

  11. Select Save Data Action.
    A completed copy step with parameters for the date dimension

Results

You now have a copy step that will copy data from an Actual version, using parameters for the source date and target date.

Create a Cross-Model Copy Step

Context

To copy data from one model to another, you can use a cross-model copy step. This step includes mapping options to let you choose which dimensions will be copied and where they will be copied to.

Procedure

  1. Create a new data action and select a Finance model as the default model.
  2. Select (Add Cross-Model Copy Step) and type a name and description for the step.

    We will call this step “Transfer to Finance”.

  3. In the Source Model dialog, choose the Sales model from Create a Copy Step with Parameters .
  4. Select Add Filter to filter the data that will be copied.

    For this example, filter the Version dimension to a Plan version.

    Filter the Measure to only include “Sales Discounts” and “Gross Sales”.

  5. In the Mapping section, define how the data will be mapped from the source model to the dimensions of the target model.
    Use the following mapping:
    • Map the Entity, Product, and Date dimensions to the corresponding Finance model dimensions.

    • Select the “Unassigned” member for the default value on the Flow dimension and Partner Entity dimension.

    • Select the “Sales Plan” member for the default value on the Audit dimension to indicate where the data is coming from.

    • The Measure dimension is automatically mapped to the G/L Account, but further configuration is needed.

    • The Customer and SalesOrg dimensions do not correspond to any dimensions in the Finance model, so these dimensions can be ignored.

  6. Select the Measure dimension to further configure the mapping.
  7. From the Source Members Without Rules list, select (+) to add a copy rules for a member.

    In this example, "Gross Sales" and "Discounts" from the source dimension will be mapped to "Gross Sales" and "Sales Discounts - Other" in the target dimension.

  8. Select Done.
    A completed cross-model copy step

Results

You now have a cross-model copy step that will copy data from a Sales model to a Finance model when triggered in a story or analytic application.