Skip to Content
Technical Articles
Author's profile photo Kundan Gandhi

S/4HANA Connection with SAC (SAP Analytics Cloud) using cors

Overview

This blog post will explain how to connect SAC (SAP Analytics Cloud) with S/4HANA. Below diagram shows architecture layout.

(reference from help.sap.com)

 

Prerequisites

Ensure that the InA package (/sap/bw/ina/service/v2) or a higher-level package on your SAP NetWeaver system is configured for basic authentication..

Note
To check if the Ina package is enabled, open the following URL in your browser: https://<Your_ABAP_System>/sap/bw/ina/GetServerInfo?sap-client=<Your_Client_ID>. Make sure you are prompted for user credentions, and after login you get a JSON response. Replace <Your_ABAP_System> with your ABAP system host, and <Your_Client_ID> with your SAP client ID.

 

Procedure

 

Configure Cross-Origin Resource Sharing (CORS) support on your SAP NetWeaver system.

If you are using SAP NetWeaver version 7.52 or above, you must apply SAP Note 2531811 or import ABAP 7.52 SP1 to fix CORS related issues in SAP NetWeaver, and then follow the steps below.

a. Immediately enable CORS in your system parameters without restarting SAP NetWeaver.

These changes will disappear after a restart of your SAP NetWeaver system.
  1. Enter transaction code: RZ11.
  2. Enter Parameter: icf/cors_enabled
  3. Select Display.
  4. Set Value to 1.

b. Permanently enable CORS in your system parameters.

  1. Enter transaction code: rz10
  2. In Profile, choose DEFAULT from the list.
  3. Select Extended Maintenance.
  4. Click Change.
  5. Click Start of the navigation pathParameter Next navigation step CreateEnd of the navigation path.
  6. icf/cors_enabled.
  7. Set the parameter value to 1.
  8. Click Exit and Set the parameter name to Yes to save.
  9. Click Profile | Save.
  10. Click Yes to activate.
  11. Click Continue.
  12. Click Exit and Yes to log off.
  13. Restart SAP Netweaver for the changes to take effect.

c. Add SAP Analytics Cloud (SAC) to the HTTP whitelist.

  1. Enter transaction code: /NUCONCOCKPIT.
  2. Change Scenario to HTTP Whitelist Scenario.
  3. Change the Mode of Cross-origin Resource Sharing to Active Check.
  4. Double-click Cross-origin Resource Sharing.
  5. Select the Display/Change icon.
  6. Under Whitelist, select the Add icon, and in the Input Window, add the following information:
  • Service Path: Add /sap/bw/ina.
  • Host rule: Add your SAP Analytics CloudSet the parameter name to host. For example, mytenant.us1.sapbusinessobjects.cloud.
  • Allowed Methods: Select GET, HEAD, POST, and OPTIONS.
  • Add the following to Allowed Headers:
x-csrf-token,content-type,x-sap-cid,mysapsso2,authorization,accept-language
  • Add the following to Exposed Headers:
x-csrf-token,sap-rewriteurl,sap-url-session-id
  • Allow Credentials: Ensure this is selected.

d. Save this information.

Verify end-users’ web browser configuration and access.

Your end users’ web browsers must be configured to:

  • Allow pop-up windows from the SAP Analytics Cloud domain: [*.]sapbusinessobjects.cloud.
  • Allow 3rd party cookies from the SAP S/4HANA server’s domain or the domain of your reverse proxy. For example, in Internet Explorer 11, go to Start of the navigation pathInternet Options Next navigation step Security Next navigation step Trusted SitesEnd of the navigation path, add your domain name, then select Enable Protected Mode.

