Skip to Content
Technical Articles
Author's profile photo Hoang Vu

SAP S/4HANA Cloud Integration | SAP Analytics Cloud

Overview

Let’s go through the steps on how to integrate SAP S/4HANA Cloud with SAP Analytics Cloud.

SAP Analytics Cloud is our strategic analytics tool, in which you analyse, report and forecast business data of your enterprise applications.

In our scenario the enterprise application is S/4HANA Cloud.

There are two options:

  • data connection
    • Are available for cloud and on premise data sources
    • Replicate data within SAP Analytics Cloud
    • Create new data models through the SAP Analytics Cloud Modeler
    • Update your data visualizations and stories when refreshed
  • live connection
    • Are available for cloud and on premise data sources
    • Do not replicate your data in SAP Analytics Cloud
    • Use existing data models for analysis
    • Update your data visualizations and stories with new data in real-time

For both we will:

  • setup integration: connect SAP Analytics Cloud with SAP S/4HANA Cloud
  • test integration: consume SAP S/4HANA Cloud service in SAP Analytics Cloud

Data connection

In our first scenario we will setup a data connection between SAP S/4HANA Cloud and SAP Analytics Cloud. These steps are also mentioned in the setup instructions of scope item 1YB.

Data connection – setup integration

In SAP S/4HANA Cloud:

Create communication system & user

  • Go to Communication Management
  • Communication Systems
  • New
  • Provide a system ID & system name (can be anything for this scenario, for example “SAC”)
  • Create
  • Provide a hostname (can be anything for this scenario, for example “SAC”)
  • Under User for Inbound Communication press on “+” & “New User”
  • Provide user name, description & password
  • Save
  • Choose your inbound user, then press OK
  • Create

Create communication arrangement

  • Go to Communication Management
  • Communication Arrangement
  • New
  • Choose scenario SAP_COM_0087 (SAP Analytics Cloud for Planning Integration)
  • Create
  • Under communication system choose your created communication system
  • Save

In SAP Analytics Cloud:

Create data connection

  • Go to Connection
  • Press on “+”
  • Choose Import Data Connection
  • Select SAP S/4HANA
  • Enter a connection name, for example “SAP S/4HANA Cloud”
  • Choose Basic Authentication
  • Type in your user and password, which you created earlier in S/4HANA Cloud
  • Save

Data connection – test integration

In SAP Analytics Cloud:

  • Go to Create
  • Models
  • Press on “+”
  • Get data from a datasource
  • Choose SAP S/4HANA
  • Choose your data connection
  • Create a new query
  • For example, choose the Business Partner API and select A_BusinessPartner
  • Choose field “Business Partner” and “BusinessPartnerName”
  • Under Models, go to Draft Data and select your Query
  • Once selected you should see the S/4HANA Cloud data

Live connection

In this scenario we will setup a live connection between SAP S/4HANA Cloud and SAP Analytics Cloud. These are prerequisite steps to implement scope item 1U8.

To setup the integration we need to:

  1. Connect SAP Analytics Cloud to the SAP Cloud Platform Identity Authentication Service of our SAP S/4HANA Cloud
  2. Setup live connection between SAP Analytics Cloud and SAP S/4HANA Cloud

What is SAP Cloud Platform Identity Authentication Service?

For SAP cloud applications the user accessing the system does not authenticate himself directly with the application but via an identity provider. By default this identity provider is SAP Cloud Platform Identity Authentication Service (formerly known as SAP Cloud Identity).

Live connection – setup integration

Connect SAP Analytics Cloud to the SAP Cloud Platform Identity Authentication Service

By default SAP Analytics Cloud and S/4HANA Cloud are configured to two separate SAP Cloud Platform Identity Authentication Service tenants. However for this setup to work, the user accessing the SAP Analytics Cloud has to be the same person extracting the data from S/4HANA Cloud.

This means we have to setup SAP Analytics Cloud to the SAP Cloud Platform Identity Authentication Service of S/4HANA Cloud.

Prerequisite:

  • You will require SYSTEM_OWNER permission in SAP Analytics Cloud
  • Note that only one user per system can hold this role

Steps in SAP Analytics Cloud:

  • Go to System –> Administration –> Security
  • Switch from SAP Cloud Identity (default) to SAML Single Sign-On (SSO)
  • Download the metadata.xml of SAP Analytics Cloud

