Enabling End-to-End SAP ECC and SAP Analytics Cloud Integration for Planning and Data Write-Back
Share

In today’s data-driven enterprise landscape, seamless integration between analytics platforms and transactional systems is crucial for real-time decision-making. While SAP Analytics Cloud (SAC) provides powerful analytics, planning and forecasting capabilities, many organizations continue to rely on SAP ECC as their core transactional system.

However, one of the key challenges in such environments is the lack of standard integration between SAP ECC and SAC. Unlike SAP BW or SAP S/4HANA, SAP ECC doesn’t provide a native connector that supports planning data write-back from SAC. As a result, organizations often require custom integration approaches to enable bidirectional data exchange between the two systems.

In this blog, I will walk through a custom SAP Analytics Cloud–SAP ECC integration that enables both data extraction from ECC into SAC and data write-back from SAC into ECC. This approach allows organizations to perform planning activities in SAC and subsequently update transactional or planning tables in ECC with the finalized data.

Exposing OData Services to SAP Analytics Cloud

  • OData services provide an effective mechanism for integrating SAP ECC with SAP Analytics Cloud. SAC supports native connectivity to OData services, making them a suitable option for extracting business data from ECC.
  • Communication between SAC and ECC takes place over HTTPS and can be secured using OAuth-based authentication mechanisms. In addition to supporting data extraction, OData services can also be leveraged as part of a custom data write-back solution.
  • Another key advantage of OData services is the ability to perform data selection, filtering, and aggregation at the ECC layer before the data is exposed to SAC. This helps optimize data transfer volumes and improves overall integration performance.

    Existing ECC- SAC Connection Options

    SAP Analytics Cloud provides multiple connectivity options for integrating with SAP ECC. While these standard connections support data acquisition and reporting scenarios, they do not provide a native mechanism for writing planning data back to ECC. To address this requirement, a custom integration approach using OData services, SAC APIs, and ECC development was implemented.

    aishunila14_0-1791966611167.png

Implementation Overview

Business Requirement: The requirement is to extract Cost Center actuals from SAP ECC into SAP Analytics Cloud (SAC) for Cost Center budget planning purposes. Once the planning process is completed in SAC, the resulting planned data must be written back to SAP ECC to update the corresponding planning or transactional tables.

The solution therefore consists of two key processes:

  • Data Extraction (ECC → SAC) – Retrieving actuals from ECC for planning and analysis. Data
  • Data Retraction (SAC → ECC) – Writing planned data from SAC back to ECC.

Data Extraction

The master data and transactional data required for planning are extracted from SAP ECC and loaded into SAP Analytics Cloud using OData services. These services act as the integration layer between ECC and SAC, enabling secure and efficient data transfer.

Connection Implementation:

In ECC

  • Create the required OData services in ECC system for master and transaction data.
  • Generate the OData URL for the corresponding datasets.
  • Configure and expose the OData service through the Basis team to enable external access.

In SAC

  • Create a Modeler based on the required dataset.
  • Establish a connection using the OData service configured in ECC.
  • Select the required dimensions, measures, fields, and filters from the exposed query.

Import the data into SAC for planning and reporting activities.

OData Service in ECC for Data Extraction

To enable data extraction from SAP ECC, a custom OData service project named ZGET_COSTCENTERSAC was created using SAP Gateway Service Builder. The service exposes Cost Center master data, transactional data, and hierarchy information required for planning in SAP Analytics Cloud. After activating the service, the corresponding OData endpoint (ZGET_COSTCENTERSAC_SRV) is generated and used to establish the connection between SAP ECC and SAP Analytics Cloud.

aishunila14_1-1791966693780.pngaishunila14_2-1791966728022.png

After activating the OData service, load the service metadata and verify that the service is accessible. Copy the generated OData service URL, as it will be used to create the connection between SAP ECC and SAP Analytics Cloud for data extraction.

To enable data extraction from SAP ECC, establish a secure connection between SAP ECC and SAP Analytics Cloud using SAP Cloud Connector and OData services. The following steps outline the configuration required to set up the connection.

Step 1: Configure Cloud Connector 
To establish connectivity between SAP ECC and SAP Analytics Cloud, add the ECC system as a Cloud-to-On-Premise system in SAP Cloud Connector. Enter the required system details, including the host, port, and protocol, as shown below.

aishunila14_3-1791966796339.png

