cancel
Showing results for 
Search instead for 
Did you mean: 

S/4 HANA Public Cloud - Sales Order Odata API - How to Add Filter to Expanded Attribute

rahuljain257
Participant
0 Kudos
354

Hello Everyone,

Could anyone please guide me on how to add a filter to an expanded attribute?

Here is an example for your reference: The following URL expands the items (Sales Order Item) and aligns them with the Sales Order:

URL: https://xxx/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrder()?$expand=to_Item

However, when I try to add a filter inside the expand operator, it doesn't seem to work:

URL: https://xxx/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrder('2')?$expand=to_Item($filter=SDProces...

rahuljain257_0-1730103655292.png

Any insights or suggestions would be greatly appreciated.

Regards,

Rahul Jain

Accepted Solutions (1)

Accepted Solutions (1)

RalfHandl
Product and Topic Expert
Product and Topic Expert
0 Kudos

The API in question uses OData V2, and OData V2 does not allow filtering expanded items.

Please check whether there is a newer OData V4 API and switch to it.

Answers (0)