on 10-28-2019 7:48 AM
Hi,
I am trying to read oData service along with filters as below , which is working fine
this.getOwnerComponent().getModel().read(regPath, { async: false, filters: oFilters, success: function (oData, Response) { }, error: function () { busyDialog.close(); } });
But when try to add search to odata.read as below , it is ignoring search and giving me same results
this.getOwnerComponent().getModel().read(regPath, { async: false, urlParametrs: {"search": "200000002"}, filters: oFilters, success: function (oData, Response) { }, error: function () { busyDialog.close(); } });in Gateway client, i tried with URL where i can see the result/sap/opu/odata/sap/EAM_OBJPG_MAINTORDANDOPER_SRV/C_ObjPgMaintOrderAndOperation?$filter=MaintenanceOrderType eq 'PM02' and (TechnicalObject eq 'p') & search=200000002
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Pass it in the filter property.
var aFilters = [];
var oFilter = new Filter({
path: "search",
operator: FilterOperator.EQ,
value1: 200000002
});
aFilters.push(oFilter);
this.getOwnerComponent().getModel().read(regPath,
{
async: false,
filters: aFilters,
success: function (oData, Response) {},
error: function () {
busyDialog.close();
}
});
Kind regards,
Dries
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Will that option work? as "search" is a url parameter and the OP did a spelling mistake and it didn't work..
My bad, indeed. I thought the requirement was calling the data with a filter where X equals 200002.
Regards,
Dries
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.