Skip to Content
Author's profile photo Tejas Chouhan

Create Dynamic App launcher Fiori Tile

Requirement: Show dynamic information of the Fiori/ Fiori-Like application on Fiori Tiles.

As we know that there are different types of tile in Fiori, if we go with Transactional apps, we have Static Tile and Dynamic Tile. Or in Fiori standards these are called as Static App launchers tiles or Dynamic App launcher Tiles. We have News Tile as well, but that has nothing to do with this requirement

There are 2 workarounds:

1. Create an OData service which will show real time data and at every refresh the Tile will show dynamic numbers.

2. Create a custom tile, which can populate dynamic data. (Hosting on standard launch page/Launchpad not possible. Either extend the Launchpad UI application or create a custom Launchpad.)

First option is the best and low cost method.

You can also visit this page for information on what are the properties that can be used for Odata service to be configured for tile configuration Service URL.

Reference:

http://help.sap.com/saphelp_uiaddon10/helpdata/en/92/dda11afc814a538a8ec626f4a74c8d/content.htm

In contrast to regular (static) app launcher tiles, the information that is displayed on a dynamic app launcher tile can be pulled from a back-end system using an OData service

The dynamic information pulled from the back-end overwrites the configuration values given in the tile configuration. Some tile functionality (for example, the state arrow) can only be configured by dynamic information (and not in the tile configuration).

Parameter

Description

Service URL

URL of an OData service from which data should be read.

The response is expected in JSON format.

When the service is called, the values that are provided by the service override the values that have been configured manually in the tile details.

Note that the service is executed on the home page only. On the admin page, sample data is displayed instead.

Tip: If you only want to read a number of entities dynamically from an OData service, and read all other content for the app launcher statically from the configuration, you can use the $count parameter in the service URL.

Refresh Interval

Number of seconds after which dynamic content is read from the data source again and the display is refreshed.

The Launchpad uses a default of 10 seconds unless you enter a higher value in this field.

The Launchpad will fall back to 10 seconds, if the value entered is > 0 and < 10. If the value entered is 0, the dynamic tile is updated only once on load. If the value is >= 10, the value is taken as refresh interval.

OData Structure for Dynamic App Launchers

In order to feed an app launcher with dynamic content, you have to create an OData service that returns the configuration properties as in the following example structure:

{

                “d”: {

“icon”: “sap-icon://travel-expense”,

“info”: “Quarter Ends!”,

“infoState”: “Critical”,

“number”: 43.333,

“numberDigits”: 1

                               “numberFactor”: “k”,

“numberState”: “Positive”,

“numberUnit”: “EUR”,

“stateArrow”: “Up”,

“subtitle”: “Quarterly overview”,

“title”: “Travel Expenses”,

                     }

}

  1. So as you see, these are the properties which you may look forward to show on your fiori tiles, which also shows the place where the desired info will appear

Table 1: Properties

Property

Description

icon

Enter an sap-icon:// URL, for example sap-icon://cart.

You can look up the names of the available icons in tile configuration.

For more information, see Static App Launcher Tiles.

info

Text to be displayed at the bottom of the tile.

infoState

The color of the tile is adapted according to the value of this property. The precise color depends on the theme that you have selected in UI theme designer.

Allowed values: Negative, Neutral, Positive, Critical

number

Number to be displayed in the top right corner of the tile.

numberDigits

Number of digits to be displayed following the decimal separator (decimal point or decimal comma, depending on the language settings).

numberFactor

A factor for scaling numbers, for example, for displaying large numbers like 1.000.000 (-> number = 1 and numberFactor=”M”) or for percentages (number = 22.2 and numberFactor = “%”). The scaling is not done by the front end but has to be provided by the app developer.

numberState

The color of the number is adapted according to the value of this property. The precise color depends on the theme that you have selected in UI theme designer.

Allowed values: Negative, Neutral, Positive, Critical

numberUnit

Unit to be displayed below the number, for example, USD.

stateArrow

Displays an arrow indicating a trend.

Allowed values: None, Up, Down

subtitle

Subtitle to be displayed below the tile title.

targetParams

List of key-value-pairs separated by ampersands.

When the application is lauched (by clicking on it), these parameters are passed to the application as business parameters (if semantic object-based navigation is used) or as URL parameters (if URL-based navigation is used).

If any parameters have been entered in the Parametersfield in the tile configuration, the parameters passed by the OData service are appended to the list of parameters to be passed to the application.

title

Title to be displayed in the tile.

If the service returns an entity collection (rather than a single entity), all values from the numberelements are accumulated

