Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Srikar
Active Participant
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....

 
3 Comments
Former Member
0 Kudos
The information is very useful and interesting. Thanks for sharing

cắt tuyến mồ hôi nách
former_member502553
Participant
0 Kudos
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.

 
Srikar
Active Participant
0 Kudos
Can you show me your response in the entity ?
Labels in this area