cancel
Showing results for 
Search instead for 
Did you mean: 

abap and fiori table sorting different

ukiranta
Participant
0 Kudos

Hello masters,

I have 3 input fields in my project. If I run my RFC, table sorting happens in a correct way.

However, if I run my fiori application, table sorting totally different.

The things here is actually I have no code in controller.js or view.xml. Can you please help to solve my issue?

Rajasekhar_Dina
Participant
0 Kudos

How is your OData implemented?

ukiranta
Participant
0 Kudos
//Here is my controller.js
onSearch: function(oEvent) {
	var that = this;
	var filterArr = [];
	var filterData = that.getView().getModel("filterModels").getData();

	filterArr.push(new sap.ui.model.Filter("Channel", sap.ui.model.FilterOperator.EQ, filterData.Channelid));
	filterArr.push(new sap.ui.model.Filter("Articleid", sap.ui.model.FilterOperator.EQ, filterData.Article));
	filterArr.push(new sap.ui.model.Filter("Sizevalue", sap.ui.model.FilterOperator.EQ, filterData.Sizevalue));
	if (filterData.RsrvStatus) {
		filterArr.push(new sap.ui.model.Filter("Active", sap.ui.model.FilterOperator.EQ, filterData.RsrvStatus));
	}
		if (filterData.Channelid == null) {
			MessageBox.alert("Please enter value for Channel.");
		}
	 else {
		that._oListFilterState.aFilter = [filterArr];
		that._applyFilterSearch(filterArr);
		that.onRefresh();
	}
},

_applyFilterSearch: function() {
	var aFilters = this._oListFilterState.aSearch.concat(this._oListFilterState.aFilter),
		oTable = this.byId("table"),
		oViewModel = this.getModel("worklistView");
	oTable.getBinding("items").filter(aFilters[0], "Application");
	// changes the noDataText of the list in case there are no filter results
	if (aFilters.length !== 0) {
		oViewModel.setProperty("/noDataText", this.getResourceBundle().getText("masterListNoDataWithFilterOrSearchText"));
	} else if (this._oListFilterState.aSearch.length > 0) {
		// only reset the no data text to default when no new search was triggered
		oViewModel.setProperty("/noDataText", this.getResourceBundle().getText("masterListNoDataText"));
	}
},

rajasekhar.dinavahi

Accepted Solutions (0)

Answers (0)