Skip to Content
avatar image
Former Member

SAPUI5 bind data from oData function import in my XML view


I'm new in SAP UI5 and Gateway, I'm using a function import that takes as import value the URLparams of my application and returns an entitySet. I need to bind this function import to my table created in the XML view, my question is how can I send the URLparam from my controller to my XML View. Someone has an idea ? or I have to take another route?

Many Thanks,


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • May 24, 2017 at 08:31 AM

    once you get an entityset, bind it to table without any URLParameter. post bind you can filter the items as below if you need only filteration:

    var filter1 = new sap.ui.model.Filter("param1", sap.ui.model.FilterOperator.EQ, "val1");
    oTable.getBinding("items").filter([filter1]); // you can number of filters like [filter1, filter2,.........]

    Or, if you need any more urlparameters like expand,select etc., then its good do read operation as below:"/entityset",{
      filters: aFilters,
      urlParameters:{"$expand": "Header2Items"},
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 24, 2017 at 01:19 PM

    Thank you for your feedback. I need to call a function import with parameter not to filter in an entityset. Actually, I bind items in my controller as I pass the urlParam to the function import. My question is if I can do more properly this with passing my param in the XML view and do the bind in XML?

    Add comment
    10|10000 characters needed characters exceeded

    • i am not getting you.....

      what i can suggest you as per my understanding is: you can not pass dynamic value for urlparameters from controller to xml view. only static values can be pass in xml.

      I think you could post your query more precisely.