cancel
Showing results for 
Search instead for 
Did you mean: 

unable to encode + sign in OData request URL

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member686809
Discoverer
0 Kudos

Hi

Any solution for this ?

Former Member
0 Kudos

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?

Former Member
0 Kudos

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.