SAP Knowledge Base Article - Public

2968837 - Uploading attachments via Integration Center

Symptom

You need to insert attachment data into Attachment OData entity via Integration Center.

Environment

  • SAP SuccessFactors HXM Suite

    • Integration Center
    • OData API

Resolution

Currently the only way to achieve this is via SFTP Inbound CSV integration type using a separate file to be inserted into Attachment. This is explained in this page of Integration Center's Guide and also in the SAP blog below:
Importing attachments to SAP SuccessFactors using Integration Center

If you try to do this via another type of integration (like REST type for example) an error like this one below will occur:

"Attachment file <fileContent> could not be read. Please make sure the file exists in the folder: null"

This occurs because Integration Center expects that the attachment being upserted is a separate file by itself located in the SFTP. So as the error message says, Integration Center is trying to look for a file with some name in the SFTP but it can't be found, since no SFTP at all was used.

Note 1: you also won't be able to upsert into Attachment entity if you are sending the file binary data into "fileContent" field. Integration Center always expects that the upserted file being upserted is a separate file in the SFTP. The "fileContent" field, in this case, should contain the name of the file as explained in the blog mentioned previously.

Note 2: there are some details you need to evaluate when using MDF Attachment entity or a navigation to it on your integration. This is explained in the OData Developer Guide:
"Inline editing of the attachment navigation property is not allowed. To add an attachment for an MDF entity, you first create the attachment with the Attachment OData API, and then add the attachment to the MDF entity.". An example in shown on Uploading Attachments to an MDF Entity page, but note that as Integration Center doesn't expose Attachment entity as a starting entity, you won't be able to perform step 1 described in the page.

See Also

Integration Center's Guide

SAP SuccessFactors HXM Suite OData API: Developer Guide

2599554 - Odata attachment upsert to custom MDF Object not reflecting attachments in UI

Keywords

attachment, integration center, odata, api, sftp, inbound, rest, more integration types, ic, insert, change, update, create, inline upsert, mdf, non mdf, non-mdf, navigation, custom, error , KBA , LOD-SF-INT-INC , Integration Center , How To

Product

SAP SuccessFactors HCM Suite all versions