Skip to Content
0

IT_FILTER_SELECT_OPTIONS range table is is not filled with passed filter options

Mar 08, 2017 at 07:59 AM

205

avatar image
Former Member

We are using SEGW transaction to create ODATA service using CDS as data source. We have build a SAPUI5 app with same. In UI, we have filter field with Value help associated. The issue is: When we pass certain filter query in GET_ENTITYSET call, IT_FILTER_SELECT_OPTIONS range table is is not filled with passed filter options. Example GET call, when IT_FILTER_SELECT_OPTIONS range table is is not filled with passed filter options:

ENTITYSETNAME?$skip=0&$top=25&$filter=(((PurchaseRequisition%20ge%20%2710006539%27%20and%20PurchaseRequisition%20le%20%2710006543%27))%20and%20(PurchaseRequisition%20ne%20%2710006541%27))

Although data is returned from GET_ENTITYSET call. But IT_FILTER_SELECT_OPTIONS range table is is not filled with passed filter options.

For below GET call, IT_FILTER_SELECT_OPTIONS range table is filled with passed filter options: GET C_PurchaseReqMassUpdate?$filter=(Plant%20eq%20%271000%27)

In our use case, we are depending on IT_FILTER_SELECT_OPTIONS range table to be filled with passed filter options. Is this desired behavior or current limitation?

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

1 Answer

Nabi Zamani Mar 08, 2017 at 01:01 PM
0

SAP GW is not always able to create the select options for you... Your case is one example:

EntitySet?$skip=0&$top=25&$filter=(((PurchaseRequisition ge '10006539' and PurchaseRequisition le '10006543')) and (PurchaseRequisition ne '10006541'))

I think if you would leave the last and $filter aways then you would get some select option generated (well, I can't test that for you...). Of course, I'm sure you need that last filter and hence that's not an option.

You could implement the visitor interface /IWBEP/IF_MGW_EXPR_VISITOR which allows you to process the filter expression tree. Or you could use the GW APIs to get an Open SQL Where claus (assuming you have direct access to the DB). For details see http://help-legacy.sap.com/saphelp_gateway20sp11/helpdata/en/17/d381522bf4214fe10000000a445394/content.htm

Cheers, Nabi

Share
10 |10000 characters needed characters left characters exceeded