SAP Knowledge Base Article - Public

3466492 - ODATA API Error : HTTP 403 " Record purge composite child does not support!" for Child Custom MDF object Upsert with parameter purgeType=record

Symptom

When you are performing Upsert operation with purgeType=record parameter for a Child MDF object, you are getting below error:

{

"key" :"cust_child/cust_parent_effectiveStartDate=2024-02-01T00:00:00.000-05:00,cust_child/cust_parent_externalCode=000123456" 

"status" : "ERROR",
"editStatus" : null,
"message" : "Record purge composite child does not support!",
"index" : 0,
"httpCode" : 403,
"inlineResults" : nul

}


DISCLAIMER:
 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
    • Integrations
      • ODATA

Reproducing the Issue

Perform the Upsert operation for the Child Entity

UPSERT URI: https://api4.successfactors.com/odata/v2/upsert?$format=json&purgeType=record 

Payload : 

{
                "__metadata": {
                    "uri": "https://api4.successfactors.com/odata/v2/cust_child(cust_parent_effectiveStartDate=datetime'2024-04-15T00:00:00',cust_parent_externalCode='00011317',externalCode=190L)",
                    "type": "SFOData.cust_child"
                },
                "externalCode": "190",
                "cust_parent_effectiveStartDate": "/Date(1713139200000)/",
                "cust_parent_externalCode": "00011317",
                "cust_StartDate": "/Date(1713139200000)/",
                "cust_salsac": "Y",
                "cust_code": "PEN10S",
                "cust_currency": "GBP",
                "cust_sch": "UK3",
                "cust_emp_fixed": "100"

}

Error Response : 

{

"key" :"cust_child/cust_parent_effectiveStartDate=2024-02-01T00:00:00.000-05:00,cust_child/cust_parent_externalCode=000123456" 

"status" : "ERROR",
"editStatus" : null,
"message" : "Record purge composite child does not support!",
"index" : 0,
"httpCode" : 403,
"inlineResults" : nul

}

Cause

This is a known issue as you are using purgeType=record parameter to avoid copy over from the previous parent records.

As you are trying to create Child Object and Parent Object in 2 different payload the Child record will not be able to purge the previous record which was inserted while creating the parent record.

Resolution

This issue can be resolved by creating both Parent and Child object in the same payload.

API Payload for reference:

Upsert URI: https://api4.successfactors.com/odata/v2/upsert?$format=json&purgeType=record 

Payload:

{
                "__metadata": {
                    "uri": "https://api4.successfactors.com/odata/v2/cust_parent(effectiveStartDate=datetime'2024-04-15T00:00:00',externalCode='00011317')",
                    "type": "SFOData.cust_parent"
                },
                "externalCode": "00011317",
                "effectiveStartDate": "/Date(1713139200000)/",
                "cust_child_detail":

[
                {
                "__metadata": {
                    "uri": " "__metadata": {
                    "uri": "https://api4.successfactors.com/odata/v2/cust_child(cust_parent_effectiveStartDate=datetime'2024-04-15T00:00:00',cust_parent_externalCode='00011317',externalCode=190L)",
                    "type": "SFOData.cust_child"
                },
                "externalCode": "190",
                "cust_parent_effectiveStartDate": "/Date(1713139200000)/",
                "cust_parent_externalcode": "00011317",
                "cust_StartDate": "/Date(1713139200000)/",
                "cust_JoinDate": "/Date(-2208988800000)/",
                "cust_salsac": "Y",
                "cust_code": "PEN10S",
                "cust_currency": "GBP",
                "cust_sch": "UK3",
                "cust_emp_fixed": "100"
                }
                ]

}

This operation should upsert the child record without copying over data from previous MDF parent record.

Keywords

&purgeType=record, Record purge composite child does not support!, HTTP 403, LOD-SF-INT-ODATA, Parent Child MDF Object Upsert, Upsert error , KBA , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT-API , API & Adhoc API Framework , LOD-SF-INT , Integrations , Problem

Product

SAP SuccessFactors HCM Core 2405 ; SAP SuccessFactors HCM Suite 2405