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:
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.
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??
Please refer to Note