cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Attachments service on S4HANA Public Cloud

sandeeppaul
Discoverer
0 Likes
536

Hi All,

I am using the GET API from the attachment service API_CV_ATTACHMENT_SRV to retrieve attachments from a work order in the S4 public cloud environment. I provide the parameters DocumentInfoRecordDocTypeDocumentInfoRecordDocVersionDocumentInfoRecordDocNumber, and DocumentInfoRecordDocPart. Although I get a response but it only includes the attachmentcontenthash, the Content field in the response is not being populated. Anyone has an idea how to convert this SHA256 value to Base64 or XSTRING?

Thanks in advance.

sandeeppaul_0-1742527826197.png

 

sandeeppaul_2-1742528144408.png

 

 

Accepted Solutions (0)

Answers (1)

Answers (1)

Kangkana
Product and Topic Expert
Product and Topic Expert
0 Likes

From your Query it is very evident that you are more concerned about the actual content of the attachment . 
For the same HDM provides an attachment download option via the get API , the URL for which has been posted here. 
https://api.sap.com/api/API_CV_ATTACHMENT_SRV/resource/get_AttachmentHarmonizedOperationSet_LogicalD...

You would be getting a URL and  a valid token for the download of files.  
Also Please note it is highly insecure to provide a content download option directly in API parameters from any kind of document. the above approach provides the flexibility to even handle larger files as well.