Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP OData $select for complex types

Former Member
0 Likes
4,104

Hi,

currently I have some troubles with my SAP OData Service.
I have an entity with three properties:

  • A key field with the core type Edm.String
  • Two properties each has a complex type

I can access the fields of the complex types for $filter and $orderby with the property name and a / in front of it.

For example:
CustomerSet?$filter=AddressData/Email eq 'user@anydomain.de'

But if I try the same with $select I receive the following error:
"The URI is violating the construction rules defined in the Data Services specification"

I couldn’t find any information if the $select parameter supports complex types,
Does anyone now a solution for this problem?

Thanks for your help.

Best regards
Philipp

2 REPLIES 2
Read only

bpawanchand
Active Contributor
1,980

Hi,

Check the below Northwind service how can you get a subset of the result by using the combination of both filter and Select

Without Select

With Select

Thnaks, Pavan

Read only

0 Likes
1,980

Hi Pavan,

thanks for the fast answer.

But the problem with the Northwind Service is the same. It is not possible to select only one field from Address.
If I change your URL to Address/City I receive an error.

With Adress/City Select

Best regards

Philipp