Skip to Content

SAPUI5 - Set default Variant

Feb 28 at 08:22 PM


avatar image


I have a Fiori application and have a conroller.js file. I also created a shared varaint.

I am strugging with setting the created variant as a default variant for all other users.

I saw class - class sap.ui.comp.smartvariants.SmartVariantManagement in Demo Kit but not sure what all methods will help. Did many trial and error, no luck so far.

setting variant should be in onBeforeRendering or OnInit ? Any help with some psedocode is appreciated.

Help !


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Bruno Lucattelli
Feb 28 at 10:06 PM

Hello Tanveer Shaikh,

Thank you for your post. It seems that you've chosen the wrong tag for your question which decreases its chances to be answered. In the future, please submit your question with the right tag.

You can learn more about tags at and browse all existing tags here:

For general information and tips about asking questions in the community, please visit this page:

I've removed the wrong tags for this question for now. Please post according to the guidelines provided above. In case you have any additional questions regarding the SAP Community, please reach out to scnmoderators (at ) sap (dot) com.

Thank you for your understanding.

Bruno Lucattelli
SAP Community Moderator

10 |10000 characters needed characters left characters exceeded