Skip to Content
Technical Articles
Author's profile photo Arno Klein

Choropleth Layer integration with SAP BW Live Connection in SAP Analytics Cloud

Introduction

Geo Maps are a good way to visualize relationships of larger datasets. These chart types are known to be most convenient to understand and process information quickly.

SAP Analytics Cloud provides different Geo Maps related to either point based or shape based layers.

Point based layers refer to a certain geographical point in the landscape like a customer address or a plant location. SAP Analytics Cloud offers three chart types to display geographical information:

  • Bubble Layer
  • Heat Map Layer
  • Flow Layers

Shape based layers display a geographical area or a polygon, like a sales region or a zip code area. The information is saved in a shape file and in SAP Analytics Cloud, it can be consumed via a Choropleth layer.

The idea of a Choropleth layer is to display aggregated information via regions that are based on hierarchies. This offers a drill down functionality.

Update: new Blog online about Custom Choropleth Layer integration with SAP BW Live Connection

 

Choropleth%20layer%20in%20SAP%20Analytics%20Cloud

Drill Down functionality in a Choropleth layer

 

In SAP Analytics Cloud, point based layer types can be used out of the box, whereas Choropleth layers using an SAP BW Live connection need additional backend configuration.

This blog post shows the different backend configuration steps needed.

 

Prerequisites

Before jumping into the detailed steps, the following prerequisites need to be fulfilled:

SAP HANA

  • SAP HANA is required for enabling Geo Maps with BW Live
  • For SAP HANA SPS 11, minimum version is 112.07
  • For SAP HANA SPS 12, minimum version is 122.03

SAP BW

  • SAP BW 7.5 SP16 on HANA or SAP BW/4HANA 2.0 SP4 as a minimum

The Choropleth scenario does not require an additional license, see SNote 2395407.

 

SAP HANA

As a first step, create a Spatial Reference Identifier (SRID) and set it to “3857” which is required by SAP Analytics Cloud. You can do this via SQL console. Detailed steps can be found in SNote 2395407.

Afterwards, download the Spatial Data Delivery Unit (DU) from the SAP Support Portal (search for “GEO CONTENT ANALYTICS“). The package contains two .tgz files which can be imported into your SAP HANA system. Before you start the import process, please make sure to increase the memory size of your SAP HANA Studio installation. This can be done via hdbstudio.ini file (values Xmx = 8192m, XX:MaxPermSize=5120m).

The DU contains approximately 200.000 regions including information of their geographical shapes and locations and the hierarchy, for example that Baden-Württemberg belongs to Germany.

That’s all you need to do on your SAP HANA system.

 

SAP BW

 On the SAP BW side, activate the following BI-Content InfoObjects (in that order):

  • 0LATITUDE       (latitude information)
  • 0LONGITUDE   (longitude information)
  • 0GSHAPE3857 (used to request shape information)
  • 0GEOFEATID    (link to the regions stored in SAP HANA)

Next, flag the characteristic as a geo dimension.Flag%20the%20characteristic%20with%20Point%20Data%20%28Type2%29

Flag the characteristic as Point Data (Type2)

 

This can be done by selecting “Point Data (Attributes 0Longitude and 0Latitude)” on tab “BI Clients”, section “Geographical” of the characteristic.

Check%20the%20attributes%20of%20the%20geo%20enabled%20characteristic

Attributes of the geo enabled characteristic

 

Afterwards, the following InfoObjects will be assigned automatically to the characteristic as attributes:

  • 0LATITUDE
  • 0LONGITUDE
  • 0ALTITUDE
  • 0SRCID
  • 0PRECISID
  • 0GEOFEATID

In case some of them are missing after switching the Geographical Type, you can also manually add them to the characteristic.

Important: Please make sure that 0GEOFEATID is checked as a navigational attribute!

Next, update your master data.

Update%20Master%20Data

Update Master Data

 

After loading data into 0LATIDUDE and 0LONGITUDE, run the ABAP report “RSD_GEO_SYNC_ATTR”. The report performs the translation of 0LATIDUDE and 0LONGITUDE into SAP HANA ST_POINT format, which will lead to an optimisation of the runtime performance via the SAP HANA Spatial Engine.

Also, point coordination information will be mapped to regions (on lowest granularity) and the Region ID will be stored in 0GEOFEATID.

Important: The report needs to be executed after every master data update.

