Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Chris_Tam
Explorer
Collecting ESG data within SAP Datasphere (DSP) and then calculating their GHG values with global emission factors has been a pretty smooth process. But collating and publishing those measures into SAP Sustainability Control Tower (SCT) has been way more onerous. With the new Datasphere Integration feature in the latest SCT release 2023-09-06, my life just became easier!

Here are some pointers on getting this running.

Datasphere transport tables and views from the Content Network


The first step was to grab the 'SAP Sustainability Control Tower Integration' content package from DSP's Content Network under the Business Content tile.
You will need to create a DSP space with Space Id = 'SAP_SCT' beforehand as this is where the content will import to


Integration Business Content from DSP Content Network


This package gave me the local tables for transporting my ESG calculations into SCT's DPI format, and the associated views for Emissions, People, Water withdrawal, etc., which SCT uses when pulling in the new data.

Datasphere OAuth credentials used by SCT


While still in DSP, create an OAuth client that SCT uses to fetch data from DSP. In DSP, under System | Administration | App Integration, create the following client in the OAuth Clients section:


Create OAuth client from DSP




  • Select Interactive Usage and API Access for the Purpose

  • Under Access, you will need to add Data Export Service

  • For the Redirect URI, it will be the root of your SCT application plus /launchpad#DataCollectionProcess-generateRefreshToken added to the end


Take note of the OAuth Client ID, Secret and Token URL as it is needed by the SCT application later

Configuring SAP BTP Cockpit


Now, head over to SAP BTP Cockpit and create a new destination for SCT using the OAuth connection above. From the Subaccount where your SCT application is running, create a destination:


Create destination from SCT Subaccount




  • Name the destination SAP_SCT_DATASPHERE (do not change this as SCT looks for this destination by name)

  • The Type will by HTTP, Proxy Type is Internet, Authentication is OAuth2RefreshToken, and check on Use default JDK truststore

  • For the URL, it will be the root of your DSP application plus /dwaas-core/odata/v4/consumption/relational/SAP_SCT/ added to the end

  • The Client ID, Client Secret and Token Service URL will be what you copied down from the section above


A word of warning here, if you "Check availability.." on this new destination, you will get a "401: Unauthorized" error. That's okay, the DSP URL is just a fragment and that warning is expected

And with that, you should be all set! SCT should now have the ability to pull data from the "Manage ESG Data" tile where you can find the Import from SAP Datasphere option.


Import from SAP Datasphere in SCT


The rest is simply following the UI to import, validate and publish the DSP data into SCT. So far, this import only supports new records and will warn of duplicate rows that are already in the SCT system. More info on this feature and it's limitations, can be found in the SCT help under the section 'Importing New Data from SAP Datasphere'.

Final thoughts


As I experimented through this new feature, these are some customizations I made for my use cases:

Customizing Business Content's DPI Views


To reduce the amount of data replication, I modified the DPI View's SQL statement to select directly from my existing ESG tables. As long as I maintained the view's dimension names and data types, I removed the need for copying data the provided local tables.

Configuring integration for different DSP spaces


One of the limitations of the Content Network is the hardcoded space that the tables and views get imported to (above, that is SAP_SCT). However, when configuring the destinations in BTP cockpit, you can see where the DSP space is specified. Once I copied the DPI views into my existing ESG spaces, I could change the URL to use those spaces instead. For example:

https://<my DSP system>/dwaas-core/odata/v4/consumption/relational/SAP_SCT/

to:


https://<my DSP system>/dwaas-core/odata/v4/consumption/relational/<my existing ESG space>/

With the flexibility in the DPI views and ability to connect to different DSP spaces, this allows me to manage multiple sets of ESG data and orchestrate the promotion of incremental ESG data from staging to production with ease.

Looking forward to the future integrations!
16 Comments
Labels in this area