SAP Knowledge Base Article - Public

3538308 - Discrepancy in handling newline character in field value between SF Odata API and Integration Center

Symptom

The SF Odata API is capable of upserting payloads that include newline characters in field values without issues. However, when the same payload is processed via the Integration Center, it results in an error due to the presence of newline characters.

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

  • SF Odata API

Reproducing the Issue

1. The "Max. Length" is set to 10.

2. The field value has newline in SF Odata API Payload, e.g.

POST: {{URLTest}}upsert?$format=json
Payload:
{
    "__metadata": {
        "uri": "Background_SpecialAssign(backgroundElementId=130166L,userId='gsteward')",
        "type": "SFOData.Background_SpecialAssign"
    },
    "backgroundElementId": "130166",
    "userId": "gsteward",
    "bgOrderPos": "2",
    "startDate": "/Date(1580688000000)/",
    "description": "TestA
TestB",
    "project": "Cyber Security"
}

Response:
{

    "d": [
        {
            "key": "Background_SpecialAssign/backgroundElementId=130166,Background_SpecialAssign/userId=gsteward",
            "status": "OK",
            "editStatus": null,
            "message": null,
            "index": 0,
            "httpCode": 200,
            "inlineResults": null
        }
    ]
}

3. Use same payload to upsert via Integration Center:

Error Message: The length of field description is 12 which exceeds the maximum limit of 10.

Cause

Integration Center will add \r\n when the CSV file has newline.

This 'Description' field value will auto change to "TestA\r\nTestB", it is exceeds 10 characters, it is 12 characters.

Resolution

Avoid using newline characters in CSV files:

To ensure seamless data processing across both the Sf Odata API and Integration Center, it is crucial to avoid including newline characters in CSV file values. Newline characters can cause unexpected behavior and errors when the Integration Center processes the file.

Keywords

Integration Center, ODATA API, Background Element, character limit, error, newline characters, import process,The length of field description is XX which exceeds the maximum limit of. , KBA , LOD-SF-INT-INC-ODATA , ODATA API In Integration Center , Problem

Product

SAP SuccessFactors Platform all versions

Attachments

Pasted image.png
Pasted image.png