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

To report this post you need to login first.

2 Comments

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

  1. Phil Cooley

    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

    (0) 

Leave a Reply