Skip to Content
Author's profile photo Wouter Lemaire

Create and use custom tile type

Dear Fiori Experts,

I was asked to add a Fiori app to the Fiori launchpad but with a total different tile layout than all the standard tile types. This meant I had to create a custom tile type. First I didn’t tought it would be possible to create custom tile types but than I came across the following blog series:

http://scn.sap.com/community/fiori/blog/2015/05/25/customised-tile-types-in-fiori-launchpad

So it is possible! 🙂


The blog series helped me very well to figure out how to create my custom tile. But I was missing the part to add my tile to the Fiori launchpad. Based on the blog series I’ve found I want to share a full end to end tutorial.


1) The Tile


I started by following the blogs to create my own Fiori tile type. I only wanted a tile with a title and a list. The title should be configurable from the Fiori launchpad designer. The list should come from an oData service. This meant I only need two fields. I removed all the unneeded fields from the configuration view and changed the layout of the tile view. You can find the full code on github:


GitHub – lemaiwo/CustomTile


My project looks like this:

  • CustomTile view
    • This contains the layout of the tile type
  • CustomTile controller
    • Controller for the tile type
  • Configuration view
    • View for the configuration in the launchpad designer
  • Configuration controller
    • Controller of the configuration view
  • CustomChip.xml

/wp-content/uploads/2016/08/f1_1021558.png

CustomChip.xml should contain the path to the tile type


<implementation>
      <sapui5>
           <basePath>./</basePath>
           <viewName>view/CustomTile.view.js</viewName>
      </sapui5>




      </implementation>

Deploy the sapui5 app to your system

/wp-content/uploads/2016/08/f2_1021589.png

2) Register the tile type as a chip


This part will show you how to create a chip which you’ll need to create a tile type. The chip will contain a name and url. The url will aim to the BSP application that contains the Custom Tile.


Go to transaction /n/ui2/chip


Create a chip:


/wp-content/uploads/2016/08/f3_1021590.png


The url should aim to the xml in the UI5 app of the tile type

/wp-content/uploads/2016/08/f4_1021591.png


3) Register the chip as tile type


Now we’ll register the chip as a tile type by using the name of the CHIP.


Go to transaction SE84 –> Web Dynpro  –> Web Dynpro-application


Search for CUSTOMIZE_COMPONENT and execute:


/wp-content/uploads/2016/08/f5_1021592.png


Double click on CUSTOMIZE_COMPONENT


/wp-content/uploads/2016/08/f6_1021593.png


Run the web dynpro application


/wp-content/uploads/2016/08/f7_1021598.png


Fill in the component name and configuration id –> click on New

/wp-content/uploads/2016/08/f8_1021599.png

Fill in a description

/wp-content/uploads/2016/08/f9_1021600.png

Add a new value to the parameterMultiVal

Select “parameterMultiVal” –> New –> values

/wp-content/uploads/2016/08/f10_1021604.png

Enter “X-SAP-UI2-CHIP:ZCUSTOM_APPLAUNCHER” –> Should be the same name as the name of the chip

/wp-content/uploads/2016/08/f11_1021605.png

4) Use the new Tile type

Finally we can use the tile by configuring the Fiori Launchpad designer.

Go to transaction /n/ui2/flpd_cust

Add a new tile to a catalog and you’ll see the custom tile type. (If not showing up, clear cache)

/wp-content/uploads/2016/08/f12_1021607.png

Fill in the title, service url for the list and the target url.

/wp-content/uploads/2016/08/f13_1021608.png

Preview in the launchpad designer:

/wp-content/uploads/2016/08/f14_1021609.png

/wp-content/uploads/2016/08/f15_1021610.png

5) Example of the oData service

Just a basic list of person with name and icon:

/wp-content/uploads/2016/08/f16_1021611.png

6) Result in the Fiori Launchpad

/wp-content/uploads/2016/08/f17_1021613.png

Now you can create your own custom Fiori Tile type. This opens a lot of possibilities!

Enjoy!

Kind regards,

Wouter

