Skip to Content
avatar image
Former Member

Can Complex types be used in a Filter

Hello,

We have Entity Type (Task) with a property (CreatedBy) which is a Complex Type (User). The Complex Type contains the properties UserId & FullName.

Is filtering on Complex Type supported? In other words, can I filter on CreatedBy-UserId?

How should the syntax be in the URL?

Regards, Paul Lauwers.

Application Engineer

IFF.


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Feb 11, 2015 at 12:46 PM

    Hello Paul,

    Yes its possible.

    If ' C_Type ' is your Complex Type which has ' Name ' and ' UserId '.

    Then URL is ->

    /sap/opu/odata/sap/Z_SERVICE/Dummy_Entity?$filter=C_Type/Name eq 'John' and C_Type/UserId eq '00001'

    Regards,

    Ashwin

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 11, 2015 at 12:47 PM

    Hi,

    try $filter=CreatedBy/UserId eq 'xyz '

    Regards,

    Chandra

    Add comment
    10|10000 characters needed characters exceeded