SAP Knowledge Base Article - Public

2465463 - Application Error when changing a Picklist value or when Editing a portlet or importing data (Format error converting NaN)

Symptom

  • Encountering "An Application Error has occurred" when trying to change a picklist value, or when displaying an employee portlet data in Profile.
  • Running Check Tool "DMPicklistDataType" and encountering errors

Product Support: You will see "Format error converting NaN" in the logs

Environment

Employee Central

Reproducing the Issue

  1. If the error appears just when editing the portlet data, then most probable cause for issue is a conversion error between picklist and string types. When this happens, the error would not point to the exact field with problems.

      It can be caused because there was some field previously being handled as a string (and therefore saved in the database as string) which was later changed to a picklist field. Picklists do not save the text corresponding to the value, but instead internally store the value, so even if the text is         the same, the system will not be able to map the values to text and will give the error message. This problem can be analyzed to try to find out the problematic field, most of the cases could be done by customer, but unfortunately it is not possible to confirm that the application error is of           type 'Format error converting NaN' unless SPLUNK is checked. Steps:

    • Identify the fields that are configured as PICKLIST in the affected portlet
    • Generate an Ad Hoc 'Person and Employment Export' report
    • Select all the fields from the affected portlet and in configuration section, select to output the Value IDs of all the fields possible.
    • Check in the exported data, for the PICKLIST fields you should find the value ID of the field, not only the text.
    • If a picklist field is only displaying the value, most possibly that will be the problematic field as it means it is stored as string and not with the value ID
  1. When 'Edit' is clicked on the affected portlet, an Application Error occurs. In the application logs (which only SAP Product Support can review) there will be a "NaN" (NOTE: Support please review internal note for example)
  1. When a Picklist value is selected, an Application Error will be displayed in the UI. In the application logs (which only SAP Product Support can review) there will be a "NaN" (NOTE: Support please review internal note for example)

    How can I tell whether this is the error I am getting?

    When you encounter the message "An Application Error has occurred" it will give you text such as this -: "errorId=4da397cb-2eb5-4f33-934b-651f9c4046c6, fingerprint=634adef51c6ceea8db32f39455f3587ca912cc6a, timestamp=2017-04-28T12:58:01.797+0200"

    You can confirm the issue with the "fingerprint" number = 634adef51c6ceea8db32f39455f3587ca912cc6a

    Cause

    This is a Configuration issue in which you may need to correct data. The cause can be a little different, but same in nature.

    • A BOOLEAN field has been configured with a PICKLIST (which is not supported)
    • The field to which you are trying to edit/change value of, was changed from a regular STRING (text) field to a PICKLIST field. The current value in this field for the User is not a PICKLIST value and so the system cannot resolve resulting in the application error being thrown.

    For any user added after the field type/configuration was change will behave correctly. However, those entered into the system before the change to picklist will encounter the Marshall Exception errors. The reason for this is that when a value is chosen from a PICKLIST, the corresponding value entered into the database is the PICKLIST OptionId, where as previously the value entered to the database was whatever was typed into the field.

    Resolution

    Issue 1) BOOLEAN field configuration issue:

    First you should run the Check Tool "Picklist must set on the correct data type", which will check all BOOLEAN and Pre-Delivered Picklist fields to ensure that they all have a valid configuration (e.g. BOOLEAN fields should not have a picklist assigned, predelivered PICKLIST fields should be using the correct pre-delivered picklists, etc)

    • Navigate to Admin Center > Check Tool
    • Select "EC Core" from the drop-down menu
    • Use the " > " to expand "Picklist" and select the check "Picklist must set on the correct data type (DMPicklistDataType)"
    • Click the "Run Check" button in the bottom right
    • The check may return with the number of errors, and if you click on the error text, you will see the list of fields, which picklist is assigned to it, and whether the check was SUCCESS or ERROR

     

    Issue 2) STRING to PICKLIST field configuration issue:

    If the error is generated for a PICKLIST field, then the issue is more likely that one or more fields were originally configured as STRING fields, and they have now been changed to be PICKLIST fields - but the STRING data for existing users data still exists in the database. Therefore when the application tries to look for an OptionId, it finds a STRING value and causes an exception. The only way to correct this is via Export and Re-import of the problem data.

    • Navigate to Admin Center > Import Employee Data > download the latest import template for the element in question (for example Job History)
    • Export can be carried out using the Person and Employment Export AdHoc report (refer to KBA 2266216). The best approach is to build the Ad Hoc report with the same columns you find in the import template
    • Then, transfer the Exported values to a blank import template and import the data it in Full Purge mode. (More information on this process can be found here 2201658)

     

    NOTE: In most cases, you will need to correct both the configuration (first) and then the bad data.

    Keywords

    picklist, Application Error, MarshallException, Format error, converting NaN, Error marshalling, 634adef51c6ceea8db32f39455f3587ca912cc6a, DMPicklistDataType , KBA , LOD-SF-EC-JOB-PKL , Picklists , LOD-SF-EP , People Profile , LOD-SF-EC-EDP , Import Employee Data (EC Core only) , Problem

    Product

    SAP SuccessFactors Employee Central all versions