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

CDS View that shows number of attachments for Journal entries

chrisbuergmayr
Participant
0 Likes
1,613

Dear community,

does anyone have experience with CDS views for Journal Entries, where I can include the count of attachments attached to this specific journal entries.

More or less I want to have a CDS view which brings me back this number as in the screenshot per Document.

best regards

Christoph

Accepted Solutions (1)

Accepted Solutions (1)

Enda
Product and Topic Expert
Product and Topic Expert
0 Likes

Dear Christoph,

For the retrieval of attachment information associated with an object like journal entries,

the API API_CV_ATTACHMENT_SRV and Entity /GetAllOriginals can be used

https://api.sap.com/api/API_CV_ATTACHMENT_SRV/resource

For Journal Entries the BusinessObjectTypeName is 'BKPF'.

The API API API_CV_ATTACHMENT_SRV also has the Entity AttachmentsCount to receive the number of attachments an object has which seems to match your requirement .

If the attachment shown in the screenshot is linked in a Document Info Record, then the

CDS views mentioned in the online documentation at 'CDS Views for Document Management

might be of use as well

https://help.sap.com/viewer/0f69f8fb28ac4bf48d2b57b9637e81fa/latest/en-US/86f3f5577c84bc12e10000000a...

Best Regards

Enda

chrisbuergmayr
Participant
0 Likes

Hi Enda,

thanks for your reply. Unfortunately I know these APIs but they do not really help.

This api can only be run by one document. What I want to see is a ODATA report where I can filter an all documents which do not have an attachment.

Do you have any Idea?

best regards

Christoph

Hans_Sarpei
Explorer
0 Likes

Did you find a solution for that issue?

We are facing the same currently.

Patryk

SebastianWoedl
Product and Topic Expert
Product and Topic Expert
0 Likes
Hi Enda, I´m having the same requirement as christoph. Any ideas on that?

Answers (0)