Skip to Content
Author's profile photo Uladzislau Pralat

Dynamic Fiori Launchpad Tile Explained

I came across a number of resources that explain Dynamic Fiori Launchpad Tile creation. They are missing some details or provide simplistic examples. In my blog I added clarity focusing on important aspects of implementation and provided more realistic example.

In my example the same OData Service is used to feed two dynamic tile and calculating values dynamically using CDS views.

As you can see from snapshot above there are two dynamic tiles. Left tile displays stock value and right one average product rating. Color coding is used for the values, for example, stock value ranged from 100 to 200 millions CAD is considered as good.

Lets see how it is implemented. To begin with, I defined ZDYN_TILE DDIC structure to provide information for dynamic tiles.

Next I used the above structure to define DYN_TILE entity of ZDYN_TILE_SRV_01 OData Service

I also implemented GetEntity method of DYN_TILESet Entity Set

Next created CDS views used in the method above

 

ZSNWD_PD_VALUE CDS View:

 

ZSNWD_PD_STOCK CDS View:

 

ZSNWD_PD CDS View:

 

ZSNWD_PD_RATING CDS View:

 

Tested ZDYN_TILE_SRV_01 OData Service for DYN_TILESet EntitySet GetEntity method for both keys:  EPM Products Value and EPM Products Rating

And finally maintained EPM Products Value and EPM Products Rating Dynamic Tiles in Fiori Launchpad Designer

Service URLs for EPM Products Value Dynamic Tile:

/sap/opu/odata/SAP/ZDYN_TILE_SRV_01/DYN_TILESet(‘EPM Products Value’)/?$format=json

 

Service URL for EPM Products Rating Dynamic Tile:

/sap/opu/odata/SAP/ZDYN_TILE_SRV_01/DYN_TILESet(‘EPM Products Rating’)/?$format=json

 

Source code for this example can be downloaded from here:

ZDYN_TILE Structure

DYN_TILESET_GET_ENTITY Method

ZSNWD_PD_VALUE CDS View

ZSNWD_PD_STOCK CDS View

ZSNWD_PD CDS View

ZSNWD_PD_RATING CDS View

Assigned tags

      17 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Super blog . Very much useful .

      Author's profile photo Former Member
      Former Member

      Nice blog! I have tried this and have a few differences in what I see.

      Firstly, when I debug the GET_ENTITY code I find that IT_KEY_TAB is sending through ‘Icon’ as the name field and not ‘Title’ as was contained in the above code. Would like to understand if I am missing something in the setup for this to happen.

      Additionally, is there any other code that needs to be put in place for the GET_ENTITYSET method to support this?

      I have carried out the above however I still have an error appearing and there is no number. I get a HTTP request 404 error. The scenario I have is from SAP Cloud Platform (not using Gateway) so wondering if there is something different required. You can see in below screenshot that the number does come through to the entity no problems so I am thinking it is the actual tile set up itself. 

      I have entered the following in the tile config - 

      https://gwaas-*/odata/SAP/ZGWS_TPP_POCONF_DYNAM_SRV/DynamicDataSet('PO CONFIRMATION TEST')/?$format=json

      This is the error in the console.

      ONFIRMATION TEST')/?$format=json: HTTP request failed - 404 Not Found -  sap.ushell.components.tiles.applauncherdynamic.DynamicTile

       

      Thanks

      Phil

      Author's profile photo Former Member
      Former Member

      Thank you very much for the article. I can not manage this parameter to change the color 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

      Author's profile photo Uladzislau Pralat
      Uladzislau Pralat
      Blog Post Author

      Vitaliy, please check that your system up to date on support packs. It should work.

      Author's profile photo Former Member
      Former Member

      SAP Fiori launchpad for software component SAP_UI 751, Fiori 2.0, SAPUI5 version: 1.44.1

      Author's profile photo Gregor Wolf
      Gregor Wolf

      Dear Uladzislau,

      thank you for this great example. Maybe you can update your Git repository and use the abapGit format. It supports also DDLS.

      Best regards
      Gregor

      Author's profile photo Mykola Chekalov
      Mykola Chekalov

      Why doesn’t it work?

       

      pic.1

       

      pic.2

       

      pic.3

      Author's profile photo Uladzislau Pralat
      Uladzislau Pralat
      Blog Post Author

      Hi Mykola,

      please check your entity key.

      Regards, Uladzislau

       

      Author's profile photo Mykola Chekalov
      Mykola Chekalov

      I'm so sorry, but what do you mean?

      I've chosen the key in my structure.

      Author's profile photo Uladzislau Pralat
      Uladzislau Pralat
      Blog Post Author

      Mykola,

      on your pic.1 OData Service Title property is equal to "EDMS (Empty)", but on pic. 2. you pass entity key "1" instead.

      Regards, Uladzislau

      Author's profile photo Appu John
      Appu John

      HI Mykola Chekalov

      the fields should be camelCase so Change the field name from “Numberstate” to “numberState”

      “Tile” to “title” .  it should work after that .

       

      Regards,

      Appu John

      Author's profile photo Thomas Schreiber
      Thomas Schreiber

      I have the same problem. We are also on UI5 version 1.44. Aditionally, if the Infostate is not ‘Neutral’ the tile doesn’t show any content value, only three dots ‘…’.

       

      Author's profile photo Appu John
      Appu John

      Hi Thomas Schreiber,

       

      please check if the field names are same . it should be camelCase.

       

      regards,

      Appu John

      Author's profile photo Ramin Shafai
      Ramin Shafai

      Super useful blog, even after 4 years.

       

      One question though, what's a safe refresh interval to use for updating dynamic tiles? I've set it to 2 seconds as per your example, but is that not going to put a lot of performance grind on the Launchpad if you have multiple dynamic tiles?

       

      Thanks

      Author's profile photo Uladzislau Pralat
      Uladzislau Pralat
      Blog Post Author

      Hi Ramin,

      I usually take a conservative approach to keep performance impact at minimum setting refresh time something like every 1 hour (definitely longer then timeout). Users can refresh Fiori Launchpad at any time anyway.

      Regards, Uladzislau

      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_RESURTIDOV1_SRV/EnTyTileSet?$filter=Title eq 'Zona'

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

      Author's profile photo Uladzislau Pralat
      Uladzislau Pralat
      Blog Post Author

      Hi Gianmarco,

      it is possible to fill with data multiple dynamic tile using the same OData Service. See my blog for details.

      Regards, Uladzislau