Next, navigate to the Resources section and add the OData service path generated in ECC. Ensure that the service is exposed and accessible so that it can be consumed by SAP Analytics Cloud.

 

Step 2: Create OData Service Connection in SAC

Log in to SAP Analytics Cloud and navigate to Connections. Select Add Connection and choose OData Services as the data source.

aishunila14_4-1791966837222.pngaishunila14_5-1791966855019.png

Enter the required connection details, including the Connection Name, Location, and OData Service URL generated from SAP ECC. In this example, the connection is configured with the name PD1_SAC. Configure the authentication settings using the appropriate ECC user credentials and save the connection.

aishunila14_6-1791966991913.png

Authentication Details (username and password for the ECC system)

aishunila14_7-1791967030828.png

Import Data from SAP ECC to SAC

Log in to SAP Analytics Cloud and create a new Model to import data from the OData connection.

aishunila14_8-1791967062987.png

When prompted to select a data source, choose On-Premise OData Service and select the ECC connection created earlier (PD1_SAC) from the available connections.

aishunila14_9-1791967090462.png

Next, select the required dataset exposed through the OData service. In this example, separate datasets were created for master data, transactional data, and hierarchy data. Select the appropriate dataset based on your planning requirements and proceed with the data import.

aishunila14_10-1791967115799.png

Select the entire query set ,Enable the check box or drag and drop the ‘get_costcenterSet’ into right side.

aishunila14_11-1791967167327.pngaishunila14_12-1791967191235.png

After the required dimensions, measures, and filters are selected, import the data into the SAC model. The extracted master and transactional data is loaded into SAP Analytics Cloud through the OData connection established with SAP ECC and is now available for planning and analysis.

aishunila14_13-1791967218004.png

This completes the data extraction process from SAP ECC to SAC.

In this way, we can create OData services and connections to extract data from ECC to SAC.

Export Data from SAC to ECC

Once planning activities are completed in SAP Analytics Cloud, the planned data must be written back to SAP ECC to update the corresponding business tables. This write-back process is implemented using SAC APIs, custom ABAP development, standard SAP BAPIs, and OData services.

Process in SAC

Step 1: Create an authentication client.

Navigate to System → Administration → App Integration in SAP Analytics Cloud.

aishunila14_14-1791967262067.png

Copy the Token URL from here.

aishunila14_16-1791967428478.png

Create an Authentication Client and Copy the Client ID and Client Secret generated after creating the authorization Client.

aishunila14_17-1791967463262.png

Select the following settings: Purpose as API Access, Access as Data Export Service, Authorization Grant as Client Credentials, and Token Lifetime as 1 day.

Step 2: In SAP Analytics Cloud, create an API Subscription for the planning model.

aishunila14_18-1791967539187.png

In this example, the COSTCENTER model is used for creating the API Subscription.

Open the model and navigate to Data Management → API Subscription.

aishunila14_19-1791967617972.pngaishunila14_20-1791967639586.pngaishunila14_21-1791967656700.png

Create a new API Subscription and, if required, apply filters and member selections to limit the data returned by the API.

aishunila14_22-1791967737329.png

After creating the subscription, copy the generated API URL, which will be used to retrieve data from the SAC model.

aishunila14_23-1791967768030.png

Verify the API URL by opening it in a browser or API testing tool and confirm that the expected data is returned successfully.

In ECC

Step 1: Create a custom table to store the SAC integration details, including the API URL, Client ID, Client Secret, and Token URL.

Step 2: Create a custom ABAP program to update the required SAP tables using standard BAPIs.

  • The planned data retrieved from SAC is filtered based on parameters such as Fiscal Year, Period, and Data Type (Planned/Actual). Configure these values as input parameters on the program selection screen.
  • Read the SAC integration details from the custom table and generate an authentication token. Use the generated token to retrieve data from the SAC API endpoint.
  • Deserialize the API response and map the required data to the corresponding BAPI structures.
  • Once the BAPIs are executed successfully, the target SAP tables are updated with the data received from SAC.

Instead of manually executing the program to update ECC tables, the write-back process can be triggered directly from SAP Analytics Cloud by passing the required parameters. To enable this, a custom OData service with a CREATE method was developed.

Step 3: Create a custom OData service with a CREATE method to trigger the write-back process from SAC. The custom ABAP program is configured to run as a background job when the service is executed, eliminating the need for manual program execution.

