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

How to Create a custom report to display whether the document number contains the attachment or not

S_DEV
Explorer
0 Likes
579

Hi All,

I have a requirement in an SAP S/4HANA Public Cloud 2-system landscape. The client needs a report that displays whether a journal entry document number has an attachment or not.

Additionally, I would like to know where the attachment is stored when a document is uploaded through the "Manage Journal Entries" app.

If anyone has insights on how to achieve this, please let me know.

Thanks in advance!

Accepted Solutions (0)

Answers (2)

Answers (2)

RaymondGiuseppi
Active Contributor
0 Likes
Jeremy_Deo
Contributor
0 Likes

Hello dear user,

And thank you for asking your question in the SAP Community blog.

There’s no out-of-the-box report that tells you this directly. But it’s possible to build one using custom development. The basic idea is:

1. Get the journal entry list : you can use the standard CDS view I_JournalEntry or I_JournalEntryItem for this.

2. Check attachments : you’ll need to call the Attachment Service API (API_CV_ATTACHMENT_SRV) to check if an attachment exists for each document.

 

This kind of setup typically requires a small custom app or a report where you loop through journal entries and call the API to check for attachments. You can then show a simple Yes/No flag for each entry.

If you're working purely within the key user tools in S/4HANA Cloud, you might be limited — you'd likely need help from a developer to build this with custom logic or via a side-by-side app in BTP.

Here’s a link Help SAP that can tell you more about the Attachment Service API.

 

Summary

  • No standard report exists, but you can build one using a custom CDS view and the Attachment API.
  • Attachments are stored in the SAP backend (DMS) and linked via the BKPF object type.
  • You’ll need the API_CV_ATTACHMENT_SRV service to check for attachment presence.

 

I hope this will help you answer your question.

Best regards,

Jeremy