SAP Knowledge Base Article - Public

2989625 - MaxLength information missing for CodeText in Odata


'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.


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:$metadata (XYZ represents the number of the tenant).


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.


This is a standard behaviour of the system.


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


SAP Cloud for Customer core applications 2008