Skip to Content
avatar image
Former Member

SAP OData $select for complex types

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jun 20, 2017 at 01:54 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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