Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Filter for child enitty type


I am facing problem with filter criteria for child entity. Let me give you an example.

There are 2 entity types:

1. Order

2. OrderItem

I have created the association between these 2 entities. Order entity is parent entity and OrderItem is child entity.

I have implemented the GET_ENTITYSET for OrderItem entity.

I am trying to call the GET method with filter parameter.

For Example:

OrderCollection('100000008212')/OrderItemCollection?filter=Rate gt 100

Following is the default code in GET_ENTITYSET to convert the select option to internal table.

                   is_select_option = ls_filter
                   et_select_option = lr_rate ).

               READ TABLE lr_rate INTO ls_rate INDEX 1.
               IF sy-subrc = 0.
                 lv_rate = ls_rate-low.

I am getting the "Rate" filter value in lo_filter variable but lo_filter->convert_select_option() is not returning the internal table. I have debugged the lo_filter->convert_select_option() method and found that it is checking properly 'Rate' with Order entity properties.

'Rate' property is only available in OrderItem Entity not in Order Entity so that why lo_filter->convert_select_option() not returning internal table.

I am just wondering why they are only comparing the filter property of child entity with parent entity properties. Any Idea??



Former Member
Former Member replied

Please refer to Note

1996855  -

The filter method convert_select_option returns an empty list if a filter is used for an entityset with navigation path

1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question