SAP Knowledge Base Article - Public

2930863 - Error on Line YYY at Column ZZZ: PCData Invalid Char Value While Executing OData in Browser

Symptom

While executing the following OData Call https://myXXX.crm.ondemand.com/sap/byd/odata/v1/c4codata/EMailCollection?$orderby=ETag%20asc&$filter=ETag%20ge%20datetimeoffset%27YYYY-MM-DDTHH:MM:00.0000000Z%27 (where XXX is the system URL, YYYY-MM-DD is a date, HH:MM is the time) in the bowser, an error occurred.

Error message: Error on line YYY at column ZZZ: PCData invalid Char value (where YYY is the line and ZZZ is the column).

Reproducing the Issue

1. Open Google Chrome
2. https://myXXX.crm.ondemand.com/sap/byd/odata/v1/c4codata/EMailCollection?$orderby=ETag%20asc&$filter=ETag%20ge%20datetimeoffset%27YYYY-MM-YYTHH:MM:00.0000000Z%27

Cause

It is a language encoding issue. Some of the properties of certain records that match the filter condition specified in the URL contains special characters. The browser is not able to render the same in the browser window. If you execute the GET request in tools like Postman, then the special characters get replaced with some other characters.

Resolution

OData service calls (GET, POST, etc.) were developed to be invoked via tools like Postman or SoapUI and not through the browser. We recommend using Postman or SoapUI  to carry out OData operations.

Keywords

PCDATA invalid char value 27, execute OData, first error, redering of the page, chrome, browser issue, , KBA , AP-RC-ODF , OData framework (C4C Only) , LOD-LE-AM , Activity Management , Problem

Product

SAP Cloud for Customer add-ins all versions ; SAP Cloud for Customer core applications all versions