SAP Knowledge Base Article - Public

2989625 - MaxLength information missing for CodeText in Odata

Symptom

'MaxLength' property which shows the maximum length of a field in metadata of an OData service doesn't show values for CodeText properties like PriorityCodeText, SourceCodeText, StatusCodeText etc.

Environment

SAP Cloud for Customer

Reproducing the Issue

  1. Go to Administrator work center
  2. Go to OData Service Explorer
  3. Select the OData service 'c4codataapi'
  4. Select Test
  5. Select the OpportunityCollection

You see that there is no value for the field MaxLength for properties like PriorityCodeText, SourceCodeText and StatusCodeText.

The same can be observed by checking the metadata using the following URL: myXYZ.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/$metadata (XYZ represents the number of the tenant).

Cause

Code text properties are dynamic properties of 'string' data type without any fixed length. That's why 'MaxLength' doesn't show any value in both OData console and $metadata of service.

Resolution

This is a standard behaviour of the system.

Keywords

 MaxLength, $metadata, CodeText , KBA , AP-RC-ODF , OData framework (C4C Only) , Problem

Product

SAP Cloud for Customer core applications 2008