Skip to Content

Create a small application using Fiori Smart Template

In this tutorial, I am going to describe the steps that have been followed in creating and deploying a Fiori Smart Template application.

The following are the topics that are covered below.

     1.      Install HANA Cloud Connector

     2.      Create Destination in Web IDE

     3.      Create OData Service

     4.      Create Annotation Model

     5.      Create a project in Web IDE

     6.      Edit the project in Web IDE

     7.      Edit using Annotation Modeler

     8.      Run the application

     9.      Deploy the application to UI5 ABAP Repository

     10.    Deploy the app to an on Premise Fiori Launchpad


1. Install HANA Cloud Connector

First of all, you need a HANA Cloud Connector to make your on Premise OData service available in the Web IDE during design time and to deploy the Fiori Smart template app to your on Premise Fiori Launch Pad;

  • Go to the below link to download the connector according to your operating system.

https://tools.hana.ondemand.com/#cloud

  • Make sure you follow the steps described in the below link for the installation.

https://help.hana.ondemand.com/help/e6c7616abb5710148cfcf3e75d96d596.html

  • Make sure you follow the pre-requisites mentioned in the above link as it is. The mandatory steps are mentioned below need to be fulfilled before the installation irrespective of your operating system.

Note: Ensure you install only Java 7 otherwise connector won’t work.

    • The environment variable <JAVA_HOME> needs to be set to the Java installation directory, so that the bin subdirectory can be found. Alternatively, you can add the Java installation’s bin subdirectory to the <PATH> variable.

          /wp-content/uploads/2016/03/1_913979.jpg

  • Note: Once pre-requisites are met and the connector is installed, in a browser, enter: https://<hostname>:8443, where <hostname>
  • In case if you want to troubleshoot the connector installation, you can refer the following link; it is very helpful.

          http://scn.sap.com/community/developer-center/cloud-platform/blog/2015/12/24/troubleshooting-hana-cloud-connector-installation-developer-edition

2. Create Destination in Web IDE

  • To consume the on premise service and to deploy the Fiori Smart Template app to the ABAP repository we need to add the destination.


  • Access of the following resources including all sub-paths need to be allowed:

           /sap/bc/adt

          /sap/bc/ui5_ui5

          /sap/opu/odata

  • We need to fill out the red marked area, with your system information.   
  •    /wp-content/uploads/2016/03/2_915460.jpg


3. Create OData Service

In the ABAP system; 

– Create a structure with all the required attributes that are needed for the UI.

– Go to transaction SEGW, for OData development using SAP NetWeaver Gateway

– Click on Create Project

          /wp-content/uploads/2016/03/3_915505.jpg

  • Choose Generation Strategy : Standard

          /wp-content/uploads/2016/03/4_915516.jpg

  • Go to Data Model node

          /wp-content/uploads/2016/03/5_915517.jpg

  • Right click and select Import->DDIC Structure

          /wp-content/uploads/2016/03/6_915518.jpg  

          /wp-content/uploads/2016/03/7_915519.jpg 

  • Select ‘Is Key’ fiield and then finish

          /wp-content/uploads/2016/03/8_915520.jpg

  • Click on Generate

          /wp-content/uploads/2016/03/9_915521.jpg


  • It prompt a window which will automatically filled with provider class and service registration. This will have a field called Technical Name that we need to note it down as we will be using it later.
  • Save it to Local Object

          /wp-content/uploads/2016/03/10_915522.jpg

Your OData service Technical Name would be * _ODATA_SRV


  • Register your service as LOCAL

          /wp-content/uploads/2016/03/11_915523.jpg

  • Maintain

          /wp-content/uploads/2016/03/12_915527.jpg

  • Run using Gateway Client

          /wp-content/uploads/2016/03/13_915528.jpg

/sap/opu/odata/sap/*_ODATA_SRV/*?$metadata

4. Create Annotation Model

– Go to SEGW; create a project of Project Type: Annotation Model for Referenced Service  /wp-content/uploads/2016/03/14_915529.jpg

    • Import ->Service Reference

               /wp-content/uploads/2016/03/15_915533.jpg

    • Click Next

                /wp-content/uploads/2016/03/16_915534.jpg

    • Click Finish

                /wp-content/uploads/2016/03/17_915535.jpg

    • Add Vocabulary Libraries based on our requirement

                 /wp-content/uploads/2016/03/18_915536.jpg

    • Then create Annotation Model Definition by Clicking ‘Generatebutton.

     Always note it down “Annotation Model Registration: Description”; *_ANNOT_ANNO_MDL

     /wp-content/uploads/2016/03/19_915537.jpg

  – To create annotation, Click on Annotation button and then choose the library from which you want UI element to be added to the fields.

               /wp-content/uploads/2016/03/20_915538.jpg

    • On click of Ok button, APC classes and Annotation Model will get created that you can see in Runtime Artifacts Folder and finally the referenced service will be assigned to the created Annotation Model.
    • APC Code: You can check annotation related code in method DEFINE_VOCAB_ANNOTATIONS ( ) of generated APC.
  • Maintain Annotation Model: You can see Assignment of the Referenced Service to Annotation Model using transaction /iwbep/reg_vocan.
  • Register the referenced service with Gateway Hub using Resister button in the Service Maintenance.
  • Maintain‘ the service
  • ‘Load Metadata
  • Access Annotation File using ‘Gateway Client

Use the following URL;

     /sap/opu/odata/IWFND/catalogservice;v=2/Annotations(TechnicalName=*_ANNOT_ANNO_MDL’,Version=’0001′)/$value

          /wp-content/uploads/2016/03/21_915539.jpg


Continue on Part 2……….

To report this post you need to login first.

1 Comment

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

Leave a Reply