cancel
Showing results for 
Search instead for 
Did you mean: 

Does oData V4 under ECC 750 support Lambda Operators for "Member Access Expressions" ?

Raphael_Sommer
Participant
0 Kudos
124

OData defines two operators "any" and "all" that evaluate a Boolean expression on a collection. They can work on either collection properties or collection of entities. 

Now I wanted to do the same stuff like here in the blog of @Andre_Fischer with Material (MaterialGeneral - MARA to MaterialSales - MVKE)

OData V4 code based implementation - Overview - SAP Community

Raphael_Sommer_0-1721978216568.png

I tried for example this oData Call:

 

/sap/opu/odata4/sap/z_material/default/sap/z_material/0001/MaterialGeneral?$filter=_Sales/any(d:d/Salesorganization eq '0100')

 

But then i get the following error in SAP Gateway, that it can not generate the open sql where clause:

Raphael_Sommer_1-1721978470292.png

In note 2305033 I find some infos, but it is not totally clear for me.

In debugging I think I found the soulution (only unary and binary nodes are supported and not member access which is the case in my example):

Raphael_Sommer_0-1721980810998.png

 

Raphael_Sommer_2-1721978708533.png

I set up navigation properties etc, all things like $expand, $select and so work quite well. 

Am I right that this is not supported under ECC 750 and maybe under S4/HANA it is?

If not can i do some special ABAP implementation in my data provider class? Or should I direct start filtering from the MaterialSales entity, but then I can also setup navigation to MaterialGeneral and expand it, but then the cardinality is not as I prefer, because MaterialGeneral should be once in the response and MaterialSales can have multiple cases (for every salesorganization): MaterialGeneral 1 ... many MaterialSales 

Thank you,

best regards, Raphael

 

Accepted Solutions (0)

Answers (0)