同时使用$ filter和$ expand进行OData调用 [英] OData call with $filter and $expand simultaneously

查看:801
本文介绍了同时使用$ filter和$ expand进行OData调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试调用一个实体,但是应该从其关联的实体调用结果.我尝试使用以下网址进行访问:

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