2025 Jan 29 6:56 AM - edited 2025 Jan 29 6:56 AM
Hi
I am trying to get the DMS Folder Content using the SAP provided activity "get DMS Folder Content", but I keep getting this error
The file Is uploaded using File Upload in SBPA Form, so initial DMS Destination is already set. I am using this activity to get the folder content
In the folder path, I am passing the hash number which I received after uploading the file. Is this the correct value? Also what specific destination we need to use the DMS Related Activities?
The documentation does not have any details around these. Appreciate if someone can help.
Thanks
Sandip
Request clarification before answering.
You are getting 405 because you are missing "root" in the path. The underlying API for this activity (I believe) is:
https://{{endpoint}}/browser/{{repo}}/root/myfolderI cannot see the full destination URL, but I assume it is not there. In any event, I would not put root in the destination but put it in the path of the activity, as then you can reuse the same destination for other purposes.
Also, this activity takes a path, not an object ID. When you said "folder ID" I assumed you meant objectID.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dan,
The destination url does not have 'root' in it, this is how it looks
Yes, when I said folderID - it is the object ID which we get once we upload a file via the SPA forms. Example of it -
spa-res:cmis:folderid:PiZaWRq8AYvDLC83fQWAbOBCcUtpiqDZ-2P4D6oeprI
So in the folderPath property of "Get DMS Folder Content" - I tried the following options
1) /root/PiZaWRq8AYvDLC83fQWAbOBCcUtpiqDZ-2P4D6oeprI
2) root/PiZaWRq8AYvDLC83fQWAbOBCcUtpiqDZ-2P4D6oeprI
neither worked, but this time I get a different error - 404 not found
Regards
Sandip
You can try knocking a square peg in a round whole but it won't work. Not your fault: Some of the DMS activities need a folder and some need an objectID.
This needs a folder.
Until they add the option for the objectID, you will have to convert the objectID to a folder, using the Get Properties API.
Go into the store and create a project from the template "How to Use Document Management Service", which provides the "old" way of doing DMS calls. There is an automation called "Get folder content", which has 2 activities -- custom script and call web service with destination. This shows you how to call DMS by creating your own call. Modify the call according to the API ... it should be quite simple.
Here is the API for Get Properties: https://api.sap.com/api/GetPropertiesApi/path/get_browser__repository_id__root
Not that you need it here, but you only need the name so you could add the query parameter filter=cmis:name to return only the name.
I have now created a blog that explains this: Convert DMS Folder ID to Name in Automation
Enjoy 😺
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to:
As for the path, yes, I think there is a missing activity allowing you to get folder content with object ID. But you can do it the "old" way directly with Web Service Call with Destination, which you can see examples of if you go to the store and import the template "How to use Document Management Service".
You'd call the Get Properties API - https://api.sap.com/api/GetPropertiesApi/path/get_browser__repository_id__root and you can filter for just the name.
Here's how it looks in Postman:
And here's how it looks in a project that gets the folder name:
Perhaps there's an easier way. I'm pretty sure development was working on adding that activity.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dan
Thanks for your reply. So, I added the destination under Control Tower -> Destination. This was missing. I also added another activity in the Automation "Select DMS", and gave the destination under its property. When I run the automation now, I do not get the Destination issue.
However I am getting another issue, "Response Code 405 (Method not allowed", I am using the standard DMS activity to get folder content (well atleast the SAP help docs says so).
Regards
Sandip
Hi Dan
Here is the destination set up,
Our Repo starts with "a4b82******" .
For Get DMS Folder Content - in the folderPath property, I tried different options but I keep getting 405 method not allowed
Option1: a4b****/TdUra3lLBAc1tM6IkUh9cLkm**** (RepoID/folderID, I got the folder ID from DMS UI)
Option2: /repoID/folderID
Option3: folderID (with & without /)
Thanks
Sandip
| User | Count |
|---|---|
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.