SAP Knowledge Base Article - Public

3635843 - API API_CV_ATTACHMENT_SRV not returning attachments from Product Master in S/4HANA Cloud Public Edition

Symptom

  • Attachments added via the "Manage Product Master Data" application are not retrieved when using the API API_CV_ATTACHMENT_SRV with the entity A_DocumentInfoRecordAttch.
  • The API api_cv_attachment_srv does not return GOS ( Generic Object Services ) attachments linked to the Material Master / Product Master.
  • 'You are not authorized for Display document with document type SPP' is returned when calling the API API_CV_ATTACHMENT_SRV to upload attachments to the product master.

Environment

  • SAP S/4HANA Cloud Public Edition
  • Product Master

Reproducing the Issue

  1. Add an attachment to a product using the "Manage Product Master Data" application on the tab Attachments - Generic Object Services 
  2. Use the API API_CV_ATTACHMENT_SRV with the entity `A_DocumentInfoRecordAttch` to retrieve the attachment.
  3. Observe that the attachment is not returned.

Cause

Missing Functionality

Resolution

The Attachment added in the Product Master is of type Generic Object Services ( found on the tab Attachments - Generic Object Services )

In S/4HANA Public Cloud , the Product Master supports the DMS Document Types SWV 'Software Documents' and YBO 'Office-Documents' in the app Manage Product Master Data

The Communication Scenario SAP_COM_0009 'Product Integration' does not support the usage of the API API_CV_ATTACHMENT_SRV for retrieval or uploading of attachments

from frameworks Document Management (DMS) or Generic Object Services (GOS)

The Communication Scenario SAP_COM_0009 'Product Integration' is not listed in the communication scenarios supported for the Attachment Service on the SAP API HUB  https://api.sap.com/api/API_CV_ATTACHMENT_SRV/overview

Please submit a feature request at the link https://influence.sap.com/sap/ino/#/campaign/1713 if you would like the communication scenario 'SAP_COM_0009' enhanced to support the download of attachments 

Workaround

It is possible to retrieve attachments from the Product Master and framework Document Management (DMS) if the Communication Scenario SAP_COM_0105

'Product Lifecycle Management - Master Data Integration' is assigned to the communication user and the attachments are linked to the DMS Documents types SWV 'Software Documents' or YBO 'Office-Documents' 

The API API_CV_ATTACHMENT_SRV can be called with Entity A_DocumentInfoRecordAttch in a GET request to return the metadata Properties LogicalDocument, ArchiveDocumentID and LinkedSAPObjectKey when supplying the parameter DocumentInfoRecordDocNumber ( of DMS Type YBO )

 /sap/opu/odata/sap/API_CV_ATTACHMENT_SRV/A_DocumentInfoRecordAttch?$expand=DocumentInfoRecordToAttachmentNavigation&$filter=DocumentInfoRecordDocNumber eq '0000000000000012345678912'

The LogicalDocument  / ArchiveDocumentID and LinkedSAPObjectKey values can then be used with the API API_CV_ATTACHMENT_SRV entity AttachmentContentSet to download the attachment

Keywords

attachment retrieval, api_cv_attachment_srv, a_documentinforecordattch, manage product master data, sap s/4hana cloud public edition, attachment not returned, odata api, product data, master data, MARA, Create Material , SPP , GetAttachmentCount , KBA , LO-MD-MM-2CL , Product Master for Public Cloud , Problem

Product

SAP S/4HANA Cloud Public Edition all versions