SAP Knowledge Base Article - Public

2531780 - Query EmpPayComponentNonRecurring / One Time Payment with Multiple Records on same day and pay component Not Retrieved

Symptom

Issue:

An Employee which has multiple entries in "One Time Payment", "Spot Bonus" portlet in EC with the same "entry date" and same "Pay component code", only one record is retrieved instead of all the records. The query is returning only one record

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

Environment

Successfactors HCM Suite

Reproducing the Issue

Sample Scenario :

An Employee having same paycomponent and date updated in Successfactors will return

 Picture1.jpg

 

Cause

Business Key for EmpPayNonRecurring Odata API will fetch one value as per business key

HRIS Element ID: payComponentNonRecurring

Business Keys:userId+ payComponentCode + payDate

Resolution

Option 1. Customer should review the requirement as they can consolidate the values / amount of the pay given that these are issued under one paycomponent type and date.

Else

Option 2. Recommend to update the Business Key and Update the query likewise

2.1 Update the data model to implement new business key (This can be requested with the Implementation Partner) with below script.

Under the element <hris-element id="payComponentNonRecurring"> in the pay component non recurring in the succession data model

***

<hris-field id="sequence-number" visibility="view" allow-import="true">
<label>seqnumber!!!</label></hris-field>

***

2.2 Update the query

/odata/v2/EmpPayCompNonRecurring?$select=sequenceNumber,userId,createdBy,createdOn,lastModifiedBy,payComponentCode,payDate,value&$filter=userId eq 'ssingh'

Updated Query is referenced with "userId+sequenceNumber" Business key, updated on above data model.

2.3 Refresh the Metadata Cache

Reference KBA 2171588 - SuccessFactors: OData API Metadata Refresh and Export

NOTE: If you change the datamodel to include sequenceNumber as abusiness key then it gets changed from payComponentCode+payDate+userId to sequenceNumber+userId for entity EmpPayCompNonRecurring.

Additional Info :

Business Key Behavior

sequenceNumber can be defined as an additional business key via data model configuration. It enables you to have more than one pay component on the same pay date. Once sequenceNumber is introduced as a business key, it must be maintained. If sequenceNumber is not maintained in integrations that rely on the uniqueness of the pay component, these integrations could break.

See Also

SAP SuccessFactors Employee Central OData API: Reference Guide (Under Section for EmpPayNonRecurring for full info)

Keywords

ODATA API, sequenceNumber, EmpPayComponentNonRecurring / One Time Payment, Same Day EmpPayComponentNonRecurring Entry / Record, Multiple Paycomponent Same Day , KBA , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT , Integrations , Problem

Product

SAP SuccessFactors HXM Suite all versions