Skip to Content

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

To report this post you need to login first.

31 Comments

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

  1. 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.

    (0) 
    1. Tejas Chouhan 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

      (0) 
      1. 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

        (0) 
        1. Tejas Chouhan 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



          (0) 
          1. 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

            (0) 
  2. 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

    (0) 
    1. Tejas Chouhan 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

      (0) 
  3. 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.

    (0) 
  4. 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.

    (0) 
  5. RAHUL JAIN

    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

    (0) 
    1. Tejas Chouhan 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.

      (0) 
      1. RAHUL JAIN

        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.

        (0) 
          1. pandu j

            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

            (0) 
            1. 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

              (0) 
    1. Tejas Chouhan 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

      (0) 
      1. Maitri Hegde

        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

        (0) 
  6. 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

    (0) 
  7. 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 

    (0) 

Leave a Reply