cancel
Showing results for 
Search instead for 
Did you mean: 

Variant is disabled in smart filter bar and table

Former Member
0 Kudos

Variant is disabled for botht smart filter and smart table.
I have chked below services are activated in SICF and console is showing the error "Component-changes.json could not be loaded".

/SAP/BC/UI5_UI5

/SAP/BC/LREPissue.pngconsole.png

ankurbabu1
Explorer
0 Kudos

Hi Radek,

I was also facing the same issue but when I deployed to backend, its working now. But when I am saving some data(values in the filter criteria) in a new variant, only the variant name is getting saved but not the data. When I load the application again, only the variant name is coming as part of variants list but not the data in fields. Can you help me in solving the issue that why the data is not getting saved. My current library version is 1.38.14.

Is there any note or upgrading the library version will solve the issue?

Accepted Solutions (0)

Answers (9)

Answers (9)

Former Member

From where you are trying to access the app? if you try to work with variant management from WEBIDE or Eclipse it wont work.

You need to deploy it to launch pad to work with variant management

0 Kudos

Hello,

I had similar issue where the variant where disabled but somehow working within the LaunchPad. I had a look at the code and find out that the SmartVariantManagement is calling Utils.js method: _getAppComponentForComponent - in order to get an AppComponent

		/**
		 * Returns the Component that belongs to given component whose type is "application".
		 *
		 * @param {sap.ui.base.Component} oComponent - SAPUI5 component
		 * @returns {sap.ui.base.Component} found component
		 * private
		 */
		_getAppComponentForComponent: function (oComponent) {

                 ......
                 if (oSapApp && oSapApp.type && oSapApp.type !== "application") {
				//we need to call this method only when the component
				//an instance of Component is in order to walk up the tree.
				if (oComponent instanceof sap.ui.core.Component) {
					oComponent = this._getComponentForControl(oComponent);
				}
				return this.getAppComponentForControl(oComponent);
			}


			return oComponent;
		},

My component was declared as type: "component" but then i've switched to type: "application" - the variant management started to work. So it looks like in order to be enabled, the variant management needs to find an AppComponent.

Hope this will help.

Patrice.

former_member103241
Discoverer
0 Kudos

If you start the developers tool(F12) you will see there is an error referring to missing component-changes.json. Add this file to your project at the same level as the Component.js file. Then add below config to the file:

{ "changes": [], "settings": { "isKeyUser": true, "isAtoAvailable": true, "isProductiveSystem": true } }

This way the variant button should be enabled.

former_member374496
Participant
0 Kudos

Even me too facing the same issue, any one can give me a solution?

0 Kudos

Even i faced the same error and got it working after deploying to launchpad.

Former Member
0 Kudos

Did you get a resolution to this?

Former Member
0 Kudos

Hi Radek

I tried deploying the app to the FIORI Launchpad, still the variant is disabled . Please refer to the below screen shot.

Thanks

Asmita

Former Member
0 Kudos

Did you get a resolution to this?

Former Member
0 Kudos

Hi All

I am facing a similar issue where the Variant button is disabled. Please refer to the below screen shot

variant.png

Below is the code I am using for displaying Smart table

<smartTable:SmartTable id="LineItemsSmartTable" entitySet="LineItemsSet" smartFilterId="smartFilterBar" tableType="ResponsiveTable" useExportToExcel="true" editable="false" useVariantManagement="true" useTablePersonalisation="false" header="Entities" showRowCount="true" enableAutoBinding="true" persistencyKey="SmartTablePkey"

Former Member
0 Kudos

As Basavaraja Goudar said it won't work unless you deploy it to the FIORI Launchpad. You are running it in eclipse on local server.

Former Member
0 Kudos

Hello,

whether this issue is solved.?

I am also facing same problem.