cancel
Showing results for 
Search instead for 
Did you mean: 

Mutiple filters issue in the query

Former Member
0 Kudos

Hi all,

Our service has multiple filter option for Odata request . For eg: We
have Company code ,Number, Delivery start date ,delivery end date etc. From
SharePoint BCS when they  
don't have input for anyone of the value , Let say  “Company code”  they are filling with value true  and below is the odata URI being sent from SharePoint on this request.  /sap/Service_name/POHeader?$filter=true and PoNumber eq '90001525’ and
DeliveryStartDate eq datetime’2013-03-06’ and DeliveryEndDate eqdatetime’2013-05-05’

When processing  the Above URI in sap , sap completely ignores parsing the filter string and in our data provider class , we cannot even able to capture any of the values for filter and hence our Query fails to send the right result. I am not sure if above URL Syntax is Right for multiple filter option and what is your suggestion on the above scenario.

In method get GET_ENTITYSET, both the filters  IT_FILTER_SELECT_OPTIONS and IV_FILTER_STRING are empty.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Keerthi,

I think the syntax isn't quite right. The ?$filter=true might cause the problem. Are you building the URL in your own .Net coding or is it assembled by BCS?

Do you get a proper response in the Gateway Client if you try the following:

/sap/Service_name/POHeader?$filter=PoNumber eq '90001525’ and
DeliveryStartDate eq datetime’2013-03-06’ and DeliveryEndDate eqdatetime’2013-05-05’

(I removed the 'true' from the URL.)

Cheers, Alex

Former Member
0 Kudos

Hi Alex,

If I remove true statement ..explicitly  , and run that query in duet , it is working. But from SP side ..

when the SP team is adding all the filters and filling only one of them , then we  are getting 'true' statement along with the filled filter. It is from BCS.

Former Member
0 Kudos

Hi Keerthi,

Thanks for clarifying. Unfortunately I don't know how to correct this on BCS side. I suggest to open a support ticket and we can route this to the Microsoft colleagues to assist.

Maybe some of the other forum members can chime in here too.

Cheers, Alex