SAP Knowledge Base Article - Public

2523258 - Compensation and Variable Pay - Cannot Class String to Date Error Message when Publishing Completed Forms to Employee Central.

Symptom

Customers have forms completed for a Variable Pay Template integrated with Employee Central.

Now, they want to Publish Selected Worksheets in Employee Central

in the Completed Compensation Cycle but the job fails and the error message is:

This scheduled job failed to complete. For details, please contact SuccessFactors customer support.

java.lang.ClassCastException: Cannot cast class java.lang.String to class java.util.Date

Environment

Compensation and Variable Pay integrated with Employee Central.

Reproducing the Issue

Login into Customers Instance. Navigate to Admin Centre>Compensation>Variable Pay>Template Name>Manage Worksheets>Manage Worksheets. You can see that forms have been completed.

Completed.png

So, after this we would expect that we can Publish Completed Worksheets to Employee Central. So, navigate to Template in Question>Complete Compensation Cycle>Publish Data>Publish Selected Worksheets in Employee Central. Please choose Completed Worksheet(s) and click Submit.

Publish.png

Now, we can see the Job is in Process and the Job ID.

Navigate to Admin Centre>Monitor Jobs and we can see the Job Status is “Failed”.

The Error Message appears as following:

error.png

 

Cause

According to the error logs for this issue, when publishing Varpay data to EC side, field types for the custom publish dates didn't match. The system is expecting "Date" type but found "String" type.


Reviewing the template XML we can find a configuration error:


< comp-hris-field-map>           
       <comp-field-id><![CDATA[EC_EFFECTIVE_DATE]]></comp-field-id>
       <hris-field-id><![CDATA[pay-date]]></hris-field-id> 
< /comp-hris-field-map>

EC field pay-day is always "Date" type while the defined Variable Pay field "EC_EFFECTIVE_DATE" (this is just an example) is, in this case, a "String" type field.

Resolution

Navigate to Admin Centre>Compensation>Compensation Home>Template in Question>Design Worksheet>Column Designer>Field containing the custom Effective Date and change the Column Type from String to Date. This change will require to relaunch forms so it will take place.

Keywords

Variable Pay, Employee Central, String, Date, Java. , KBA , LOD-SF-VRP , Variable Pay Programs , LOD-SF-CMP , Compensation Management , Problem

Product

SAP SuccessFactors HCM Core 1708