Hi everyone, in this post I want to share with you some experiences about how to create news tiles with SAP HANA UI Integration Services (UIS). I installed SAP HANA SPS09 three months ago and have already tried lots of cool new features. Today I wanted to test something with UIS in SAP HANA Stuido. So when I created the "UIS Catalog" artifact and added a tile, I found there's also something new with UIS in SAP HANA SPS09.
As of SAP HANA SPS08, there's no news tile template in UIS. But as you can see in the following screenshot, in SAP HANA SPS09 now we have the news tile template which means we are able to place news tiles in the Fiori Launchpad in just few seconds. That's cool! "Custom App Launcher" is also newly introduced in SAP HANA SPS09, but I'm not going to focus on that in this blog post. Maybe I will show you something in another blog post.
As usual, first of all I wanted to show you some basics and useful materials about this topic, since perhaps for someone it's the first time to hear SAP HANA UI Integration Services (UIS) and I didn't plan to introduce everything in this post. So, what's UIS? I think the following slide page explained this clearly. As of SAP HANA SPS09, I think the killer feature is the capability of creating Fiori Launchpad inside SAP HANA.
If you are new to UIS, you may have a look at the following materials first.
As its name implies, we can use news tile to display news feeds or we say RSS. In this section, let's start to create our first news tile and show it on our Fiori Launchpad step by step. I'm using SAP HANA SPS09 Rev. 93.
Step 1: Create XS project, as of SAP HANA SPS09, you can create .xsapp and .xsaccess together with creating the project.
Step 2: Create "UIS Catalog"
Select a wizard
Create new catalog, for simplicity I did not generate privileges.
Step 3: Add and configure the news tile
Add the news tile
Step 4: Add article feeds
Find a feed URL, e.g., we can choose one from http://scn.sap.com/community/feeds?community=2407
Add the feed URL and save it, see all configurations from News Tile - SAP HANA Developer Guide for SAP HANA Studio - SAP Library
Step 5: Create "UIS Application Site" - Fiori Launchpad
Select the wizard
Create new application site
Step 6: Grant the role
When launchpad.xsappsite is opened, you will see the following error.
How can we solve this? Granting the corresponding role. Since I wanted to show the error, I just granted the role in this step. You'd better do it at the beginning.
Now the error is gone.
Step 7: Create group and add tile
Create group
Add tile
Save and activate it
Step 8: Run Fiori Launchpad
Click "Runtime Version"
Login and the news tile didn't work, saying "No articles to display". You can use Chrome developer tools to find the issue in red box.
What happened? This is because of the same origin policy and the response header of our requested resource did not include "Access-Control-Allow-Origin". Are there any solutions? Yes, one of the solutions is called CORS. You can have a look at Cross-origin resource sharing - Wikipedia, the free encyclopedia and Cross-Origin Resource Sharing. That's why the following note is stated in News Tile - SAP HANA Developer Guide for SAP HANA Studio - SAP Library
If the URL references an external feed, the feed must be CORS-compliant. If the URL references an internal feed, the feed must originate from the same server and port as the launchpad.
Although there's no "Access-Control-Allow-Origin" in the response header, we can find a workaround from Fiori News Tile - no articles displayed. So, I installed Allow-Control-Allow-Origin: * - Chrome Web Store and enabled CORS. It worked and now we can get RSS feeds from all content of SAP HANA Developer Center.
As you can see in News Tile - SAP HANA Developer Guide for SAP HANA Studio - SAP Library, there are some other configurations we can make in order to customize our RSS feeds. Since everyday I spend some time on SAP HANA Developer Center and SAP HANA and In-Memory Computing, and I love to participate in discussions about SAP HANA, I'd like to make my own RSS feeds.
As you can see in the above screenshot, I made three configurations.
That's it! No coding, only configurations, you got the Fiori Launchpad with your customized News Tile. Want to have more RSS feeds on SCN? You can have a look at Everything I know about... SCN RSS Feeds and configure your own.
However, it seems to be an error when clicking the news tile. I found SAP Note 1968559 and 2065811 are related with this issue but don't know yet how to solve this inside SAP HANA. :sad:
Hope you enjoyed reading my blog and create your own news tile successfully! :smile:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
38 | |
19 | |
13 | |
13 | |
11 | |
10 | |
10 | |
10 | |
8 | |
8 |