ODATA / SAP Gateway: About Query with $filter and

2019-08-31 09:56发布

I've been trying to call a entity, but i'm supposed to call the results from its associated entities. I tried to do it with the following URL:

/sap/opu/odata/XXXXXXXX/SERVICE_NAME/MatnrGetdetailCollection?$filter=IVendorId eq '1701' and ILanguage eq 'P' and IMaterial eq 'M-05'&$expand=MatnrClassGetdetail

I must use the filter cuz the called function has these obligatory parameters.

Am I making any mistake on the URL or the error isn't there?

2条回答
孤傲高冷的网名
2楼-- · 2019-08-31 10:14

There is some problem with the URL when you want to go for obligatory parameters. Please pass them as key values in segw and and go for the format I'm sending:

/sap/opu/odata/sap/SERVICE_NAME/EntitySet(keyfield='value',keyfield='value')/?$expand=navigationName
查看更多
欢心
3楼-- · 2019-08-31 10:15

In general $filter and $expand can be combined, we use it in our application. Therefore please see Layla's Comment. In addition, you should tell us what the actual error is.

If MatnrGetdetailCollection is indeed an entity set, then the corresponding entity must have a navigation property of the name MatnrClassGetdetail, otherwise $expand won't work.

查看更多
登录 后发表回答