cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Gateway ODATA is not accepting Specical characters % #

0 Kudos

Hi ,

I have material and Material description , when I am doing change operation for Material descriptions while passing special characters like % # in the material description, getting XML parsing error.

without XML Payload also tried passing directly via parameters throwing an error.

Please let me know how to handle the special characters in ODATA SAP.

Best Regards

Shaik

Accepted Solutions (0)

Answers (4)

Answers (4)

amarnath_prasad
Explorer
0 Kudos

Please pass | (pipe) instead of % in URL & replace | (pipe) with % in redefine method code.It will definitely work.I faced this issue earlier.Framework does not accept(% , = etc).You can use @ also.

former_member188585
Participant
0 Kudos

Hello Shaik,

As suggested by Ashwin please use ASCII values. For reference check below URL

HTML URL Encoding Reference

Cheers

~Rahul

EkanshCapgemini
Active Contributor
0 Kudos

Hi,

I just tried passing % and # to a text field with PUT and POST operation and it worked without any issues.

The payload looked was like:

  1. <a:entry xmlns:a="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">
  2. <a:author><a:name/></a:author><a:content type="application/xml"><m:properties><d:Empid>1613</d:Empid><d:Empname>XYZ</d:Empname><d:Empadd>abcd%abcd#abc</d:Empadd><d:Empdesc>SSE</d:Empdesc></m:properties></a:content></a:entry>



AshwinDutt
Active Contributor
0 Kudos

Hello Shaik,

Try to pass the ascii value instead of % # and check.

For % pass %25

For # pass %23

Regards,

Ashwin