SAP Knowledge Base Article - Public

3506116 - How to get a list of journal entries with attachments

Symptom

It's required to get a list of journal entries with attachments, and a list of the attachments.

Environment

S/4HANA Cloud Public Edition.

Cause

How to.

Resolution

The first 3 proposals below will work only with one journal entry at a time. A loop can get all of the data:

1. API API_CV_ATTACHMENT_SRV/GetAttachmentCount can be used to get the count of attachments/links liked to a Journal Entry.

2. API API_CV_ATTACHMENT_SRV/GetAllOriginals can be used to get the list of attachments/links liked to a Journal Entry.

3. A report can be built using the steampunk class API CL_ATTACHMENT_SERVICE_API. Method GET_ATTACHMENT_COUNT gets the count of attachments/links liked to a Journal Entry and method GET_LIST_OF_ATTACHMENTS give list of attachments/links.

4. Please check also if https://api.sap.com/cdsviews/I_JOURNALENTRY can fulfill the requirement. 

Keywords

API, list, attachments, links, journal entries, attachment, cds , KBA , FI-FIO-GL-TRA-2CL , Transaction Apps (Public Cloud) , How To

Product

SAP S/4HANA Cloud Public Edition all versions ; SAP S/4HANA Cloud all versions