Steps in SAP Cloud Platform Identity Authentication Service:

  • Access the SAP Cloud Platform Identity Authentication Service of your S/4HANA Cloud
  • Go to Applications & Resources –> Applications
  • Add application
  • Go to SAML 2.0 Configuration
  • Import metdata.xml from SAP Analytics Cloud
  • If successful, application name, endpoints and signing certificate are established
  • Export the metadata.xml under Applications & Resources –> Tenant Settings –> SAML 2.0 Configuration
  • Import metadata file into SAP Analytics Cloud

Now when accessing SAP Analytics Cloud, you will use the same identity provider as S/4HANA Cloud.

Setup live connection between SAP Analytics Cloud and SAP S/4HANA Cloud

Firstly we need to do some steps in SAP Analytics Cloud.

Steps in SAP Analytics Cloud:

  • Go to Connection
  • Create Live Data Connection –> S/4HANA
  • Set Connection Type to S/4HANA Cloud
  • Set Host to hostname of your S/4HANA Cloud system (my300xxx.s4hana.ondemand.com)
  • Set Default Language to EN
  • Set Authentication Method to OAuth 2 SAML Bearer Assertion
  • Note down provider name (will be required in S/4HANA Cloud)
  • Download Signing Certificate

We continue with the SAP S/4HANA Cloud configuration and come back later.

Steps in SAP S/4HANA Cloud:

  • Go to Communication Management –> Maintain Communication Users
  • Create user & password
  • Save
  • Go to Communication Management –> Communication Systems
  • Create new system
  • Choose created user
  • Under OAuth 2.0 Identity Provider mark “Enabled”, add provider name and signing certificate of SAP Analytics Cloud
  • Save
  • Go to Communication Management –> Communication Arrangements
  • Create new communication arrangement SAP Analytics Cloud Integration (SAP_COM_0065)
  • Choose created communication system
  • Save

Now back to SAP Analytics Cloud.

Steps in SAP Analytics Cloud:

  • Under Token Service User insert S/4HANA Cloud communication user name
  • Under Token Service Password insert S/4HANA Cloud communication user password
  • Under OAuth Scope add:
    • SAP_BW_INA_BATCHPROCESSING_HTTP SAP_BW_INA_GETCATALOG_HTTP SAP_BW_INA_GETRESPONSE_HTTP SAP_BW_INA_GETSERVERINFO_HTTP SAP_BW_INA_LOGOFF_HTTP SAP_BW_INA_VALUEHELP_HTTP
  • Save

Now you have established a live connection between SAP Analytics Cloud and SAP S/4HANA Cloud.

Live connection – test integration

To test the integration between SAP Analytics Cloud and SAP S/4HANA Cloud we will:

  • Setup custom CDS view in SAP S/4HANA Cloud
  • Setup custom analytical query in SAP S/4HANA Cloud
  • Create model in SAP Analytics Cloud
  • Create story in SAP Analytics Cloud

Setup CDS view in SAP S/4HANA Cloud

Scenario

We want to know total project hours per customer.

To do that we need to combine two CDS views into one custom CDS view

  • I_TimeSheetRecord for information on total project hours
  • I_FinancialPlanningEntryItem for information on customer

Steps in S/4HANA Cloud:

  • Go to Extensibility –> Custom CDS Views
  • Create new custom CDS view
  • Under Select Additional Scenarios mark Analytical
  • Choose your Primary Data Source (I_TimeSheetRecord)
  • Choose your Associated Data Source (I_FinancialPlanningEntryItem)
  • Bind the two Data Sources with Associated Data Source Field WBSElementInternalID
  • Select fields RecordedHours & Customer (will appear on the right side once selected)
  • Under Field Properties choose for RecordedHours as Aggregation “Sum”
  • Save & Publish

Setup custom analytical query in SAP S/4HANA Cloud

Steps in S/4HANA Cloud:

  • Go to Query Design –> Custom Analytical Query
  • Create new analytical query
  • Select your custom CDS view as Data Source
  • Select both fields Hours and Customer
  • Save & Publish

Create model in SAP Analytics Cloud

