Skip to Content

SAPUI5 getBinding() returns undefined

Feb 07, 2017 at 10:08 AM


avatar image


I'm an abap developer, but now i'm trying to build a simple application in SAPUI5 and I'm stuck with a Problem. I think the solution is quiet simple, but I can't figure it out.

I built the application using webIDE and a simple oData Service that provides me with data to fill a sap.m.table in a XML view. works quiet good.

But now I'm trying to set a filter on the data in the the table. In my view Controller I have the following code, first line works, I get a reference to my table, but the getBinding() method just Returns undefined and I can't figure out why.

Thanks in advance for your help.

regards Alex

var oTable = this.getView().byId("__table0");  
var oTableBinding = oTable.getBinding("items");
var filters = [];  filters.push(new sap.ui.model.Filter("ProjectNo", "EQ", "999"));

10 |10000 characters needed characters left characters exceeded

Do you really have the tableId defined this way ("__table0")? It looks like the auto generated ID. Can you please share your view as well?

* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Alexander Beckmann Feb 14, 2017 at 05:05 PM

After some further reading and try outs I used another way and now I am using the bindAggregation method, which also allows filtering.

Thanks to all who tried to help me to solve my problem.

kind regards


10 |10000 characters needed characters left characters exceeded
Alexander Beckmann Feb 07, 2017 at 10:37 AM

yep, that is the id generated by webIDE. In my XML view I just bind the data via items="":

that is the table Definition in my view.xml:

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Please try adding an id (ex: "myTable") to your table control and access it.

You could accessing it like



Srikanth KV Feb 07, 2017 at 08:26 PM

I think you are trying to access the binding information of the table in onInit method before the data is loaded. If so check this link

10 |10000 characters needed characters left characters exceeded