Skip to Content
0

SAPUI5 Variant Management: Save Variant is not possible

Jun 13, 2017 at 08:46 AM

343

avatar image
Former Member

Hi,

We need to save a filter variant in a SmartFilterBar. But it doesn't work. This is the SmartTable based on an OData Model. We have the SmartFilterBar which works properly. There’s only one problem with the Variant saving.

Button "SAVE" is not active. And If I define field conditions in the FilterBar, I catch some exceptions:

/IWFND/CX_SODATA_EDM_PROVIDER

/IWCOR/CX_DS_URI_NOT_MATCHING

Below shows View.xml

<core:View 
xmlns:core="sap.ui.core" 
xmlns="sap.m"
xmlns:smartFilterBar="sap.ui.comp.smartfilterbar" 
xmlns:smartTable="sap.ui.comp.smarttable"
xmlns:smartVariantManagement="sap.ui.comp.smartvariants" 
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:table="sap.ui.table"
xmlns:ScrollContainer="sap.ui.core.ScrollBar"
xmlns:commons="sap.ui.commons"
xmlns:app="http://schemas.sap.com/sapui5/extension/sap.ui.core.CustomData/1"
controllerName="telereport.SmartTable" 
height="100%">


<smartFilterBar:SmartFilterBar
id="smartFilterBar"
entityType="TELEREPORT" 
persistencyKey="SmartFilter_Explored"
liveMode="true" 
enableCustomFilter="true" 
smartVariant="pageVariantId"
assignedFiltersChanged="onFiltersChanged">


<smartFilterBar:controlConfiguration>
<smartFilterBar:ControlConfiguration
key="Partner" visibleInAdvancedArea="true"
preventInitialDataFetchInValueHelpDialog="true">
</smartFilterBar:ControlConfiguration>
<smartFilterBar:ControlConfiguration
key="Type" visibleInAdvancedArea="true"
preventInitialDataFetchInValueHelpDialog="true">
</smartFilterBar:ControlConfiguration>
<smartFilterBar:ControlConfiguration
key="Region" visibleInAdvancedArea="true"
preventInitialDataFetchInValueHelpDialog="true">
</smartFilterBar:ControlConfiguration>
<smartFilterBar:ControlConfiguration
key="Sap" visibleInAdvancedArea="true"
preventInitialDataFetchInValueHelpDialog="true">
</smartFilterBar:ControlConfiguration>
</smartFilterBar:controlConfiguration>



</smartFilterBar:SmartFilterBar>
<smartTable:SmartTable 
id="LineItemsSmartTable"
entitySet="TELEREPORTSet" 
smartFilterId="smartFilterBar"
smartVariant="pageVariantId" 
tableType="AnalyticalTable"
useExportToExcel="true" 
useVariantManagement="true"
useTablePersonalisation="true" 
header="Клиенты ТЕЛЕ" 
navigationMode="Scrollbar"
showRowCount="true" 
persistencyKey="SmartTableAnalytical_Explored"
enableAutoBinding="true" 
enableCustomFilter="true"
class="sapUiResponsiveContentPadding" 
requestAtLeastFields="Link"
showFullScreenButton="true" 
height="100%"
initiallyVisibleFields="Region,City1,Status,Type,Form,Nameorg,Sap,Underbp,Deal,Gfk">


<table:Table selectionMode="None" fixedColumnCount="1"
autoResizable="false" height="100%»>
….    ….    …. 
</table:Table>
</smartTable:SmartTable>
</VBox>
</core:View>

Please, help me to fix this issue.

Thanks and Regards.

1.gif (25.6 kB)
2.gif (60.5 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Iftah Peretz
Jan 21 at 06:42 PM
0

Hi,

What happens when you put values in the fields of the variant (on the "Filter" screen, in your case "Region, Partner...")? Then can you save it?

The other issue is unclear, first, I can't read the image text (2.gif) and unless you can have some JSFiddle/JS Bin etc. to test on, it would be hard to help with...Based on the names of the exceptions it looks like you have some issues with the OData (binding type, Auth. accessing issues, mismatch to view and the list goes on).

Would recommend you try and implement a working example (from here) and work your way up to what you need.

Share
10 |10000 characters needed characters left characters exceeded