cancel
Showing results for 
Search instead for 
Did you mean: 

Discovery Centre SBPA Invoice Process - Real use of DMS between BTP & S4PC

Pyc
Participant
0 Kudos

G'day all,

I have completed the Discovery Centre SBPA Invoice Processing Journey and am left with questions on BTP DMS and S4 Public Cloud. I had played with it and extended it quite a bit before realising that the BTP DMS stored document was ignored and duplicated in the whole process.

The process does the following:

Opens Outlook
Finds unread mail in appropriate folder that contains a PDF attachment
Saves PDF to local PC directory (C:\Temp)
Performs Data Extraction (OCR)
Reads the PDF back in
Encodes the PDF
Creates a new BTP DMS folder
Stores the PDF into the BTP DMS folder
Marks the email as read
Possible approval of extracted data
Creates the Supplier Invoice in S4
Attaches the PDF to the new Supplier Invoice via the Attachment service

It's the bold bits I'm interested in. I had assumed that once the PDF had been stored in the BTP DMS that when the S4 Attachment service was called that it would be passed a link or reference to the stored document to the already stored document. In fact what the process does in that last stage is pass the details of the local PC file to the attachment service - as in C:\Temp\Inv123.pdf

This means the PDF is stored both in the BTP DMS and then wherever S4 also stores it. This could be GOS, it could be BTP DMS, it could be a 3rd party CMIS repository. Regardless it's now stored twice in the SAP landscape.

The journey provided scripting uses "AttachmentContentSet" passing desktop machine file name and path when calling API_CV_ATTACHMENT_SRV

var attObj = {

resolveBodyOnly : true,

contentType: irpa_core.enums.request.content.pdf,

readFileAsBufferToBody : filePath,

method: 'POST',

url: '/AttachmentContentSet',

headers: {

'BusinessObjectTypeName': 'BUS2081',

'LinkedSAPObjectKey':response.d.SupplierInvoice + response.d.FiscalYear,

'slug': fileName,

'x-csrf-token': csrf

}

};

First Question:
Is it possible instead to use "CreateUrlAsAttachment" and pass a URL reference to the BTP DMS Stored PDF?

Second Question:
How do I construct the URL to point to the BTP DMS document? I've tried my hardest to find what such a URL needs to look like based presumably on the CMIS ID for the repository, folder and document.... no luck, or I don't understand when I am seeing the answer.

Third Question:
Also how is authentication handled? Will the user be able to open the URL from the S4 Supplier Invoice without being asked for credentials?

Any and all feedback appreciated.

Have fun,
Mark

View Entire Topic
archit_goel
Advisor
Advisor
0 Kudos

Hi markpyc,

Yes, in the mission we use SAP DMS to store the attachment. Currently, it is used only to show in the Approval step the attached invoice as there is no UI5 support currently (at the time of releasing the mission) and we wanted to avoid Workflow using BAS deployment for simplicity.

We do not use the SAP DMS for uploading to SAP S/4 as we already have the file in the process, also there is a limitation for uploading attachments using the Actions project, so we needed the Agent script to assist us.

Ideally, we can use SAP DMS + SAP S/4 setup, where the SAP DMS service is already connected to the SAP S/4 system but we avoided that for this mission as that might make things more complicated. But, depending on the use case we achieve the relevant setup.

I hope that helps clarify.