SAP Knowledge Base Article - Public

3778849 - How To List Attachments Of Posted Supplier Invoices (CDS view, App, or Api)

Symptom

User wants to list files attached to a posted supplier invoice and asks whether a CDS view, an app, or an API can provide this.

Environment

  • Product: SAP S/4HANA Cloud Public Edition
  • Fiori UI for Invoice Verification (Public Cloud)

Reproducing the Issue

  1. Try to find a standard CDS view that lists files attached to posted supplier invoices; no suitable CDS/reports are available.
  2. From the Supplier Invoices list screen, attempt to see attachments directly; the attachment list is not shown there.

Cause

  • Attachments are stored in the centralized attachment service and linked to the invoice object.
  • A standard programming interface and on-screen viewing inside the invoice are available, but no delivered reporting CDS view exists to list attachments; therefore a CDS-based listing is not available.

Resolution

There is no standard CDS view that lists supplier-invoice attachments. Use the UI approach or the API for retrieval.

UI Approch:

  1. View attachments in the UI:
  2. Open Supplier Invoices List and navigate into the posted supplier invoice (or use Display Supplier Invoice - Advanced for read-only).
  3. Inside the invoice, open the Services for Object menu.
  4. Choose Manage Attachments to display the list of attached files.

Retrieve attachments via API:

  1. Use the Attachment Service OData API API_CV_ATTACHMENT_SRV.
  2. Call the read operations to count attachments and to fetch attached originals for the specific invoice key (one invoice at a time).
  3. Refer to: Attachment Service API (API_CV_ATTACHMENT_SRV).

See Also

Keywords

supplier invoice attachments, list attachments, cds view, api_cv_attachment_srv, manage attachments, services for object, attachment service, invoice verification, posted supplier invoice, odata api, dms, gos, harmonized document management, attachment list, procurement invoicing , KBA , MM-FIO-IV-2CL , Fiori UI for Invoice Verification (Public Cloud) , Problem

Product

SAP S/4HANA Cloud Public Edition all versions