SAP Knowledge Base Article - Public

2324193 - Integrity constraint violated error when deleting Background_varPayEmpHistData


When executing interface in SAP to bring employee’s delta changes to SF, a new record is getting inserted in employee history data, but the old record is not getting deleted. We checked API audit log in SF, below message is appearing.

Detail: Wrapped Exception: Fail to delete background: Unable to delete background id : 3620962. Error Msg: ORA-02292: integrity constraint (EUSFV4_STOCKPM2657.FK_ASSIGNMENT_SM_BG_ID) violated - child record found</message>

attached is the response and request xmls




The 1st time an employee history record is imported into SF system, a background entry will be created, without ASSIGNMENT. At this moment, the deletion API can still delete the employee history or background entry.

But if we run calculation engine for the program, having this employee history record processed, one or more ASSIGNMENT entries will be created for this background entry. Starting from this point, the deletion API won’t work on this background entry as there’s DB integrity validation. We need to delete all the VRP data (ASSIGNMENT, PAY_ITEM, and etc) before we can delete this background entry. This part is not supported in existing SF API.


background SFAPI can not remove Background objects which has already associated with existing ASSIGNMENT; and the current solution is to remove those background objects through UI.


KBA , LOD-SF-INT-API , API & Adhoc API Framework , Problem


SAP SuccessFactors HCM Core 1602