Steps in SAP Analytics Cloud:

  • Go to Create –> Model
  • Create a new model
  • Choose “Use a datasource”
  • Choose “Live Data connection”
  • Choose your S/4HANA Cloud system and search for “yy1”
  • Select your Data Source and name your model
  • Press OK
  • Rename description field to “Total project hours”
  • Save

Create story in SAP Analytics Cloud

Steps in SAP Analytics Cloud:

  • Go to Create –> Story
  • Select “Add a Canvas Page”
  • Choose “Add data”
  • Press on “Data acquired from an existing model”
  • Select your model
  • Click on “Data View” on the top left corner
  • Then choose “Chart”
  • Select as Measure “Total project hours”
  • Select as Dimension “Customer”
  • A column chart is displayed with total project hours per customer

Remark:

You only require a business user in S/4HANA Cloud if you want to create models and stories via a live connection. Once the story is published other SAC users can access your story without requiring a business user in S/4HANA Cloud.

Conclusion

And that is it! Leave your comments below if you have questions regarding any of the steps.

Useful links

Live connection to S/4HANA Cloud with OAuth

https://help.sap.com/doc/00f68c2e08b941f081002fd3691d86a7/release/en-US/0485d540e0b340a0bc0da86fe368997c.html

Integration Guide 1802

https://help.sap.com/doc/bdeb018c266f45b8b79af60461e5e964/1802%20500/en-US/loio8f37e2bdedf741d7b75cd7561cb813dd.pdf

Integration with SAP Analytics Cloud

https://help.sap.com/viewer/0f9408e4921e4ba3bb4a7a1f75f837a7/1802%20500/en-US/3164d452b44440b1bffd2fc3b1d30692.html

Enabling a custom SAML identity provider

https://help.sap.com/doc/00f68c2e08b941f081002fd3691d86a7/release/en-US/3651184dad944aa2b361ad029a7a8cae.html

SAP Cloud Platform Identity Authentication Service

https://help.hana.ondemand.com/cloud_identity/frameset.htm?228428f9f476449cafd841a68d75b

https://cloudplatform.sap.com/dmp/capabilities/us/product/SAP-Cloud-Platform-Identity-Authentication/06dbcc67-ab2a-4d2e-aff1-28dfaaf95063

