Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
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.

https://sapvideoa35699dc5.hana.ondemand.com/?entry_id=1_gn550zrs,

 


 

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:

 
38 Comments
Keerthana
Participant
0 Kudos
Hi chaitanyapriya.puvvada ,

Can we use S3 Bucket for the file upload in SPA.

Regards,
Keerthana
0 Kudos

Hi chaitanyapriya.puvvada,

Is it possible to upload structure data via excel to S4 using SPA?

 

Regards,

Parthibaraja

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi keerthan_1987

At the moment, We support CMIS-based repositories.
SadiqManji
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi chaitanyapriya.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
Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert

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.

aii-nloeb
Explorer
0 Kudos
Dear chaitanyapriya.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
mhitelli
Explorer
0 Kudos
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?
soumyasharma
Discoverer
0 Kudos
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

 
Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi soumyabg

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.

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos
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?
soumyasharma
Discoverer
0 Kudos
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
Ahmed_Ajlan
Newcomer
0 Kudos

Could we upload multiple files on SAP build process automation form?

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos
ahmed-ajlan

You can upload multiple files
sub_marathe
Member
0 Kudos
HI  chaitanyapriya.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
Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert

soumyabg

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..

fuchswolfgang
Explorer
0 Kudos

Hi chaitanyapriya.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

 

fuchswolfgang
Explorer
0 Kudos
Hi sub.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

 

 
Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi sub.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.

fuchswolfgang
Explorer
0 Kudos
Hi chaitanyapriya.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:

  1. user is in S/4 Backend and uploads documents via API to DMS, Integration Option repository

  2. now he triggers a workflow from S/4 Backend ( also via API Trigger )

  3. For the Approval task we would like to use the documents the user uploaded in step 1.


 

I think this is a valid use case that is necessary for many SAP On-Prem Users.

 

To clarify one more time:


API Trigger




  1. Calling the API Trigger is straight forward. We have S/4 Hana Release 2020 FPS02 in place. works smooth.

  2. I want to have the Approval Task to already have documents attached. The documents that i uploaded before triggering the API and i use the file path in payload.


 




  1. My requirement is to already have files included here. And i didn't know how this was possible


 

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
0 Kudos
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
Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
Hi mohini.verma

We have created a sample in the Store which is similar to your use case. Please refer to the same.

KimberlyWyss
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Wolfgang,

Could you elaborate on how you achieved this exactly?

Would be highly appreciated!

Best,

Kimberly
fuchswolfgang
Explorer
0 Kudos
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
KimberlyWyss
Product and Topic Expert
Product and Topic Expert
0 Kudos
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
fuchswolfgang
Explorer
0 Kudos
Good News Kimberly, now its possible 🙂
fuchswolfgang
Explorer
0 Kudos
chaitanyapriya.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 🙂
Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

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.

SadiqManji
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi chaitanyapriya.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...

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
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.
santoshchinni
Member
0 Kudos
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
Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

As of now, we don't have any plans to modify this UI element.

subhm779
Explorer
0 Kudos

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.

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos
Shubham Kumar

Please refer to these KBA 
Sandeep_Verma
Explorer
0 Kudos
Hello chaitanyapriya.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
Animatron56
Participant
0 Kudos
Hello chaitanyapriya.puvvada ,

thank you for the great blog.

I was wondering if it is possible to use multiple repositories for a Build Process Automation and a Document Management service in the same subaccount.

We have a situation where several customers implement their use case in a Build Process Automation tenant and more than one of them wants to use the file upload functionality.

If they uploaded everything to a repo, it would be very difficult to find out who uploaded which document.

It would be great for us if we could split them up according to their repository.

Is this currently possible?

Thanks in advance!
Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
beniseeger_98

It is not possible to have multiple repositories as the Document Management Service destination that is configured in SAP BTP is mapped to a single DOcument Repository ID.

 
Animatron56
Participant
0 Kudos
chaitanyapriya.puvvada thank you for the response!

Then we will have to create separate Subaccount for them.
SARAVANAN02
Explorer
0 Kudos

Hi @Chaitanya_Priya 

This blog example demonstrates the default forms in SAP build process automation. Could you please explain how to utilize the document service in a custom UI inbox? For instance, we would like to send attachments from the Start UI and download them using the custom UI inbox. The decision-making process will be based on the attached document. Additionally, could you clarify the appropriate data type to be used for the "DownloadFile" property in this case?

Here is the code snippet:

 "properties": {
                "DownloadFile": {
                    "type": "document",
                    "title": "DownloadFile",
                    "description": "DownloadFile"
                }
            }
Thanks,
Saravanan