Run the ABAP report “RSD_GEO_SYNC_HIER”, which creates the content Hierarchy “SAPBWWORLDHIERARCHY”. The Hierarchy is used by the 0GEOFEATID and will be derived from the SAP HANA DU (Country/State/District). This is a one-time step.

As a last step, you need to maintain the corresponding Composite Provider and Query by adding the geo enabled characteristic as well as the navigational attribute of the characteristic (0GEOFEATID).

 

Summary

Now the backend system is prepared and you can start analysing your data via Choropleth layer in SAP Analytics Cloud!

Do you want to display information from your custom hierarchy like your own sales regions in SAP Analytics Cloud? Stay tuned for more technical blogs 🙂

 

Assigned Tags

      8 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Sebastian Moritz
      Sebastian Moritz

      Hello Arno Klein

      Thanks for your article, very well written and better to understand than the documentation. You are referring to the possibility that this feature is available from BW on HANA 7.5 SPS 16 or greater. Is it possible to use custom shapes in BW on HANA too? We are currently using custom shapes based on a Hana live connection and are evaluating the possibilities of a BW live connection.

      greatly appreciate your help on this one.

      Thanks and all the best

      Sebastian

      Author's profile photo Arno Klein
      Arno Klein
      Blog Post Author

      Hi Sebastian,

      thank you for the comment.

      As mentioned in the blog, the choropleath feature based on the default hierarchy (BWWORLD) is available for BW on HANA as well as BW/4HANA (see versions above).

      If you want to bring your own regions (hierarchies) you´d need to run a BW/4HANA system (starting with 2.0 SPS4+). A blog about this is currently in work.

      You can find these information also in our SNote 2715030.

      Thanks,

      Arno

      Author's profile photo Regys Mene
      Regys Mene

      Hello Arno, thanks for the great explanation. we didnt run the report once after a master data update, but the day after it and so some master data do not have filled the 0geofeatid, although the 0Latitude and 0Longitude is there. I saw above that you mentioned:

      Important: The report needs to be executed after every master data update.

      Do you have a suggestion how to fill the missed records with the 0geofeatid? Is there a workaround for these missed records? A complete deletion and reload of our master data is not possible...

      Thanks, Regys

      Author's profile photo Dirk Ilmberger
      Dirk Ilmberger

      Hello Arno,

      have you tried using Choropleth Layer with transitive attributes too?

      In our BW-datamodel we have the geografical information only on country level. We flagged country as geo dimension and added the relevant attributes like 0LATIDUDE, 0LONGITUDE and 0GEOFEATID.

      But Country is only used as an attribute, in our case as attribute of Sold_To.

      So the Geo-Characteristics are transitive attributes:

      YCSOLDTO__YCCOUNTRY__0GEOFEATID

      And with this model the Choropleth Layer does not work!

      When I have a datamodel with values directly on Country (YCCOUNTRY__GEOFEATID), the layer in SAC works fine.

      Maybe there is a workaround or some additional settings have to be done. Hope you have an idea!

      Thanks, Dirk

      Author's profile photo Henning Severin
      Henning Severin

      Hello Arno,

       

      we are planning to use the geographical information feature, but info object 0GEOFEATID is not

      available in the BI-Content for activation - how can i get it ? We are on SAP_BW 755 SP0.

       

      Thanks in advance.

      Henning

      Author's profile photo Bart Van Boxelaer
      Bart Van Boxelaer

      Hi Arno,

      We have followed your blog but are running into an issue.

      We have 0COUNTRY enabled as geographical type 'Shapes and Data Point' .

      For Austria, for example, we have latitude and longitude filled based on the info found in table GEOT005.
      In this case 13,333333333333 latitude and 47,333333333333 longitude.
      After running the program RSD_GEO_SYNC_ATTR the 0GEOFEATID is filled with  000000000580320.

      However, in the SAC story the data is displayed on the Austrian village Wagrain.
      This is a village somewhere in the center of Austria.

      Any idea what we have done wrong?

      Author's profile photo Przemyslaw Miga
      Przemyslaw Miga

      Hello Arno,

      The same question about Choropleth Layer with transitive attributes as Dirk. Any information if it's work or will be according to the product roadmap? Any difference in the BW/4HANA version?

      Thanks!

      Author's profile photo Benjamin Huaysan
      Benjamin Huaysan

      Thanks for the article! Is it possible to do choropleth layer map without longitude/latitude data?