Skip to Content
Author's profile photo Srikar Nagadevara

Scaling Dynamic Tile on Fiori Launch Pad

Hi All , Few days back I had a requirement  where , I have a Fiori application which is having a business process as, the completed deliveries count. So if there is count more than 3 digits i,e greater than 999 then I need to display the count as 1K 1M 1B 

Firstly we need to create an oData Service to configure the tile dynamically,

Go to SEGW , create a new project and create an entity

For a tile to configure dynamically we need to pass the following structure as shown in the below standard SAP link

https://help.hana.ondemand.com/cloud_portal_flp/frameset.htm?8e7cec3cf6494b09a01d09606119b9dd.html

Go to the Class implementation of the entity as write the below code to get the scaling factor

Firstly we need to have the below structure for the enitySet

we need to send the data to this structure as show below

{
                "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",
                     }
}

 

        IF delCount > 999999999.
          scalingFactor = 'B'.
        ELSEIF delCount > 999999.
          scalingFactor = 'M'.
        ELSEIF delCount > 999.
          scalingFactor = 'K'.
        ENDIF.

    er_entity-icon = 'sap-icon://travel-expense'.
    er_entity-info = 'All Deleiveries'.
    er_entity-infoState = 'Positive'.
    er_entity-number     = deliveryCount.
    er_entity-numberDigits = '2'.
    er_entity-numberFactor = scalingFactor .
    er_entity-numberState = 'Positive'.
    er_entity-numberUnit = ''.
    er_entity-subtitle = 'Deliveries Completed'
    er_entity-title = 'Deliveries'
 

 

So let Us think we have a count of 10000 the we will have

 

To get count on the tite we have to configure it on the fiori launchpad admin URL so

Create an Dynamic Tile for any application and open the dynamic tile and fill the Dynamic Data as shown in the below image

Service URL : Need to pass the entity oData Service URL in Json format

/sap/opu/odata/sap/ZDYN_TILE_XX_SRV/PlantsSet(‘ISSUE’)?$format=json

Refresh Interval in Seconds:

We need to give the interval to call the oData Service after a certain period to dynamically load the deliveries count.

So after this configuration open the Fiori LaunchPad.

Open the application which is having delivery count as

       

 

So this is how i have achieved them dynamically, If the back-end data changes then we can configure the dynamic tile accordingly.

Cheer’s….

 

Assigned Tags

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

      The information is very useful and interesting. Thanks for sharing

      cắt tuyến mồ hôi nách

      Author's profile photo Arun Kumaran
      Arun Kumaran

      Hi Srikar,

      I have extended a standard gateway services, here I am not able to add the above structure as new entity set and generate, But I have added the required field to the existing Entityset and configured the service url in Launchpad, Still the Tile properties are not set, Where should I populate the data and I am not able to stop at Get_Entity method, please advice.

       

      Thank you.

       

      Author's profile photo Srikar Nagadevara
      Srikar Nagadevara
      Blog Post Author

      Can you show me your response in the entity ?