Skip to Content

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.

Scope item: 1YB

We will:

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

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).

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

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.

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

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

To report this post you need to login first.

8 Comments

You must be Logged on to comment or reply to a post.

  1. 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

    (0) 
    1. 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

      (0) 
    2. Hoang Vu 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

       

      (0) 
  2. 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

    (0) 
    1. Hoang Vu 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
      • With communication arrangement SAP_COM_0087 you setup a import data connection
      • Technically both are different as with a live data connection you only keep metadata information in SAP Analytics Cloud while with a import data connection the data from S/4HANA Cloud is being uploaded into the database of SAP Analytics Cloud
      • If I find the time I will add a section to this blog on how to setup SAP_COM_0087 😉

      regarding question 2:

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

      Regards,

      Hoang

      (0) 

Leave a Reply