$ expand中的Odata过滤器

2020-08-23 02:06发布

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


我有odata:https://mytenant/sap/byd/odata/cust/v1/purchaseorderstaging/PurchaseOrderCollection?$ format = json&$ expand = PurchaseOrderItem/PurchaseOrderItemAccountingCodingBlockDistribution/PurchaseOrderAccountingCodingBlockAssignment。添加到过滤器
来自$ expand PurchaseOrderItem/PurchaseOrderItemAccountingCodingBlockDistribution/PurchaseOrderAccountingCodingBlockAssignment的ProjectID?

JSON:

 {
   " d":{
     "结果":[
       {
         " ObjectID":" 00163E8838E71ED9A5E01D1B788E2762",
         " ID":" 1",
         " PurchaseOrderLifeCycleStatusCode":" 10",
         " PurchaseOrderConfirmationStatusCode":" 9",
         " GrossAmount":" 5390000.000000",
         "总净额":" 4900000.000000",
         "总税额":" 490000.000000",
         " CurrencyCode":" IDR",
         " LastChangeDateTime":"/日期(1561450856000)/",
         " OrderedDateTime":"/img/Date(1561437455000)/",
         " PurchaseOrderItem":[
           {
            
             " ObjectID":" 00163E8838E71ED9A5E01EBFC7612762",
             " ParentObjectID":" 00163E8838E71ED9A5E01D1B788E2762",
             " ID":" 1",
             " NetAmount":" 4900000.000000",
             "金额":" 4900000.000000",
             " BaseQuantity":" 1.00000000000000",
             "描述":"赞助内容",
             "数量":" 1.00000000000000",
             " unitCode":" XSX",
             " TaxAmount":" 490000.000000",
             " ProductID":"",
             " PurchaseOrderItemAccountingCodingBlockDistribution":{
               " ObjectID":" 00163E8838E71ED9A5E01EBFC7612762",
               " ParentObjectID":" 00163E8838E71ED9A5E01EBFC7612762",
               " PurchaseOrderAccountingCodingBlockAssignment":[
                 {
                   " ObjectID":" 00163E8838E71ED9A5E01EF0D7EBA762",
                   " ParentObjectID":" 00163E8838E71ED9A5E01EBFC7612762",
                   " ProjectID":" CPSO1",
                   " TaskID":" CPSO1-1"
                 }
               ]
             }
           }
         ]
       }
     ]
   }
 }
 

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


我有odata:https://mytenant/sap/byd/odata/cust/v1/purchaseorderstaging/PurchaseOrderCollection?$ format = json&$ expand = PurchaseOrderItem/PurchaseOrderItemAccountingCodingBlockDistribution/PurchaseOrderAccountingCodingBlockAssignment。添加到过滤器
来自$ expand PurchaseOrderItem/PurchaseOrderItemAccountingCodingBlockDistribution/PurchaseOrderAccountingCodingBlockAssignment的ProjectID?

JSON:

 {
   " d":{
     "结果":[
       {
         " ObjectID":" 00163E8838E71ED9A5E01D1B788E2762",
         " ID":" 1",
         " PurchaseOrderLifeCycleStatusCode":" 10",
         " PurchaseOrderConfirmationStatusCode":" 9",
         " GrossAmount":" 5390000.000000",
         "总净额":" 4900000.000000",
         "总税额":" 490000.000000",
         " CurrencyCode":" IDR",
         " LastChangeDateTime":"/日期(1561450856000)/",
         " OrderedDateTime":"/img/Date(1561437455000)/",
         " PurchaseOrderItem":[
           {
            
             " ObjectID":" 00163E8838E71ED9A5E01EBFC7612762",
             " ParentObjectID":" 00163E8838E71ED9A5E01D1B788E2762",
             " ID":" 1",
             " NetAmount":" 4900000.000000",
             "金额":" 4900000.000000",
             " BaseQuantity":" 1.00000000000000",
             "描述":"赞助内容",
             "数量":" 1.00000000000000",
             " unitCode":" XSX",
             " TaxAmount":" 490000.000000",
             " ProductID":"",
             " PurchaseOrderItemAccountingCodingBlockDistribution":{
               " ObjectID":" 00163E8838E71ED9A5E01EBFC7612762",
               " ParentObjectID":" 00163E8838E71ED9A5E01EBFC7612762",
               " PurchaseOrderAccountingCodingBlockAssignment":[
                 {
                   " ObjectID":" 00163E8838E71ED9A5E01EF0D7EBA762",
                   " ParentObjectID":" 00163E8838E71ED9A5E01EBFC7612762",
                   " ProjectID":" CPSO1",
                   " TaskID":" CPSO1-1"
                 }
               ]
             }
           }
         ]
       }
     ]
   }
 }
 
付费偷看设置
发送
2条回答
一只江湖小虾
1楼-- · 2020-08-23 02:49

嘿,您尝试过这样的事情吗?

https://mytenant/sap/byd/odata/cust/v1/purchaseorderstaging/PurchaseOrderCollection?$ format = json&$ expand = PurchaseOrderItem/PurchaseOrderItemAccountingCodingBlockDistribution/PurchaseOrderAccountingCodingBlockAssignment&$ filter = PurchaseOrderItemAccountingPurchaseOrderItemAccount >

huskylover
2楼-- · 2020-08-23 02:40

如果是OData v2,则无法将过滤器应用于扩展。 在V4中,我认为它可用。

致谢

Joseph

一周热门 更多>