cancel
Showing results for 
Search instead for 
Did you mean: 

$filter proprty in Netweaver Gateway Odata service not working

former_member190313
Active Participant
0 Kudos

Hello ,

I am creating a UI5 application on CRM server. I have created ZBAPIs in CRM and I consume these ZBAPIs in Netweaver Gateway server to create ODATA service. I have used service builder tool to achieve this. Howevr $filter proprty is not working for any entity set.

When i fire below query :

/sap/opu/odata/sap/ZCRM_RESOURCEPLANNINGTOOL_SRV/ResourcesSet/?$filter=PartnerId eq '0000000190'

I get all the records.

The entity property Filterable is set.

Please suggest.

Sheetal

Accepted Solutions (1)

Accepted Solutions (1)

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Any update on this discussion.? Did you find a solution?

Rgrds,

JK

former_member190313
Active Participant
0 Kudos

Hi All,

The issue is resolved. We have added import parameters in our ZBAPI and used them for filter.Its working now.

Thanks ,

Sheetal

Answers (3)

Answers (3)

dirk_roeckmann
Participant
0 Kudos

Hi Sheetal,

the input parameters of the Z function modules have to be range tables in order for the $filter function to  fully work beyond eq

regards

Dirk

sreenivas_pachva
Participant
0 Kudos

Hi Sheetal,

Remove slash ( / ) after entity set name and give the parameter names should be case sensitive which are same as in metadata

use below URL

/sap/opu/odata/sap/ZCRM_RESOURCEPLANNINGTOOL_SRV/ResourcesSet?$filter=PartnerId eq '0000000190'


The custom bapi is having input parameters not required to implement the filter logic in DPC_EXT class if you are using service builder,the builder automatically created filter logic for the input fields..please make sure your bapi, how it is working in debug mode..


Thanks


Sreenivas


former_member190313
Active Participant
0 Kudos

Hi Sreenivas,

I tried this , However I face the same issue

any suggestion .

Sheetal

sreenivas_pachva
Participant
0 Kudos

Hi Sheetal,

Check your custom BAPI with input parameter: PartnerId eq '0000000190'  then if it is working fine then keep break point and debug the code in DPC class get entity set method : /IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_ENTITYSET



Thanks


Sreenivas

ChandraMahajan
Active Contributor
0 Kudos

Hi Sheetal,

you need to implement logic for filter in get_entityset method of DPC_EXT class.

you will get the filter values in the method parameter IT_FILTER_SELECT_OPTIONS.

There is alternative way to get the values as well. Please see my blog

so you have to read the filter value and then accordingly use it to filter data.

Regards,

Chandra