SAP Knowledge Base Article - Public

2283678 - Application error while saving data in MDF Object

Symptom

  • Application error occurred while trying to save data for MDF object
  • Users are unable to save data for the custom MDF object

"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 HXM Suite
  • Metadata Framework (MDF)

Reproducing the Issue

  1. Go to Employee Profile and access the MDF Portlet or open the MDF object in Manage Data;
  2. Click on Edit to add data for the object and click Save;
  3. User receives an application error with the following message: an application error occurred. Please try again later, or notify support if the issue keeps occurring.

Cause

externalCode field for an MDF Object acts as a primary key value in maintaining data for the object. The externalCode field is used to create unique data for the MDF object based on the value entered in this field. In a user based MDF Object, a user is a unique value for the data being created for the object. Setting this field as Not Visible or Read Only will disallow to create data because the system cannot verify if the externalCode field has unique value or not and thereby resulting in the Application Error message on the screen.

Resolution

Checking the Object Definition to verify if the Visibility of the externalCode field:

  1. Navigate to Admin Center --> Configure Object Definitions;
  2. Select Object Definition --> Choose the required object from the dropdown;
  3. Click on Details option for externalCode field of the selected object's definition;
  4. Check the Visibility. If it has been set as Not Visible, set it as Editable:
  5. If the field has been set as Read Only, users will be able to add data on the portlet. However, if any admin user tries to create new data via the Manage Data page or tries to perform import, this field will not be accessible and data for any user cannot be created. Therefore, it is recommended to set the externalCode field as Editable on the object definition.

Important Note: The only scenario where external code could be set as not visible is if the type is AutoNumber, because this will guarantee that the external code will always be provided. The same recommendation is applied for child MDF objects in a scenario of association. The child object needs to have the external code editable or set as AutoNumber.

Also, please make sure to clear the Metadata Cache as another solution attempt as per KBA 2534674 - How To Fix Inconsistencies In Metadata Framework (MDF) - SAP for Me

Keywords

externalCode, Visibility, Editable, Not Visible or Read Only, application error, application, error, save, MDF, Object, Portlet, Record , KBA , LOD-SF-MDF-UI , UI Config, Layout & Rules , Problem

Product

SAP SuccessFactors HCM Suite all versions