Assigned Tags

      12 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Hemsagar Elugu
      Hemsagar Elugu

      Thankyou  Hoang Vu

      Fantastic blog

      Author's profile photo Jens Neumann
      Jens Neumann

      Very elucidating!

       

      Author's profile photo Mariya Yanush
      Mariya Yanush

      Brilliant article Hoang! I have already one question on integration, will write you a Mail 🙂

       

      Author's profile photo Johannes Bacher
      Johannes Bacher

      Hello Hoang, this is very helpful - thanks a lot! It worked for me just as you described!

      I have another question: I see in my S/4HANA Cloud tenant there is a tile called "Create tile for Analytics cloud story". When I click it i get an error saying "Error when retriving BOC stories from API", the details are:

      {"error":{"code":"BOC_STORY/484","message":{"lang":"de","value":"Verbindung zum BOC-System fehlgeschlagen"},"innererror":{"application":{"component_id":"CA-GTF-VDM-BOC","service_namespace":"/SAP/","service_id":"BOCSTORY","service_version":"0001"},"transactionid":"8EBD6AED4EAC4B7A9E5E885BC0C0039A","timestamp":"20180801095032.8268650","Error_Resolution":{"SAP_Transaction":"For backend administrators: run transaction /IWFND/ERROR_LOG on SAP Gateway hub system and search for entries with the timestamp above for more details","SAP_Note":"See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)"},"errordetails":[{"code":"/IWBEP/CX_MGW_TECH_EXCEPTION","message":"Verbindung zum BOC-System fehlgeschlagen","propertyref":"","severity":"error","target":""}]}}}

       

      Have you tried this? I would assume, with this tile i can somehow create a tile in the S4HC launchpad, which will take the user directly to a SAC story. That would be nice! But obviously some more integration setup is required.

      I would be glad for your help,

      thank you, Johannes

      Author's profile photo Diego Lombardini
      Diego Lombardini

      Hi Johannes,

      I am facing the same problem. I believe it is related to the SAP_COM_0065 setup. In order to make this communication work, I had to untick the Service Status Active flag for the Retrieve Stories function (as per blog that recommended this setting). Will see if with 1808 the guides are updated and issues resolved.

      Cheers,

      Diego

      Author's profile photo Hoang Vu
      Hoang Vu
      Blog Post Author

      Hi Johannes,

      this seems to be a newer feature, I have not tried it so far. But as you mentioned, I assume you would retrieve the SAP Analytics Cloud stories in this S/4HANA Cloud application.

      I have found following links regarding app "Create Tile for Analytics Cloud Stories":

      Also in the documentation for SAP Analytics Cloud Integration under 3e it states to deselect this option, maybe it can't be used just yet:

      • Under Outbound Services -> Retrieve Stories -> Service Status, deselect the Active checkbox

      I have tried it myself by

      • creating an OAuth client in SAP Analytics Cloud
      • maintain this OAuth client in SAP S/4HANA Cloud as outbound communication user in communication system
      • maintained Authorization & Token URL of SAP Analytics Cloud in SAP S/4HANA Cloud communication system
      • set flag "Retrieve Stories" to active in SAP S/4HANA Cloud

      Unfortunately I am still receiving the same error as you did.

      If you want to use this application, maybe you can create a ticket on component CA-GTF-VDM-BOC, they might be able to help you.

      Let me know how you are progressing!

      Regards,

      Hoang

       

      Author's profile photo Amith Nair
      Amith Nair

      Hi Hoang,

      Thank you for this nicely documented article:

      I have two Questions essentially:

       

      1. In your blog you have used SAP_COM_0065 however in the Scope item 1YB it make use of Comm. arrangement: SAP_COM_0087. Any specific reason why we are using SAP_COM_0065.
      2. In SAP Analytics Cloud, Under OAuth Scope add:

      SAP_BW_INA_BATCHPROCESSING_HTTP SAP_BW_INA_GETCATALOG_HTTP SAP_BW_INA_GETRESPONSE_HTTP SAP_BW_INA_GETSERVERINFO_HTTP SAP_BW_INA_LOGOFF_HTTP SAP_BW_INA_VALUEHELP_HTTP

      Is this OAuth Scope ID going to be the same for all systems?

       

      Thank you! Amith Nair

      Author's profile photo Hoang Vu
      Hoang Vu
      Blog Post Author

      Hi Amith,

      regarding question 1:

      • I have followed below documentation
      • In both blogs communication arrangement SAP_COM_0065 is being used as we want to setup a live data connection, this is for scope item 1U8
      • With communication arrangement SAP_COM_0087 you setup a data connection as mentioned in scope item 1YB
      • I have updated the blog accordingly

      regarding question 2:

      • yes it would be the same for all systems
      • I got the OAuth Scope ID from the documentation above

      Regards,

      Hoang

      Author's profile photo Johannes Bacher
      Johannes Bacher

      Hello Hoang,

      may I ask a question: If I want to use the S/4HANA Cloud API CO_PSWBSELEMENT_MASTER_DATA_RE (Web Service for WBS Element Replication), it says in the documentation “The data replication is performed using DRF Data Replication Framework”. Can you explain what this means?

      On S/4HANA Cloud side, it is a SOAP service (in the API hub). Is the DRF part on the target system side?

      And would I still use CPI for this, or not?

      Sorry for these basic questions – i am new in this area.

      thank you,

      Johannes

      Author's profile photo Hoang Vu
      Hoang Vu
      Blog Post Author

      Hi Johannes,

      the DRF has nothing to do with the scenario mentioned in this blog, but maybe I can still help you out 😉

      DRF is part of S/4HANA Cloud and enables you to replicate data out of the system.

      Yes, you could use CPI, so replicate data with DRF from S/4HANA Cloud to CPI and then transform it to the structure of your receiving system.

      Hope this helps.

      Hoang

       

      Author's profile photo Giovanni Leggio
      Giovanni Leggio

      https://rapid.sap.com/bp/#/scopeitems/1YB

      Author's profile photo Giovanni Leggio
      Giovanni Leggio

      More integration announced!

      https://blogs.sap.com/2020/10/06/s-4hana-on-premise-integration-of-sap-analytics-cloud-optimizes-business-user-experience/