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: 
former_member199536
Active Participant

Now that the Fiori Launchpad (FLP) is available on the HANA Cloud Platform (HCP) Trial accounts its a good time to try out the end to end development and consumption scenario with the new Fiori launchpad Sites.

In the first part of this blog we will focus on:

  • Generating a business application using SAP Web IDE based on Northwind public OData services.
  • Deploying our application to the HCP repository
  • Registering our application to Fiori Launchpad and creating a Static Tile for it

In the 2nd part of this blog we will see how to

  • Create a Dynamic Tile for our application
  • Develop and configure a Custom Tile for our application.

By the end of this blog (if you make it... ) your Fiori Launchpad site will have 3 tiles - one of each type:

Launching the generated business application:


Prerequisites

  1. You have registered for a trial account for SAP HANA Cloud Platform
  2. Set up connectivity to Northwind (the destination file is attached bellow):
    How to use Northwind OData service with SAP Web IDE
  3. Enabled Fiori Launchpad on Portal Service and created a new Fiori Launchpad site
    SAP Fiori Launchpad Joins HANA Cloud Platform Trial

ExplanationScreen Shot
  • After creating your FLP Site Publish it by
    hovering over its tile in the Portal Service
    Site Directory

  • Open the FLP site’s Configuration Cockpit
    in a new browser tab by clicking the
    Manage button

  • Open the FLP site runtime by clicking on the
    URL

1)  Creating Categories, Content Packages & Groups for FLP Site

In Fiori Launchpad, apps belongs to specific Categories (for classification and availability for the end user catalogs),
Content Packages (for the purpose of role-based access) and are arranged in Tile Groups 
(read more in  Creating Content for Launchpad Sites
)


ExplanationScreen Shot
  • Access your Launchpads Configuration Cockpit to create Categories,
    Content Packages & Groups by launching the dedicated apps

Create a new Category


  1. Launch the Define Categories app

  2. Click the + at the bottom of the master list

  3. Enter the category Name (Northwind)

  4. Click Save
  5. Click on the Back or Home buttons to return to the configuration cockpit

Create a new Content package


  1. Launch the Manage Content Packages app

  2. Click the + at the bottom of the master list

  3. Enter the content package's Name (Northwind)

  4. Click on the Sites tab and add the new Launchpad site you created - to assign the content package to it

  5. Click Save
  6. Click on the Back or Home buttons to return to the configuration cockpit

Create a new Tile Group


  1. Launch the Manage Tile Groups app

  2. Click the + at the bottom of the master list




2) Generating the ‘Employees’ Fiori application

After we enabled connection from our HCP account to the Northwind OData services we can use the SAP Web IDE templates to generate applications that consume its data.

ExplanationScreen Shot

Open SAP Web IDE  from your HCP account cockpit

See Opening SAP Web IDE

Create a new project


  1. Right click on the Local root folder

  2. Select New > Project from Template

In the Template Selection screen

  1. Select the SAP Fiori Full Screen Application template

  2. Click Next

  3. Give the project a name employees*

* For consistency please stick to the suggested names

In the Data Connection screen

  1. Select Service URL

  2. In the Service Information section
    • Select the Northwind OData Service
    • Enter the URL:
      /V3/Northwind/Northwind.svc

  3. Click on the Play icon to view the available services on the right side Details pane

  4. Click Next

In the Template Customization screen bind the OData properties to the UI controls.

Page 1 Section
Select the properties for the main table:

  1. Title - Employees
  2. OData Collection - Employees
  3. Item Title - EmployeeID
  4. Numeric Attribute - FirstName
  5. Units Attribute - LastName
  6. Status Attribute - Title
  7. Attribute - ReportsTo

Page 2 Section


Select the properties for the detail header

  1. Attribute 1 - Address
  2. Attribute 2 - City

Navigation Section
Select a related Object and its properties

  1. OData Navigation - Orders
  2. Attribute 1 - OrderID
  3. Attribute 2- OrderDate
  4. Attribute 3 - ShippedDate

Click Next and Finish to generate the project code.

Preview the Application


  1. From the project explorer expand the employees folder

  2. Select the Component.js file

  3. Click the Run button

The employees application is launched displaying OData retrieved from the Northwind service

To complete the integration of our employees application with the Fiori Launchpad site we need to "proxify" our service URLs to overcome cross domain issues. This is achieved by adding a prefix to the service URL: jQuery.sap.getModulePath("< app id >")  + "< service url >"

ExplanationScreen Shot

Edit the code


  1. From the project explorer expand the employees folder

  2. Double click the Component.js file to open it

  3. Locate the serviceUrl property (around line 21 in the generated code)
  1. Add the prefix

    jQuery.sap.getModulePath("employees")

  2. Your code should look like this

    serviceUrl: jQuery.sap.getModulePath("employees") + "/destinations/northwind/V3/Northwind/Northwind.svc/"

  3. Click Save to persist your changes


For more information - Integrating Apps in the Launchpad .

3) Deploying & Registering the application to FLP with a Static Tile

Now its time to deploy the employees applications to our HCP account. A dedicated versionised Git repository is allocated to every application we deploy. We can choose to activate any version of our application to make it public. After deployment we will register the application to Fiori Launchpad.

ExplanationScreen Shot

Deploy the application


  1. Right click on the employees folder

  2. Select Deploy > Deploy to SAP HANA Cloud Platform

In the Login to SAP HCP dialog box

  1. Enter your SCN password

  2. Click Login

In the Deploy Application Dialog box

  1. Notice that the deployment will create an activate version (1) from your deployed source code

  2. Click Deploy

Register application to SAP Fiori Launchpad


  • After deployment the Successfully Deployed dialog box is opened

  • Click the Register application to SAP Fiori Launchpad button

In the General Information screen

  1. Enter a Description for the application

  2. Click Next

In the Tile Configuration screen

  1. Enter the following
    • Type: Static
    • Title: Employees
    • Subtitle: Our winning team
    • Icon: select the employee icon

  2. Click Next

In the Assignment screen

  1. Enter the following
    • Category: Northwind
    • Content Package: Northwind

  2. Click Next
  3. Click Finish
  4. Click OK

The app (and its static tile) are now available in the your Launchpad Site's Content catalog.


How did that happen? In Part 1 we created a Content Package (named Northwind) and assigned our new Fiori Launchpad Site to it. Registering our employees application to the same content package makes it available in the assigned sites under the registered category.


ExplanationScreen Shot

Preview & add content to the Launchpad Site


  1. Go back to your Launchpads Configuration Cockpit

  2. Click on the Preview Site tile

  3. Your new (and empty) launchpad site is opened

  4. Click on the top left menu icon to open the Group Panel
  5. Click on Tile Catalog to open the catalog and add content to
    your launchpad Site

  1. Click on the + under the Employees tile

  2. Select the My Home group

  3. Click OK
  4. Click on the Back or Home buttons to return to the
    Launchpad sites runtime

  5. The Employees Static Tile was added to you launchpad

  6. Click it to launch the application





The tile we created for our employee application is a Static Tile. It contains a fixed set of fields like the title, subtitle, info and and icon. More on tiles in the following link: Tile Properties


As inspiring as the Static Tile may be, you might want to add more data to your tile or totally customize it and turn it into a small informative application. We will see how to do that in sections 4 and 5 of the 2nd part of this blog.


12 Comments