Skip to Content

xP&A CX Commercial Planning - Manage data loads for xP&A Commercial Planning

This tutorial will show you how to set up data loads from and into Sales and Marketing Planning in SAP Analytics Cloud
You will learn
  • how to set up connectivity to cloud integration flows for loading data between SAP Integrated Business Planning for Demand, SAP S/4HANA and SAP CX Commercial Planning content in SAP Analytics Cloud.
  • how to use parameters and initialize cloud integration flows via SAP Analytics Cloud multi actions
Simon KranigAugust 7, 2024
Created by
HeGro
November 9, 2023
Contributors
HeGro

Prerequisites

In the previous tutorial xP&A Commercial Planning - How to set up system connections you have set up the initial connectivity between SAP Integrated Business Planning for Demand, SAP Cloud Integration Suite and SAP Analytics Cloud and created a Process Integration Runtime. In this tutorial you will learn how to leverage these connections to manage the data loads between those respective applications.

Each of the integration flows offered in the package SAP Commercial Planning is related to either the sales planning or marketing planning data model and is used for transfer of data labeled in the honeycombs highlighted in green in the picture below.

OverviewPicture

Let’s have a look at the steps ahead

  • Create an API connection in SAP Analytics Cloud to be used by the multi actions
  • Customize multi actions with API endpoints and parameters
  • Initialize the integration flow data loads via multi actions

