Skip to Content

Error in special character '#' in OData filter

Hi Experts,

I am getting the following error while doing the OData read call from SAPUI5 application.

When I am sending any string (like service) with some entity set its working fine.

Ex- /EtMatnrSet?$filter=Matnr%20eq%27service%27

But when my string contains special character value '#' like (servi#ce) it not reading anything after '#'.

Ex- /EtMatnrSet?$filter=Matnr%20eq%27servi

So, Kindly provide any solution so that I can send special character '#' while doing the OData read call.

Thanks in advance.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Mar 10, 2017 at 07:39 AM

    Use encodeURI() function to first encode the string containing characters like # and then pass it to the filter.

    JavaScript encodeURI() Function

    Add comment
    10|10000 characters needed characters exceeded