Assigned Tags

      33 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Vladimirs Semikins
      Vladimirs Semikins

      Nice! Thanks for sharing.

      Author's profile photo Naseem VP
      Naseem VP

      Thanks for sharing

      Author's profile photo Jeremy Good
      Jeremy Good

      Hi Wouter - it is great to see your curiosity and desire to share displayed here in the community, well done!  I also like the fact that you closed the loop in the part 3 blog comment section 🙂

      Author's profile photo Emmanuel Da Costa
      Emmanuel Da Costa

      Thanks for sharing.

      regards

      Emmanuel

      Author's profile photo Syambabu Allu
      Syambabu Allu

      Excellent..will surly try in my landscape. ...thanks for sharing ☺

      Author's profile photo Former Member
      Former Member

      Excellent Post, thanks a lot!
      I still have an issue tough, maybe someone can help:

      The custom tile launcher appears like it says in the blog, but when I want to create a tile with it, it shows the following:

      I can't click on it or anything and I just followed the steps provided here in the blog. Maybe someone else has had this and found a solution?

      Thanks!

      Kind Regards,

      Simon

      Author's profile photo Former Member
      Former Member

      In dev tools it complains about contract types or something:

      Author's profile photo Former Member
      Former Member

      Hi! You should delete wrong lines in CHIP configuration from example (file CustomChip.xml) - lines to be deleted are marked on the picture.
      Standard config might be used as an example, you could find it at your_GW_host/sap/bc/ui5_ui5/ui2/ushell/chips/applauncher_dynamic.chip.xml

      Author's profile photo Former Member
      Former Member

      Hi Akmet,

      Thanks for you response! Is this working on your side? I don't get any errors anymore but the tile is not working.

      Did you make any other changes to this project?

      Thanks!

      Kind regards,

      Simon

      Author's profile photo Former Member
      Former Member

      Yeah, there are more things to do. Maybe the reason is different versions of ui5 components. I've copied corresponding source files from my FLP runtime (view and controller for DynamicTile and its config). Please have a look at final code - https://github.com/tozkopan/sap-flp-custom-tile

      Author's profile photo Former Member
      Former Member

      Thanks!

      Author's profile photo Murthy K
      Murthy K

      This post is intriguing! Thanks,Wouter Lemaire

       

      Still facing some issues in this.

      Earlier, I got an error as shown below and I resolved it by deleting the wrong lines in CHIP configuration. Thank you, Former Member

      And now its throwing the below errors:

      Kindly help on this.

       

      Author's profile photo Wouter Lemaire
      Wouter Lemaire
      Blog Post Author

      Hard to tell what's going wrong. Did you took the latest version of the dynamic tile from your system?

      Are you sure that the CHIP configuration is coming through ? Had a lot of problems with that...

      Author's profile photo Former Member
      Former Member

      Hi Experts,
      I have followed the above process and created chip.But when i select that chip type from admin page i am getting below the error message.

      Kindly Help on this.

      Author's profile photo Wouter Lemaire
      Wouter Lemaire
      Blog Post Author

      Same as above comment, are you sure the chip config is coming through ? Try changing with modification key instead of customizing...

      Author's profile photo Pranav Nagpal
      Pranav Nagpal

      Hello Wouter,

      I have created a custom tile and in target mapping i have made it visible only for mobile device device, by selecting those device specific check boxes. Even though, tile is not suppose to be visible for desktop, but i can still see it on desktop. Is it something with launchpad that does not recognize the device type for custom tiles? Or something else needed on chip or custom tile?

       

      Thanks

      Pranav

      Author's profile photo Wouter Lemaire
      Wouter Lemaire
      Blog Post Author

      Not sure about that, didn't try that feature. Have you implemented code in your custom tile to use the device specific check boxes?

      Gr,

      Wouter

      Author's profile photo Jordi Vila
      Jordi Vila

      I have the same issue, did you find any solution?

      It seems is not supported, please check this note:

      https://launchpad.support.sap.com/#/notes/2591289

      Thank you,

      Jordi

      Author's profile photo Klaus Reiner
      Klaus Reiner

      Hi Wouter,

      I have just imported your example from GIT-Repository directly into SAP WebIDE-Full-Stack.

      But when running the component.js in the Sandbox Fiori-Launchpad, i am getting the following error:

      It seems if there is something wrong in the project structure.

      Please let me know, what needs to be done.

      Thanks, KIaus

      Author's profile photo Wouter Lemaire
      Wouter Lemaire
      Blog Post Author

      Hi Klaus,

      I would not start from my git project. It can be different depending on your UI5 version. You should try to find the standard code in the Fiori launchpad designer and use Google chrome developer tools.

      Gr,

      Wouter

      Author's profile photo Mathias Körner
      Mathias Körner

      Hi Wouter,

      good blog. After some errors I found out how to implement this on my system.

      What I’m now missing is a possibility to create a larger tile. Did you ever tried this?

      My tile.xml looks like this:

       

      <?xml version="1.0" encoding="UTF-8"?>
      <core:View 
      		xmlns="sap.suite.ui.commons" 
      		xmlns:ui="sap.suite.ui.microchart" 
      		xmlns:core="sap.ui.core" 
      		controllerName="views.KpiTile">
           <GenericTile 
        	 	id="kpiTile"
      	 	press="onPress" 
      	 	header="{/config/display_title_text}" 
      	 	subheader="{/config/display_subtitle_text}" 
      	 	frameType="TwoByOne"
      	 	mode="ContentMode"
      	 	>
              <tileContent>
              	<TileContent footer="{/config/display_info_text}">
                  	<content>
                      	<ui:ComparisonMicroChart size="L" scale="L">
      						<ui:data>
      							<ui:ComparisonMicroChartData title="Monat 1" value="10" color="Good}" />
      							<ui:ComparisonMicroChartData title="Monat 2" value="20" color="Error" />
      							<ui:ComparisonMicroChartData title="Monat 3" value="30" color="Critical" />
      						</ui:data>
      					</ui:ComparisonMicroChart>
      				</content>
      			</TileContent>
      		</tileContent>
      	</GenericTile>
      	
      </core:View>

      As you can see I have defined the frameType as TwoByOne, means it has to be 2 times wider then high. But on the launchpad I can not see it.

      Any suggestions how to solve this?

      Best

       

      Mathias

       

      Found the solution in this blog

      https://blogs.sap.com/2017/01/28/how-to-create-custom-tile-types-for-onpremise-fiori-launchpad/

      In the launcher.chip.xml the parameter col needs to be set to 2:

      <contracts>
      		<consume id="configuration">
      		<parameters>
                      <parameter name="tileConfiguration"></parameter>
                      <parameter name="col">2</parameter>
                  </parameters>
      		</consume>
      Author's profile photo Mathias Körner
      Mathias Körner

       

      Found the solution in this blog

      https://blogs.sap.com/2017/01/28/how-to-create-custom-tile-types-for-onpremise-fiori-launchpad/

      In the launcher.chip.xml the parameter col needs to be set to 2:

      	<contracts>
      		<consume id="configuration">
      		<parameters>
                      <parameter name="tileConfiguration"></parameter>
                      <parameter name="col">2</parameter>
                  </parameters>
      		</consume>

      Mathias

      Author's profile photo Naoto Amari
      Naoto Amari

      Hello @Wouter Lemaire

      I'm really greatful, following your steps everything i made the custom tile 😀 but what if i want to show some info consuming an odata passing a parameter, i'd do that in the controller of the tile , am i right? and the rest of the info with other odata introduce it in the configuration

       

      something like this:  https://answers.sap.com/questions/463671/pass-parameter-to-dynamic-tile.html

       

      Author's profile photo Wouter Lemaire
      Wouter Lemaire
      Blog Post Author

      Yes, should work like that.In theory, you can do everything like in an SAPUI5 app.

      Author's profile photo Naoto Amari
      Naoto Amari

      Hi Wouter Lemaire   do you have an example with xml view ? , be cause when i try to modify and deploy and all the steps i got an error :C

      Author's profile photo Wouter Lemaire
      Wouter Lemaire
      Blog Post Author

      No sorry...

      Author's profile photo Bassa Sai Pavan
      Bassa Sai Pavan

      Hi @Naoto Amari

       

      Same issue for me when i'm trying to modify the tile controller ..... do u have solution for this one?

       

       

       

       

      Author's profile photo Raghavendra H K
      Raghavendra H K

      Hello @Wouter Lemaire

       

      Thank you for sharing.

      In my launchpad catalog is getting added, but on click of the tile its directly adding to the group its not navigating to that configuration view, but configuration view is loading, Can u help me out,

      and my launchpad supports only 1.28 libraries, Is it possble to add the microochart on the tile ?

      Regards,

      Raghavendra

      Author's profile photo Raghavendra H K
      Raghavendra H K

       

      Hi All,

      Everyting is working as expected, But My requirement is how to make my customized chip tile as a bookmark tile because customer wants to add the tile using bookark services without defining any configurations, How to achieve this?

      Thanks in Advance,

      Regards,

      Raghavendra

      Author's profile photo Michael Smith
      Michael Smith

      Wouter,

      Great blog – thanks for sharing.

      Do these custom tile types survive UI5 upgrades?  Or do they have to be created all over again after an upgrade?

      Thanks,

      Michael

      Author's profile photo Wouter Lemaire
      Wouter Lemaire
      Blog Post Author

      Not always... try to avoid custom tile types is my advice. Just know it's possible in case it is a must for your use case.

       

      Kr, Wouter

      Author's profile photo Halil Ural
      Halil Ural

      Thanks, Wouter,

       

      Great blog.

       

       

      Author's profile photo Aleksandr karpov
      Aleksandr karpov

      Hi Wouter Lemaire .

      I have an interesting question, how i can debug custom tiles locally(Fiori tool CLI)? When i try to use standard template such as flpSandbox and flpSandboxMockServer i have an error that  controller not found.