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.
This blog is about how to bulk post assets to SAP Analytics Hub (SAH) using a mini application written using Excel VBA.
This application is useful to Administrators who are getting started with SAP Analytics hub and would like to post hundreds or thousands of assets quickly.
See the end to end video and the links to download the files needed towards the end of this blog.
Basic Functionalities of this tool:
Load SAH Structure from JSON Export. Useful for values lookup
Validate the data before creating the Postman requests
Verify if the text, URL field lengths are within the limits defined in SAH
Verify if all LoVs match with those defined on SAH
Highlight Blank values
Create Postman Collection JSON for Creating Drafts
Create Postman Collection to make the asset live (Status change from Draft->forReview->Live)
Bulk delete drafts (n number of assets sequentially)
Bulk delete assets (n number of assets sequentially)
Prerequisites:
Setting up postman: Install and Configure Postman and postman interceptor (Animated GIF below)
From chrome apps install Postman and Postman interceptor
Open postman through the bookmark bar shortcut for apps
Enable interceptor
Create a new environment with the following fields/values
url: YOUR SAH URL
x-csrf-token: blank
content-type: application/json
Download and extract the SAH Hub Structure zip file: Make sure you have created fields, lovs and have updated the layout, either using SAH Cockpit or using postman or such REST client. It should be something like below (Animated GIF). You can download the HUB Structure data and unzip the file in a suitable location. Under the structure folder you will find 4 json format files namely
assettype.json
field.json
lov.json
lovfield.json
Testing Postman setup:
Import the sample postman collection (find the download link below)
Open your SAH in chrome browser and establish the connection.
Make sure you have selected the right SAH environment
Select the “Get CSRF token” request and click send
Go to the response header and Double Click the csrf-token value -> Right click and set the value for the environment variable.
Note that the CSRF token changes if the session is inactive and you may need to repeat the process when you see CSRF Token nonce failed as the response
Hope this helps you to get started with SAP Analytics Hub asset creation 🙂
***Update: 30th October 2017****
The tool now supports multi LOVs separated by comma.
Note: The application provided here is to ease the bulk upload of assets. Use at your own discretion. The images used here are for representational and educational purposes only.