Step 4: Execute the OData service created for write-back, load the service metadata, and copy the generated service URL.

aishunila14_24-1791967801643.png

Step 5: Create an HTTP-based OData connection in SAP Analytics Cloud using the OData service URL generated in the previous step.

aishunila14_25-1791967822337.png

Step 6: Execute the OData service and select the required entity set. Enter the necessary parameters, including Fiscal Year, Period From, Period To, and Version. Once the parameters are provided, execute the service and copy the generated URL containing the entity set and parameter values.

aishunila14_26-1791967924370.png

Replace HTTP with HTTPS in the generated URL and update the port number as required. Use the modified URL to create an HTTP API connection in SAP Analytics Cloud for triggering data write-back to SAP ECC.

aishunila14_27-1791967956182.pngaishunila14_28-1791968045038.png

Note: Each time the OData service is executed, the corresponding background job is triggered in SAP ECC. The generated URLs are used while configuring the Multi Action in SAP Analytics Cloud, allowing the write-back process to be initiated directly from SAC. The execution status of the background job can be monitored using transaction SM37 in SAP ECC.

Triggering Data Write-Back from SAC

The data write-back process is triggered using the Multi Action feature in SAP Analytics Cloud. Multi Actions enable users to automate and execute a sequence of planning and integration tasks, including calling external APIs and triggering processes in SAP ECC.

Step 1:  Open the Multi Actions Workspace

In SAP Analytics Cloud, navigate to the Multi Actions section to create or manage the Multi Action that will be used to trigger the data write-back process to SAP ECC.

aishunila14_29-1791968104376.png

Step 2:  Create a New Multi Action

Within the Multi Actions workspace, create a new Multi Action that will be used to configure and trigger the SAP ECC write-back process.

aishunila14_30-1791968133062.png

Step 3: Create a Multi Action with an API Step

Create a new Multi Action and add an API Step. This API Step will be used to invoke the ECC OData service and trigger the data write-back process from SAP Analytics Cloud.

aishunila14_31-1791968155802.png

Note: The custom ABAP program created in SAP ECC requires input parameters such as Fiscal Year, Period From, Period To, and Version. These parameters must be defined in the Multi Action and passed to the ECC OData service during execution to ensure that the correct planning data is processed and updated.

Step 4: Create Input Parameters in the Multi Action

Create the required input parameters in the Multi Action to capture and pass values from SAP Analytics Cloud to SAP ECC during execution. In this example, parameters such as Fiscal Year, Period From, Period To, and Version are configured and passed to the ECC write-back service.

aishunila14_32-1791968203571.pngaishunila14_33-1791968223393.png

Step 5: Configure the API Step

In the API Step, select the previously created connection and enter the API URL generated earlier. Use the copied URL without the entity set as the API endpoint.

aishunila14_34-1791968314049.png

Enable CSRF Token handling and provide the URL containing the entity set as the CSRF Token URL. Then, map the required input parameters in the request body so they can be passed from SAP Analytics Cloud to SAP ECC during execution.

aishunila14_35-1791968337141.png

Save the Multi Action after completing the configuration.

Step 6: Trigger the Write-Back Process from SAC

The configured Multi Action can be triggered from a SAP Analytics Cloud landing page, story, or planning application. To make it accessible to users, bind the saved Multi Action to the required form or interface using the appropriate scripting logic.

aishunila14_36-1791968362585.png

Step 7:  Execute the Multi Action

When the Multi Action is triggered, a dialog box appears prompting the user to enter the required parameters configured during the Multi Action setup, such as Fiscal Year, Period From, Period To, and Version. After entering the required values, click Update Table to initiate the write-back process.

aishunila14_37-1791968487074.png

Note: The planned data corresponding to the selected fiscal year, period, and version is transferred from SAP Analytics Cloud to SAP ECC. Once the Update Table button is clicked, the background job is triggered in ECC, and the corresponding BAPIs are executed to update the target SAP tables.

Conclusion

Integrating SAP ECC with SAP Analytics Cloud enables organizations to bridge the gap between operational and planning systems. By leveraging OData services for data extraction and custom APIs for write-back, businesses can establish a connected planning process that allows users to plan in SAC while keeping ECC updated with the latest approved data. This approach enhances collaboration, improves data accuracy, and supports more informed business decision-making.

 

 

 

  Read More Technology Blog Posts by Members articles 

#abap

By ali

Leave a Reply