Skip to Content

Intro

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.

/wp-content/uploads/2015/03/1__659911.png

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.

/wp-content/uploads/2015/03/2__659945.png

What’s UIS? & Some useful materials

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.

3.PNG

Source

If you are new to UIS, you may have a look at the following materials first.

  1. HANA UI Integration Services? What’s that? You can learn some basics of UIS, but the examples are very old since standard application sites are deprecated as of SAP HANA SPS09.
  2. http://help.sap.com/openSAP/HANA1/openSAP_HANA1_Week_06_Unit_02_UI_Integration_Services_Presentation.pdf A slide deck from openSAP, also get some basics and ignore the old examples.
  3. Using UI Integration Services – SAP HANA Developer Guide for SAP HANA Studio – SAP Library
  4. News Tile – SAP HANA Developer Guide for SAP HANA Studio – SAP Library
  5. SAP HANA UI Integration Services (New and Changed) – What’s New in the SAP HANA Platform (Release Notes) – SAP Library
  6. SAP Hana UI Integration Services – YouTube Be careful. Some videos are very old, since widget and SAPUI5 application tile are deprecated as of SAP HANA SPS09.

Creating our first news tile

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.

4.PNG

Step 2: Create “UIS Catalog”

Select a wizard

/wp-content/uploads/2015/03/5__660016.png

Create new catalog, for simplicity I did not generate privileges.

6.PNG

/wp-content/uploads/2015/03/7__660017.png

Step 3: Add and configure the news tile

Add the news tile

8.PNG

Step 4: Add article feeds

Find a feed URL, e.g., we can choose one from http://scn.sap.com/community/feeds?community=2407

/wp-content/uploads/2015/03/9__660019.png

Add the feed URL and save it, see all configurations from News Tile – SAP HANA Developer Guide for SAP HANA Studio – SAP Library

/wp-content/uploads/2015/03/10__660024.png

Step 5: Create “UIS Application Site” – Fiori Launchpad

Select the wizard

/wp-content/uploads/2015/03/11__660025.png

Create new application site

12.PNG

/wp-content/uploads/2015/03/13__660030.png

Step 6: Grant the role

When launchpad.xsappsite is opened, you will see the following error.

14.PNG

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.

15.PNG

Now the error is gone.

Step 7: Create group and add tile

Create group

16.PNG

Add tile

17.PNG

Save and activate it

18.PNG

Step 8: Run Fiori Launchpad

Click “Runtime Version”

/wp-content/uploads/2015/03/19__660036.png

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.

/wp-content/uploads/2015/03/20__660037.png

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.

/wp-content/uploads/2015/03/21__660047.png

Make more configurations

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.

/wp-content/uploads/2015/03/22__660057.png

As you can see in the above screenshot, I made three configurations.

  1. Add my tile default image and set “Always Use Default Image” to true. I borrowed the image from Hana Maui | Escape to Hana, Maui
  2. Add two article feeds. The first one is discussion feeds from SAP HANA Developer Center and the second one is discussion feeds from SAP HANA and In-Memory Computing You can find the links from http://scn.sap.com/community/feeds?community=2407 and http://scn.sap.com/community/feeds?community=2127
  3. I want to focus on the discussions whose title includes “HANA”

/wp-content/uploads/2015/03/23__660056.png

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.

Failed to start the app…

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. 🙁

/wp-content/uploads/2015/03/24__660058.png

Hope you enjoyed reading my blog and create your own news tile successfully! 🙂

To report this post you need to login first.

7 Comments

You must be Logged on to comment or reply to a post.

  1. Nipun Senadheera

    > Failed to start the app…

    To make the app work, and display the info,
    simply create a target mapping with the following details:
    Semantic Object: NewsFeed
    Action: displayNewsList
    Launchpad Role: SPBUTIL
    Launchpad Instance: NEWSITEM
    Application Alias: NewsApp
    Capture.jpg
    The Semantic Object, Launchpad Role etc. should be already available in the system.

    The result should be a list like this: redirecting you to the article when clicked.
    Capture2.JPG

    (0) 
  2. Chris Xu

    Hi Wenjun,

    Good work, thank you!

    I also have the same issue when tried to click the news tile.

    Have you solved this issue?

    Thanks and Regards,

    Chris Xu

    (0) 
  3. Hagen Dittmer

    Hi Wenjun,

    thanks for your article. Very informative!

    I am attempting to implement a custom app launcher tile, but I have found that unless I give a user the SITE_DESIGNER role (as you explain) they cannot select from any of my custom catalog tiles. I don’t want to give all my HANA users this role. Similarly, if I assign the catalog/app site privileges directly to the user, they are still unable to see the tiles in their tile catalog. If I then give them the SITE_DESIGNER role they can see my custom tiles, and every other catalog tile in my system. What’s going on here? Why can’t I simply make certain tiles available to users?

    Cheers,

    Hagen

    (0) 

Leave a Reply