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:

/wp-content/uploads/2015/05/target_696393.png

Launching the generated business application:

/wp-content/uploads/2015/05/target2_696395.png


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
Explanation Screen 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
/wp-content/uploads/2015/05/p1_696255.png/wp-content/uploads/2015/05/p2_696256.png

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
)


Explanation Screen Shot
  • Access your Launchpads Configuration Cockpit to create Categories,
    Content Packages & Groups by launching the dedicated apps
/wp-content/uploads/2015/05/p3_696332.png

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
/wp-content/uploads/2015/05/category_696333.png

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
Contentpackage.png

Create a new Tile Group


  1. Launch the Manage Tile Groups app
  2. Click the + at the bottom of the master list
/wp-content/uploads/2015/05/groups_696345.png




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.

Explanation Screen 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
/wp-content/uploads/2015/05/newproject1_696346.png

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

/wp-content/uploads/2015/05/newproject2_696356.png

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
/wp-content/uploads/2015/05/newproject3_696357.png

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
/wp-content/uploads/2015/05/newproject4_696362.png

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.

/wp-content/uploads/2015/05/newproject5_696363.png

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

/wp-content/uploads/2015/05/preview1_696364.png/wp-content/uploads/2015/05/preview2_696368.png

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 >”

Explanation Screen 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)
/wp-content/uploads/2015/05/proxify1_696376.png
  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
/wp-content/uploads/2015/05/proxify2_696377.png


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.

Explanation Screen 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
/wp-content/uploads/2015/05/deploy1_696369.png

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
/wp-content/uploads/2015/05/deploy2_696370.png

Register application to SAP Fiori Launchpad


  • After deployment the Successfully Deployed dialog box is opened
  • Click the Register application to SAP Fiori Launchpad button
/wp-content/uploads/2015/05/register1_696372.png

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
/wp-content/uploads/2015/05/register2_696373.png

In the Assignment screen

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

  2. Click Next
  3. Click Finish
  4. Click OK
/wp-content/uploads/2015/05/register3_696374.png

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.


Explanation Screen 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
/wp-content/uploads/2015/05/previewsite1_696645.png/wp-content/uploads/2015/05/previewsite3_696662.png
  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


/wp-content/uploads/2015/05/previewsite4_696663.png


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.


To report this post you need to login first.

7 Comments

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

  1. Jason Scott

    Hi Ido. Thanks for this great step-by-step blog post. As a developer – this is exactly what we need so that we can see how differing technologies all fit together which can be very difficult from the help documentation and the typical blog announcing a new SAP technology.

    Now I just need something that carries on from here to add in HCPms and even Mobile Secure to see the whole mobile scenario.  😉

    Thank-you.

    (0) 
  2. Kumar Gaurav

    Hi Ido,

    I deployed the application on HCP and able to run  it successfully using WebIDE. But when I am trying the app to run the app using launch pad, I am not able to access the services.Capture.PNG

    I am using the jQuery.sap.getModulePath(“fioriContent”) in the service url.

    Please suggest the necessary step to resolve.

    Thanks in advance.

    Regards,

    Kumar Gaurav

    (0) 
      1. Madhuri Muthyalu

        Hi Meni,

        I am also facing the same issue the app works in IDE, when deployed in launchpad it is not able to pick up the destination

        /wp-content/uploads/2015/09/destination_error_786155.jpg

        can you suggest any ways to avoid this.

        Regards,

        Madhuri

        (0) 
  3. Ankur Jindal

    Hi Ido,

    I want to change the theme of the application and wanted to add some images and other stuff. Can you please let me know, how can i achieve it?

    (0) 

Leave a Reply