SAP Knowledge Base Article - Public

2848170 - Maximum length of custom field exceeded in Configure Object Definition

Symptom

When trying to edit the Maximum Length of some custom field in a MDF object on Configure Object Definition page, you are receiving a message that the length has exceeded the limit.

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.

Environment

  • SAP SuccessFactors HCM Suite
  • Metadata Framework (MDF)

Reproducing the Issue

  1. Go to Configure Object Definition;
  2. Select Object Definition and a custom MDF object that you have on your environment;
  3. Add a new custom field and select the type String;
  4. Go to details and try to set the Maximum Length to 5000;
  5. Save the object and receives the following message: Maximum length 5,000 should not exceed the allowed maximum length 4,000 of field.

Cause

This error is shown due to a validation that is made when saving the object. It is set a limit of 4,000 characters for String fields in MDF objects, so any value higher 4,000 inserted on Maximum Length will not be allowed.

Resolution

As well as String type, other types have also a limit hardcoded, and it is not possible to change this limit.

Maximum Length : The Maximum allowed data length for the data type String. The maximum length includes the total number of digits before the decimal separator for Decimal data type. The default value for this field is 255.

To configure the fields in the Object Definition UI, consider the following limits:

  • Maximum length for externalName and externalCode is 128 characters.
  • Maximum length for String data type is 4000 characters for predelivered objects.
  • Maximum length for Number data type is 4000 characters, but it’s recommended not to exceed 38.
  • Sum of Maximum Length and Decimal Precision for Decimal data type is 4000 characters, but it’s recommended not to exceed 38.

You can check these values for each type of field where the limitation exists in this page of SAP Help Portal: Adding Fields

FAQ - Additional Information

Q) Where can I get information on this from the Guide?

A) Guide: Implementing the Metadata Framework (MDF

    Chapter - Adding Fields - Maximum Length

    Chapter - Important Configuration Guidelines and Usage Limits

    Chapter - Custom Field Limits on Pre-delivered and Custom MDF Generic Objects

 

See Also

  • 2273344 - How to Configure Object Definition in MDF?
  • 2955912 - [Custom MDF] Unable to add more custom fields inside a Custom MDF object definition
  • 2438887 - Metadata Framework | How to create a custom field for a MDF Object?

Keywords

maximum, length, MDF, custom, object, field, string, 4000, Maximum length should not exceed the allowed maximum length, You are adding too many NUMBER-typed fields (limit is 100). You cannot exceed this limit, MDF, custom MDF, object, custom field, add field, limit, NUMBER-typed , KBA , LOD-SF-MDF-OBJ , Object Definition & Field Related Issues , LOD-SF-EC-ADM , Admin Tools (EC Core only) , Problem

Product

SAP SuccessFactors HCM suite all versions