SAP Knowledge Base Article - Public

2971238 - Background Element upsert 'Two beans have the same order position' error - SAP SuccessFactors HXM Suite OData API

Symptom

When upserting a background entity (any which has 'Background_' as a prefix), an error message similar to this one is returned in the response:

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
    • OData API

Cause

  • This error indicates that the record you're upserting has the same 'bgOrderPos' (order position) value of another record associated to the user
  • The bgOrderPos field determines the order in which the records are shown in the employee's profile UI portlet, so the value for each record must be different
  • For example:
    • if one user has 2 Background_InsideWorkExperience records, one will have bgOrderPos = 1 and the other will have bgOrderPos = 2
    • if you try to upsert a third record passing the value bgOrderPos = 2, the error will occur;
  • IMPORTANT: this will apply even if the same user has more than one backgroundElementId which shares the same bgOrderPos as another backgroundElementId
  • You also may be facing this issue due to upserting a 'bgOrderPos' value that is too large
  • The current limit is around 7 digits, but it will be increased as of the b2011 release (November 2020)

Resolution

  • To prevent this, you may pass the value bgOrderPos = -1 in the API call
  • This will trigger a system function that calculates the next available bgOrderPos for that specific background entity and user, and insert the new record with that value
  • Going back to the presented 'Background_InsideWorkExperience' example in the section above, the system will attribute bgOrderPos = 3 to the new record

See Also

OData API Reference Guide

Keywords

background element, order, pos, position, fails, failed, not able, can't, Background_, api, insert, add, EDU-16519 , KBA , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT , Integrations , Problem

Product

SAP SuccessFactors HCM suite all versions