For my scenario, I use Get entity method as it will show single entity.


Step 1: RFC Development/Code based

This step is not mandatory.  You can either use Structure or create a redefinition and write logic in the Get entity method of DPC EXT class.I use RFC because every time I don’t have to change the modelling. I can change the logic in the BAPI and that BAPI is called in my redefinition or I can map it directly with the Entities.


Step 2: Use case


Here I am taking a real time scenario, where the rfc will show the Count of Total Entry list present in the table( or created till date) and the latest Entry list number along with Name of the Entry list.


As per the logic, my RFC will calculate the entry list every time the table is updated and also populate the latest record.

Now once we have the data coming from the RFC, we just have to include properties in gateway modelling as per the table 1 above:


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


COUNT: “number”

NAME: “info”


Write Get entity method and you should get response as below in Gateway client.

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

Step 3: Create a Dynamic Tile in Fiori Admin page


Open URL: https: //<host>.<domain>:<port>/sap/bc/ui5_ui5/sap/arsrvc_upb_admn/main.html?sap-client=<Client>?scope=CUST


Step 4 : Create Custom Catalog, Group and Dynamic Tile configuration


Once you enter admin page, you should create custom tile catalog and choose a dynamic tile.


Adminpage1.JPG

adminpage2.JPG



adminpage3.JPG

   Choose App Launcher – Dynamic.



/wp-content/uploads/2015/03/3_659384.png


Above screenshot is for Purchase order scenario. You can configure your custom gateway service URL in field : Service URL.

                                                                               

  • In the Dynamic Data section provides your OData URL. Click on save and move on with the next steps on Tile configuration.


  • As per the configuration, we should see something like this:

/wp-content/uploads/2015/03/4_659385.png

  • Now to check whether the tile is dynamic:
  • Create an entry list from backend: tcode IK31


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

  • Refresh the Launchpad:


  • You can see count increases to 150 and Info also shows the latest entry list details with dynamic text.

/wp-content/uploads/2015/03/6_659390.png


Thank You  

Tejas Chouhan

