on 05-06-2020 9:07 AM
Hi there,
how can I call an OData Service or one of its methods with input parameters?
I do not want to load to much data in model so would it be possible to only load the needed data?
Thanks and best regards.
Jay
You can filter OData using $filter query and load data accordingly.
Ashutosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jay,
If you are calling read method then you can pass the $filter ( like mentioned by Ashutosh ) in the following fashion. If you want to limit the output you can also pass $top for getting only few records for the beginning.
var entitySet_url = lv_oDataUrl + "SetName?$filter=(field1 eq '') &$etop=20";
OData.read(entitySet_url, function(oResponse) { }
Regards,
Anmol
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think you should learn the basics by working through the SAPUI5 Walkthrough
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.