SAP Analytics Cloud supports powerful location analytics with various map layers. For Import data models, Location Dimensions can be defined as spatial data to build a Geo Map. In this blog, let us learn how to consume spatial data from BW4HANA as Live Connection to build a Geo Map.

Required Version:

  • SAP Analytics Cloud 2019.4 and above
  • BW4HANA 2.0
  • BW Modelling plugin 1.21.6

* * *

Consider an example data with fields Country, Latitude, Longitude, Sales. To map the countries in Geo Map you need an Infoobject in BW4HANA enabled with Geographical attributes.

Info Object with Geographical Attributes

Create an Infoobject named ZCTRYCODE. Change the Geographical Type to Point Data since the example data have Latitude and Longitude.
sap-analytics-cloud-consuming-spatial-data-bw4hana-live-model-1

 

 

Once the Geographical type is assigned it will automatically add the display attributes – Latitude, Longitude, Altitude, Geo-Location Height and Geo-Location Precision to the info object.
sap-analytics-cloud-consuming-spatial-data-bw4hana-live-model-2

 

Activate Infoobject and load data

Activate the Infoobject and it will automatically create a table(‘/BIC/9<InfoobjectName>) in the underlying HANA system. The generated table has two fields SID and POINT. To populate the data to this table, load attribute data to the infoobject. Since the type is Point data, Latitude and Longitude should be loaded. Then the in-built function in the BW4HANA layer will convert the coordinates into Spatial Points.

This table will contain the spatial point as XML for each latitude and longitude record.
sap-analytics-cloud-consuming-spatial-data-bw4hana-live-model-4

 

Sample XML

<?xml version=”1.0″ standalone=”no”?>

<!DOCTYPE svg PUBLIC “-//W3C//DTD SVG 1.1//EN”

“https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd”>

<svg xmlns=”https://www.w3.org/2000/svg” version=”1.1″ viewBox=”178284.1664 -5243158.71714 .0002 .0002″>

<rect width=”0.1%” height=”0.1%” fill=”lightgrey” stroke=”none” x=”178284.1665″ y=”-5243158.71704″/>

</svg>

Consuming Geospatial Data

Consume the infoobject and create a query in BW4HANA. Then consume the query in SAC live model. The Geographical info object present in the query will act as a Location dimension.
sap-analytics-cloud-consuming-spatial-data-bw4hana-live-model-5

 

You can map the Location dimension and create map layers – Bubble, Heat Map and Flow.

Please note that Choropleth Layer is not supported.

 

Heat Map Layer

sap-analytics-cloud-consuming-spatial-data-bw4hana-live-model-6

 

Bubble Layer

sap-analytics-cloud-consuming-spatial-data-bw4hana-live-model-7

 

***

Reach out to our team here if you are interested in evaluating if SAP Analytics Cloud is right for you.

Subscribe to our Newsletter

5920 Windhaven Pkwy
Plano TX 75093.

+1 888-227-2794

+1 972-232-2233

+1 888-227-7192

solutions@visualbi.com