Variant Management Implementation Guide (UI5)

The variant management control allows users to load, save, and change variants. You can use variant management with filter bar. The filter settings consist of selection fields, their filter parameters, and layout, But this blog refers to a variant management that allows users to load, save, and change variants without interacting filter bar.

Biggest challenge in such implementation of variant management is to enable save button, for which i have used “currentVariantSetModified(true);”

Here is the step by step guide to implement such variants –

I have created following view to implement Variant Management.

This view has two controls

Filter bar with two input fields and one checkbox.

Variant management.

Variant items are bound with OData service So the data is coming from database table.

Unless you are asking for clarification/correction of some part of the Document, please create a new Discussion marked as a Question. The Comments section of a Blog (or Document) is not the right vehicle for asking questions as the results are not easily searchable. Once your issue is solved, a Discussion with the solution (and marked with Correct Answer) makes the results visible to others experiencing a similar problem. If a blog or document is related, put in a link. Read the Getting Started documents (link at the top right) including the Rules of Engagement.

NOTE: Getting the link is easy enough for both the author and Blog. Simply MouseOver the item, Right Click, and select Copy Shortcut. Paste it into your Discussion. You can also click on the url after pasting. Click on the A to expand the options and select T (on the right) to Auto-Title the url.

We have a requirement to implement variant management where we need to save tiles as variants with selection within that gets execution on navigation.

Example: We have an Orders application with master list containing ‘Filter / Grouping / Sort’ options. When we try to save the variant with specific selections, a new tile should be created and on navigating to the newly created tile, the variant should be applied.

Above scenario is possible ? If yes, can you please point the steps we should follow ?

I have the same requirements as in in the Guide above. I want to implement the Variant Management for my Filterbar using Lrep (flexibilty Service), but can’t figure out how to get it done. I can only find examples for Smart-Elements, but im not using Smart-Elements. Is it possible that you could provide an example? I would really appreciate.

FakeLrepConnectorLocalStorage.enableFakeConnector({
sInitialComponentJsonPath: jQuery.sap.getModulePath("ips.ac.lrep.component-changes") + ".json"
});
The default variants needs to be stored in a file inside the folder lrep/component-changes.json
The file should look like this

I created a shared variant and want to make that shared variant as default variant for all other users. Also have a use case where need to have a logic to dynamically set variant based on some conditions. Is there a way to get a varinat set in OnInit() funtion in conroller.js ?

I posted a question in question in Q&A too.. But helpful no responses. Any hint is greatly appriciated.