| Analytics , SAP Analytics Cloud , SAP Business Warehouse , SAP BW ,
SAP Analytics Cloud can be directly connected to SAP BW using the LIVE DATA CONNECTIONS, this type of connectivity will always let the data remain in SAP BW behind the corporate firewall. We noticed that a lot of customers are not yet on the SAP Netweaver version 7.52, so we documented the steps to configure connectivity for SAP Netweaver releases lower than 7.52. Follow the steps to setup the live connection type for SAP BW.
Step 1: Configure CORS
Add the following content in the rewrite file.
Note: Replace <HOSTNAME> with your SAP Analytics Cloud host name.
if %{HEADER:isSACOriginAllowed} = true
setHeader isSACOriginAllowed false
if %{HEADER:ORIGIN} regimatch ^(https:\/\/)?<HOSTNAME> [AND]
if %{PATH} regimatch (\/sap(\(.*\))*\/bw\/ina\/*)
setHeader isSACOriginAllowed true
if %{HEADER:isSACOriginAllowed} = true [AND]
if %{REQUEST_METHOD} regimatch (GET|POST)
begin
setResponseHeader Access-Control-Allow-Origin %{HEADER:ORIGIN}
setResponseHeader Access-Control-Expose-Headers x-csrf-token,sap-rewriteurl,sap-url-session-id,sap-perf-fesrec,sap-system
setResponseHeader Access-Control-Allow-Credentials true
setResponseHeader Vary origin
end
if %{HEADER:isSACOriginAllowed} = true [AND]
if %{REQUEST_METHOD} stricmp OPTIONS
begin
regRewriteUrl ^/(.*) /sap/public/ping
setResponseHeader Access-Control-Allow-Origin %{HEADER:ORIGIN}
setResponseHeader Access-Control-Allow-Methods GET,POST
setResponseHeader Access-Control-Allow-Headers x-csrf-token,x-sap-cid,authorization,mysapsso2,x-request-with,sap-rewriteurl,sap-url-session-id,content-type
setResponseHeader Access-Control-Max-Age 600
setResponseHeader Access-Control-Allow-Credentials true
setResponseHeader Vary origin
removeResponseHeader Set-Cookie
removeResponseHeader Expires
end
Adjust ICM parameter pointing to the CORS file path.
icm/HTTP/mod_0 = PREFIX=/,FILE=<Path_To_CORS_Rewrite_File>
Restart ABAP Server.
Step 2: Add custom web content
Run transaction SE24, and create object ZCL_DUMMYAUTH_SERVICE
Go to the Interfaces tab, and add IF_HTTP_EXTENSION
Verify the below details under the Methods tab
Double click on IF_HTTP_EXTENSION~HANDLE_REQUEST and add the following code, and then SAVE and ACTIVATE. method IF_HTTP_EXTENSION~HANDLE_REQUEST.
DATA:
html_content TYPE string.
html_content = ‘<html><script type=”text/javascript”>window.close();</script></html>’.
server->response->set_cdata( data = html_content ).
endmethod.
Enter Transaction SICF, enter the path /sap/bw/ina, and then press Enter.
Under default_host -> sap -> bw, right click ina, then choose New Sub-Element.
In service name, enter auth, and click enter.
Add a description, and then navigate to Handler List tab, and enter ZCL_DUMMYAUTH_SERVICE
Save and return to the main menu.
Right click and test the service.
Make sure you are redirected to the login page, and not getting 404 page after login.
Step 3: Add BW Live connection in SAP Analytics Cloud
Log onto SAP Analytics Cloud and go to Main Menu -> Connection.
(Add Connection) -> Live Data Connection -> SAP BW.
Enter the connection name, and set the connection type to Direct and add your SAP BW host name, HTTPS port, and Client.
Under Authentication Method select SAML Single Sign On and click OK.
You should now be able to connect to SAP BW using the LIVE DATA CONNECTIVITY.