同时使用$ filter和$ expand进行OData调用 [英] OData call with $filter and $expand simultaneously
问题描述
我一直在尝试调用一个实体,但是应该从其关联的实体调用结果.我尝试使用以下网址进行访问:
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 because the called function has these mandatory parameters.
我在URL上犯了任何错误或错误不存在吗?
Am I making any mistake on the URL or the error isn't there?
推荐答案
通常$filter
和$expand
可以组合使用,我们在应用程序中使用它.因此,请参阅 Layla的评论.另外,您应该告诉我们实际的错误是什么.
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.
如果MatnrGetdetailCollection
确实是一个实体集,则相应的实体必须具有名称为MatnrClassGetdetail
的导航属性,否则$expand
将不起作用.
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.
这篇关于同时使用$ filter和$ expand进行OData调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!