Skip to Content
Feb 02, 2021 at 01:39 PM

URI To Filter association property

119 Views Last edit Feb 03, 2021 at 07:00 AM 3 rev


I have developed a cds view like below and converted into an odata service (odata version v4) but when i try to filter a field from association it's not working. Please find the below uri's.

/sap/opu/odata/SAP/zodata_filters_cds/zodata_filters?$expand=to_ma&filter=to_ma/matkl eq 'L001'

/sap/opu/odata/SAP/zodata_filters_cds/zodata_filters?$expand=to_ma($filter=matkl eq 'L001')

define view zodata_filters
as select from vbak as vb inner join vbap as vp on vb.vbeln = vp.vbeln
association [1] to zmaterialtt as _ma on vp.matnr = _ma.matnr
key vb.vbeln,

Can anyone please suggest me the correct uri.