So let us get started.

  • Step 1

    To be able to initialize integration flows from SAP Analytics Cloud you will need to set up a connection of type HTTP API. This connection will need to use the service key credentials from your SAP Process Integration Runtime, so let’s go there.

    Start your browser and go to your SAP BTP Cockpit. Open the Services section and click on Instances and Subscriptions

    To quickly locate your process integration runtime service you can use the drop downs on top:

    In the service drop down, filter for Process Integration Runtime. In the plans drop down, filter for integration-flow.

    Hint: This should be the same one you had used to set up the flows during the tutorial xP&A Commercial Planning - How to set up system connections

    OpenBTP

    Once you have located the correct one in the list of instances click on the Key link in the Credentials column. You will get pop up displaying the credential details for OAuth authentication.

    GetOauthKey

    Take a note of:

    • clientid
    • clientsecret
    • url
    • tokenurl

    Now that you have retrieved the credentials head over to the next step to retrieve the API end point for your connection

  • Step 2

    In case you have not worked through the previous tutorial xP&A Commercial Planning - How to set up system connections for defining the endpoints for each integration flow in step 10, this step will show you an easy way to get the defined endpoints for each flow.

    Head over to your Integration Suite instance. In section Monitor click on Integrations.

    OpenMonitorIntegrations

    In the search field enter market which should give you any of the integration flows being part of the SAP Commercial Planning package. Click on one of the search results.

    GetEndpointUrl

    On the right hand-side under tab Endpoints, you can find the Endpoint for the particular flow.

    Note down the whole URL. You will need the part in the beginning of the URL (anything before /http/<name of flow endpoint>) for the general connection set up.

    When calling the individual endpoints of each flow afterwards by multi action, you will need the base URL plus individual flow suffix.

    Now that we have the credentials, the URL and the endpoint(s), let us create the HTTP API connection in SAP Analytics Cloud.

  • Step 3

    In SAP Analytics Cloud click on menu entry Connection.

    SacConnection

    and then on the + icon to add the new connection

    AddConnection

    Please choose the connection type HTTP API.

    TypeHttpApi

    You will get a pop up to enter the connection details

    Provide the following details

    FieldName
    Connection Nametechnical name of the connection
    Descriptiondescription for the connection
    Data Service URLThe URL as retrieved in step 1
    Authentication Typeset to OAuth 2.0 Client Credentials
    OAuth Client IDclientid as retrieved in step 1
    Secretclientsecret as retrieved in step 1
    Token URLtokenurl as retrieved in step 1

    Once you have entered all details click on the Create button to have your connection created.

    TypeHttpApi
  • Step 4

    Let’s have a look at the Multi Actions now.

    You can find the list of the multi actions delivered with the content package and their integration flows for transferring data in the table below. You can find more information on the individual cloud integration flows in their package documentation on SAP Business Accelerator Hub.

    Multi ActionIntegration FlowSourceTarget
    SAP_MKT_IM_MarketingPlanning_LoadPricesSend SAP S/4HANA prices to SAP Analytics Cloud Marketing modelSAP S/4HANASAP Analytics Cloud
    SAP_MKT_IM_MarketingPlanning_LoadBaselineQuantitiesSend IBP for Demand baseline to SAP Analytics Cloud Marketing modelSAP IBP for DemandSAP Analytics Cloud
    SAP_MKT_IM_MarketingPlanning_SendMarketingExpensesSend SAP Analytics Cloud Marketing model drivers to IBP for DemandSAP Analytics CloudSAP IBP for Demand
    SAP_SD_IM_InboundBaselineQuantitiesFromIBPSend IBP for Demand baseline to SAP Analytics Cloud Sales modelSAP IBP for DemandSAP Analytics Cloud
    SAP_SD_IM_OutboundSpendToIBPSend SAP Analytics Cloud Sales model drivers to IBP for DemandSAP Analytics CloudSAP IBP for Demand

    The set up of the multi actions for all flows follows a similar scheme.

    The following points need to be configured in all of the multi actions

    • the connection to be used
    • the URL to be called for the respective API end point
    • parameters and their values to be passed in the body

    Let’s use the multi action SAP_MKT_IM_MarketingPlanning_LoadBaselineQuantities as an example.

    Please repeat these steps for all multi actions that you require.

    In the Files menu search for multi action SAP_MKT_IM_MarketingPlanning_LoadBaselineQuantities and open it

    OpenLoadBaselineMultiAction

    In the multi action screen, click on the API step in the middle of the screen. On the Step Details panel on the right-hand side you will need to finalize the details for the step.

    In field HTTP API Connection pick the connection you have set up in the previous step.

    In the field API URL you need to enter the API endpoint of your integration flow.

    This is:

    • The URL as determined in step 1
    • /http
    • the end point (e.g. /xpa_mkt_write2sac ) you have configured in the previous tutorial xP&A Commercial Planning - Data Integration in step 10 (or as retrieved in step 2 of this tutorial).

    Example: https://<host of your process integration runtime>/http/<your configured end point>

    ConfigLoadBaselineMultiAction

    In the Body input field you need to specify three parameters and their values for the integration flow:

    ParameterDescription
    modelIDtechnical SAC model id as data target for the integration flow; or in case of the model being the source of the integration flow the model to read data from
    calmonthFromstart date from which baseline quantities will be transferred
    calmonthToend date up to which baseline quantities will be transferred

    If you are working with the models as delivered by default, the parameter modelID is pointing to the correct model id already. In case you have created a copy of the model, make sure to insert the correct model id. The correct id can be found in the URL when opening your model from the File menu.

    FindModelId

    Parameters for calmonthFrom and calmonthTo are filled by parameters ${StartPeriod} and ${EndPeriod} respectively which will prompt you to enter a value when running the multi action.

    In the Response section, leave the option as displayed in the screen shot below.

    In section Request -> Method, leave the setting at Synchronous Return.

    ConfigLoadPricesMultiActionReturn

    Great, now that you have customized the multi actions, head over to the next step to see them in action

  • Step 5

    Now you are ready to get your multi actions started.

    Based on the different planning scenarios in the Commercial Planning package, the multi actions are linked in different stories. Hence, please find the story you need to open for each multi action in the table below:

    Multi ActionStory
    SAP_MKT_IM_MarketingPlanning_LoadPricesSAP_MKT_PortfolioPlanning_AdminPage
    SAP_MKT_IM_MarketingPlanning_LoadBaselineQuantitiesSAP_MKT_Marketing_AdminPage
    SAP_MKT_IM_MarketingPlanning_SendMarketingExpensesSAP_MKT_Marketing_AdminPage
    SAP_SD_IM_InboundBaselineQuantitiesFromIBPSAP_SD_SalesPlanning_AdminPage
    SAP_SD_IM_OutboundSpendToIBPSAP_SD_SalesPlanning_AdminPage

    To continue with our example, search for story SAP_MKT_Marketing_AdminPage
    in the File menu and open it.

    ConfigLoadBaselineMultiActionReturn

    Click on the Load Baseline Quantities multi action trigger to start the multi action.

    RunLoadBaselineMultiAction

    You will get a pop up to set the parameters for start and end period as seen before in the previous steps. Enter values for start and end period and click on Run

    EnterLoadBaselineParameters

    Now your multi action will call the cloud integration flow to pick up baseline quantity data from SAP Integrated Business Planning for Demand and push it into your SAP Analytics Cloud planning model.

    MultiActionRunning

    Once the job has finished, you will get a notification.

    MultiActionSuccess

    Please repeat steps 4 and 5 of this tutorial to get all of your multi actions ready.

  • Step 6

    Congratulations! You have now learned how to set up and initialize your integration jobs from within SAP Analytics Cloud. Visit our community page Extended Planning & Analysis Business Content.

Back to top