Assigned Tags

      36 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Masayuki Sekihara
      Masayuki Sekihara

      Nice document. I included this in the collection SAP Fiori - SAP Fiori launchpad.

      Author's profile photo Tejas Chouhan
      Tejas Chouhan
      Blog Post Author

      Thanks Masa 🙂

      Author's profile photo Former Member
      Former Member

      Thanks a lot Tejas for posting such a helpful blog. 🙂

      Author's profile photo Former Member
      Former Member

      Tejas, You are simply great.

      Author's profile photo Siva Satya Prasad Yerra
      Siva Satya Prasad Yerra

      Hi Tejas,

      Thanks for the information. I was trying this usecase like:

      I want to add URL parameters to URL mentioned in dynamic tile. Tile is using URL based navigation. I've provided custom odata service with following parameters:

      Metadata.png

      Now i've created Dynamic Tile with URL based navigation and provided my URL (https://test.com/) in Target URL property of Navigation section and i've provided my odata service entity link to Service URL in Dynamic Data section.

      NOTE: https://test.com/ exists 🙂

      Now when i load the tile, it is showing information from number and numberUnit attributes. But the values provided in targetParams attribute is not added to Target URL mentioned in dynamic tile when i click on the tile.

      You can see the values returned by service here:

      Result.png

      Could you please assist me if anything is wrong here.

      Author's profile photo Tejas Chouhan
      Tejas Chouhan
      Blog Post Author

      To be frank, I have never used targetParams. But as per the definition, Target URL comes up with combination of Semantic object, Action and Parameters.

      Could you try with Tile Actions.

      Select URL and provide your URL in Navigation target

      Author's profile photo Vijay Vegesana
      Vijay Vegesana

      Hi Teja,

      Please find attached screen shot and can you help me in constructing URI.

      As per the attached screen shot, we want the number which is displaying in the count field in Dynamic tile.

      The URI, which is getting called here is

      /sap/opu/oData/iwpgw/taskprocessing;mo/TaskCollection?$skip=0&$top=100&$orderby=CreatedOn%20desc&$inlinecount=allpages&$filter=(SAP__Origin%20eq%20%27RDU_U5C_110_PGW%27%20and%20(TaskDefinitionID%20eq%20%27TS92500481%27)%20and%20%20((Status%20eq%20%27READY%27)%20or%20(Status%20eq%20%27RESERVED%27)%20or%20(Status%20eq%20%27IN_PROGRESS%27)))

      Thanks

      VijayTileCount.png

      Author's profile photo Tejas Chouhan
      Tejas Chouhan
      Blog Post Author

      Hi Vijay,

      The property would be "number" instead of "count".

      OR as i have mentioned above :

      Tip: If you only want to read a number of entities dynamically from an OData service, and read all other content for the app launcher statically from the configuration, you can use the $count parameter in the service URL.


      Regards,

      Tejas



      Author's profile photo Vijay Vegesana
      Vijay Vegesana

      Hi Tejas,

      thanks for your response.

      As I mentioned, the above standard Approve requests task processing URI is giving me the total count in Count property.

      Can you please help me in constructing URI which gives me the same number in the Tile.

      Thanks

      Vijay

      Author's profile photo Nandish m
      Nandish m

      Thanks Tejas for information .

      Author's profile photo Ludovic Bento
      Ludovic Bento

      Hi all,

      I've a problem when I try to create my specific dynamic app launcher. Data sent by Odata model aren't never displayed.

      I would like to know some information about this wiki :

      - What kind of configuration were you made in the SEGW tcode, like structure definition to pull tile properties, Entity type/set and artefacts?

      - How to define the Service URL (syntax) in the launchpad designer to pass all properties values?

      If you want i can share screenshots.

      Thxs

      Best Regards

      Ludovic

      Author's profile photo Tejas Chouhan
      Tejas Chouhan
      Blog Post Author

      Hi Ludvig,

      you can create properties, like the one in Table 1. Create a structure, and pass the rfc export or logic, so that the property holds some dynamic value. You can then show the same in tile information window.

      Regards,

      Tejas

      Author's profile photo Matthew Partington
      Matthew Partington

      Hi SCN, if anyone is struggling with a Service URL to test with this document try the following SAP standard Gateway Service SRA002_TIMESHEET_SRV.

      The service URL would be:

      /sap/opu/odata/sap/SRA002_TIMESHEET_SRV/Summary

      I expect it will only work for users setup for SAP Time Sheets but developers can take a look at a SAP example.

      Author's profile photo Sarbjeet Singh
      Sarbjeet Singh

      Thanks a lot for this document.

      Author's profile photo Rohit Mahajan
      Rohit Mahajan

      Hi Tejas,

      Used the following, Still it is not showing info? Can you Please advise on this,

      Best regards,

      Rohit

      chartType_error.png

      Author's profile photo Tejas Chouhan
      Tejas Chouhan
      Blog Post Author

      Hi

      You need to expose the odata collection along with$count

      Regards

      Tejas

      Author's profile photo Rohit Mahajan
      Rohit Mahajan

      Hi Tejas,

      I used like this now, Still the same issue?

      ?$count&$filter=TorType%20eq%20%27USCO%27%20and%20AggType%20eq%20%27Lane%27

      Author's profile photo Tejas Chouhan
      Tejas Chouhan
      Blog Post Author

      Hi Rohit,

      Either use like this below :

      Servicename/Colletions

      or

      Servicename/Collections/$Count

      Regards,

      Tejas

      Author's profile photo Heiko Ettelbrueck
      Heiko Ettelbrueck

      Hi Tejas,

      regarding the refresh interval, could you please fix the one important detail? You wrote:

      Number of seconds after which dynamic content is read from the data source again and the display is refreshed.

      The Launchpad uses a default of 10 seconds unless you enter a higher value in this field.

      The Launchpad will fall back to 10 seconds, if the value entered is > 0 and < 10. If the value entered is 0, the dynamic tile is updated only once on load. If the value is >= 10, the value is taken as refresh interval.


      Actually the default interval is not 10 seconds, but 0 seconds, which (as you write a bit later) means the key figure is loaded only once and not refreshed regularly afterwards.


      Best regards

      Heiko


      P.S. Apparently this is also wrong in the official product documentation. We will take care about fixing it there, too.

      Author's profile photo Former Member
      Former Member

      Hi Tejas,

      Great Blog. Its really very helpful.

      For a requirement i need to display the number on the dynamic tile for a custom transactional app in different color.

      I have created a RFC FM with the attributes required as below.RFC.PNG

      After this i created a Odata service where i am able to get the reuired data in JSON format.

      Service.png

      I have now configured the same service on the dynamic tile as shown below:

      Admin.png

      But after doing all these stll I am not able to see data from the service instead the manually configured data is getting displayed on the tile.

      Could you please help me on this?

      Could you please tell where I am going wrong?

      Thanks in advance.

      Regards,

      Rahul

      Author's profile photo Tejas Chouhan
      Tejas Chouhan
      Blog Post Author

      Please check and run the same URL in browser if you are getting count displayed as "number". If it is showing as gateway client, then kindly debug from console and recheck the properties, whether your dynamic tile is showing the count.

      Author's profile photo Former Member
      Former Member

      Thanks Tejas for your response.

      I had solved the issue.

      Actually the problem was with the syntax of the URL.

      I was calling the URL with complete Entity Set instead of single Entity.

      It worked when I called the url with single entity like:

      /sap/opu/odata/SAP/ZXXXX_SRV/Tile_HeaderSet('ATC Utilization')

      and apart from this the names of the property mentioned in the OData Structure should be same in our OData Service response--I mean they are "case sensitive".

      Regards,

      Rahul.

      Author's profile photo Tejas Chouhan
      Tejas Chouhan
      Blog Post Author

      great

      Author's profile photo Former Member
      Former Member

      Hi Tejas,

      I am trying to create a dynamic tile by following your blog ,  have created an Odata Service with the below Parameters

      odata.PNG

      above is the odata response in my browser but the tile properties doesn't change , they are still picked up from the configuration which i mentioned during creation of the tile

      Please help me !

      Many Thanks

      Pandu

      Author's profile photo Jocelyn Dart
      Jocelyn Dart

      Hi Pandu

      Please raise a discussion in the SAP Fiori space so we can help you.  Blog comments are not a good place to answer specific issues... often only the author will see them. However there are many others who will see your issue and be able to help if you use a Discussion.

      Thanks

      Jocelyn

      Author's profile photo Priya Jha
      Priya Jha

      Hi ,

      Is it not possible at all to configure it with complete entity set?

      Author's profile photo Former Member
      Former Member

      If I want to add two numbers(both are dynamically calculated from odata) how do I do that? 

      Author's profile photo Tejas Chouhan
      Tejas Chouhan
      Blog Post Author

      Hi Maitri,

      You would be ideally calculating the same in your odata service, you can handle the logic in your read service. Say your RFC returns :

      exp1 : 5
      exp2 : 6

      exp1 + exp2 = number, you need to handle in the dpc_ext class of your new service and pass it to the export parameter of your service. et_entityset-number

      Regards,

      Tejas

      Author's profile photo Former Member
      Former Member

      Hello Thanks for the reply, By add I meant display multiple numbers on the tile. My understanding is that there is only one number property so how do I display multiple numbers on the tile.

      Regards,
      Maitri

      Author's profile photo Tejas Chouhan
      Tejas Chouhan
      Blog Post Author

      @maitri : how about 36____34 , displaying like this from abap, where undescore is a space.

      Author's profile photo Niket Soni
      Niket Soni

      Hello Tejas,

      we have configured our app as dynamic tile its working fine in our development, but when we moving it to production it giving following error attached n screen shot

      Author's profile photo Srikar Nagadevara
      Srikar Nagadevara

      Hi ,

      If my count is more than 3 digits ( Example : 1111 ) . By default   i am getting 1.11 in FLP . I need to get 1,11 K .  How can i achieve this ? Please help me out 

      Author's profile photo Naoto Amari
      Naoto Amari

      Hi Tejas Chouhan  i'm very greatful with your blog, now i have a question, can i pass is there a way to pass the user logged id to the odata ? for example something like this:

      /sap/opu/odata/SAP/ZERP_ACTIVIDADES_SRV/UserSet$?filter=User eq '{user id logged}'

      so for each user it will send the id

       

      Author's profile photo Tejas Chouhan
      Tejas Chouhan

      This OData service you can create with properties as given in the screenshot. Pass the userid in "info" and it will come as per the odata service output details.

      Property should have this field in your entity type.

      "info"  = User id (fetch from odata service)

       

      Regards,
      Tejas

      Author's profile photo Naoto Amari
      Naoto Amari

      Hi Tejas thanks for reply,

       

      Reading deeper i think i need this https://blogs.sap.com/2016/08/23/create-and-use-custom-tile-type/comment-page-1/#comment-417350 be cause i need to send the user id in fiori launchpad , make some queries and retrieve the info in a micro chart and the others normal properties to the tile that's why just a dynamic tile in this case does not work for me . If you have some examples of this o material i'll be beholden oll my life with you!

       

      Regards

      Author's profile photo Gianmarco Castañeda
      Gianmarco Castañeda

      Thank you very much for the publication. My question is the following: Is it possible to bring a lot of dynamic tiles from the GET_ENTITYSET method?

      The URI: /sap/opu/odata/sap/ZGWART_PRUEBA_SRV/EnTyTileSet?$filter=Title eq 'P1'

      this brings me a lot of logs, but on the launchpad it only brings me a single tile