Skip to Content
avatar image
Former Member

unable to encode + sign in OData request URL

Hi,

Right now we are working on a project using SAPUI5 SDKs and facing a challenge. We are trying to consume a OData service from SAPUI5's JSON Model. We are passing a string value with + sign to the OData service url. But + sign by default got interpret as space and we were not able to process further. Later, we tried to encode + with a predefined js function encodeURIComponent() as %2B instead of + but, still we are facing the same challenge.

Please suggest some alternatives to encode + sign in Odata service request url. Thanks.

Sample Request URL  - OData Service Request

http://xx.xx.xx.xx/z_sgm_pwh/GoodsReceipt1Tab(GRHUList='SomeStringWith+Sign')

Thanks,

Rajesh

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Dec 11, 2013 at 10:13 AM

    Do you really need the + sign or can you use another character? %2B is the correct encoding for the plus sign. If it doesn't work maybe SAP itself replaces the + sign in the url with a space?

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Stephanie,

      Thanks for your reply. Yes I need + sign, we are passing material number from mobile to backend. Its system generated number in our industry, we cant replace it just like that. Also we are thinking of raising OSS message to SAP. But before that just wanna check with expertise suggestions as well. Thanks again.