12-20-2022 5:12 AM - edited 02-04-2024 4:49 AM
Customer has developed interfaces to pass the attachments from external systems to their existing ERP system. They were sending the content of the file (raw data) in the payload in this interface. Now they switch to S/4 HANA Cloud ERP and the same integration is required.
However, the attachment API in S/4 expects the content to be as a file and not the raw data for attachment purpose. Is there a way customer can still send the raw data (content of file) and the attachment API can accept it? Or there is another API to work out this problem?
Regards
Babu
Hello Babu
The API https://api.sap.com/api/API_CV_ATTACHMENT_SRV/overview is the only API in S/4HANA Cloud
that im aware of that can upload attachments.
Have you tried using the API in Postman using the method outlined in the thread ?
https://answers.sap.com/questions/13728197/api-cv-attachment-srvattachmentcontentset-pdf-cont.html
in S/4HANA Cloud , the supported MIME types are listed at the link
Best Regards
Enda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello enda.fennelly
I have a payload from external system that passes me the pdf file as a base64 string. I need to create an attachment of type pdf, out of this string in S/4 Billing Document object. I am using the S/4 Attachments API (as you have mentioned). I have passed header and body as shown below in the images.
The file is attached as pdf. But this pdf does not open and I get an error "Error in loading pdf". Looks like the system is not able to understand this base64 string. Do we need to convert this string into other format before passing to attachment body?
Message Header:
Message Body: I pass the base64 string as shown
Any help or hint would be highly appreciated. Thanks a lot in advance.
Regards
Babu
User | Count |
---|---|
95 | |
9 | |
8 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.