Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
arnoklein
Product and Topic Expert
Product and Topic Expert

Introduction


The previous blog post gave you an overview of what is needed and how SAP backend systems can be prepared in order to provide business users the option of analyzing data via a Choropleth layer in SAP Analytics Cloud.

The drill down functionality in that standard scenario was based on a hierarchy delivered by SAP (SAPBWWORLDHIERARCHY) and bound to the specific characteristics of it. Instead of using the default hierarchy, some of your projects may have different requirements to visualize KPIs of e.g. particular sales regions or building capacities. This can be realized by creating your own hierarchy for your shapes.

Taking the default choropleth scenario as given, please make sure that everything mentioned in the previous blog post is already in place before you start with the custom choropleth scenario. This blog shows you the steps besides the default scenario.

 

Prerequisites


Please note that the custom choropleth layer functionality is only supported with SAP BW/4HANA 2.0 SP4+.*

 

Backend steps


1. SAP HANA


If you are already running the default choropleth scenario descripted in the previous blog post, no further steps are needed. If you are new to this topic, please follow SNote 239540.

2. SAP BW


On the BW side, you need to create, add and adjust a few things in order to link your hierarchy with the shapefiles. The example described in this blog contains three different InfoObjects, building a hierarchy:


1. Example hierarchy


 

Based on the different regions you can drill down to the state and supermarket level.


2. From left to right: Region, State and Supermarket level


 

2a) Lowest granularity - Supermarket


Let´s start with the lowest granularity of the hierarchy and the main characteristic – the Supermarket. Within the BW modeling tools, tab BI Clients of the InfoObject, you need to maintain it as Geographical Type 2 – “Point Data”.


3. Supermarket InfoObject settings


 

With that type, a few standard attributes like Longitude and Latitude will be automatically added.


4. Supermarket InfoObject attributes


 

As you can see on the screenshot, beside State and Region, 0GEOFEATID is also part of the attribute list. This InfoObject plays only a crucial role in the default scenario, no further actions needed here.

On the lowest granularity, Longitude and Latitude need to be maintained via master data maintenance. InfoObjects on a higher granularity, in the example State and Region, are carriers of the individual shapes and need to be added as navigational attributes only.

2b) Upper levels - State and Region


Coming to the next characteristic – the State. You need to maintain this one as Geographical Type 4 – Shapes and Point Data. That type “combines” type 1 (shapes) and type 2 (point data) and allows you to describe characteristics by a shape and geographical coordinates.


5. State InfoObject settings


This geographical type offers additional actions:


6. Upload shapefiles


By choosing „Upload shapefiles“, you can upload the shapefile set on the BW server. This can also be done via SAPGUI (Transaction RSDIOBJGISMAINT).

The set consists of three files (they should have the same name):


7. Shapefile set (same name)




  • .dbf: DBase file contains a table with attributes describing the different states

  • .shp: Shapefile contains geographic shapes

  • .shx: Link between .shp and .dbase File


You need to enhance the .dbf file by the BW Field and its corresponding values you are referring to (in this case State). The type should correspond to the characteristic type and its internal format.


8. PMSTATE.dbf


Please note: For such a task you would need to have kind of a GIS software in place as a text editor is not adequate enough.

The shape represents the different states that you want to render:


9. PMSTATE.shp


After uploading the files, select "Update Geotable" under Actions (similar to figure 6).

These steps need to be repeated for Region as well. The next picture provides you an overview of the different objects and tasks needed around the InfoObject.


10. Overview PMREGION


After doing all the steps above and back again in SAP Analytics Cloud, you can switch (via Builder Panel of the Geo Widget) from the default hierarchy to your own hierarchy (Region-State):


11. SAP Analytics Cloud - Geo Widget Builder Panel


After the switch the widget will use your hierarchy automatically.


12. SAP Analytics Cloud - Choropleth Layer


I hope this helps you to develop and build your own geo stories in SAP Analytics Cloud.

Cheers!

 
2 Comments