Add a remote system to SAP Analytics Cloud:

  1. Go to Start of the navigation path (Main Menu) Next navigation step  Connection Next navigation step Connections Next navigation step  (Add Connection)End of the navigation path

    The Select a datasource dialog will appear.

  2. Expand Connect to Live Data and select SAP S/4HANA.
  3. In the dialog, enter a name and description for your connection.
    The connection name cannot be changed later.
  4. Set the connection type to Direct.
  5. Add your SAP S/4HANA host name, HTTPS port, and Client.
  6. (Optional) Choose a Default Language from the list.
    This language will always be used for this connection and cannot be changed by users without administrator privileges.
    You must know which languages are installed on your SAP S/4HANA system before adding a language code. If the language code you enter is invalid, SAP Analytics Cloud will default to the language specified by your system metadata.
  7. Under Authentication Method select User Name and Password.
  8. Enter an SAP S/4HANA user name and password.
  9. Select OK.

 

Known Issue

You may see error as below after doing all configuration, if ssl is not configured for S/4HANA system.

Solution – You have to configure SSL for S/4HANA system using this blog post

Conclusion

The connection is saved. Only the user whose credentials you added will have access to the live data connection.

Assigned Tags

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

      great stuff, much obliged!

      Author's profile photo Muhammad Shafiq
      Muhammad Shafiq

      HI All,

       

      We want to connect our SAP BO Cloud to S4HANA on premise system through Live using CORS or Via Reverse Proxy.

      Kindly suggest prerequisite configuration for  of live connection to S4hana on premise.

      We are stuck right now.no solution working.

       

      Regards,

      Muhammad Shafiq

       

       

      Author's profile photo Phil Cooley
      Phil Cooley

      Thanks for this - S/4HANA is specifically mentioned but does this also apply to SAP Business Suite systems? Just checking.

      Author's profile photo Kundan Gandhi
      Kundan Gandhi
      Blog Post Author

      Hi Phil,

      We have not tried it. However we have connected BW on Oracle to SAC.

      So fundamentally,  you can connect Business Suites also.

       

      Regards,

      Kundan

      Author's profile photo Laszlo Kajan
      Laszlo Kajan

      Hello Phil,

      did you manage to connect it to your Business Suite system? - I'm very curious.

      Best regards, Laszlo

      Author's profile photo Lokesh Royal Avisani
      Lokesh Royal Avisani

      Thanks for the detailed explanation kundan

      But I have one query is this live connections with core is configured only in SAP netweaver systems or S4HANA abap stack systems?

      Author's profile photo Vincent Rochat
      Vincent Rochat

      What are the permissions needed for the S4/HANA user?

       

      Author's profile photo Alfonso Uscategui
      Alfonso Uscategui

      Dear:

      What is the procedure when S/4 HANA system is HEC-based?

      Thanks

      Author's profile photo Vinod Malatkar
      Vinod Malatkar

      Thank you! Helped me resolve connectivity issue with SAML Authentication.

       

      Author's profile photo Muhammad Ali
      Muhammad Ali

      Hi

      Can you please let me know in detials that how to connect SAP S/4 HANA rise with SAP 2020 with SAC trial offer?

      thank youin advance

      Muhammad Ali Awan

       

      Author's profile photo Kundan Gandhi
      Kundan Gandhi
      Blog Post Author

      Hello Muhammad,

       

      In my view, its a same procedure which has been mentioned the in blog. Please let me know - if you are getting any error.

       

      Regards,

      Kundan

      Author's profile photo Sergio Oliveira
      Sergio Oliveira

      Hello and thank you for the great blog post!

      I was able to configure CORS and create the Live Data Connection to our on-premise S4HANA system by following your post (and also to a secondary NW 7.52 system we have).

       

      However on SAC I can't use this Live Data Connection to build anything such as a Dataset or Model.

      Datasets: Only provide me the Live Data option to SAP HANA (not S4HANA)

      Modeler: Only provides options for HANA, BW, BPC and SAP Universe.

      Also tried other things such as Analytical Applications, Data Analyzer, etc. The type of connection I created does not show as a data source option for any of those.

      So, my question is. What is the purpose of this type of connection withn SAC? What kind of Analytics resources should be able to consume this connection?