Technical Articles
Upload files in SAP Process Automation
Hello Community,
With SAP Process Automation, you now have the availability to upload files in your forms.
The citizen developers can also restrict the number of files to be uploaded for each file input field.
Approver can download the form when he is approving the tasks in his Inbox.
Pre-requisites
The UI element File Upload is visible in the Form, after completing the pre-requisites.
1. Enable Document Management Service in SAP BTP account
2. Create a Destination for Document Manage Service in your BTP Cockpit. For more information, refer to the documentation.
Please find the video on setting up DMS.
Build a Form with File Upload
1. Create a Form and drag and drop the File Upload.
2. Create an approval Form and drag and drop the File Upload. Make it read-only since it is sent to the Approver for review.
3. Build your process as shown below and bind the parameters of the Input form with the file parameters of the Approval Form.
4. Save, Release, and Deploy the process
Run the business process
Once the Invoice is uploaded and submitted, it goes for approval.
You can find the Approval form with the uploaded invoice document as an attachment in the Approval form which is available for download.
How to retrieve the attachments uploaded through Forms?
Refer to the blogpost for more details.
For more information on SAP Process Automation, please refer to the following sources:
- Exchange knowledge: SAP Community | Q&A| Blogs
- Explore: SAP Product Page | Product Demo
- Learn more: SAP Help Portal | SAP Learning Journey
- Follow us on LinkedIn, Twitter, and YouTube
- SAP Process Automation Best Practice Series.
Hi Chaitanya Priya Puvvada ,
Can we use S3 Bucket for the file upload in SPA.
Regards,
Keerthana
Hi Keerthana jayathran
At the moment, We support CMIS-based repositories.
Hi Chaitanya Priya Puvvada,
Is it possible to upload structure data via excel to S4 using SPA?
Regards,
Parthibaraja
Hi Chaitanya Priya Puvvada,
Are there plans to enhance some of the Automation Activities, such as "Extract Data" which calls the Document Information Extraction service, to utilize these uploaded files easily?
It doesn't seem very straightforward to download this file from the DMS from within an automation and then supply the local file to this activity. Following the DMS sample on the Bot Store doesn't seem very straightforward for a "citizen developer".
Ideally other activities, like the Excel activities, would also be enhanced to leverage this DMS file.
Best regards,
Sadiq
Hi Sadiq Manji ,
I understand your requirement. As of now, we don't have activities which support that feature. We will take this into consideration.
Dear Chaitanya Priya Puvvada,
do you know some capabilites about uploading a document (content) to SAP SDM Service:
(a) from Office Application(like Excel, Word)
(b) from any Print-Service
(c) from 3rd Party Scan Software
(d) via Interface with encoded Data Stream Content
Just Direct -> Without saving to local / network windows file explorer.
Thanks
Nico
Hi,
I followed the tutorial and when I upload a document a new document is created in SAP Document Management Service, but unfortunately without content. If I use the samples and upload a document everything works fine: https://store.irpa.cfapps.eu10.hana.ondemand.com/#/package/29a922bb-6cdc-4d7f-82f1-66a73d749921
Any idea what the issue could be?
Can you check what is happening in the Developer console of the Browser when you are uploading the document using Process automation?
Are you getting any errors?
Hello Chaitanya Priya,
I have followed the same steps as you have mentioned to upload a document from the SAP Process(via Build). In my SAP Build, I can see the UI control of file upload.
However, when I try to run the process, the file upload control does not load. I get the below error:
Are there any more steps that I am missing here? Could you please let me know.
Regards,
Soumya
Hi Soumya Sharma
Can you please check if the URL is changed in ur BTP destination? From the error,I notice that the URL is changed to a Dummy URL instead of a DMS repo URL.
Hello Chaitanya Priya,
I have created the destination with the right DMS repo URL. However, when I try to access the destination(simply even viewing it in the BTP cockpit) after saving it, I see that the URL gets changed to : https://sap.com/DUMMY_URL.
I am not really sure if this is expected but this is the current behavior that I am observing.
Regards,
Soumya
Soumya Sharma
This is a bug in BTP cockpit and the BTP cockpit team is working on that.Create Service instance manually till the issue is fixed..
Could we upload multiple files on SAP build process automation form?
Ahmed Ajlan
You can upload multiple files
HI Chaitanya Priya Puvvada
I have a requirement for uploading a flat file by users (From UI) & having an approval workflow and load into HANA Backend.
Can SAP Process Automation be used to do the same? I understand HANA backend should be on BTP(cloud).
Thanks & Regards
Subodh
Hi Subodh Marathe,
do you have the same requirement then me?
Just see the next comment here 🙂
do you have DMS, Integration Option in place?
would be interesting to exchange on a thing like that.
best regards,
Wolfgang
Hi Subodh Marathe, Wolfgang Fuchs
You can upload the files and have them in the Approval workflow but you cannot send the attachments to HANA Backend. The actions project doesn't support attachments.As an alternative you can use an automation to send your attachments to Backend.
Hi Chaitanya Priya Puvvada ,
thanks for clarification.
But i didn't find any documentation on how to use preliminary uploaded files when starting an Process Automation Workflow with an API Trigger.
I just want show the use case one more time:
I think this is a valid use case that is necessary for many SAP On-Prem Users.
To clarify one more time:
API Trigger
In general i have already solved this issue, but i just wanted to point out, that it is missing in documentation. For me it was hard to get there.
I will share the experience on this use case soon.
best regards,
Wolfgang
Hi Wolfgang,
Could you elaborate on how you achieved this exactly?
Would be highly appreciated!
Best,
Kimberly
Hi Kimberly,
i entered a blog post on this topic which is under review now.
can you see it, as you are from SAP?
Use uploaded documents in Process Automation API Trigger | SAP Blogs
Otherwise, i try to tell you in a differnt way 🙂
best regards ,Wolfgang
Hi Wolfgang,
Unfortunately I do not have access to the blogs that are under review 🙁
Very curious on how you went on to solve this.
Best,
Kimberly
Good News Kimberly, now its possible 🙂
Hi Chaitanya Priya Puvvada ,
is it possible to upload files to dms and use them inside API-Trigger?
That means, that i would like to have files included in the workflow already in the first form.
Use Case:
Start Workflow ( SBPA ) from SAP Backend ( S/4 HANA ).
Step 1: Upload files to DMS, Integration Option
Step 2: Trigger API to start an Approval Workflow.
Step 3: Approval Person checks infos and uploaded documents, approves or reject WF.
Best regards,
Wolfgang
Chaitanya Priya Puvvada Just wanted to let you know what i was talking about, since this simple solution has cost me a lot of energy and desperation --> Use uploaded documents in Process Automation API Trigger | SAP Blogs
I think that's even a feature which extends use cases available for SBPA 🙂
Hi Wolfgang Fuchs :
We released the blog post, Store sample, and the Discovery Center mission on this use case in the month of May for a similar scenario. Please refer to the blog post for more details. You can refer to the SBPA learning content monthly release for more updates.
The feature request is already in the pipeline.
Hi Chaitanya Priya Puvvada
Will this feature request include a DMS SDK or something to make these steps simpler in the automation side? The sample provided in the store is nice but may still be a bit much for Citizen Developers to follow...
To simplify it for Citizen Developers, we have a future roadmap to release the activities to retrieve the attachments instead of writing the custom code.
Hi Priya,
Thanks for the detailed blog, we are facing one issue with this functionality -
Uploading a file using a DMS destination only works if we give the repoID in the URL. It automatically creates a folder inside that repo when the file is uploaded which is a dynamic folder every time. Now, if we want to download the file from DMS for further tasks using automation in SPA, how will the file be downloaded since we need to give the folder name and file name to download a file?
Somehow we should either be able to specify the folder name in the destination or have information returned when the file gets uploaded about the name of the folder.
We need to implement this scenario for one of the projects and hence your support would be very helpful!
Regards,
Mohini
Hi Mohini Verma
We have created a sample in the Store which is similar to your use case. Please refer to the same.
Hello Chaitanya, the Attachment UI element occupies full space in the approval form which is not acceptable as per our requirement. Is there any plan to show the Attachment option as an icon instead of UI element?
Attachment UI Element
Thanks,
Santosh
As of now, we don't have any plans to modify this UI element.
Hi Chaitanya,
Thanks for the detailed blog. I am facing one issue on document.
When i am trying to upload a document from process automation its getting failed although it was working earlier.
Although I have checked the destination too and i tried to upload the file individually to DMS (CMIS Repo) and its working fine.
Can you please help me out with this issue.
Please find the attached screenshot of error.
Thanks in Advance.
Shubham Kumar
Please refer to these KBA
Hello Chaitanya Priya Puvvada
Thanks for the detailed blog.
I did try to put "Upload doc" input field in SBPA approval form, but could find it in the drag and drop features.
Can you please help on this.
Thanks