Skip to Content
0

SAP OData $select for complex types

Jun 20, 2017 at 12:12 PM

98

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Pavan Bhamidipati Jun 20, 2017 at 01:54 PM
1

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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

0